Networking

(Ethernet)
(Ethernet)
Line 128: Line 128:
Wired Networking using USB host mode and OS 2008
Wired Networking using USB host mode and OS 2008
-
Legacy Instructions:
+
'''Legacy Instructions:'''
Save the following .deb packages [http://p7230.homelinux.com/os2008/dbus-scripts_1.0.3_armel.deb dbus-scripts] and [http://p7230.homelinux.com/os2008/usbLAN_0.4.6_armel.deb usbLAN] to Documents.
Save the following .deb packages [http://p7230.homelinux.com/os2008/dbus-scripts_1.0.3_armel.deb dbus-scripts] and [http://p7230.homelinux.com/os2008/usbLAN_0.4.6_armel.deb usbLAN] to Documents.
Line 138: Line 138:
If you have a USB=>Ethernet dongle with the RTl8150 chipset, specifically the Linksys USB100M (ebay about $15 w/ shipping) then it should be plug and play. Plug ethernet cable into adapter dongle, dongle into USB OTG cable and OTG cable into N810. It should automatically connect to the dummy IAP "WIRED" and then "Unable to to connect, no file system available" should popup. At this point, you should be able to ping google.com and web browse.
If you have a USB=>Ethernet dongle with the RTl8150 chipset, specifically the Linksys USB100M (ebay about $15 w/ shipping) then it should be plug and play. Plug ethernet cable into adapter dongle, dongle into USB OTG cable and OTG cable into N810. It should automatically connect to the dummy IAP "WIRED" and then "Unable to to connect, no file system available" should popup. At this point, you should be able to ping google.com and web browse.
-
Current Instructions:
+
'''Current Instructions:'''
Thanks to the USB Host mode it's possible to setup and utilize a wired network connection for those times when you want to use your IT but don't have access to wifi (or there just isn't any wifi around to use). A good example of this type of scenario is in hotel rooms while traveling around; most have wired high speed connections in the rooms but don't offer any kind of wifi connectivity. Although it's possible to carry around a small wifi router, it can be a bit more cost effective and convenient to connect the tablet to the wired connection directly.  
Thanks to the USB Host mode it's possible to setup and utilize a wired network connection for those times when you want to use your IT but don't have access to wifi (or there just isn't any wifi around to use). A good example of this type of scenario is in hotel rooms while traveling around; most have wired high speed connections in the rooms but don't offer any kind of wifi connectivity. Although it's possible to carry around a small wifi router, it can be a bit more cost effective and convenient to connect the tablet to the wired connection directly.  

Revision as of 02:26, 19 October 2009

The Comprehensive Alternative Networking Guide

A lot of the alternative networking methods on this wiki and in the forum have out-date information. This guide is for OS2008 Diablo. For more detailed information on a specific interface see the relevant wiki page or search the forums.

(FYI: to add a new page to the wiki just navigate to it http://wiki.maemo.org/your-new-page this was not obvious to me until I remembered how wikipedia is set up)


We will cover: built-in wifi (Managed), external USB wifi (r8187), ethernet (via USB), bluetooth PAN, usb networking, and forwarding traffic to a wired computer.

Contents

Built-in wifi (Managed)

The built-in wireless card is pictured in detail here: http://talk.maemo.org/showthread.php?t=30032

This interface is wlan0 and uses the closed-source cx3110x driver. For the NITdroid project an open-source driver http://stlc45xx.garage.maemo.org was created. As it stands, the internal wifi chipset is not capable of injection with either of these drivers.

A useful utility is WifiInfo which shows signal strength, internal IP address, power savings toggle and a AP scan option.

External USB wifi (r8187)

This is the legacy drive for the RTL8187 chipset. The Alfa 500mW b/g usb adapter uses this as do knock-offs. The Alfa goes for about $35, while the knock-off is about $25.

You are going to need more power than the N810 can provide for itself. There are many ways to do this. EXAMPLES of power injection

Download and untar this archive containing the compiled drivers. For example, download here to Documents

# cd /home/user/MyDocs/.documents/
# tar -xvf rtl8187_diablo.tar
# cd rtl8187/

Make script executable

# chmod a+x r8187-start

Script:

echo host > /sys/devices/platform/msusb_hdrc/mode
insmod ieee80211_crypt-rtl.ko
insmod ieee80211-rtl.ko
insmod r8187.ko
echo -n 1 > /sys/bus/usb/devices/1-1/bConfigurationValue

The first line tells the N810 to set the USB mode as host The next 3 lines insert the kernel modules in the right order. The last line is optional, if you have a proper powered hub comment it out, if you are using a y-cable or similar then this tells the N810 to ignore the lack of power messages and use the device anyway. No, this will not work if you do not have the full power requirements; it is merely for when you fulfill the power requirement and the device does not know it.

Plug the microusb end into your N810. A couple error message will pop up, these are normal and just ignore them."usb device not supported". then "Unable to connect, no file system available" (hit OK)

# lsusb        (as root, else there will be no output)
Bus 001 Device 012: ID 0bda:8187 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 0000:0000

if no output then you are not root. If the Realtek doesn't show up then try lsusb a few more times, if that doesn't work it means that the wifi card is not being supplied enough power. That is the tricky part regarding external (also card chipset must be supported) usb wifi cards.

Now time to execute the script

$ ./r8187-start

No output should show (if you run this too early, as in before the popup error messages then it might also have no output). If you have already run this script this session (haven't turned off N810 since) then it will state that it can't insert the kernel modules. If it states that "/sys/bus/usb/devices/1-1/bConfigurationValue" does not exist, it means it is not getting enough power. It might also state that if you have not plugged the cable in.

At this point let's see if everything works.

# bash
# airmon-ng
Interface	Chipset		Driver
wlan0		Nokia 770	cx3110x
wlan1		RTL8187		r8187
# airodump-ng wlan1

At this point we are not using aircrack-ng suite for nefarious use. We are using it because it's reliable and the built-in (and community created) tools are hard-coded for wlan0. A list of APs/routers should appear as it sees them. We are doing this in leu of a proper scanner (Connections and WifiInfo are hard-coded and iwlist scan wlan1 doesn't work for some reason)

connect to router

connect to AP/router

# iwconfig wlan1 essid MYNETWORKHERE

input key to open AP

# iwconfig wlan1 key off

check to see if associated with AP

# iwconfig wlan1

obtain IP address via DHCP (if obtaining leave fails, just run command again until it succeeds)

# /sbin/udhcpc -n -q -i wlan1

select DUMMY from Network connection dialog box and browse the web!

If browsing doesn't work, then check if you can ping IP

ping 4.2.2.2

If that works but ping google.com doesn't then DNS isn't working

nano /etc/resolv.conf

And make sure a line like this exists:

NAMESERVER	192.168.1.1

which should point to your router's admin page (default gateway).


nefarious use warning

while on the subject, instead of connecting to router, let's change the mode from Managed to Monitor (injection-capable)

# airmon start wlan1

Now run airodump to capture packets

# airodump-ng wlan1 -w savedfile 

Choose a channel to increased efficiency

# airodump-ng wlan1 -w savedfile -c 6

Open a new terminal window or tab to run some attacks while airodump is running. First we test if injection is working. Not all routers are suseptable to packet injection, range is also a major factor. If at least one router gets over 0% then injection is in fact working correctly.

# aireplay wlan1 -9

Deauthenticate attack. The X's are the BSSID of the Access Point/Router

# aireplay wlan1 -0 0 -a XX:XX:XX:XX:XX:XX

Deauthenticate user with the c parameter.

# aireplay wlan1 -0 0 -a XX:XX:XX:XX:XX:XX -c XX:XX:XX:XX:XX:XX

Fake authentication.

# aireplay wlan1 -1 5 -a XX:XX:XX:XX:XX:XX

ARP attack. Takes awhile to start injecting packets. ARPs good, ACKs bad.

# aireplay wlan1 -3 -b XX:XX:XX:XX:XX:XX

Ethernet

Wired Networking using USB host mode and OS 2008

Legacy Instructions:

Save the following .deb packages dbus-scripts and usbLAN to Documents.

# cd /home/user/MyDocs/.documents/
# dpkg -i dbus-scripts_1.0.3_armel.deb
# dpkg -i usbLAN_0.4.6_armel.deb

If you have a USB=>Ethernet dongle with the RTl8150 chipset, specifically the Linksys USB100M (ebay about $15 w/ shipping) then it should be plug and play. Plug ethernet cable into adapter dongle, dongle into USB OTG cable and OTG cable into N810. It should automatically connect to the dummy IAP "WIRED" and then "Unable to to connect, no file system available" should popup. At this point, you should be able to ping google.com and web browse.

Current Instructions:

Thanks to the USB Host mode it's possible to setup and utilize a wired network connection for those times when you want to use your IT but don't have access to wifi (or there just isn't any wifi around to use). A good example of this type of scenario is in hotel rooms while traveling around; most have wired high speed connections in the rooms but don't offer any kind of wifi connectivity. Although it's possible to carry around a small wifi router, it can be a bit more cost effective and convenient to connect the tablet to the wired connection directly.

In order to do this you need to make sure that you have USB Host mode up and working properly (whether via cable to software switch; see the HOWTO: USB Host mode on the N800 using OS 2008 entry for details). OS 2008 natively supports USB adapters based upon the RTL8150 chipset such as the Linksys USB100M; however it's possible to find other devices that are supported by custom compiled modules.

If you're looking for a "ready to go" solution simply pick up a supported USB100M along with your USB OTG adapter from here.

Once you've got some compatible hardware ready to go, the easiest step is to next install the USB LAN Package. The USB LAN Package has been updated to overcome the OTG removal problem. You can get a copy of the updated package to install into the Application Manager here. The updated version of the package utilizes the dbus-scripts package, which can also be easily installed by following this link on your tablet.

The USB LAN Package has been updated to support the latest version of Diablo as of 08/21/08; if you're having problems make sure that you have version 0.4.6 installed.

The package will setup a few scripts and install all of the additional USB LAN drivers that are available for the OS:

catc.ko dm9601.ko kaweth.ko mcs7830.ko pegasus.ko rt73.ko (Added in 0.4.6 for external USB Wifi adapters) (Anyone who knows other commonly supported and tested working devices using these drivers, please add them to the end of this entry).

Contents 1 Step by Step 2 Performance 3 Tested Devices 4 Wishlist


Step by Step Install Dbus-scripts by clicking here Install USB LAN Package by clicking here Once the packages are installed any RTL8150 device will operate as follows:

Connect USB device to LAN cabling. Connect USB device to ITT. Wait for USB messages to popup ("USB Device Not Supported", "No Filesystem Found"). Launch your web browser or whatever application you want to use. As soon as you connect the adapter the "WIRED" connection will automatically be selected. Surf and enjoy.

For devices other than those based on the RTL8150 you'll manually need to call "usbEthUp.sh" after you connect your device, and "usbEthDown.sh" after you remove it to get the network settings in place. These scrips can be found at /usr/sbin

When you're done with your wired connection simply unplug the network adapter from the USB host cable (this lets the tablet recognize that the adapter has been unplugged), then disconnect your host cable from the tablet (and manually set it out of host mode if required). Also, don't forget to choose "Disconnect" from the connection window (click on the little wifi icon), or your tablet will try to stay connected to "WIRED" until you restart or manually force a new connection.


Performance Do not expect a wired connection to help you gain faster transfer speeds. In testing I've found that the CPU on the tablet maxes out at approximate 5-7 Mbps, well beneath the threshold of Wired networks or USB connectivity. (Can others support to debunk this?)

This is also an important consideration regarding the type of network adapter you select to use. The Linksys USB100M for example is only listed as USB 1.1, not 2.0, but still functions above the maximum sustainable speed of the tablet. Conversely, while the 2.0 version of the same device should work, it required additional drivers and actually requests more power than the USB OTG chip in the Tablet is willing to provide, so you'd end up needing an externally powered USB hub to use it. Thus while the USB 2.0 adapter might seem better, in actually for the ITs it's a worse choice.

(Information about setting up static IPs/etc requested).


Tested Devices How to test:

1. Make sure you have the latest driver and scripts installed as noted above. You will also need becomeroot installed 2. Open xterm on your internet tablet 3. Connect your usb adapters (including OTG adapter if you are using that product) 4. Connect your usb ethernet device 5. You will see error messages that can be ignored 6. Type sudo becomeroot into xterm and press Enter 7. Type /usr/sbin/usbEthUp.sh into xterm and press Enter 8. Note messages. A successful connection will be indicated by an acquired IP address (Lease xxx.xxx.xxx.xxx obtained, where xxx. represents parts of an IP address) 9. Type dmesg into xterm and press Enter 10. Scroll up through messages until you discover text describing the ethernet adapter, containing codes prefixed by v (vendor code) and p (product code). The characters following v and p will be entered into the appropriate fields as shown below 11. Any unknown information should be added after the corresponding field as Unknown


The following usb ethernet devices have been tested with this solution:

Model: Crystal Blue USB to Ethernet 10/100 LAN Adapter Ethernet chipset: Davicom DM9601 USB Ethernet http://www.davicom.com.tw/page1.aspx?no=143762 Vendor ID: 0a46 Product ID: 9601 External power required: No Functionality: Success is sporadic with these; they are technically okay, but lacking in reliability. Out of 4 tested by me, 2 worked Cost: Low to very low Status: Not recommended Notes: This adapter is seen all over ebay, usually in translucent blue but variants are also found in clear, white and black. FYI, a freebsd patch to get it to work on that OS is posted at http://readlist.com/lists/freebsd.org/freebsd-current/10/52177.html Tested by: Texrat

Model: SMC EZ Connect USB 2202USB/ETH Ethernet chipset: ADMtek ADM8511 Vendor ID: 0707 Product ID: 0200 External power required: No Functionality: Works very well, very quick internet access Cost: Moderate to low Status: Highly recommended Notes: Adapter did not work with earlier releases of tablet driver. Uses detachable usb pigtail Tested by: Texrat

Model: Targus ACP50 universal notebook hub (various ports; US and European versions available) Ethernet chipset: ADMtek 8515 Vendor ID: 0451 (hub) Product ID: 2036 (hub) Vendor ID: 07a6 (ethernet) Product ID: 8515 (ethernet) External power required: Yes Functionality: Works well, very stable Cost: High to moderately high Status: Recommended Notes: Hub loses ethernet and usb functionality if it is simultaneously used as USB charging solution for tablet Tested by: Texrat

Model: Trendnet TU-ET100C Ethernet chipset: ADMtek ADM8511 "Pegasus II" Vendor ID: 07a6 Product ID: 8511 External power required: No Functionality: Works well, very stable Cost: US$15-25 as of October 2008 Status: Recommended Notes: Non-detachable tail, approximately 3 feet long. Only one light. Addendum by Texrat: noted by one tester as drawing an unusually high amount of current ("more than N810's 192 mA limit"). See http://internettablettalk.com/forums/showpost.php?p=242053&postcount=88 Tested by: SKarp

Model: Netgear EA101 USB Ethernet Ethernet chipset: Kawasaki LSI KL5KLUSB101B Vendor ID: 0846 Product ID: 1001 External power required: No Functionality: Works well, quick internet access Cost: Moderate to low Status: Recommended Notes: Form factor is a bit bulky, but it has indicator lights for power, link/activity and packet collisions. Uses detachable usb pigtail. Other adapters that use this chipset are the LinkSys USB10T, the 3Com 3c19250, the ADS Technologies USB-10BT, the Peracom USB Ethernet Adapter, the Entrega NET-USB-E45 and NET-HUB-3U1E, the ATen UC10T, the D-Link DSB-650, Corega USB-T and the SMC 2102USB and 2104USB (from http://www.mavetju.org/mail/view_message.php?list=freebsd-doc&id=1493000) Tested by: Texrat

Model: DIGITUS 10/100 Mbps Fast Ethernet USB adapter DN-3015 Ethernet chipset: RTL8150 Fast Ethernet Adapter Vendor ID: 0x0bda Realtek Semiconductor Corp Product ID: 0x8150 RTL8150 Fast Ethernet Adapter External power required: No Functionality: Works well Cost: EUR 13.- (Feb. 2009) Status: Recommended Tested by: walto


Wishlist

-automatic detection and activation of all devices passing functionality test (i.e., plug and play)

-advanced control panel configuration (helpful for static IP, etc)

Bluetooth PAN

On the host computer, install blueman. BlueMan. Not bluemon (installed by default). Reboot (or you could open a terminal and run blueman-applet).

  • Blueman>Local Services>Network>
    • Check "Group Network" and "Network Access Point (NAP)".
    • Select dnsmasq, change IP address to 192.168.3.14.
    • Check "Enable Routing (NAT)"
    • Finally select "Let Blueman handle the network interfaces"
  • Apply.

Pair tablet with computer.

  • Select BT applet>Devices>New.
  • Select your computing device and Pair.
    • The computer will popup (sometimes minimized) asking for the passcode that the tablet provides. Make sure "trusted" is checked. If you SElinux installed it may ask if you want to always set as trusted, do so.

Go here and follow directions to install PC Connectivity Manager packages.

  • Settings>Control Panel>PC-Connectivity Manager>Advanced
    • Select [...] next to Environments>New>Name it bluetooth.
      • Connection type>Bluetooth>Options select enable.
        • Under "Bluetooth address" click Search to pair with your computer.
  • Click Save>Basic (make sure Bluetooth is checked)>Apply.
  • If you SElinux installed on your computer it may ask if you want to always set as trusted, do so.
  • The BT icon/applet should now be blue.

Now open nano or your favorite text editor as root

# nano /etc/resolv.conf

and add the router's IP/gateway to the file on a new line

NAMESERVER 192.168.1.1

CTRL+X then y and enter

You should now be able to ping google.com

USB networking

Make sure you have the wonderful PC Connectivity Manager installed on the tablet.

  • Main Menu>Settings>Control Panel>PC Connectivity Manager
    • Advanced>
      • Select Environments [...] and New and input USB
    • Select USB Network>Options>drop-down next to Mass Storage change to Network
    • Default values here will work, should be:
      • IP adress 192.168.2.15
      • Gateway 129.68.2.14
      • Network Mask: 255.255.255.0
    • Save>Apply

Fedora

  • System>Administration>Network>(Input root password)
    • >New>Ethernet connection>Forward>Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget (usb0)
    • >Forward>Select Statically set IP addresses>
      • Address: 192.168.2.14
      • Subnet mask: 255.255.255.0
      • Default gateway address: 192.168.2.14
      • Primary DNS: 209.18.47.61 (or 4.2.2.2 or whatever DNS server you like)
      • Secondary DNS: 209.18.47.62
    • >Forward>Apply

NetworkManager should now successfully connect to it (initially networkmanager should have seen the USB connection but fail at connecting)

From the tablet ping 192.168.2.14 if that works, then it's time to let the tablet open to the Internet

  • System>Administration>Firewall>(Input root password)>
    • Hit OK to warning dialog (actually it says Close)>Trusted Interfaces>
    • Check usb0>Apply

Now you should be able to ping google.com from the tablet. If google.com can't be pinged try 4.2.2.2 to see if you picked a faulty DNS server.


XP & Debian-based (Ubuntu)

Follow directions USB_networking here

Vista

You are out of luck (AFAIK). RDNIS gadget drivers seem to be unsupported. Use adhoc instead, if the Windows driver for your laptop's card supports it.



Extras

http://www.electronicproductonline.com/catalog/supportFiles/hydra_0.5.4_armel.deb (Hydra)



Special Thanks to:

qwerty12, paulkoan, texrat, Patrik Flykt, the PC Connectivity team and everyone else involved.