Difference between revisions of "USBnet Setup"

From WebOS Internals
Jump to navigation Jump to search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
USBnet allows you to create an IP network over the USB cable. This will allow you to talk to your Pre without WiFi or Bluetooth, and it keeps the battery charged.
+
= 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.
  
This page is a duplicate of [[USBnet networking setup]]
+
== Device Setup ==
 +
=== With Linux Access to Your Device ===
  
== With Linux Access ==
+
''To enable Linux Access to your device, see [[Portal:Accessing_Linux|Accessing Linux]]''
  
run
+
# Run '''usbnet enable''' as root.
 +
# Restart the device as instructed.
 +
# 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.
  
'''usbnet enable'''
+
==== 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.
as root and then restart the device as instructed. When it comes back up, run 'ifconfig' and verify you now have a usb0 interface. Mine had the IP of 192.168.0.202. The IP can be changed in /etc/network/interfaces. After a change, bounce the usb0 interface: ifdown usb0; ifup usb0
+
# Open ''/etc/dnsmasq.palm.conf'' in your editor of choice.
 
+
#* '''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
== Optional Setup to enable DHCP (so you don't have to set the IP address below) ==
+
# Add '''interface=usb0''' below the existing interface line.
 
+
# Add '''dhcp-range=192.168.0.11,192.168.0.12,12h''' below the existing dhcp-range.
#Edit /etc/dnsmasq.palm.conf  
+
# Run '''stop dnsmasq; start dnsmasq''' as root to apply the changes.
#Add interface=usb0 below the existing interface line  
 
#Add dhcp-range=192.168.0.11,192.168.0.12,12h below the existing dhcp-range  
 
#Restart the dnsmasq process: stop dnsmasq; start dnsmasq  
 
 
 
== On Windows XP ==
 
  
 +
== 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 =====
 
#Download the driver here: [http://gitorious.org/webos-internals/usbnet-pre/blobs/raw/master/windows/usbnet-pre.inf usbnet-pre windows driver(32 bit)] or [http://gitorious.org/webos-internals/usbnet-pre/blobs/raw/master/windows/usbnet-pre-64.inf usbnet-pre windows driver(64 bit)] and save the file to disk as usbnet-pre.inf  
 
#Download the driver here: [http://gitorious.org/webos-internals/usbnet-pre/blobs/raw/master/windows/usbnet-pre.inf usbnet-pre windows driver(32 bit)] or [http://gitorious.org/webos-internals/usbnet-pre/blobs/raw/master/windows/usbnet-pre-64.inf usbnet-pre windows driver(64 bit)] and save the file to disk as usbnet-pre.inf  
 
#Plug the Pre into your computer. The Add New Hardware Wizard should come up, asking to install an ethernet gadget.  
 
#Plug the Pre into your computer. The Add New Hardware Wizard should come up, asking to install an ethernet gadget.  
 
#Follow detailed instructions (screenshots and all) here if you are unfamiliar with installing drivers: [http://docwiki.gumstix.org/index.php/Windows_XP_usbnet Windows XP USBnet install]  
 
#Follow detailed instructions (screenshots and all) here if you are unfamiliar with installing drivers: [http://docwiki.gumstix.org/index.php/Windows_XP_usbnet Windows XP USBnet install]  
#When you finish, you should have a network setup. Goto "Network Connections" via Network Places or the Control Panel  
+
#When you finish, you should have a new network icon in "Network Connections"
#If you have previously installed Novacom on this machine, bring up Windows Task Manager before proceeding. You may find 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.
+
===== Network Setup =====
 +
#Goto "Network Connections" via Network Places or the Control Panel  
 
#Right-click on the new network, which probably be named Local Area Connection 2  
 
#Right-click on the new network, which probably be named Local Area Connection 2  
 
#Select Properties  
 
#Select Properties  
 
#Double click on Internet Protocol (TCP/IP)  
 
#Double click on Internet Protocol (TCP/IP)  
 
#Click Advanced  
 
#Click Advanced  
#UNCheck Automatic metric, put 100 in its place. This will keep Windows from attempting to [http://support.microsoft.com/default.aspx/kb/299540 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).
+
#Un-check Automatic metric, put 100 in its place. This will keep Windows from attempting to [http://support.microsoft.com/default.aspx/kb/299540 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).
 
#Click OK  
 
#Click OK  
#If you did not enable DHCP, you will need to set an IP address manually:  
+
===== Setting the IP Address Manually =====
##Set your IP address as 192.168.0.203 ( could be anything except 192.168.0.202, assuming this is the Pre's address)
+
# If you did not enable DHCP, you will need to set an IP address manually:  
##Subnet mask: 255.255.255.0  
+
## Set your IP address as 192.168.0.203
##Default Gateway: 192.168.0.202 (your Pre's address for the usb0 interface)
+
##* 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.
##Set DNS to your preferred servers. Addresses are not currently resolving for me, regardless of the server I use
+
## Subnet mask: 255.255.255.0  
#Hit OK  
+
## 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.
 +
## Set DNS to your preferred servers.
 +
# 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 =====
  
The network should now be setup. To verify, ssh to 192.168.0.202, and you should be prompted for a login.
+
* 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
  
== Notes: ==
+
==== Windows Vista (64-bit) ====
  
*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.  
+
* 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 [http://support.microsoft.com/kb/311272 DevCon] application.
 +
* For network setup and testing, see the relevant sections under Windows XP.
  
- From zinge: 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.
+
==== Windows 7 (64-bit) ====
  
*The 64 bit driver is unverified at this point, but I think it works.  
+
* 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.
*wayne47: 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.  
+
* For network setup and testing, see the relevant sections under Windows XP.
  
== On Mac OS X ==
+
==== Windows 7 RC Build 7100 (64-bit) ====
  
*[http://www.wikidot.com/user:info/mdklein mdklein] notes that as of 1.0.4 the g_composite driver appears to only operate usbnet in rndis mode which is not the method OS-X includes. He has made a version that implements CDC-ECM, but it breaks a few other things. Working on this.
+
* 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 ====
  
''*Allegedly, Mac OS X 10.4 should create a usb0 interface after you plug in a usbnet enabled pre. 10.5 needs a modified driver, which is not working for me (and carazy) yet. See [http://bugcommunity.com/wiki/index.php/Start_Guide_Mac_OS_X_10.5 this page] for more details.
+
USBNet driver does not work as MacOS X does not directly support RNDIS, but a third party RNDIS driver is now available: [http://www.joshuawise.com/horndis HoRNDIS].
 
 
''*I don't know of anyone that has gotten USBNet driver to work on Mac OSX at all so for the time being, count it as unsupported. If anyone can figure it out please shed some light on us.
 
 
 
MacOS X does not directly support RNDIS. The link provided is for a CDC Ethernet driver with a system-specific patch, which won't work.
 
 
 
Both [http://mac.eltima.com/sync-mac.html Syncmate] and [http://www.markspace.com/products/windowsmobile/mac/windows-mobile-sync-software.html Missing Sync] appear to provide a RNDIS driver to access WinCE devices, which '''does not''' work with the Pre/Pixi. Someone should investigate.
 
 
 
== Windows Vista (64-bit) ==
 
 
 
*If driver/device fails to come online in network sharing center, simply click start->right click computer-> properties … Click Device manager and look for the device "Linux USB Ethernet/RNDIS Gadget" you can then right click disable/enable the device. That's all.
 
*This device/driver can also be cycled with MS Windows own [http://support.microsoft.com/kb/311272 DevCon] application.
 
 
 
== 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.
 
  
== Windows 7 RC Build 7100 (64-bit) ==
+
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):
  
*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.
+
<pre><nowiki>
 +
<key>HoRNDISDevice_PRE</key>
 +
<dict>
 +
<key>CFBundleIdentifier</key>
 +
<string>com.joshuawise.kexts.HoRNDIS</string>
 +
<key>IOClass</key>
 +
<string>AppleUSBComposite</string>
 +
<key>IOProviderClass</key>
 +
<string>IOUSBDevice</string>
 +
<key>bDeviceClass</key>
 +
<integer>0</integer>
 +
<key>bDeviceProtocol</key>
 +
<integer>0</integer>
 +
<key>bDeviceSubClass</key>
 +
<integer>0</integer>
 +
</dict>
 +
</nowiki></pre>
  
== Linux Support ==
+
=== GNU/Linux ===
=== Ubuntu ===
+
==== 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.
 
* 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 order to prevent Ubuntu Linux from automatically trying to connect to the internet while the phone is connected via USBnet:  
Line 86: Line 111:
 
*** Check the box next to "Use this connection only for resources on its network"
 
*** 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
 
** Click Ok, Apply. Now you should be able to access your regular wifi/lan/internet
=== Gentoo ===
+
==== Gentoo ====
* If you are using a default kernel, this should work out of the box.
+
* 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.
 
** 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):
 
* 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
 
  Modules: usbnet cdc_ether rndis_host

Latest revision as of 10:48, 29 April 2013

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, 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):

		<key>HoRNDISDevice_PRE</key>
		<dict>
			<key>CFBundleIdentifier</key>
			<string>com.joshuawise.kexts.HoRNDIS</string>
			<key>IOClass</key>
			<string>AppleUSBComposite</string>
			<key>IOProviderClass</key>
			<string>IOUSBDevice</string>
			<key>bDeviceClass</key>
			<integer>0</integer>
			<key>bDeviceProtocol</key>
			<integer>0</integer>
			<key>bDeviceSubClass</key>
			<integer>0</integer>
		</dict>

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)