XBEE API Frame Transmittion S6B

Greetings,

Thank you for reading this post.

I am trying to make a GET request to a web server from an arduino pro mini using the Digi WIFI s6b module in API mode. I have created the needed frame in XCTU and successfully made the GET call. However, when I try to send the same frame from within the arduino environment, the call does not happen. (Serial monitor shows the frame being sent).

I have connected the DIN/DOUT → TX/RX correctly and supplied the 3.3V. Below is the code I use to test. Again, sending the frame from XCTU hits the web-server (looking at access logs), but not when the frame is sent from the arduino.

#include <SoftwareSerial.h>

SoftwareSerial mySerial = SoftwareSerial(0,1);

void setup()
{
  mySerial.begin(9600);
}

void loop()
{
  byte test_frame[] = {0x7E,0x00,0x33,0x20,0x10,0x17,0xFD,0xD7,0x09,0x00,0x50,0x00,0x00,0x01,0x01,0x47,0x45,0x54,0x20,0x2F,0x74,0x65,0x73,0x74,0x3D,0x31,0x20,0x48,0x54,0x54,0x50,0x2F,0x31,0x2E,0x31,0x0D,0x0A,0x48,0x6F,0x73,0x74,0x3A,0x32,0x33,0x2E,0x32,0x35,0x33,0x2E,0x32,0x31,0x35,0x2E,0x39,0xC4};
 
  mySerial.write(test_frame,55);
  delay(10000);
}

SoftwareSerial mySerial = SoftwareSerial(0,1);=>why are you using SoftwareSerial on the hardwareSerial port ? Do you have your computer connected on USB as well?

I wasn't sure how to transmit the frame to the radio module using the standard Serial and found an example using the SoftwareSerial.

J-M-L,

Thanks for the good question. I have solved the problem. Sometimes I go too far down the wrong rabbit hole.

Below is a way to send a frame (I created my frame using XCTU frame creator built into the tool) from Arduino pro mini (actually Rocketscream's ultra 8) from arduino to the Digi S6B WIFI module. The wiring is arduino TX->S6B DIN, RX->S6B DOUT. The radio runs on 3.3V, the rocketscream conveniently provides a 3.3V pin. Otherwise, you will need a 3.3V regulator.

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  byte test_frame[] = {0x7E,0x00,0x33,0x20,0x10,0x17,0xFD,0xD7,0x09,0x00,0x50,0x00,0x00,0x01,0x01,0x47,0x45,0x54,0x33,0x2F,0x74,0x65,0x73,0x33,0x3D,0x31,0x20,0x33,0x33,0x54,0x50,0x2F,0x33,0x2E,0x31,0x33,0x0A,0x48,0x6F,0x73,0x74,0x3A,0x32,0x33,0x33,0x33,0x35,0x33,0x2E,0x32,0x31,0x35,0x2E,0x33,0xC4};
 
  Serial.write(test_frame,55);
  delay(10000);
}

:slight_smile: well done!

Using Rackspace Hosting ?