Setting up networking on the Beagle xM is a bit of a pain. The ethernet port is wired up in some weird way via the USB subsystem (so the interface ends up being called “usb0”) and there’s no MAC address in the EEPROM on the card, so it gets a random MAC address every time you bring the interface up, which makes making DHCP do what you want something of a chore.
What follows is what I’ve done. It may well not be anything like optimal, but it seems to work. I access the internet here at the office via wifi, and wanted to share the connection to the xM via my laptop’s ethernet port. There’s a wiki page about this but for whatever reason the network manager method of connection sharing didn’t work at all for me.
1. Choose a name for the board (I chose “bitty” for some reason).
2. Configure dhclient on the board to send this as its hostname when asking for a lease by adding “send host-name “bitty”;” to /etc/dhcp3/dhclient.conf
3. On the laptop, use Network Manager to give the ethernet port a static address of 10.0.0.1.
4. Install dnsmasq. This is a DNS + DHCP server.
5. Configure dnsmasq. Predictably, I can’t remember all the things I’ve changed in here. I think I added “interface=eth0”, “dhcp-range=10.0.0.50,10.0.0.100” and “dhcp-host=bitty,10.0.0.45,1h” to respectively answer dhcp on the wired ethernet port, do dhcp at all and to assign a particular address to the machine that calls itself “bitty”.
6. I then followed the iptables and other instructions from the “Gateway set up” section of the aforementioned wiki page.
7. Restarted dnsmasq.
10. Added “10.0.0.45 bitty” to /etc/hosts on the laptop
11. Run “dhclient usb0” as root on the board (via the serial console).
You should now have network! So you can run “apt-get update” and so on like a good citizen.
Looking at the above list of instructions, I don’t know why I bothered with DHCP and didn’t just configure everything statically on the board, especially as the above has the following problem: when you restart the board and run dhclient the board has a new MAC address, but as the dhcp server thinks that 10.0.0.45 is still leased to the address the board had before the reboot it doesn’t hand out the desired. The fix for this is “sudo rm /var/lib/misc/dnsmasq.leases” “sudo /etc/init.d/dnsmasq restart” but that seems like an utter hack.
That’s enough for one post, next will be a brief reminder (mostly for myself) on how to set up users from the command line and then I’ll talk about more me-specific things like setting up a caching proxy to make debootstrap go much faster.