Sending Customized Data

I have looked through a couple LoRa node repositories (https://github.com/wklenk/lmic-rpi-lora-gps-hat) and (https://github.com/rneurink/MAX32660_LMIC) and I cannot find anything to do with sending any normal real human writing as data.

Is there any easy way to do this? Eg. send “Hello World” from the node and see “Hello World” come up on the gateway.

Thank you in advance.

You could simply send the ASCII character code and decode at other end…though it is not recommended to send ‘data’ as text (and vise versa) as this is very inefficient in the context of small payloads, long battery life and infrequent traffic and need to keep duty cycle to a minimum…may be that if you want to send lots of what you describe as normal human writing as data then LoRa/LoRaWAN might not be the comms solution for you! :thinking: there is always SMS! :wink:

Note also the GW wont decode you message/payload - it will be visible (once decoded) in you application/console…the GW just passes on you encrypted message via its packet forwarder to the network server and thence on to your application server where it can be decoded & decrypted.

This is the part that I am stuck on. I appreciate the rest of what you said, but the “simple” stuff still has me confused. Are there any repositories that you could recommend where I could customize the data that is being sent? It doesn’t have to be text or anything like that, I just want to input something on the node side and see it come up on the gateway side.

I should add that I have gotten the node and the gateway to talk to each other, I’m just onto the next step of sending what I actually want to send, and after many google searches, I have not been able to find any repository that will let me easily set any custom characters.

I don’t know of any repo to do that. My thought is to take the thethingsnetwork-send-v1 example program from https://github.com/wklenk/lmic-rpi-lora-gps-hat and adapt it to take in command line arguments that specify the various keys needed and allow arbitrary hex data to be specified. example:

ttn-send -a appeui -d deveui -n devkey -s artkey -e devaddr -x hexdata

It should be relatively simple to do. I don’t know how stable lmic is though at this point.

See Creating a command line version of LMIC.

This seems to be the right topic to ask questions about my setup. The quote below gives some background info on my project.

We am using the LMIC-rpi-lora-gps-hat repository on our nodes. We have successfully connected our nodes to the TTN and sent uplink packages to our gateway. We were able to do this using one of the example programs called periodic. It sends the cpu temp of the pi every 60 seconds.

We are not sure how we should proceed now. This repo only has a few examples in it, such as ping, join, transmit, beacon, periodic, modem, hello etc… Although we want to be able to determine the actual data to send out on each of our nodes. So with this repo it looks like our only option is to go in and modify one of these example programs to meet our needs, or find a new repo that actually allows the person using it to determine the data to send to the gateway.

since the repository is written in C, I would rather just find a different repo that does not require us to re-write any of the programs.

I appreciate any insight or recommendations on how we should proceed.

2 posts were split to a new topic: Creating a command line version of LMIC

Apart that sending strings through LoRaWAN is discouraged because you will send long packets, text is just numbers coded according to ASCII, so it is just matter of sending the string you want as is. The basic LMIC example shows exactly what you want…

1 Like

So has anybody been able to successfully send any type of data over The Things Network? I have yet to see any example or any proof. For example, I want is to send the number “12”. Can anybody here show me that they can do that, or show me how I could with step by step instructions and not just telling me to edit C code?

Send a single byte payload in binary format with your app decoding as such : 000001100 :slight_smile:

That will only happen if you run a network stack on the gateway. Otherwise the gateway will forward any LoRaWAN packets it receives to the backend where the data will be visible.

Interesting, what software did you use? Normally a node sends data which any gateway forwards to the backend. And the backend schedules data to be forwarded to the node by a gateway.

Yes, thousands of users have devices that send millions of data packets each day.

May-be you should start by reading the tutorials? Like working with bytes and the other device related information?

Just curious, what hardware are you using?

1 Like

Again: the basic LMIC example sends precisely “Hello world”, like you asked. However, as others told you, on the Console you will read it as bytes, but is there.
Unfortunately programming requires some knowledge of… programming and thus also of how data is represented inside computers :wink: . The tutorial suggested by @kersing seems a good starting point.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.