Home/Support/Support Forum/Sending data from arduino to xbee and uploading value to digi cloud

Sending data from arduino to xbee and uploading value to digi cloud

0 votes
Hello,

I'm new in this so I'm asking for help.

1. I have program in arduino IDE to send some values to XBEE WI-FI S6B.

Program:
#include <SoftwareSerial.h>

SoftwareSerial xbee(2, 3); // RX, TX
char c = 'A';
int pingPong = 1;

void setup() {
Serial.begin(57600);
Serial.println( "Arduino started sending bytes via XBee" );

// set the data rate for the SoftwareSerial port
xbee.begin( 9600 );
}

void loop() {
// send character via XBee to other XBee connected to Mac
// via USB cable
xbee.print( c );

//--- display the character just sent on console ---
Serial.println( c );

//--- get the next letter in the alphabet, and reset to ---
//--- 'A' once we have reached 'Z'.
c = c + 1;
if ( c>'Z' )
c = 'A';

//--- switch LED on Arduino board every character sent---
if ( pingPong == 0 )
digitalWrite(13, LOW);
else
digitalWrite(13, HIGH);
pingPong = 1 - pingPong;
delay( 2000 );
}

I also can see values in serial monitor (arduino IDE tools option).

2. Like I said I'm using xbee wi-fi s6b and XCTU. In the XCTU I setup xbee (Soft AP mode) and SSID.
Now I have problem: I'm connected to xbee (like wifi connection) and in XCTU console I dont see any data receiving from arduino program.

3. I will try to send data from arduino-->xbee-->to digi cloud. I added xbee into it by MAC address. Next will be taking this data from cloud and send it to android mobile app - just to show the value.

Any suggestion?

Tnx for answer.
asked Aug 23, 2016 in XBee Programmable Development by hasbiba New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
Is XBee continuously connected to laptop in Soft AP mode? If yes, then in that case it don't have access to internet. In XCTU, you have to use "Active Scan" button and connect module to an Access Point with internet capability.

Second, check "DO" parameter of module to make sure that transmission of data to cloud is enabled (Bit 2).

If everything is set correctly, then you should be able to see this data under "Data Files" in Device Cloud.
answered Aug 24, 2016 by asgm Veteran of the Digi Community (1,408 points)
Hi again,

tnx for you answer...now I got this in console log (XCTU). I wonder what is meaning of it, can you please help me?

+++OK
ATWR
OK
ATAC
OK
ATCN
OK


2B 2B 2B 4F 4B 0D
41 54 57 52 0D
4F 4B 0D
41 54 41 43 0D
4F 4B 0D
41 54 43 4E 0D
4F 4B 0D

Thanks. If you need screen of mine XCTU settings please let me know your email address.

Bye
...