21 Aug 2007
(updated 21 Aug 2007 at 04:01 UTC) »
WiFi module tested sucessfully!
Today the Lantronix WiPort wifi module on the Dynamixel Robotics Controller board was successfully tested!
Initially I had quite a time getting the wifi module going - mainly due to confusion regarding the two serial ports (3.3V logic level) the WiPort provides. On the controller board I had designed port 0 to run directly into the main AtMega2560 micro, and the secondary port 1 to run through a RS232 level converter IC and to a DB9 serial connector on board. This port was intended to be used as a serial configuration port only, a means to initially configure the wifi module, and to act as a fall back connection for fault diagnosis if the wifi link was not working for any reason.
Unfortunately the Lantronix documentation for the module, although it mentions both serial ports, doesn't really draw any distinction between the operation of them - as I read the documents, either port could support their serial configuration console.
So, when I fired up the board and tried to enter the 'xxx' required to drop the module into console mode from the DB9 connector - nothing. I went through all sorts of debugging steps because I didn't know whether module, my pcb or the RS232 level converter circuitry was at fault, all to no avail. I did think that perhaps the serial configuration console feature was only available through port 0 (which is connected to my Atmel micro, which currently has no firmware in it to speak of...), however this was harder to test.
I resolved to write some firmware to just pass through a connection from the FTDI USB chip on board to the WiPort module transparently. This way I could use hyperterminal to talk to Port 0 of the WiPort as if I was connected directly to it. I then ran into more difficulties - the USB port was not working - not even getting recognised on the PC at all!
Eventually I found an incorrectly loaded resistor (wrong value...) in the USB circuitry that was preventing the FTDI chip from functioning correctly. Once that was fixed, the USB sprang into life, and I could open Hyperterminal connected to com4 (assigned to the USB serial). Wrote some quick firmware for the transparent link from USB to the WiPort - basically any characters received from either port are passed across to the other. Turned it all on, entered the 'xxx' to jump to the WiPort console, and voila! Success. I could access the menu setting up all the parameters in the WiPort. Next came some rapid learning about AdHoc and Infrastructure modes in wifi networks. I had initially wanted to use an adhoc connection between my laptop and the robotics controller so the whole setup would be portable outside my house, however I couldn't get this to coexist with the infrastructure mode I use at home with my wireless router. Basically I would have to reconfigure my laptop wifi everytime I wanted to use the robot... not very satisfactory. So I ended up just configuring it to use the home network router, which I suppose I will have to take with me if I want to demonstrate the robot elsewhere.
Now I had the WiFi module basically going, I thought of the next test... Since I had firmware in the Atmel to pass through comms from USBWiPort I could telnet from my notebook using hyperterminal to the WiPort Port 0, which would get passed through to usb, which I had open again in hyperterminal on the laptop. This worked! I effectively had an elaborate loopback between hyperterminal windows, and could type in either window and see the results in the other. I then wanted to see whether the WiPort would support simultaneous connections to Port 1 at the same time as port 0, so hooked up a serial cable from the laptop to the DB9 connector on the board, another hyperterminal on com1, and a fourth hyperterminal window telneting to the WiPort Port1. Amazingly, all this worked as well! The image above has this crazy scheme illustrated, two simultaneous telnet sessions, one looped back through an FTDI usb serial connection, the other looped back through the DB9 connector onboard the controller to the laptop com1 serial port!
So now I have tested some large slabs of the Dynamixel Controller, it is time to get it to actually do something halfway useful. I think the next step is to write firmware to link to the Robotis Dynamixel AX-12+ servo network, and then get some software on the laptop to move a servo over the wifi (or even the usb) link. When that happens I am sure I will have to post an blog entry (even though others may not be as excited about the event as I am...).
Syndicated 2007-08-21 02:05:00 (Updated 2007-08-21 03:30:21) from Robots Australia