Getting Chumby to use a hard-wired Ethernet is easier than one may think. The modifications to the Chumby are pretty easy to do and can be done via the special "debugchumby" file and a USB thumbdrive.
I was able to successfully use a Trendnet TU-ET100C 10/100Mbps USB-to-Ethernet Dongle. It's USB 1.1, but I wanted to make sure the Chumby would support it. The Chumby OS (BusyBox Linux) has the drivers built into the kernel already for this device (yay!). To use the modifications below, your USB-Ethernet dongle will need to be supported by the OS (more on this later - see "How to tell if your USB-Ethernet dongle is supported by Chumby).
Basic Quick Setup.
Here's what you need to do:
- Before tinkering with your Chumby, get it up and running with a wireless network first. This is necessary as the network check in the Chumby bootup process checks for an already working configuration. Once you're got Chumby working wirelessly, continue on.
- Create a text file on a USB thumbdrive named "debugchumby". Make sure there is no extension to the file (like ".txt").
- In the debugchumby file, add the following lines:
#!/bin/sh
/sbin/udhcpc
ifconfig rausb0 127.0.0.1
- Plug in your USB thumbdrive (with the debugchumby file) into one of the USB ports on the back of the Chumby.
- Go somewhere where your wireless network (the one you used before) isn't active/reachable (like work).
- Turn on/Reboot Chumby.
- Chumby will do its usual business, and will be running off of the Ethernet.
Important note: using this hack will cause the Chumby to show its IP address in the network control panel as "127.0.0.1". If you need to SSH into the Chumby in the future, you'll need to take note of the IP address your Ethernet gets assigned somehow. (You'll need to SSH in with both wireless and Ethernet active). Check the "advanced" area below for a small hack to see what your new ethernet-adapter's IP address is.
Advanced Setup, with explanation
- Before tinkering with your Chumby, get it up and running with a wireless network first. This is necessary as the network check in the Chumby bootup process checks for a configuration file that is created after you setup your wireless connection. Once you're got Chumby working wirelessly, continue on.
Fortunately, the network check only checks to see that there is a configuration and that one is selected. (If one isn't selected, it will prompt you to pick one, which messes up this hack).
- Create a text file on a USB thumbdrive named "debugchumby". Make sure there is no extension to the file (like ".txt"). If you have problems, check out the Chumby Community Forums for help.
- In the debugchumby file, add the following lines (without the line numbers, those are for explanation)
- #!/bin/sh
- /sbin/udhcpc
- ifconfig rausb0 127.0.0.1
Explanation:
- #!/bin/sh
This tells Chumby that the file is a shell script.
- /sbin/udhcpc
udhcpc is the DHCP client. This command tells chumby to request an ipaddress for all non-assigned network interfaces. Since the USB-Ethernet doesn't have an IP address yet, it will get a new one. This also, coincidentally, takes care of setting up a new default route in Chumby's routing table, pointing to your gateway. This is important because without it, your Chumby won't know where to send the network traffic. You could achieve this with a route command also, but it's not necessary.
- ifconfig rausb0 127.0.0.1
This is where the real hack is. This command tells the Chumby to change the IP address of the built-in wireless card to 127.0.0.1 . This IP address is the "loopback" address and is used to refer to "yourself" aka localhost.
This is necessary because the network_status.sh script in the Chumby (what actually checks that the wireless network is up and running) requires the wireless card be active and functional.
If the wireless interface isn't active and functional, the Chumby will present you with the network control panel asking you to connect to a network.
Changing the IP address to 127.0.0.1 tricks the network status checker into thinking the wireless is active and functional even though it isn't. How? Upon investigation of the network_status.sh script, I discovered that Chumby is looking for the word "RUNNING" in response to a query to the ifconfig command on the wireless interface. Coincidentally, setting the IP address to 127.0.0.1 also causes ifconfig to return "RUNNING" in the response.
- Plug in your USB thumbdrive (with the debugchumby file) into one of the USB ports on the back of the Chumby.
- Go somewhere where your wireless network (the one you used before) isn't active/reachable (like work).
- Turn on/Reboot Chumby.
- Chumby will do its usual business, and will be running off of the Ethernet. Ta-Da.
- To see what your Chumby's new Ethernet adapter's IP address is at boot time, add this to the end of your Chumby debugchumby script file:
IP=`ifconfig eth0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;
fbwrite $IP
this will show:
192.168.0.108 (or whatever your IP is)
note: this prints the IP address of the eth0 interface in the upper left corner of the screen in a blue font. You need to look quick, because animation will erase the text.
the first line uses a small perl command to parse the IP address out of the ifconfig command.
fbwrite is a chumby command to write text to the screen.
Alternatively, the following could also be used to print the pertinent lines from ifconfig (without perl). Note, the quotations marks around the $IP variable are required. Without them, most of the data won't be printed to the Chumby screen:
IP=`ifconfig | grep "inet addr"`;
fbwrite "$IP"
This is what my Chumy shows:
inet addr:127.0.0.1 Mask:255.0.0.0
inet addr:192.168.0.108 Bcast:192.168.0.255 Mask:255.255.255.0
How to tell if your USB-Ethernet dongle is supported by Chumby
- In order to test your USB-Ethernet dongle, you'll need to get your Chumby working wirelessly first. Do this, then continue.
- Plug in your favorite USB-Ethernet dongle into the back of the Chumby and plug an Ethernet cable into the dongle. (as well as into your Router/Switch/Hub). Make sure you get a link light. If no link light, check the cable and plugs. Is it inserted all the way?
- On your Chumby, go to the control panel (by patting the Chumby's head). Click "Settings" then "About". In the top right hand corner, you'll notice a small "pi" symbol - press it. You'll be presented with a hidden menu.
- Press the "SSHD" button. This will start the SSH daemon on the Chumby and will allow you to connect to the Chumby with your favorite SSH client. (I use Putty on Windows). On this page, you'll also notice the IP address of your Chumby. Take note of this.
- In your SSH client, connect to the IP address of your Chumby. On mine, it's 192.168.0.108, yours will vary depending on how your network is setup.
- In your SSH client, you will be prompted with "login:". The username on the Chumby is "root" with no password. You'll be presented with the ASCII-Art Chumby. You're in.
- To verify the functionality of your USB-Ethernet dongle, simply enter this command:
ifconfig
- Chumby will respond with something that looks like this (this is from my Chumby):
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:192.168.0.108 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)
- What you're looking for is in the red - something saying "eth0" or "eth" followed by a number (most likely "0"). Depending on the hardware, it could be referred to by "anything" (some random set of letters). You're basically looking for anything other than "lo" or "rausb0". If you see something else (like eth0), it means the Chumby has the necessary drivers for your USB-Ethernet dongle in the kernel already. You don't need to do anything else. You should be able to use the "hack" above..