I picked up an
RN-XV from Sparkfun to see what it would do. I didn't read the docs before I ordered, and I expected to be reading and writing registers and building my own packets. However, I was almost disappointed to learn how much functionality is supported within and how easy it is to get working.
The RN-XV is a carrier board for Roving Networks' RN-171 WiFi module. Since the XV is meant to be pin compatible with the Xbees which use an odd pin spacing, I also ordered an
Xbee Explorer Regulated to make connections and power easy (the FTDI cables I have are logic 3.3v but 5v Vcc, so the regulator is needed).
I plugged TX to Din, RX to Dout, added power, and BAM! Blinky lights!
WiFly Ver 2.32, 02-13-2012 on RN-171
MAC Addr=00:06:66:72:20:58
Auto-Assoc roving1 chan=0 mode=NONE FAILED
Unfortunately, it didn't respond to my serial input. After a bunch of tracing and reading, it turns out that the Xbee board does logic level shifting with diodes. The Xbees's have pullup resistors in their Din pins, however the RN modules do not. After adding a 10k resistor from Vcc to Din, I was able to link it to my network and ping things first try.
CMD
<2.32> set wlan phrase myWifiPasswd
AOK
<2.32> join mySSID
Auto-Assoc secure chan=11 mode=WPA1 SCAN OK
Joining mySSID now..
<2.32> Associated!
DHCP: Start
DHCP in 775ms, lease=86400s
IF=UP
DHCP=ON
IP=192.168.9.61:2000
NM=255.255.255.0
GW=192.168.9.1
Listen on 2000
ping 4.2.2.1
Ping try 4.2.2.1
<2.32> 64 bytes from 4.2.2.1: seq=1 ttl=251 time=6.56 ms
64 bytes from 4.2.2.1: seq=2 ttl=251 time=6.41 ms
<2.32>
With the default settings, you can open a socket to the device via wifi on port 2000. Any data that arrives goes out the serial, and any data in the serial goes out the socket. Easy as pie. Now I just need to find something cool to do with it...
For the curious:
RN-XV Datasheet (pinout),
RN-171 Manual and Command Set