public DeviceDescriptor Connect(string address)
        {
            int    port = 4757;
            string ip   = address;

            if (address.Contains(":"))
            {
                ip = address.Split(':')[0];
                int.TryParse(address.Split(':')[1], out port);
            }
            DdClient client = new DdClient();

            if (!client.Open(ip, port))
            {
                throw new Exception("No server was found!");
            }
            var devices = client.GetDevices();

            if (devices.Count == 0)
            {
                throw new Exception("No connected device was found!");
            }

            client.Connect(devices[0]);
            DdServerProtocol protocol = new DdServerProtocol(client);

            if (CameraDeviceManager.GetNativeDriver(protocol.Model) != null)
            {
                DeviceDescriptor descriptor = new DeviceDescriptor {
                    WpdId = "ddserver"
                };
                var cameraDevice = (ICameraDevice)Activator.CreateInstance(CameraDeviceManager.GetNativeDriver(protocol.Model));
                descriptor.StillImageDevice = protocol;

                //cameraDevice.SerialNumber = StaticHelper.GetSerial(portableDevice.DeviceId);
                cameraDevice.Init(descriptor);
                descriptor.CameraDevice = cameraDevice;
                return(descriptor);
            }
            else
            {
                throw new Exception("Not Supported device " + protocol.Model);
            }
        }
        public DeviceDescriptor Connect(string address)
        {
            string ip = address;

            if (address.Contains(":"))
            {
                ip = address.Split(':')[0];
                int port;
                int.TryParse(address.Split(':')[1], out port);
            }
            PtpIpClient client = new PtpIpClient();

            if (!client.Open(ip, 15740))
            {
                throw new Exception("No server was found!");
            }
            PtpIpProtocol protocol = new PtpIpProtocol(client);

            protocol.ExecuteWithNoData(0x1002, 1);

            if (CameraDeviceManager.GetNativeDriver(protocol.Model) != null)
            {
                DeviceDescriptor descriptor = new DeviceDescriptor {
                    WpdId = "ptpip"
                };
                var cameraDevice = (ICameraDevice)Activator.CreateInstance(CameraDeviceManager.GetNativeDriver(protocol.Model));
                descriptor.StillImageDevice = protocol;
                descriptor.CameraDevice     = cameraDevice;
                //cameraDevice.SerialNumber = StaticHelper.GetSerial(portableDevice.DeviceId);
                cameraDevice.Init(descriptor);
                return(descriptor);
            }
            else
            {
                throw new Exception("Not Supported device " + protocol.Model);
            }
        }