| Gumstix Verdex Networking Last Modified: 2010-05-03 | | |
| Acroname Robotics | |||
| Overview The Gumstix Verdex Pro has multiple interfaces for connecting to a network. The following examples demonstrate settings for the wireless interface that get entered into the (/etc/network/interfaces) configuration file on the Gumstix Verdex Pro. You must be comfortable with the following tools and means before attempting any networking configuration.
Networking Settings You can manipulate and diagnose networking settings using both the "ifconfig" and "iwconfig" commands. Networks can vary dramatically affecting which settings will need to get issued to get the Gumstix Verdex to connect to the network. A detailed walkthrough is available on setting up an embedded Linux processor on a wireless Ad-Hoc network using the command line. Learn about the current networking settings by issuing the following command. root@gumstix-custom-verdex:/$ ifconfig
Which will give you something like: eth0 Link encap:Ethernet HWaddr 9E:CD:D2:75:E9:90
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:131 DMA chan:ff
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:65 errors:0 dropped:0 overruns:0 frame:0
TX packets:65 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8271 (8.0 KiB) TX bytes:8271 (8.0 KiB)
wlan0 Link encap:Ethernet HWaddr 00:0B:6B:0E:80:79
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:128
All networking settings can be manipulated for the appropriate network using ifconfig and iwconfig. All settings changed using the command line are only persistent until the Gumstix Verdex is power cycled. If settings are changed through the command line, the networking interfaces can be restarted if necessary without doing a power cycle. root@gumstix-custom-verdex:/$ /etc/init.d/networking restart
Wireless WEP Network with Static IP Address on Boot Often it useful to have the Gumstix on the network with a known IP address. This example demonstrates getting onto a network named "YOURNETWORK" with a password of "YOURPASSWORD" and an IP address of "192.168.1.217". The network interfaces configuration file is edited with the following information (/etc/network/interfaces): auto wlan0
iface wlan0 inet static
pre-up /sbin/iwconfig $IFACE key YOURPASSWORD
pre-up /sbin/iwconfig $IFACE key open
pre-up /sbin/iwconfig $IFACE essid YOURNETWORK
pre-up /sbin/iwconfig $IFACE txpower on
address 192.168.1.217
netmask 255.255.255.0
/sbin/ifconfig $IFACE up
Wireless Ad-Hoc Network with Static IP Address on Boot Garcia robots and distributed systems are often used in an Ad-Hoc network. This configuration is how factory Garcia robots are configured to operate in. For example, an Ad-Hoc network name is desired to be "NETWORKNAME." The network interfaces configuration file is edited with the following information (/etc/network/interfaces): auto wlan0
iface wlan0 inet static
address 192.168.1.217
netmask 255.255.255.0
wireless-mode ad-hoc
wireless-essid NETWORKNAME
Wireless WEP Network with Dynamic IP Address on Boot Some configurations may not be particular about what IP address is assigned to the Gumstix Verdex Pro. DHCP is a dynamic means to gain an IP address that is assigned by the wireless access point. auto wlan0
iface wlan0 inet dhcp
pre-up /sbin/iwconfig $IFACE key PASSWORD
pre-up /sbin/iwconfig $IFACE key open
pre-up /sbin/iwconfig $IFACE essid NETWORKNAME
pre-up /sbin/iwconfig $IFACE power on
Wireless WPA (TKIP, passkey) using a Static IP Address on Boot WPA has many variations and this is for WPA wireless networks using as shared passkey and TKIP. Others may be similar. Below are the settings in the /etc/networking/interfaces file: auto wlan0
iface wlan0 inet static
pre-up wpa_supplicant -Dmarvell -iwlan0 -c/etc/wpa_supplicant.conf -Bw
down killall wpa_supplicant
address 192.168.2.200
netmask 255.255.255.0
gateway 192.168.2.1
If you look carefully, this starts and stops the network interface by first running a program called wpq_supplicant and then stopping it on teardown. This program contains some configuration parameters which are stored in the file /etc/wpa_supplicant.conf in this example. The contents of this file are: network={
ssid="NETWORKNAME"
scan_ssid=1
proto=WPA RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk=fa2d9df812b3f40f8a41c8d35f02bccc37s0dfasdf7asd9f70asd7fs9797f
}
The "psk" parameter is an encoded password and you use the wpa_supplicant program to generate this from your plain-text password. To do this, you type: wpa_passphrase NETWORKNAME PASSWORD
This will output a partial configuration file that looks something like: network={
ssid="NETWORKNAME"
#psk="PASSWORD"
psk=fa2d9df812b3f40f8a41c8d35f02bccc37s0dfasdf7asd9f70asd7fs9797f
}
You then copy and paste the psk line into the /etc/wpa_supplicant.conf file you are working on to incorporate your encrypted password. Revision History:
| ||
Related Links: Configuration steps for using a Gumstix Verdex Pro on a Garcia robot | ||
| voice: 720-564-0373, email: sales@acroname.com, address: 4822 Sterling Dr., Boulder CO, 80301-2350, privacy © Copyright 1994-2012 Acroname, Inc., Boulder, Colorado. All rights reserved. |