0
\$\begingroup\$

from India. I am working on a project where multiple xbee s2c devices form a star network, i.e., 1 coordinator and 3 end devices. Each end device attached to the Arduino Uno, coordinator to the NodeMCU.

I am collecting data from all 3 end devices and upload it into my website. But there is a small problem, sometimes the data from 2 or more end devices concatenates.

enter image description here

So 1 way to solve this issue might be write a code in NodeMCU to seperate data before posting it to website. But (I am an electronics student), I want to know if it is possible to avoid the merging of data at xbee coordinator device itself (maybe, by configuring it with a set of AT commands). I think a few times, the coordinator receives data from end devices consecutively which is making the serial buffer to perceive the incoming data as single large value. I provided sufficient delays between all 3 end devices, but still sometimes the data is merging.

I read in the datasheet(https://www.digi.com/resources/documentation/digidocs/pdfs/90002002.pdf) that CSMA-CA is implemented in the MAC layer, which means end device wont transmit data till it finds the channel free.

Should I allocate a seperate channel for each end device or should I try increasing baud rates? Your help is greatly appreciated.

\$\endgroup\$
  • \$\begingroup\$ Byte stuffing might be the answer. \$\endgroup\$ – Andy aka Mar 22 at 11:18
  • \$\begingroup\$ @Andy, yes, it sounds right. I will try it. \$\endgroup\$ – Md Arshad Ali Mar 22 at 23:44
  • \$\begingroup\$ Please report back if u get some results. \$\endgroup\$ – Andy aka Mar 23 at 11:59
0
\$\begingroup\$

Looks like you might be running in Transparent mode. To avoid conflicts entirely you might need to use API mode.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.