| Stargate Wireless Configuration Last Modified: 2008-05-13 | | |
| Acroname Robotics | PDF webpage version | ||
| Overview The Plan Add the Wireless Card Identify the card from the command line Identify the MAC address of the wireless card Set up the wireless connection settings for your card Set up the ethernet connection settings for your card Configuring for automatic networking on boot up. Disable the boot up wired ethernet delays (pumping) Change the boot loader delay for faster booting Overview The Stargate processor board uses the PXA255 XScale processor by Intel and it sports both a compact flash and PCMCIA slot. The board runs Linux so it can use the readily available drivers to easily support wireless ethernet connectivity across 802.11b, etc. using these ports. This HOWTO shows the nuts and bolts of how to configure this to allow a wireless connection to your Stargate. Once you have this working and can ssh into a Stargate remotely, you will never want wired solutions again! The Plan This HOWTO assumes you have a completely stock Acroname Stargate kit. Since this kit includes the serial null-modem cable and daughter card, we will use these to get the board up and running and then set up the wireless connection. Once completed, the board will boot up quickly and automatically use the settings we have provided to allow connectivity from another TCP/IP node on the wireless network like a workstation or laptop. Here we assume that when finished, the primary login access will be through a terminal session on another machine via ssh. This configuration is how we configure the Stargate to be used in our mobile robots. Here are the steps we hope to accomplish: ![]() The overview of what we are trying to achieve in this HOWTO Add the Wireless Card The cards we have tried with good results are:
Other cards will likely work as well. If you have another and it is working, please contact us and your card type will get added to the above list. Try plugging in your card with the power off and then connect up the serial console using the null-modem cable that comes with the Stargate Kit. Turn on the board and watch the boot process using Hyperterminal (Windows) or minicom (Linux). The specific instructions for booting from the console like this are covered in the Stargate Developer's Guide. Log in as root (default password is "rootme"). You should be able to see the card using the cardctl command. Try: # cardctl ident
This should return some information that looks something like: Socket 0:
no product info available
Socket 1:
product info: "AmbiCom", "WL1100C 802.11b CF-Card", "2.2"
manfid: 0xd601, 0x0002
function: 6 (network)
The wireless networking card should show up in the list coresponding to the socket where you have the card installed. If not, you likely have not plugged it in correctly or for some other reason, the card is not being recognized by the system. If you do get information, you are in good shape and next we will work on identifying the actual card you have beyond just the card type. Identify the card from the command line There is a unique address on most wireless network cards that is both maintained internally as well as printed on a sticker on the outside of the card. Since your card is plugged in, we will use the iwconfig tool to identify the card that your Stargate sees plugged in. Use the command: # iwconfig wlan0
Here I assume your card is showing up as wlan0. You should see some output that looks something like: wlan0 IEEE 802.11b ESSID:"test"
Mode:Master Frequency:2.422GHz Access Point: 00:10:7A:71:A9:2C
Bit Rate:11Mb/s Sensitivity=1/242700000
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:1392 Rx invalid frag:0
Tx excessive retries:12 Invalid misc:262 Missed beacon:0
This is a list of the basic wireless settings in use by your card. These may need to change based on your networking needs. Later we will change these but you should see something similar to the above if all is well. Identify the MAC address of the wireless card The unique address that the system sees is likely the same number printed on the outside of the card. This number is called the MAC address for the ethernet interface. We will use this number to establish a certain set of wirless and ethernet settings whenever the system sees this particular card. To find the MAC address of your card, type: # ifconfig wlan0
This should output some text that looks something like: wlan0 Link encap:Ethernet HWaddr 00:10:7A:71:A9:2C
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:2480 (2.4 KiB)
Interrupt:155
Notice in the first line, there is a hardware address (00:10:7A:71:A9:2C in this case). This is the hexidecimal hardware address or MAC address that uniquely identifies your card. Write it down for future reference. We will be using this number to keep track of your card and the settings you would like to associate with it. Set up the wireless connection settings for your card There are three layers we are working on here to get a solid wireless TCP/IP connection. The first is the cardctl level which is the driver that actually manipulates the I/O pins in the PCMCIA or CF slot. This layer was verified by the cardctl command. The second layer is next, the wireless layer. This layer allows the wireless card to create a connection to the network. The third layer will be the actual TCP/IP configuation. Several parameters need to be set up in your wireless configuration to get the card on the wireless network. Here are the settings we manipulate for our setting:
These typically will get things working. The essid refers to the identifier of the wireless network you are trying to connect to. This is a unique id for every network in local proximity and it allows multiple networks to run in coordination without conflict. In our example we are going to create a new small network between the Stargate board on a Garcia robot and a laptop for off-robot control and interaction. This network will have the essid of "garcia". This could be any identifier and is typically something meaningful like the company name of the network, lab name, etc. Each of the wireless parameters can be manipulated on-the-fly using the iwconfig command. Lets start by setting the essid of your wireless card. # iwconfig wlan0 essid garcia
Here, we use the typical name for the wireless on the Stargate, eth1 . The name is followed by the parameter to change (essid in this case) and then the new value (we use "garcia" here in this example). Verify that this worked by checking the wireless configuration again: # iwconfig wlan0
If all is well, you should see that the essid has been changed to "garcia". Next, set the other two parameters and verify: # iwconfig wlan0 mode Ad-Hoc
# iwconfig wlan0 key s:jerry
# iwconfig
These three parameters should get things working for Ad-Hoc mode and a tiny network between your host (laptop in this case) and the Stargate. Here, we use the authorization key (like a password) of "s:jerry". You may have different needs if you are working through a wireless access point (managed mode) or other setting. Next, we will do the final configuration for the networkging which is the TCP/IP parameters. Set up the ethernet connection settings for your card Very similar to the iwconfig command is the ifconfig command which is used for TCP/IP settings. Start by typing in the raw command for our wireless LAN named eth1 # ifconfig wlan0
You should see the information for the TCP/IP settings we saw earlier when seeking the MAC address of your NIC (network interface card). For a simple private network between the Stargate and the host laptop, you can just use fixed IP addresses. Here we use the common network address space for this purpose with the following two addresses:
Set the Stargate's IP address using the following command: # ifconfig wlan0 192.168.3.2
Now, lets see if we can ping ourselves which would tell us that the network stack is in place and things are working on the Stargate end: # ping 192.168.3.2
You should see a stream of data, one line per second that looks something like this: PING 192.168.3.2 (192.168.3.2) 56(84) bytes of data.
64 bytes from 192.168.1.99: icmp_seq=1 ttl=64 time=0.051 ms
64 bytes from 192.168.1.99: icmp_seq=2 ttl=64 time=0.033 ms
64 bytes from 192.168.1.99: icmp_seq=3 ttl=64 time=0.029 ms
64 bytes from 192.168.1.99: icmp_seq=4 ttl=64 time=0.031 ms
--- 192.168.1.99 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
If this is working, you will see short times at the end. Hit Control-C to stop this train of messages. If you have this working, you should be ready to work on the other side of the equation to get the network working, the laptop or other device with which you will be networking. This HOWTO only covers the Stargate side. The other side should be fairly simlilar. Once both sides are set up, you should be able to ping across the wirlesss network from one machine to the other. These settings you have configured are not persistent. They will be gone after you reboot the machine. If this is something you will want to happen on boot up, you need to manipulate the configuration files to effectively type these commands for you automatically on start up. Configuring for automatic networking on boot up. Once you have things working, you can configure the Stargate to automatically come up in the wirless network with these settings. This is handled using two files (wireless.opts and network.opts). Both these files are found underneath the /etc/pcmcia directory of your Stargate's operating system. Each file is set up to look for a specific hardware address and system scheme and then it applies the commands needed. Since the Stargate will likely not be using multiple schemes, you can just use wildcards for the portions you don't use (or where you want global settings for all schemes). Both files then match the hardware address and apply settings, as though the were being typed into the tools we used earlier. Here is the /etc/pcmcia/wireless.opts configuration file which sets three parameters (essid, mode, key) for my card that has the MAC address 00:10:7A:58:21:AC. These coorespond to the configuration we did earlier using iwconfig . # Ambicom WL1100C-CF
*,*,*,00:10:7A:*)
ESSID="garcia"
MODE="Ad-Hoc"
KEY="s:jerry"
;;
Here, the line preceeded by the '#' character is a comment. The first 3 asterix show that I don't care about scheme or other parameters. The final setting of the four is the hardware address which I set to the number I recorded earlier. Here I leave off the last part of the number and use a wildcard. This would essentially use the same settings for any card with the hardware address prefix shown. Each setting follows on a line and the ";;" on the last line signifies the end of the settings for this card. The same process is used for the /etc/pcmcia/network.opts file to set the TCP/IP address. These lines coorespond to the values we set using ifconfig : *,*,*,00:10:7A:*)
IPADDR="192.168.3.2"
;;
Now, when you reboot the Stargate, these settings will "stick" as they will be applied each time the device is booted. Disable the boot up wired ethernet delays (pumping) Once you have the wireless settings configured and working, you may want to lose the wires from the ethernet connection and serial console terminal. Without these plugged in, the eth0 (wired ethernet port on the daughter card) will cough up some messages and take a while to time out on start up. This can be disabled by commenting out certain lines (using a preceeding '#' character) in the (/etc/init.d/networking) file . Comment out the 2 lines that use pump and look like: pump -i eth0
This will remove these delays when booting up the Stargate without any wired ethernet connection. Change the boot loader delay for faster booting Now, you have things working and you can log in via ssh over your wireless network so you likely don't want the serial console terminal connection any more. This console is where you press return to get the boot loader to boot without waiting on the timeout but the timeout is pretty long at ~30 seconds. You can shrink this down considerably and still leave enough time to "catch" the boot loader if you need to make boot changes later. To do this, first you need to get into the boot loader by rebooting your board and then pressing some key other than return from in the console terminal while the boot loader is starting up. Use the boot loader commands to set the delay to 3 seconds: set autoboot_timeout 3
params save
This should show that the parameters have been saved. Now, when you reboot, the wireless will come up automatically, the wired ethernet will not cause any delays, and the boot up time will be very fast. Revision History:
| |||
Related Links: Using Additional Serial Ports on the Stargate How To How To: Adding a heatsink to the Stargate Daughter Board. Acroname Projects: LRV Network Setup 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-2010 Acroname, Inc., Boulder, Colorado. All rights reserved. |