Connecting to the world
![](/var/linux_magazin/storage/images/linux-magazine.com/online/blogs/beagleblog/354164-9-eng-US/Beagleblog.png)
Beagleblog
Controlling the Beagleboard over a serial line with a terminal program such as Minicom is working just fine, but it's much more convenient to have a real network connection. For instance to update the Linux distribtion on the SD card without having to unplug it and plug it into a PC's card reader. There's just one little obstacle to overcome: The board does not feature either an Ethernet port or a Wifi chip :)
Luckily the Linux kernel programmers are providing a solution to that problem for quite some time: You can use the USB interface for networking, too. So I just connect the Beagleboard to the computer with a USB cable in addition to the serial connection I am using to control the board. There's no need to load a kernel module or compile special software for this to work. The only thing left is to enter the following line into the terminal that connects to the board:
root@beagleboard:~# /sbin/ifconfig usb0 192.168.0.2 netmask 255.255.255.0
The same goes for the PC, just with a different address:
# /sbin/ifconfig usb0 192.168.0.1 netmask 255.255.255.0
That's enough to have a working connection between Beagleboard and PC, as you can see with the ping command:
$ ping 192.168.0.2 PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data. 64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=0.203 ms 64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=0.207 ms ...
To get on the Internet you need to configure your PC as the default router and set up Network Address Translation (NAT) accordingly. Setting the default route on the board is as simple as:
root@beagleboard:~# route add default gw 192.168.0.1
The following commands will configure Masquerading on the PC and activate IP routing in the Linux kernel:
# iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE # iptables --append FORWARD --in-interface usb0 -j ACCEPT # echo 1 > /proc/sys/net/ipv4/ip_forward
Beware that I am using "wlan0" here as the outgoing interface, as my PC has a wireless connection to the Internet. Depending on the brand of hardware you might need to write "wmaster0" here, or just "eth0" if you are using an Ethernet connection.
To conveniently make use of host names instead of plain IP addresses you need to add the IP address of a nameserver to the Beagleboard's "/etc/resolv.conf" configuration file. If it's working you can start an update of the Angstrom distribution with "opkg update".
Comments
comments powered by DisqusSubscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.
Had no idea the Beagleboard
what about if your pc is already on a network witht he same subnet as your example
Now what would you suggest as suitable ip for LAN2 (beagle gadget adapter) and for Beagle Ifconfig?
How to save?
No config necessary(?)
and after cabling the hub to my router (Airport Extreme) and booting the Beagleboard,
it was on the network. I ssh-ed to the beagleboard and did opkg update, worked perfectl
I expected to have to do some configuration, but the thing just came up on the network.
Ethernet in ubuntu
Connecting via SDIO...
Note the previous question, and my answer: you need both the min A OTG to miniB adapter, plus a USB to Ethernet adapter. I bought the suggested one that has the 3 USB ports and Ethernet port. It works well for me, since in addition to mouse and keyboard, I can power the BB with it too (via a USB to power adapter [see https://specialcomp.com/beagleboard/RevB.htm]).
Also note that in my case I used the Angstrom build too. And one nice feature is that it appears that a VNC server is loaded and executing by default. So with the Ethernet connection working, one does not even need the keyboard or mouse directly connected to the BB. Which brings me to my next dream:
I have both a Spectec SDIO WiFi card, and a Palm SDIO Bluetooth module. What I would _really_ like to do is use the SDIO WiFi card instead of the wired Ethernet connection. With the Linux kernel and rootfs in NAND, this would make a very nice stand-alone controller board. I have tried plugging in the SDIO card, but I do not know enough about Linux to know how to get the proper driver loaded.
Any suggestions?
Thank you,
Tyler
No special hardware needed
Thanks for your interest.
Oliver
confused ... no extra hardware needed ?
No need special/extra hardware ? What kind of usb cable are you using ?