When user plugs device to USB (Bluetooth is similar).

  1. User plugs Windows Mobile device into USB. Hub realizes this and notifies system.
  2. Hotplug loads kernel drivers (cdc_ether.ko, ...). Network interface is created and HAL is notified about this.
  3. HAL executes configuration scripts for that device, which mostly launch DHCP client daemon which obtains IP address from the device.
  4. The device opens TCP connection to the host on TCP port 990 and scenario continues in odccm and vdccm daemons.

Some handshake steps have to be performed before a stable initial connection between the device and the host is established. This handshake is fully implemented in odccm and vdccm.

  1. The device connects to the host on TCP port 990.
  2. After esteblishing this TCP connection, the device sends four bytes {0x00, 0x00, 0x00, 0x00} via that connection to the host.
  3. The host has to respond with four bytes also {0x03, 0x00, 0x00, 0x00}.
  4. The device answers that response by again sending four bytes {0x04, 0x00, 0x00, 0x00} to the host.
  5. The host must not send a response to that answer. Instead, the device transmits the DeviceInfoPackage to the host.

  6. The connection is established.
  7. To keep the connection up, the host has to send ping packages consisting of {0x01, 0x00, 0x00, 0x00} to the device periodically (ActiveSync does this every 40th second).

  8. The device responds to a ping by sending the four bytes {0x02, 0x00, 0x00, 0x00}.

TechnicalInformation/InitalConnection (last edited 2008-09-21 19:07:02 by petr.bug)