Topic: Got Ethernet working over USB dongle

I was able to get ethernet working on my chumby within 2 minutes!

I ran to my local electronics store (Frys) and got a $9.99 Trendnet USB 1.1 10/100 USB dongle.. model TU-ET100C, H/W:C3.2

the light came on immediately after plugging it in.

Doing an ifconfig showed the new device as ETH0.

I only needed to tell the dhcp client to pull an IP:

ifconfig eth0 0.0.0.0 (not sure if this is needed, but I found it on a site)
/sbin/udhcpc

then it discovered, and pulled an IP.

I was then able to SSH into the little monster on the new ip address.

-Roger

Visit Roger's Chumblatory: www.rnoia.com/chumby

Re: Got Ethernet working over USB dongle

Did you need to add that to your startup script then?

-John Forsythe
www.jforsythe.com

Re: Got Ethernet working over USB dongle

Hi,

I just tested it with the additions to the debugchumby script, but USB ethernet isn't working (the light is on though). It seems to insist on the wireless connection. I will investigate if I need to change the routing or something else tonight.

-roger

Visit Roger's Chumblatory: www.rnoia.com/chumby

4 (edited by rnoia 2007-11-28 21:43:01)

Re: Got Ethernet working over USB dongle

Good news but only after doing a crazy hack. Scroll down to see the necessary hack to make USB-Ethernet work, otherwise keep reading for an "interesting" hack.

Symptom: if wireless isn't active (deactivated the config/switch to a non-working config), chumby can't/won't proceed past the bootup phase. My USB Eth *is* active (I can ping the IP during bootup), however SSHD isn't running yet which means I can't mess with things at this point. (apparently sshd won't start until after the wireless network check passes).

After more snooping, I found out why chumby ignores the eth0 device: in the /usr/chumby/scripts/network_status.sh script file which is run before loading the control panel, there's a check to see if the wireless network device specifically (rausb0) is up (i.e. connected), if not, it it sends an error which should trigger the "pick a wireless network". It's hardwired to look for "rausb0", not any network or other device.

Problems to overcome:
1] Chumby wants the wireless specifically to be active at boot time
2] Chumby wants a previously verified wireless configuration stored
3] Chumby won't accept any other network interface during the network check
4] Chumby is a read-only file system where the networking scripts are kept

Fortunately, there is a small loophole in the design of the "is the network up" code that gives us what we need. It's looking for the word "RUNNING" in the response from ifconfig to decide if the rausb0 wireless interface is up. (curious design, but it opens up a way around the network check).

So, here's where it gets evil. In my "debugchumby" script, I set rausb0 (the wireless) to IP= 127.0.0.1 (the localhost/loopback ip which should always be "up"). This immediately sets it to "RUNNING" and is verifiable via ifconfig:

rausb0    Link encap:Ethernet  HWaddr <HIDDEN>
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1


Now, with rausb0 set to 127.0.0.1, the network check thinks it's up and proceeds happily.

I have verified that the dhcp client adds a new default route to my router autmatically when the IP address is assigned. No "route" command necessary. Because of this Chumby *thinks* it is sending traffic out over wireless, but I've redirected it to the usb-dongle.

Wa-La. USB-Ethernet is active.

The *only* reason this works is because the debugchumby script is run before the network_status.sh script.  This gives us the window we need to be naughty.

Now, I believe there is a requirement that the wireless network "was" configured/working at some point (there's a check for that too in the network_status.sh code) as it wants a configuration of any sort present.  But, with my hack above, it doesn't matter. Any configuration will work (even networks that aren't currently present), because rausb0's traffic is going to the ethernet. So, to get your chumby working at the office, where your IT people won't let you connect to the wireless network, setup your chumby at home with a working wireless config first, copy the debugchumby script below and reboot.

(side note for chumby to fix at some point: the wireless network key is stored in plain text in a not-so-obscure file. Not a good idea. They could have at least zipped the file with a password or something more clever.)

Then, bootup with the following debugchumby script:

##############################################

#!/bin/sh
/sbin/udhcpc   # tells the dhcp client to pull the ip address from your router for the ethernet
                      # this coincidentally sets up a default route on your network via the ethernet so no route command necessary
ifconfig rausb0 127.0.0.1  # changes the ip of the wireless card to the loopback IP, tricking the network status checker

##############################################


side effects: if you do this, however, the chumby info screen will show the following (incorrect info):

IP:  127.0.0.1
SSID: <name of not-working wireless SSID>

you better know/write down the IP of your chumby, or you won't be able to ssh into it (or you can just unplug the usb during boot)

if you're all set, your ifconfig response should look like this:

chumby:~# ifconfig
eth0      Link encap:Ethernet  HWaddr <HIDDEN>
          inet addr:192.168.0.109  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:375 errors:0 dropped:0 overruns:0 frame:0
          TX packets:314 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:402658 (393.2 KiB)  TX bytes:35355 (34.5 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:47 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8196 (8.0 KiB)  TX bytes:8196 (8.0 KiB)

rausb0    Link encap:Ethernet  HWaddr <HIDDEN>
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26 errors:0 dropped:0 overruns:0 frame:0
          TX packets:173 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3783 (3.6 KiB)  TX bytes:13024 (12.7 KiB)


and your routing table will look like this:
chumby:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
127.0.0.0       *               255.0.0.0       U     0      0        0 rausb0
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

I've copied my setup with descriptive information on my site: http://www.rnoia.com/chumby

Happy Chumby-ing

-roger

Visit Roger's Chumblatory: www.rnoia.com/chumby

Re: Got Ethernet working over USB dongle

I've posted instructions for using wired Ethernet on chumby here - http://wiki.chumby.com/mediawiki/index. … d_Ethernet

Note: This technique has only been tested using the Linksys USB200M USB Ethernet adapter

Re: Got Ethernet working over USB dongle

*le sigh*  Looks like I'll be going to RatShack for the dongle this weekend...  THANK YOU!  smile

7 (edited by Threemoons 2008-01-07 09:12:33)

Re: Got Ethernet working over USB dongle

Ken wrote:

I've posted instructions for using wired Ethernet on chumby here - http://wiki.chumby.com/mediawiki/index. … d_Ethernet

Note: This technique has only been tested using the Linksys USB200M USB Ethernet adapter

Ken--so this works without first having to have an active WiFi connection?

The Corporate Policy Drones are 86ing my wifi in all likelihood and I still want to use this at work...

Also, one other very dumb question:

I assume that debugchumby would be a text file named debugchumby that has the exact text as you wrote it?  Or do I need to compile it or something?  Yes, it's been a zillion years since I touched Linux and took that "Become a PERL Wizard in 48 Hours" crashcourse during the dotcom days....  sad

Re: Got Ethernet working over USB dongle

You don't need the wifi for this to work.

The "debugchumby" file is a text file with UNIX-style line endings (you can't use Windows NotePad to create it). It does not need to be compiled - it's a shell script. See the wiki for more info about how to create these files.

Re: Got Ethernet working over USB dongle

One last question:  Do I need to leave the USB key with "debugchumby" in the Chumby all the time, or once I am up on the Ethernet can I take it out?  Sorry for all of my questions; as mentioned upstream I am a soopernoob.

Re: Got Ethernet working over USB dongle

I think you can take it out - but I haven't tried.

Re: Got Ethernet working over USB dongle

Hi,

Yes, you can take it out.  I've had my USB key removed for 3 months without problem.

Then again, I need to go find it now, because I need to turn the chumby off to get the firmware update. :-)

-Roger

Visit Roger's Chumblatory: www.rnoia.com/chumby

Re: Got Ethernet working over USB dongle

I have just updated my chumby yesterday and suddenly the script mentioned here stopped working.  I took it home where i have wireless and noticed that A) dhcp did not work when I ran it manually and B) even when I set a static IP address I still get the use "Use new/existing connection" prompt on boot up.  Is this something that is new in the update?  Is there a way to bypass that?  I'll post again if I find anything further.

Re: Got Ethernet working over USB dongle

Hi,

After discovering that my trendnet adapter stopped working, I went and bought the other "known to work" adapter, the Linksys 200M.

I tried adding the necessary lines for  the linksys 200M for the debugchumby file and am also having problems.

I get no ethernet device showing up in ifconfig.

I'll investigate.

-roger

Visit Roger's Chumblatory: www.rnoia.com/chumby

14 (edited by rnoia 2008-02-25 22:41:01)

Re: Got Ethernet working over USB dongle

Here's what I've found:

I am experiencing the same problem with my new Linksys 200M as I am with my old Trendnet.. DHCP requests are not being processed (or so it appears).

The Linksys debugchumby lines do work (they require a reboot/work only during reboot for some reason).

My Linksys router (wrt54g) shows the chumby in the dhcp client list, so the router *thinks* the ip address was issued, but the chumby doesn't think so.
I am not sure if this is new with the firmware update.

Also, the 200M is showing a lot of errors on eth0 (just like the trendnet). I have replaced the cable itself, and even plugged directly into the router.

If I statically assign an IP address to chumby:

ifconfig eth0 192.168.0.98

I *can* ping it from another computer. If I do the original hack of setting the radio (rausb0) to ip 127.0.0.1 (loopback), I lose all network (radio and ethernet). After checking the routing table, I noticed that the default route is still going to the radio. So I put in a static route for eth0 and still no luck.

So it looks like something may be broke with the DHCP client (udhcpc) at a minimum if not something else.

-roger

Visit Roger's Chumblatory: www.rnoia.com/chumby

Re: Got Ethernet working over USB dongle

OK, we'll have the client team look into it.

Re: Got Ethernet working over USB dongle

rnoia wrote:

Here's what I've found:

I am experiencing the same problem with my new Linksys 200M as I am with my old Trendnet.. DHCP requests are not being processed (or so it appears).

The Linksys debugchumby lines do work (they require a reboot/work only during reboot for some reason).

My Linksys router (wrt54g) shows the chumby in the dhcp client list, so the router *thinks* the ip address was issued, but the chumby doesn't think so.
I am not sure if this is new with the firmware update.

Also, the 200M is showing a lot of errors on eth0 (just like the trendnet). I have replaced the cable itself, and even plugged directly into the router.

If I statically assign an IP address to chumby:

ifconfig eth0 192.168.0.98

I *can* ping it from another computer. If I do the original hack of setting the radio (rausb0) to ip 127.0.0.1 (loopback), I lose all network (radio and ethernet). After checking the routing table, I noticed that the default route is still going to the radio. So I put in a static route for eth0 and still no luck.

So it looks like something may be broke with the DHCP client (udhcpc) at a minimum if not something else.

-roger

I too noticed the same thing on my chumby.  This all started after the update for me.  I was able to get this to work with no problems before the update.  Here is some more detail that I have found.

I am using a linksys 200m.


when running /sbin/uhdhcpc -i eth0 Its sending a DISCO packet fine.  When the DHCP server sends a OFFER packet back it never gets there.  notice there are no Rx packets on eth0

chumby:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1A:70:90:23:8E
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:35 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:8910 (8.7 KiB)

hope that help smile

Re: Got Ethernet working over USB dongle

Same problem here.

Im using the trendnet adapter.

On a side note, I was able to successfully SSL into the chumby over ethernet if I manually assign an IP. However, the boot script still does not prevent the chumby from asking for a wireless connection, even if modified to use a static IP.

Re: Got Ethernet working over USB dongle

rats!  I did the online chat w/ Chumby folks last week who said the ethernet dongle worked.  Ordered the Trendnet from Amazon and the new Chumby - which both arrived today.  Although the wireless works, I don't have access to wireless at work - which is why I need wired.  Here's what my DHCP server reports when doing the debugchumby script on a USB memory stick:

Mar  5 21:42:22 dhcpd: DHCPDISCOVER from <MAC> via eth1
Mar  5 21:42:22 dhcpd: DHCPOFFER on <IP>to <MAC> via eth1
Mar  5 21:42:25 dhcpd: DHCPDISCOVER from <MAC> via eth1
Mar  5 21:42:25 dhcpd: DHCPOFFER on <IP> to <MAC> via eth1

<MAC> and <IP> are replacing my real IP and MAC addresses set up.

Looks like the Chumby does two requests at bootup and doesn't accept the IP for either one.

A workaround sure would be appreciated!

Re: Got Ethernet working over USB dongle

Not giving up easily, I left wireless on while having the USB stick and USB TrendNet going, ssh'd in.

I ifconfig'd eth0 to a static IP
route defaulted to my wired route out of eth0

General problem seems to be that packets are not being received from eth0 and are getting reported as errors.

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:14:XX:XX:XX:XX
          inet addr:XX.XX.XX.61  Bcast:XX.XX.XX.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:646 dropped:0 overruns:0 frame:1216
          TX packets:384 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:22704 (22.1 KiB)

Re: Got Ethernet working over USB dongle

thats what im getting on my linksys 200m.  It was working for me before the update.  My guess is the kernel module usbnet.ko.  But i dont know for sure.

Re: Got Ethernet working over USB dongle

Any updates on this one?

Re: Got Ethernet working over USB dongle

I am a new Chumbian and ran into this problem as well.

If the change happened between 1.2 and 1.40, the diffs seem to indicate no movement on usbnet as far as I can tell. However, it does seem like the imx21 USB host driver had some changes.

Could there be something introduced here?

Thomas

Re: Got Ethernet working over USB dongle

Today, I asked to Chumby customer support.

According to a customer support, Firmware1.6 will support USB LAN dongle.
Firmware1.5 doesn't still support USB LAN dongle.

Re: Got Ethernet working over USB dongle

Yes, we found why it broke, and have a fix in Engineering - it now goes to QA and once approved, gets scheduled for a future firmware update.

Re: Got Ethernet working over USB dongle

bgb.tom wrote:

Today, I asked to Chumby customer support.

According to a customer support, Firmware1.6 will support USB LAN dongle.
Firmware1.5 doesn't still support USB LAN dongle.

To clarify.  This will still be considered  an 'Easter Egg'