Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Sending medium-sized strings over ANT

Rank

Total Posts: 4

Joined 2014-04-15

PM

Hi All,

For my project I want to send stringified JSON-RPC objects to about 25 nodes with a mesh network. Say these messages are of size: "{address: hd7ahkvf, origin: hh27hd, UID: 22dgc, content: { id: 6654gd, method: "dosomething", params: {a:234, b:false, c:"bananas"} } }"

Will these strings be stripped down to chunks of a few characters per message over the channel? I could send it with burst but if all nodes are bursting data to eachother, say 4 times a second, this may be problematic (?).

I only have 2 nodes to test on (NRF51422 based N5 kits) so I'm unsure if this is feasible to scale up. Could anyone shed some light on this?

Regards,

Alex      
Avatar
RankRankRankRank

Total Posts: 235

Joined 2012-08-31

PM

Hi Alex,

If you use a limited character set you can transmit each character using ASCII or UTF-8 with 1 byte per character. Your example string is ~125 characters / 8 => 16. So you're looking at 16 ANT messages (broadcast or acknowledged) or a 16 packet burst, (or two 8 packet bursts if you find that works better with your timing).

I would consider condensing the data if you can. For example if you know which parameters you will be transmitting in each burst, you can define which bytes you will transmit each parameter value in, and just transmit the value etc.

Take a look at the ANT basics section and watch the video so you understand how the ANT devices communicate. http://www.thisisant.com/developer/ant/ant-basics/

Hope that helps,

Kat