Robotics wifi pro pack
Bringing up the Robotics Wifi Pro Pack with Open Embedded.
The procedure I used to bring up a Robotics Wifi pack.
1) If using Ubuntu 8.10 setting up the build environment is done in great detail here: (link)
2) Get an image and load it onto a 2GB microSD and booted from that to I did not mess up the gumstix great directions here (Boot_From_MMC).
Could not get an 8GB card to work. Seems Uboot does not recognize SDHC disks only SD, Open Embedded would read the 8GB card.
Card partitions after formatting: Device Boot Start End Blocks Id System /dev/mmcblk0p1 1 24 42450+ 6 FAT16 /dev/mmcblk0p2 25 1088 1883280 83 Linux
Also so that you can talk attach the robostix later on add the following when you edit $GUMSTIXTOP/user.collection/conf/machine/gumstix-custom-verdex.conf uncomment the robostix and comment out the lcd and touch screen:
# if you enable robostix you will need to disable both "lcd" and "touchscreen" features MACHINE_FEATURES += "robostix" #MACHINE_FEATURES += "lcd" MACHINE_FEATURES += "rgb16" #MACHINE_FEATURES += "rgb18" #MACHINE_FEATURES += "touchscreen" MACHINE_FEATURES += "keyboard" MACHINE_FEATURES += "pcmcia" MACHINE_FEATURES += "mmc"
3) Using the tweener and the gumstix (not the robostix or the netpro) I tried the image.The Gumstix would boot from the microSD only after I rebooted, But it would never boot from the microSD after a power cycle. Turned out running mmcinit twice in the bootcmd under u-boot got the mmc boot to work. Not sure why, In U-Boot I changed the boot command to run mmcinit twice:
setenv bootcmd "icache on; setenv stderr nulldev; setenv stdout nulldev; mmcinit; if pinit on && fatload ide 0 a2000000 gumstix-factory.script; then setenv stdout serial; setenv stderr serial; echo Found gumstix-factory.script on CF...; autoscr; else if mmcinit && fatload mmc 0 a2000000 gumstix-factory.script; then setenv stdout serial; setenv stderr serial; echo Found gumstix-factory.script on MMC...; autoscr; else setenv stdout serial; setenv stderr serial; katload 100000 && bootm; fi"
saveenv
boot
4) Get the netpro card connected, remove the tweener and connect the netpro. The gumstix by default is configured to DHCP so I plugged it into my linksys router and looked to see what IP address it got. Once you have the IP address loginto the gumsitx with the default username (root) and password (gumstix).
5) Get the wireless working. Edit /etc/network/interfaces find the wlan config example that has the security your router has (WEP/WPA/none) and configure it to match your wireless (add key and ssid). Instead of using "txpower 100mW" I used "power on" otherwise the wifi card gets hot and you burn your batteries up. Reboot and look at your router for your wifi address.
6) Get the robostix attached. There are two modifications I had to do to the board.
a) Just needed to add the 10k pullup resistor as described here link b) short V_BATT to V_ROBOBATT robostix_power.pdf c) Make a connector as described here link which connects Atmel 0 Tx to PXA ST Rx and Atmel 0 Rx to PXA ST Tx.
7) Get some precompiled hex files from here Robostix_samples. (details on compiling them later)
Program the fuses:
uisp --wr_fuse_l=0xbf --wr_fuse_h=0xc9 --wr_fuse_e=0xff
Load the led test onto the robostix using the connector in part c above and uisp:
uisp --erase --upload if=Flash-LED.hex
8) Get the open embedded boa web werver to run. Edit /etc/boa/boa.conf. All you need is a server name (anything seems to work)
# ServerName: the name of this server that should be sent back to # clients if different than that returned by gethostname + gethostbyname ServerName myGumstix
Restart the server $ boa restart
9) Get a hello world program to build and run hello_world.
Robostix build environment:
10) Setup the build environment for the robostix using gcc Installing gcc-avr.
11) Create a directory for your robostix source to live. Checkout Dave Hylands robostix code:
svn co http://svn.gumstix.com/gumstix-buildroot/branches/projects/robostix .
12) cd into the Flash-LED directory and type "make".
13) Upload the file to the robostix:
uisp --erase --upload if=Flash-LED.hex
The Leds should start to flash as before.
14) Use sertest (should be already on your gumstix, but info is here sertest so connect to the robostix via the serial port used by uisp.
sertest -p ttyS2 -b 38400
The output should look like:
B 88 91 9a a2 af bc 98 91 C: ff Y 89 92 9a a2 b0 bc 99 92 C: ff R 89 92 9b a3 b0 bd 99 92 C: ff B 89 92 9b a3 b0 bd 9a 93 C: ff Y 89 93 9b a3 b1 be 9a 93 C: ff R 89 93 9b a3 b1 be 9a 93 C: ff B 89 93 9c a3 b1 be 9b 94 C: ff Y 89 93 9c a4 b1 be 9b 94 C: ff
Press the space bar. The LEDs stop flashing and you get a message if so two way communication is working. Dave Hylands has a few other robostix programs that you checked out there are lots of good examples in there.