USBnet Setup

From WebOS Internals

Revision as of 11:01, 19 March 2011 by IDG (Talk | contribs)
Jump to: navigation, search

Contents

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.

Device Setup

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.
    • Note the IP Address listed, it is needed in the Computer Setup. The default should be 192.168.0.202.
    • If desired, the IP can be changed in /etc/network/interfaces.
      • 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. Add interface=usb0 below the existing interface line.
  3. Add dhcp-range=192.168.0.11,192.168.0.12,12h below the existing dhcp-range.
  4. Run stop dnsmasq; start dnsmasq as root to apply the changes.

Computer Setup

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.

Windows XP

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:
    1. Set your IP address as 192.168.0.203
      • 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.
    2. Subnet mask: 255.255.255.0
    3. Default Gateway: 192.168.0.202
      • 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.
    4. Set DNS to your preferred servers.
  2. 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.

Notes
  • This has only been tested on Windows XP 32 bit. For Windows 2000, you will need an additional download from Microsoft. The link is in the header of the INF file.
  • I have several confirmations via the precentral forums that this only works on XP SP3. SP2 gives "error code 10, the device cannot start". Has anyone followed this process and had it work on XP SP2? Update: Upgraded to SP3 on my laptop, and it immediately started working. - zinge
  • The 64 bit driver is unverified at this point, but I think it works.
  • I was having all kinds of issues with this on my WinXP notebook. Clicking on the safely remove hardware icon in the tray indicated two devices associated with the Pre: Novacom and a USB drive. Stopping the Novacom service resolved the issues. Note that I need to do this each time that I attach the Pre via USB. - wayne47
  • In Step 9. UNCheck Automatic metric, put 100 in its place. - Sniperlcd
    • I put 100 and it didn´t work, but when i put 10, it worked.... i think metric should be 10

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.

Apple MacOS

Mac OS X

  • USBNet driver does not work as MacOS X does not directly support RNDIS.
  • Both Syncmate and Missing Sync appear to provide a RNDIS driver to access WinCE devices, which does not work with the Pre/Pixi. Someone should investigate.

GNU/Linux

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

  • 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):
Modules: usbnet cdc_ether rndis_host
Kernel Options:
 Device Drivers  --->
  [*] Network device support  --->
   USB Network Adapters  --->
    <M> Multi-purpose USB Networking Framework
    <M>   CDC Ethernet support (smart devices such as cable modems)
    <M>   Host for RNDIS and ActiveSync devices (EXPERIMENTAL)
Personal tools
Google AdSense