ronoth / LoStik

LoRaWAN compatible USB test device
MIT License
134 stars 40 forks source link

How to send string data in lorawan.py #21

Closed aditya767 closed 5 years ago

aditya767 commented 5 years ago

protocol.send_cmd("mac tx uncnf 1 hgbhbjbhjbbjyjbv")

This gives invalid_param. How to pass string? I also tried : protocol.send_cmd("mac tx uncnf 1 %s" % "fsdfdssdvdvs") but it also gives invalid_param. Please help. Also what is the max size of string(payload) I can send?

lolsborn commented 5 years ago

The data has to be converted to hex. Take a look at the command reference linked in the README.

<data> hexadecimal value.
The length of <data> bytes capable of being transmitted are dependent upon the set
data rate (please refer to the LoRaWAN™ Specification for further details