I have successfully integrated my nodes and gateway to TTN and they are now transferring data easily. I need to know how can I extract data from TTN and send the same to my server?
Is there any API provided by TTN?
Kindly help with any information.
Hi celiagarridoh, can you see the recieved messages on your server ( what you are getting in the frames as payloads sent from the object ), cause thatās my problem, when i see the statu of the gateway, it shows me the number of the forwarded frames to the server but it doesnāt show me what the server is recieving as payloads, does your solution solve my problem ?
Iām not sure I understand your problemā¦ You donāt see the messages from your node (application) in your own server, right?
I have a Node.js server running and Iām receiving there the data from my application in TTN, if this is what you want let me know and Iāll help you
yes @celiagarridoh thatās what i meant, do i have to develop the node.js server or itās already ready and i just have to configure it ?
Thanks for replaying.
Thanks All for the help. Now I can extract data from TTN.
One more issue is all my packets are not being received on TTN side, also most of the time I get No_Free_Channel message.
Kindly help
No_free_channel means you are sending data far too frequently. If possible try a higher data rate, if that is not possible send less frequently. Be aware the TTN fair use policy allows 30 seconds of airtime a day. When your module complains about free channels you are exceeding that limit a number of times.
@celiagarridoh , thanks a lot, but do i have to install the app in the RPI when itās supposed to be installed in the TTN server cause i wonna see the packets recieved in the server and not in the gateway, do you get me ?
and i have a question, does this means that iām recieving packets in my server from the endnode :
root@debian:/home/administrator/ttn# ./ttnctl gateways status eui-b827ebfffe388da3
INFO Discovering Routerā¦
INFO Connecting with Routerā¦
INFO Connected to Router
INFO Received status GatewayID=eui-b827ebfffe388da3
I changed these variables in the exemple js file :
var region = ā172.31.1.180ā;
var appId = āomniacom4ā;
var accessKey = āttn-account-v2.YlE_Gt-i_kz7Fyio2MopBmbo6d2BPftgE5qVb1ueFp4ā;
iāve put the localhost address of the region variable. is that correct cause iām running a local server ?
but an error appears when i try to execute the file :
pi@ttn-gateway:~/node-app-sdk/src $ node .
/home/pi/node-app-sdk/src/index.js:3
const data = require(ā./dataā);
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensionsā¦js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
I used a different Raspberry for creating the server, it has nothing to do with the one I used for developing the gateway, sorry if I was confusing. For the server I used a Raspberry with Raspbien and Node.js installed.
About the error, try to check if all the required files are in the directory. However, I was referring to the āexample.jsā file, not the index.js one.
I think the āregionā field is wrong, it should be related to the router TTN is using (for example āeuā). Try this and tell me if it helped you.
iām running a TTN server in my localhost, i wonna know if it works as a region cause iām running my own router and not connected to the ttn-handler-eu anymore.
This is my router info :
id: mynetwork-router
tls: true
key-dir: router/
auth-servers:
ttn-account-v2: āhttps://account.thethingsnetwork.orgā
Iām sorry, I was referring to extracting data from TTN to your server, but using a TTN router. Iām not sure of how to help you with that, Iām also relatively new with LoRaWAN.
If anyone knows the answer Iād also like to know how to do it
Is there any option to send my data as acknowledgement to LoraModules?
I am using my own server which is getting data regularly from TTN. So I want to send a command(data) to my Lora Devices through TTN. If I use TTN Console I can easily send confirmed message to specific device, is there an API provides this facility so that I can send data from my server?
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ā¦
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.
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?