USBnet Setup

= Introduction = USBnet allows you to create an IP network over the USB cable. This will allow you to talk to your WebOS Device without WiFi or Bluetooth, and it keeps the battery charged.

With Linux Access to Your Device
To enable Linux Access to your device, see Accessing Linux


 * 1) Run usbnet enable as root.
 * 2) Restart the device as instructed.
 * 3) After the reboot, run ifconfig as root and verify you now have a usb0 interface.
 * 4) * Note the IP Address listed, it is needed in the Computer Setup. The default should be 192.168.0.202.
 * 5) * If desired, the IP can be changed in /etc/network/interfaces.
 * 6) ** After a change, run ifdown usb0; ifup usb0'' as root to pick up the change.

Optional Setup to enable DHCP
If you do not want to have to manually setup the network on your computer, do the following to enable the DHCP server on your device to serve requests on the usb0 interface.
 * 1) Open /etc/dnsmasq.palm.conf in your editor of choice.
 * 2) * vi is available on a stock WebOS Device, for a quick tutorial on its use, see: http://www.unix-manuals.com/tutorials/vi/vi-in-10-1.html
 * 3) Add interface=usb0 below the existing interface line.
 * 4) Add dhcp-range=192.168.0.11,192.168.0.12,12h below the existing dhcp-range.
 * 5) Run stop dnsmasq; start dnsmasq as root to apply the changes.

Microsoft Windows
''Note: If you have previously installed Novacom, bring up Windows Task Manager before proceeding. Once you install USBnet with the instructions below, you may discover a conflict between USBnet and novacomd where the novacomd process will consume lots of CPU and your machine will become very unresponsive. Since you have Task Manager up already, you can easily use it to kill novacomd if this occurs.''

Driver Installation

 * 1) Download the driver here: usbnet-pre windows driver(32 bit) or usbnet-pre windows driver(64 bit) and save the file to disk as usbnet-pre.inf
 * 2) Plug the Pre into your computer. The Add New Hardware Wizard should come up, asking to install an ethernet gadget.
 * 3) Follow detailed instructions (screenshots and all) here if you are unfamiliar with installing drivers: Windows XP USBnet install
 * 4) When you finish, you should have a new network icon in "Network Connections"

Network Setup

 * 1) Goto "Network Connections" via Network Places or the Control Panel
 * 2) Right-click on the new network, which probably be named Local Area Connection 2
 * 3) Select Properties
 * 4) Double click on Internet Protocol (TCP/IP)
 * 5) Click Advanced
 * 6) Un-check Automatic metric, put 100 in its place. This will keep Windows from attempting to route traffic over the Pre (it won't work anyway). Note: 100 may be too high. If it seems that network traffic is being routed to the pre (IE - your internet connection apparently dies), try setting this to something lower (like 60).
 * 7) Click OK

Setting the IP Address Manually

 * 1) If you did not enable DHCP, you will need to set an IP address manually:
 * 2) Set your IP address as 192.168.0.203
 * 3) * This could be anything except the IP address of the WebOS device's usb0 interface, if you changed the IP Address of the device, make sure to choose an IP address on the same subnet.
 * 4) Subnet mask: 255.255.255.0
 * 5) Default Gateway: 192.168.0.202
 * 6) * This should be the IP address of the WebOS device's usb0 interface, if you changed the IP Address of the device, make sure to use that.
 * 7) Set DNS to your preferred servers.
 * 8) Hit OK

Testing the Connection
The network should now be setup. To verify the connection, ssh to the IP Address of your WebOS device's usb0 interface. If unchanged it should be 192.168.0.202. If everything is setup properly, you should be prompted for a login.

Windows Vista (64-bit)

 * If driver/device fails to come online in network sharing center, go to Start->(Right Click) Computer->Properties->Device Manager and look for the device "Linux USB Ethernet/RNDIS Gadget" you can then right click and disable/enable the device.
 * This device/driver can also be cycled with MS Windows own DevCon application.
 * For network setup and testing, see the relevant sections under Windows XP.

Windows 7 (64-bit)

 * Windows 7 has the driver it needs already, but it won't set it up by itself.  The driver you want is under "Microsoft Corporation" > "Remote NDIS based Internet Sharing Device.".  See http://mytether.net/#other for complete directions.
 * For network setup and testing, see the relevant sections under Windows XP.

Windows 7 RC Build 7100 (64-bit)

 * User lars47 confirms this is working on Windows 7 x64. Wrestled with the driver installation at first, it would not install, Windows complained of a file in use. I rebooted, and the next time I plugged in the Pre via USB, it "just worked". Unsure if I caused the problem, or if a reboot is required/recommended.
 * For network setup and testing, see the relevant sections under Windows XP.

Mac OS X
USBNet driver does not work as MacOS X does not directly support RNDIS, but a third party RNDIS driver is now available: HoRNDIS.

The following entry needs to be added to the IOKitPersonalities dictionary of the driver's Info.plist to match Pre/Pre+/Pre2 (I don't have other devices to test):

HoRNDISDevice_PRE CFBundleIdentifier com.joshuawise.kexts.HoRNDIS IOClass AppleUSBComposite IOProviderClass IOUSBDevice bDeviceClass 0 			 bDeviceProtocol 0 			 bDeviceSubClass 0

Ubuntu

 * Once usbnet was enabled on the Pre, my Ubuntu 9.04 (64 bit) immediately identified the Pre in the NetworkManager and worked without modification to the OS. It seems to already have a driver that works.
 * In order to prevent Ubuntu Linux from automatically trying to connect to the internet while the phone is connected via USBnet:
 * In the Network Manager icon, click "Edit Connections"
 * Select the usb0 interface and select "Edit"
 * Uncheck the box that says "Connect Automatically" (this is optional, but could prevent headaches)
 * Under IPv4 Settings select Routes
 * Check the box next to "Use this connection only for resources on its network"
 * Click Ok, Apply. Now you should be able to access your regular wifi/lan/internet

Gentoo
Modules: usbnet cdc_ether rndis_host Kernel Options: Device Drivers ---> [*] Network device support ---> USB Network Adapters --->  Multi-purpose USB Networking Framework   CDC Ethernet support (smart devices such as cable modems)   Host for RNDIS and ActiveSync devices (EXPERIMENTAL)
 * If you are using a default kernel, and you enabled DHCP on the WebOS Device, this should work out of the box.
 * Simply run as root dhcpcd usb0 once the device is connected.
 * If you did not enable DHCP, see the Windows XP section for the relevant TCP/IP information.
 * If you are using a custom kernel, make sure you have usbnet, cdc_ether and rndis_host either compiled-in or available as modules. The relevant kernel options are (from kernel 2.6.36-gentoo-r5):