Connecting your Windows Mobile 2005 device via USB (usb-rndis) (old)


From SynCE-Wiki

Windows Mobile 2005 Support: Installing SynCE, Connecting Your Device, Using SynCE, Troubleshooting

These instructions let you connect your Windows Mobile 2005 device, via USB, to your computer, using the usb-rdnis kernel module.

Contents

Warning

This is an older version of the driver, please use usb-rndis-lite

Before you start

usb-rndis does not yet work with Intel PXA27x-based devices because of their flaky USB client implementation. These devices require a work-around of some sort, which the ActiveSync driver does, but it is at this point unknown what it is. If you try to connect such an unsupported device, you will get the error message:

rndis_host 3-2:1.0: rndis_host WM5 r17
rndis_host 3-2:1.0: use_status = 1, send_keepalives = 1
rndis_host 3-2:1.1: bulk IN: 0x82 (0x2), bulk OUT: 0x3 (0x3)
rndis_host 3-2:1.0: sending RNDIS_MSG_INIT
rndis_host 3-2:1.0: status ep1in, 8 bytes period 3
rndis_host 3-2:1.0: rndis response timeout waiting for status ep
rndis_host 3-2:1.0: RNDIS init failed, -110
usb%d: intr shutdown, code -2
rndis_host: probe of 3-2:1.0 failed with error -110

Until someone with such a device steps up and fixes the driver, this will unfortunately remain an unresolved issue. There are two other option of connectivity: use bluetooth or look for a tool to switch your device to usb-serial in which case you can use the ipaq module instead of rndis (best source is the manufacturer site or use this link at your own risk: http://idisk.mac.com/robinjackson-Public).

Download Driver

Download the usb-rndis driver from the Subversion repository. For this you must have a subversion installed. Execute:

svn co https://svn.sourceforge.net/svnroot/synce/trunk/oleavr-files/usb-rndis

Compile and Install

Note: you must have your Kernel Headers installed:

cd usb-rndis/
make
sudo ./clean.sh
sudo make install

If you don't use or understand sudo, you can use normal su for the last two commands:

cd usb-rndis
make
su
(enter root password)
./clean.sh
make install

If you get no errors with the last step, you can plug your device into the computer. This should automatically load the new usb-rndis driver that was just installed.

Find Device Interface

You must now find out the interface that will be used by usb-rndis. Execute the following command:

dmesg | grep "eth[0-9]: register" | grep "rndis_host" | tail -1

If everything went smoothly then you should have been outputted a line like this:

eth1: register 'rndis_host' at usb-0000:00:10.1-2.1, RNDIS device, 80:00:60:0f:e8:00

The interface in this example is eth1. This is the interface that the device will use to connect to the computer.

Assign IP address

You now must assign an IP address to the interface.

Note: it is possible to use DHCP, but in some cases (where dhcp-client < v3), the DNS server that has been sent by the device (there is none, but it still..) wipes all existing DNS servers from /etc/resolf.conf. However, using DHCP does work, it just may bring down other interfaces. This scenario has been tested under these conditions:

  • Ubuntu Linux - Dapper (6.06): using DHCP works and does not alter /etc/resolv.conf. The dhcp3-client package is installed.
  • Debian GNU/Linux (using unstable repositories): using DHCP does remove other DNS servers from /etc/resolf.conf. The version of dhcp-client installed is 2.0pl5-19.4. However, there is a dhcp3-client package available but not installed. Installing this would probably fix this problem.

Assign static IP

To assign the device an IP address you must use the following command (as root):

ifconfig eth1 169.254.2.2 netmask 255.255.255.0 up

where eth1 is the interface that was found in the last step. This command sets the interface to IP address 169.254.2.2 and sets the Netmask to 255.255.255.0. The up at the end of the command brings up the interface.

Assign IP using DHCP

To assign IP address using DHCP, execute the following command as root:

dhclient eth1

where eth1 is the interface that was found in the last step. Note: on some distributions, the command dhclient3 is used instead of dhclient. Something like the following should be outputted at the end:

DHCPOFFER from 169.254.2.1
DHCPREQUEST on eth1 to 255.255.255.255 port 67
DHCPACK from 169.254.2.1
bound to 169.254.2.2 -- renewal in 1296000 seconds.

This means that the interface, eth1 has been assigned the IP address 169.254.2.2 by the device, which is using the IP 169.254.2.1.

Success

Well done! You now have the device and computer successfully connected! Next, you must install SynCE to use your connection to your device. Next step:

Starting A Connection

Troubleshooting

Computer Freezes in Operation

This is a kernel panic and there is currently no way around this problem. The following is the log that is found in /var/log/kern.log, entered just before the computer freezes:

Aug 10 23:36:20 localhost kernel: eth0: wow, got some OOB data
Aug 10 23:36:20 localhost kernel:
Aug 10 23:36:20 localhost kernel: eth0: bad rndis message 0x06800040/-22439270/-22478590/201589250, len 1920
Aug 10 23:36:21 localhost kernel: eth0: wow, got some OOB data
Aug 10 23:36:21 localhost kernel:
Aug 10 23:36:21 localhost kernel: eth0: bad rndis message 0x06800040/-22446182/-22478590/201589250, len 1496
Aug 10 23:36:22 localhost kernel: eth0: wow, got some OOB data
Aug 10 23:36:22 localhost kernel:
Aug 10 23:36:22 localhost kernel: eth0: bad rndis message 0x06800040/-22446180/-22478590/201589250, len 9056
Aug 10 23:36:22 localhost kernel: eth0: wow, got some OOB data
Aug 10 23:36:22 localhost kernel:
Aug 10 23:36:22 localhost kernel: eth0: bad rndis message 0xd1ad95e4/-1512041443/604847522/-985073907, len 600