Home  >  Support  >  Support Forum  >  Data format in serial/0 stream from xbee wifi
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Data format in serial/0 stream from xbee wifi

0 votes
Hi,

I have Xbee Wifi TX pin connected to RX pin on Arduino.
The code on the Arduino is doing simple thing of incrementing the counter every 2s and sending its value over Serial protocol to Xbee Wifi, and then to the Device Cloud:
Code:
int counter = 0; void setup() { Serial.begin(9600); } void loop() { delay(2000); counter++; Serial.println(counter); }

I have problem with seeing this data properly in Device Cloud data stream: in the data column of serial/0 stream I see values that does not correspond to the value of the counter variable being send, and they are for instance 858994489, 858994736,858994737,858994739,.... while the counter values are smaller than 1000 for sure. Changing the Data Type from Integer to other type does not help.

On the other hand, when I use Xbee Wifi cloud kit serial monitor (https://xbeewifi.herokuapp.com/#/dashboard) connected to my cloud I can see the values displayed properly. If I set up my Xbee Wifi to write the serial data to the Data File in the cloud, the values in the file are also right. This assures me that my setup and connection are done properly. Is the data in serial/0 encoded in some way or it is some special format?

My goal is to use Device Cloud API to access my data from outside application, but with those weird values I am unable to.

Thanks!
asked Jul 11 in Data Services by kaminski New to the Community (0 points)
edited Jul 11 by kaminski

Please log in or register to answer this question.

1 Answer

0 votes
Hi,

The values are sending like characters, in ASCII.

You can try also to make an http request "GET /ws/DataPoint/[data path]" and see if you get the response whith the right values; in this response they are in Base64. Maybe you want to try the API Explorer from Device Cloud for this (in Documentation tab).

If you need convertor here you are one:
http://www.hcidata.info/base64.htm

I hope I have helped.
answered Jul 29 by Violeta New to the Community (1 point)
edited Jul 29 by Violeta
Contact a Digi expert and get started today! CONTACT US
...