Send double/float data via OTAA

(Yamaha) #1

Hello Everyone,

I want to send double or float data via OTAA the given example is sending just a string and character array.

Can somebody please tell me how can i send double value via lora packet ? for example ( temp or gps)

I have tried different type casting but it’s not working . Please advice

thanks in advance


what node are you using? off the shelf or one of your own and have access to the code?

There are multiple ways to do this depending on the precision needed and number of bytes you want to send.


(Yamaha) #3

I am using Seeeduino LoraWan w/gps and yes i have access to the code

No need for multiple ways … the easiest way is enough :smile:

(Arjan) #4

I’d suggest you read about LoRaWAN first, and then search this forum. OTAA is unrelated to sending any data, and you cannot expect people to list all options without even telling us what you’ve tried.


Check my blog, last post explains some of what you want to do in detail:
In particular this page:

(Brady Aiello) #6

Try this out. Make sure to use the included payload function. It glues the bytes back together in the right order to compensate for the difference in endianess of the Seeeduino and TTN.

(Brady Aiello) #7

Unions work well for sending LoRa packets from C. If you’re using Python / Micropython, struct-packing is the way to go. It keeps the message size small.