At XBee3 router device micropython ps=1 at start-up, transmission to coord takes ~ 10sec.. too slow!

I have an XBee3 router device running micropython firmware at start-up (PS=1). At start-up the firmware transmits a message to the coordinator using xbee.transmit(coord64bit, message)
The message is received by the coordinator device and processed through a python message received callback function.

So when I run the python program with the coordinator module powered and then power up the router module, it takes about 10 seconds for the auto-start micropython to send the message, message received, result.

Any way to make this go like 10x faster? any faster?

it appears to be this snippet of my micropython firmware code that takes the majority of the time:

while xbee.atcmd(“AI”) != 0:

I tried changing the baud rate on the router AP=4 device from 9600 to 115200… I don’t think it made a difference…

then I changed the above snipet of code to:

while xbee.atcmd(“AI”) != 0:

which appears to have made it like 2 seconds faster maybe? ish.

nvm the transmission send timing varies from 5 seconds to 12 seconds so, still totally inconclusive… any ideas?

thanks :slight_smile:

No. You see you have to wait for the two modules to associate as you are using Zigbee firmware.

If this is a simple point to point network, then I would suggest using the 802.15.4 firmware instead. Then it can operate considerably faster as there is no association needed.

hm interesting… I would switch the protocol being used but I have no idea the rippling effect that would have elsewhere in my code?

is switching protocol device-specific or can I do this by just configuring the device with a different protocol?

do all the devices in a network need to be operating on through the same protocol?

lasly, why is ZigBee protocol slower than 802.15.4 firmware faster? some association mechanism you say?

much appreciated.

The Micro Python code is the same for both. On that side, it real should not be any different.

Yes, all of the devices in the network would need to use the same protocol. Keep in mind that the 802.15.4 IEEE protocol is a Peer to peer, point to point, point to multi-point protocol. All that is needed in the XBee’s default configuration is for any two units to be in range of each other for them to pass data back and forth.

The Zigbee protocol runs in higher layers of the OSI module on top of the IEEE 802.15.4 protocol. So there are more functions that need to occur before data can be sent. For example, you have to wait for Joining or Association occurs before any data can be sent.