Max bytes allowed to transfer via publishdata function

79 views
Skip to first unread message

Roman Dorogan'

unread,
May 4, 2016, 8:36:08 AM5/4/16
to souliss
Good day!
I used the example of publishdata function from Souliss wiki:

// Sender
uint8_t mypayload[10];

if(...) publishdata(Alarm, mypayload, 10);
// Receiver
uint8_t mypayload_len;
uint8_t mypayload[10];
if(subscribedata(Alarm, mypayload, &mypayload_len))
{
   
}

When I used "mypayload" array dimension equal or less then 9 - it worked perfectly. When the dimension was 10 or more - nothing worked.
The network architecture is very simple, only 1 node based on Arduino Uno and 1 gateway based on ESP8266, connected by TX-RX pins.
All other Souliss functions work correctly. Is this a principal limitation of publishdata function or it can be improved?
Thank you in advance!

Di Maio, Dario

unread,
May 4, 2016, 2:41:24 PM5/4/16
to sou...@googlegroups.com

Hi Roman,

the publish use a small queue of the RAM and that's why you cannot send more data.

The size is defined here
https://github.com/souliss/souliss/blob/friariello/conf/frame/MaCacoCfg.h#L268

Here is defined the maximum size while sending a publish
https://github.com/souliss/souliss/blob/friariello/frame/MaCaco/MaCaco.cpp#L821

You should be able to send larger frames increasing that constant value, but anyhow you never have to build a frame larger that the MaCaco_PAYLOAD.

Regards,
Dario.

From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/b606d8c9-efd5-46b8-a685-1f67a7d3d21a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Roman Dorogan'

unread,
May 5, 2016, 10:07:30 AM5/5/16
to souliss
Now it works! :) Dario, thank you very much!

NORBERT JÓNA

unread,
Jun 17, 2016, 4:18:45 AM6/17/16
to souliss
Hello Dario,

Would you mind fixing this in WIKI ("You can send up to MaCaco_PAYLOAD bytes." - in peer2peer section) ? I also faced with this problem and the current wording is a bit confusing. I assumed that the max length is MaCaco_PAYLOAD (41bytes)
But the max data length is " < MaCaco_QUEUELEN-5 " and  the " MaCaco_QUEUELEN = 15" by default. So the max leght is just 9 byte.
The "MaCaco_PAYLOAD" defined in the "souliss\conf\frame\MaCacoCfg.h " but not used.

Thank you in advance
Best regards
JN

Di Maio, Dario

unread,
Jun 17, 2016, 11:45:27 AM6/17/16
to sou...@googlegroups.com
Done, thanks.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

NORBERT JÓNA

unread,
Jun 18, 2016, 3:59:02 AM6/18/16
to souliss
I also thanks

JN
Reply all
Reply to author
Forward
0 new messages