Enabling Network through Command Line for Embedded Boards on Linux

This tutorial is intended to give directions for embedded developers for enabling network on their Linux Machines through command line. Although the commands and paths may differ with some Linux Distros, the method is identical. The commands listed below is tested with Debian Distribution with Kernel 3.0.52 in oLinuXino A13 board.

OLINUXINO A13 Embedded Development Board

Debian distribution

There are instances where a X11 Gui is not available for enabling networking and/or applications like network-manager or wicd are not installed by default. So user may require command line solutions for connecting to the network. Since oLinuXino board doesn’t come with Ethernet Controller a USB to Ethernet converter AX88772B was required.

Use sudo ifconfig the available ethernet devices. You may see usb0 for USB-ETHERNET converter/OTG or eth0 for onboard ethernet controllers.

Assuming the available interface is usb0, edit the following file. You can use nano, an easy to use command line text editor.

sudo nano /etc/network/interfaces

Add the following lines

auto usb0 
iface usb0 inet dhcp 

Save the file and run the following in terminal

sudo /etc/init.d/networking restart

A dynamic IP will be assigned to the ethernet interface. You can check the internet connection by /etc/network/interfaces

ping http://www.google.com

If wifi dongle is connected and let the device turns out to be wlan0 then create a configuration file like

sudo nano /etc/wpa.conf

pairwise=CCMP TKIP

and add the following to /etc/network/interfaces

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa.conf

and run sudo /etc/init.d/networking restart.Thus networking can be enabled using command line for Embedded Linux machines.
Happy Networking!!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s