XBee S6 WiFi with Wireless SD Shield howto

I've been trying to get the XBee WiFi working with an Arduino Uno using a Wireless SD shield.
I've managed to get the XBee to connect to an-secured AP.
I did this by sending commands from the Serial Monitor.
I've also gotten it working using Arduino code.

Here's my notes for how to get it working with the Serial Monitor:

  1. Plug the Wireless SD Shield into the Arduino Uno.
  2. Set the Serial Select toggle switch on the Wireless SD shield to USB.
  3. Plug the XBee S6 WiFi module into the shield.
  4. Add a 470uf cap into the shield going from XBee pin 10 (GND) to pin 1 (3.3V).
    This is because the XBee WiFi has an initial power spike when the Arduino is first turned on that is too high for the Arduino to handle (see page 14 of manual: http://ftp1.digi.com/support/documentation/90002124_F.pdf )
  5. Upload this sketch to the Arduino:
void setup() {
}

void loop() {
}
  1. Open the Serial Monitor
  2. Set line ending pull down to No Line Ending.
  3. Type +++ and press Send. The XBee should reply with OK.
  4. Set line ending pull down to Carriage Return.
  5. Type ATIDFoo and press Send, where Foo is the name of your un-secured AP. The XBee should reply with OK.
  6. Wait 10-20 seconds and you should try pinging whatever DHCP address you would expect the device to be added by the router.

Here's the version of the instructions for getting it working with some Arduino code so the computer can be removed from the equation:

  1. Plug the Wireless SD Shield into the Arduino Uno.
  2. Set the Serial Select toggle switch on the Wireless SD shield to USB.
  3. Plug the XBee S6 WiFi module into the shield.
  4. Add a 470uf cap into the shield going from XBee pin 10 (GND) to pin 1 (3.3V).
    This is because the XBee WiFi has an initial power spike when the Arduino is first turned on that is too high for the Arduino to handle (see page 14 of manual: http://ftp1.digi.com/support/documentation/90002124_F.pdf )
  5. Upload this sketch to the Arduino:
void setup() {
  Serial.begin(9600);
  Serial.print("+++");
  delay(5000);
  Serial.println("ATIDFoo");
}

void loop() {
}

Note: For the line Serial.println("ATIDFoo");, the Foo should be replaced by the name of your un-secured AP.
6. Set the Serial Select toggle switch on the Wireless SD shield to MICRO.
7. Push the reset button on the Wireless SD shield.
8. Wait 10-20 seconds and you should try pinging whatever DHCP address you would expect the device to be added by the router.

It was quite a journey getting to this point.

I started out thinking the code built into the Arduino WiFi library should 'just work' if I plugged an XBee WiFi into the Wireless SD Shield:

Of course that's not the case since the XBee WiFi uses a completely different chipset.

So I switched to trying to get this XBee WiFi port from the mbed working:

It's a work in progress, it doesn't even have an Arduino sketch, just C++ code.
Eventually I got it to compile:

I still haven't gotten that library to work.
Ultimately I imagine the existing XBee library would be more efficient than what I'm doing, but for now this is the only method I have that works.
I haven't seen any tutorials on how to integrate all these tricks together to get past the pitfalls for this particular XBee so I thought I would post all my notes here. Maybe I'll turn this into a tutorial soon, probably once I've explored a bit more about how to do something more interesting with the XBee WiFi.

I haven't used that module, but I think you're almost there, now that you can directly
interrogate/configure the module from the terminal. This means you can also send data
out the module.

See post #5 on the following thread for setting up a 2nd node to talk to via an adHoc
network.

It looks like the way to get that library working it to make sure the XBee is in API mode, AP=2.