How many data can the transmit method send?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
manos
Posts: 27
Joined: Mon Sep 28, 2020 9:03 am

How many data can the transmit method send?

Post by manos » Fri Nov 27, 2020 8:04 am

Hey,

Being a noob in Micropython and the Xbee 3 RF Zigbee module I have, I have faced the following problem:
While trying to transmit wirelessly some data/message from one xbee to another one (using the xbee.transmit method), I noticed that depending on the size of the message, an error might be raised. If I recall correctly it was an error of type EAGAIN.
My guess that the fault was the size of the message, is based on the fact that if I send a long string (like a whole sentence) I get the error, whilst if I send a simple "hello" the message is transmitted successfully!

So, is there a way to know what is the max size of the message-payload that I can pass as an argument in the xbee.transmit() method?

Thanks in advance!

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: How many data can the transmit method send?

Post by jimmo » Sun Jan 10, 2021 11:18 pm

manos wrote:
Fri Nov 27, 2020 8:04 am
So, is there a way to know what is the max size of the message-payload that I can pass as an argument in the xbee.transmit() method?
Unfortunate Digi have never released the code for their MicroPython fork so very little is known about internal details like this... (This is a real shame because these modules are very useful). You might have more luck posting on the Digi forum -- https://www.digi.com/support/forum/

In general though, this is fairly typical of a low-level API for transmitting data -- there will be a fixed transmit buffer size. You can probably try and figure this out by sending increasingly large messages until it fails.

Post Reply