Extracting Data from TTN to my Server

(Celia Garrido-Hidalgo) #17


  1. Sorry for that long time, I didn’t have Internet access. I’m not quite sure of where did I find the EUI, I’m going to take a look to see if I find it so I can help you, that shouldn’t be a problem I hope…

  2. Yes, I think there’s a way to do that, but it may not be recommendable to send many downlink messages from your server (using TTN) to your nodes.

According to https://www.thethingsnetwork.org/wiki/LoRaWAN/Limitations:

Downlink messages should be avoided if possible, and if you send downlink, keep the payload small

However, what client are you using in your server?



meet Celia :blush:

(Lora Wansmaru) #19

Hi celiagarridoh,

I did not understand your term ‘Client’. I just want to send data to one of my Lora Device through TTN from my server.

(Celia Garrido-Hidalgo) #20

How did you implement your server? For example, I used the Node.js client library for that, taking a look at the library you’ll see how to send downlink messages, am I right?

(Lora Wansmaru) #21


I have implemented HTTP integration in my application. But the only thing I want to use from this integration is to schedule downlink messages to my devices.

Can you please help what do I need to enter in the fields such as
Process ID: As far as I think, it is user defined.
URL; what would be the endpoint url(I am unable to understand here what does it mean by endpoint url)
Method: POST
Authorization : I guess this is also user defined.

I am a bit confused what is the Endpoint url here.

The main motive for me to use this integration is to independently use this integration and schedule downlink messages to devices, using my own web application.

(Lora Wansmaru) #22

Continuation from the above question:

I am using the following URL to schedule downlink messages:
I have entered my-app-id/my-process-id and secret key, but in response I always get 502 Bad Gateway/ nginx/1.11.10

(Celia Garrido-Hidalgo) #23


I had never tried to implement the HTTP integration, but I tried yesterday to see how it works. As far as I know, you’re right, the Process ID is user-defined and the Authorization is optional. However, I’m not sure about the field URL.

I tried what you were trying to do, and I also got the “502 Bad Gateway” error. Then, I tried to use the URL of a Channel I created some months ago in ThingSpeak (https://thingspeak.com/), and it sends data from TTN to Thingspeak via HTTP (however, you were interested in downlink). Finally I tried to introduce the IP address of a server I created (http://xxx.xxx.xxx.xxx:8080/) in the URL field and it works, I receive a JSON from TTN and I suppose that sending downlink data to end-devices would not be a problem.

I’m also starting with TTN and so on, I hope these options can help you. Anyway, I’m sure some other people know the answer :wink:


(Celia Garrido-Hidalgo) #24

Hi again, this tool may be useful for inspecting your HTTP requests:



(Lora Wansmaru) #25

Thanks @celiagarridoh, just received the json data at my server using the step you had provided. The json data included the downlink url which is working perfectly to send downlink data. Great help ! :slight_smile:

(Lora Wansmaru) #26

Hi, anything about Gateway’s Device EUI??

(Celia Garrido-Hidalgo) #27


Try this: Ic880a concentrator with Raspberry pi Gateway


(Lora Wansmaru) #28



Can we change the operational frequency of RN2903 Lora Module?
As of now its being operated on 868 Mhz and in India this band is not licence free. TTN says it works on 865-867 Mhz but my module frequency does not change?
Any help

(Celia Garrido-Hidalgo) #29

I’ve never used this module, but as far as I know it operates in the 915 MHz frequency band, doesn’t it?


I’m sorry that I can’t help you.


(Lora Wansmaru) #30

Hi Celiagarridoh ,

Any idea if TTN supports 2 different Ports for uplink and downlink?
Currently it allows 1700 port on the Gateway to uplink and downlink. Can we change downlink port other than 1700?

(ahaw021) #31

What is the benefit of separating these function to different ports?


(ahaw021) #32

I don’t believe you can.Review: RN2903 AU firmware


(Lora Wansmaru) #33

Hi celiagarridoh ,

Is there any issue with Data Packets logs on the TTN console, my gateway and devices are working fine but no data on the console since 3-4 days,

Kindly advice,

(Saiprakash) #34

I am able to receving the uplink messages in Node.js(on console). Now i want to send those received uplink messages to my server(local host:xxxx) please tell me the procedure how to do this.

your help is most valuable to me.
please give me reply
Thank you

(Celia Garrido-Hidalgo) #35


I am so sorry that it’s been such a long time since you asked me, but I was finishing my exams at university. I’ve been a time disconnected, my apologies.

In response to @LoraWANSMARU, I cannot confirm that, I would also like to know the answer.

In response to @saiprakash, I think I used the “socket-io” client on Node.js:

io.connect('http://localhost:xxxx', { reconnect: true, query: "var=abc" })
socket.emit('abc', ...)

I send the data using the emit function, you can take a look while I update my nodes and, in case you need further information, don’t hesitate to ask.

My apologies one more time for being away such a long time, now I came back to stay :wink:

Best Regards,


The data stream is like that : Lora Node -> LoraGateway -> TTN ->myAPIserver.
We still cannot analysis the specific data on TTN, we only can read the data on our server, is that right ?
What is the advantage of this ?
Instead we can use thingspeak server directly and the LoraGateway sends the package from lora Nodes to thingspeak directly, so that we can read specific data with thingspeak api interface. This is so convenient and we only need one server.