Topic: Saving network setup

Received the chumby hacker board with various I/O including the wireless network adaptor. Worked
first time. It has been years since I last configured Linux via the command line and do not remember how
how to manually save the wireless network configuration info. Any relevant documents available?

Also, C compiles see to be extremely slow. Is this because of the flash device? Would an external USB
drive be more responsive?

Regards,
  George

Re: Saving network setup

As for saving the network setup, there isn't really any standard in Linux from the command line.  Well, there sort of is, in that cnetworkmanager drives NetworkManager which drives wpa_supplicant which associates with the network.  For a number of reasons, chumby has chosen to directly communicate with wpa_supplicant.

When you boot, a script called start_network reads the file /psp/network_config, and configures the network.  Here, for example, is my network_config (passwords and all!):

 <configuration allocation="dhcp" key="duplification" encoding="ascii"
                encryption="WPA2" auth="WPAPSK" hwaddr="00:22:55:F2:FA:A1"
                ssid="Semisucculent" type="wlan" />                               

Valid encodings are "ascii" or "hex".  They determine what form the key is in.  If you really want to specify your 128-bit PSK, you can set this to "hex" smile

Valid allocations are "dhcp" and "static".

If you set allocation to "static", you'll need to add keys for ip, netmask, gateway, nameserver1, and nameserver2.

Encryption should be WPA, WPA2, WEP, or NONE.  I think WPA and WPA2 are interchangeable in our current setup.

Auth should be WPAPSK, WPA2PSK, WPAEAP, WPA2EAP, WEPAUTO, or OPEN.

If you set auth to WPAEAP or WPA2EAP, add a key "username" with your EAP username.  Set the "key" to your EAP password.

hwaddr is ignored.

Type can be wlan, lan, or for the adventurous, 3G.

As for the slowness of the C compiler -- The memory bus is 131 MHz.  That's about as fast as an early Pentium, but without the out-of-order execution.  And it has 64 megs of RAM.  Poor little thing, trying to run a modern compiler.  I've seem g++ eat up all 64-megabytes of RAM just compiling a single file!  If you compile with all optimizations turned off, that might speed it up.  Aside from that, I've got nothing.

Re: Saving network setup

Thanks for the info.

Day 2 with Chumby was spent trying to write to the SD device. I wanted (because my other Linux systems do) to write /etc/sysconfig/network-scripts/ifcfg-wlan0. I can set the RW and change file/directory permissions, but every attempt to write returns "insufficient memory". Even mounting the SD device on a running Linux fails. df reports about 21M free.

George

4

Re: Saving network setup

ggallant wrote:

Thanks for the info.
Day 2 with Chumby was spent trying to write to the SD device. I wanted (because my other Linux systems do) to write /etc/sysconfig/network-scripts/ifcfg-wlan0. I can set the RW and change file/directory permissions, but every attempt to write returns "insufficient memory". Even mounting the SD device on a running Linux fails. df reports about 21M free.
George

Depending on the image, you may need to fix the partition table (basically use fdisk to delete and recreate the first partition fixing the size).  I wrote up something on Ladyada's wiki.  Also, do a "dmesg" - sometimes filesystem errors will force it read-only even if you mount it differently but if there is something causing it there will usually be something in the kernel message log, and just doing e2fsck -f on the unmounted partition might help.  I've not had similar problems.  Also make sure you are on the right filesystem since symlinks can jump between them.

Re: Saving network setup

I read the writeup on fixing the partitions and was successful (I think) in resizing the first partioion. I can mount the sd on a desktop linux and see the individual files. It also reports insufficient space when trying to add a file. I have not tried the fsck yet. Was hoping to make a working copy incase (when) the device gets really blasted.

1. Can copied of the SD can be purchased?
2. What is the size of the shipped SD?

George

6

Re: Saving network setup

The standard root image is in another post on this forum.  You can use dd to copy it to any SD, but it has the bad partition.

http://forum.chumby.com/viewtopic.php?pid=31177#p31177

So you can always go back to a working copy.

My notes are at:

http://wiki.ladyada.net/chumbyhackerboard/microsd

Re: Saving network setup

I am fairly certain that the image contained in the rom-hackerboard-3320.zip does not match the image on the shipped sd.

1. The shipped image appears to be 1GB. The hackerboard 512MB.
2. The shipped image has partitions 1 thru 6. The hackerboard has partitions 1 thru 3.
3. The shipped image boots. The hackerboard image occasionally prints some hex numbers.

Additionally the hacker board appears to have two partitions with identical files.

George

8

Re: Saving network setup

The chumby hackerboard I received had the 6 partitions on the uSD out of the boc, complete with the overlap problem, only /mnt/storage (and its containing partition) was stretched to the 1Gb.  I think it has 2 roots to insure it can boot if one gets broken.  They also may have other differences.

Re: Saving network setup

The shipped SD device has no free inodes on the root device making it quite difficult to add a file!!

George