Doing some holiday shopping? Please check here for shipping deadlines to make sure your order arrives in time.

Member #576196

Member Since: July 19, 2014

Country: United States

  • Sorry but it still doesn't work. It prints "Sending update...SUCCESS!" to the serial monitor but that isn't really true.

    When plugged in all that happens is the device requesting DHCP. There is no activity outside of that sadly. The Pro Mini 3v does appear to now be formulating a valid HTTP GET request but nothing happens when sent to the Xbee. By the way, which firmware are you running on the S6B? I read about an issue with the S6B having trouble passing GET and POST to an MCU. (Could be related?) I'm on firmware 2021. Digi Support

    Edit: Maybe try to code it more like this using PROGMEM The Thing System Xbee WiFi S6B

  • Does this mean you got data to post to data.sparkfun.com?

  • I am having a post issue as well. When looking at the serial output I am getting everything up to "Sending update: Success!!!" followed by "time : sensor info" continuously but nothing gets posted to the web. I modified the sensor info (I only have one sensor) but nothing outside of that. Furthermore the serial data "time: sensor data" being printed is evidence that I didn't mess that bit up. I'm using a pro mini 3v, an xbee breakout, and an analog uv sensor. TX RX (3,2) and A0 for the sensor. Frustrating...

    EDIT: This is all that's happening in wireshark. After the ARP request there is no further communication happening.

    DCHP Discover
    DHCP Request
    ARP Who has Tell

    EDIT 2: I have confirmed that it is not the module, the ability for the module to talk to the Pro Mini 3v, or the module's ability to connect and post to the internet. I can successfully post serial data to Etherios using the Xbee S6B connected to Software Serial and an FTDI breakout attached to the Pro Mini 3v.

    EDIT 3: Using the default code with no sensors attached and the sensor values manually set to zero for testing purposes this is what I get when I print phant.url(). Note that I've also tried the below method of commenting out the lines suggested in setup() below.


    The phant.url function should produce something like: (as per the README)


    It appears as though string concatenation isn't happening as it should in my case. This is what printing phant.post() returns:

    POST /input/PUBLIC_KEY.txt HTTP/1.1
    Host: data.sparkfun.com
    Phant-Private-Key: PRIVATE_KEY
    Connection: close
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 0

    Edit 4: I suspect the use of String is causing memory fragmentation. Why not use PROGMEM instead...

    Edit 5 (FINAL): So after days and many hours of netcat, putty, wireshark, and XCTU shenanigans I have learned a lot about the Xbee S6B on firmware 2021. My conclusion is that using Software Serial is not a good recommendation for all µC. On my 8 MHz devices, Software Serial (As of Arduino 1.0.5) is just not reliable which is why the programs haven't been working. After monitoring the Software Serial from the Pro Mini using an FTDI cable it was clear by the sprinkled garbled characters that this was the issue. If at all possible use Hardware Serial for Xbee communication or any other UART communication and Software Serial for debugging ONLY. I'm thinking I will get a Teensy moving forward as it has a UART interface independent of its USB and fits my 3v requirements. That said, using the Xbee S6B in SPI mode would solve these issues, increase potential throughput, and there is already a library for it xbee-wifi-spi-arduino. The downsides to this approach are that it is more complex, requires knowledge of somewhat complicated networking to achieve even simple tasks, requires more pins, and is more resource intensive.

    To Jimb0: This doesn't mean there wasn't an issue using String Objects. That still exists and I recommend using PROGMEM instead like the example I posted.

    As for using the Xbee S6B for simple tasks it can be okay but was designed for much much more. For simple GET or POST use Transparent Mode using the UART interface and simply print an HTTP POST or GET request line by line to the module. I think it is probably best to pre-program the S6B using XCTU for destination IP (Server IP), port number, and wireless configuration instead of trying to do it in the program. Also, remember that the port number is in HEX. (so 80 = 50) As a final note RTFM...the User Manual provided by Digi isn't terrible.

    Here is a simple bit of "quick and dirty" code I used to test send messages to Pushover using the XBee. (IP

    void setup () {
    void loop() {
      Serial.println("POST /1/messages.json HTTP/1.1");
      Serial.println("Host: api.pushover.net");
      Serial.println("Connection: close");
      Serial.println("Content-Type: application/x-www-form-urlencoded");
      Serial.println("Content-Length: 85");

    I'd like to also note that I had trouble using XCTU's serial console during my tests (packet send). I almost always got back a 400 Error letting me know the request was bad. The same HTTP POST or GET request however would work when entered over serial using a µC. I'm still not exactly sure why this is. It may be a timing issue. For reference I am using XCTU Version: 6.1.1 Build ID: 20140129-0.

No public wish lists :(