Connecting your Windows Mobile 2005 device via USB
From SynCE-Wiki
These instructions let you connect your Windows Mobile 2005 device, via USB, to your computer, using the usb-rdnis-ng tool.
Contents |
Warning
This is an older version of the driver, please use usb-rndis-lite
Prerequisites
Make sure that glib >= 2.0 and libusb, including any development packages, are installed. Other required packages that are likely to be installed already are build-essential, autoconf, automake1.9 and libtool. On Ubuntu this means:
sudo apt-get install libglib2.0-dev libusb-dev build-essential autoconf automake1.9 libtool
Your running kernel should also provide a driver called "tun". You can verify this by checking for /dev/net/tun (try running modprobe tun in case the mentioned file doesn't exist).
Just to make sure that you have an older version of automake installed as well, you should execute the following to update your preference:
sudo update-alternatives --set automake /usr/bin/automake-1.9
This to ensure that automake 1.9 is used by default.
Download Driver
Download the usb-rndis-ng driver from the Subversion repository. For this you must have a subversion installed. Execute:
svn co https://svn.sourceforge.net/svnroot/synce/trunk/usb-rndis-ng
Compile and Install
cd usb-rndis-ng/ ./autogen.sh ./configure --enable-hal make sudo make install
If you don't use or understand sudo, you can use normal su for the last two commands:
cd usb-rndis-ng/ ./autogen.sh ./configure --enable-hal make su (enter root password) make install exit
HAL Note: If you get warnings about HAL not found AND you use Ubuntu then please install libhal-dev and libhal-storage-dev
HAL Note: If you don't want to use HAL (Hardware Abstraction Layer) then omit the --enable-hal option.
Note: If your system doesn't support USB 2.0, or you're connecting your device to a non-hi-speed hub, it is recommended that you use a text-editor to adjust /usr/lib/hal/hal-usb-rndis-ng.sh to launch the driver with the "-l" option added, or the performance will be very poor.
Using the driver without HAL
Only follow this section if you are not using the HAL integration documented above.
- If you used the old usb-rndis driver then make sure it is not loaded or installed. To make sure it's unloaded, do
sudo rmmod rndis_host; sudo rmmod cdc_ether; sudo rmmod usbnet
Then runclean.sh
in the old usb-rndis/ folder to remove it automatically. If you did not use it then ignore this step. - Plug in your device.
- Run:
sudo usb-rndis-driver
The output should look something like:
$ sudo usb-rndis-driver scanning for a USB RNDIS device doing rndis_init rndis_init succeeded: major_version = 1 minor_version = 0 device_flags = 0x00000001 medium = 0 max_packets_per_message = 32 max_transfer_size = 8192 packet_alignment = 3 af_list_offset = 0 af_list_size = 0 rndis_query(OID_GEN_MAXIMUM_FRAME_SIZE) => 8050 rndis_query(OID_802_3_PERMANENT_ADDRESS) => 80:00:60:0f:e8:00 rndis_set(OID_GEN_CURRENT_PACKET_FILTER) => ok rndis0 is now up and running $
Note: If your system doesn't support USB 2.0, or you're connecting your device to a non-hi-speed hub, it is recommended that you launch the driver with the "-l" option added, or the performance will be very poor.
Assign IP address
You now must assign an IP address to the device. Run the command:
sudo dhclient3 rndis0(on fedora, I think this is just dhclient).
and you should get an output like this:
$ sudo dhclient3 rndis0 Internet Systems Consortium DHCP Client V3.0.4 Copyright 2004-2006 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Listening on LPF/rndis0/80:00:60:0f:e8:00 Sending on LPF/rndis0/80:00:60:0f:e8:00 Sending on Socket/fallback DHCPDISCOVER on rndis0 to 255.255.255.255 port 67 interval 7 DHCPOFFER from 169.254.2.1 DHCPREQUEST on rndis0 to 255.255.255.255 port 67 DHCPACK from 169.254.2.1 bound to 169.254.2.2 -- renewal in 1184723 seconds. $
If you get the output:
bash: dhclient3: command not found
then you have two options:
- Assign the IP address statically by executing the following:
-
ifconfig rndis0 169.254.2.2 netmask 255.255.255.0 up
-
- Install the dhcp3-client package and then run the previous command again.
Note: Using an older version of dhclient can lose your gateway information.
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:
