Getting data from LoRa - TTN network

Hello !
Please tell me how can I get sensor’s data from my registered TTN Devices.
I want to do that using Microsoft Visual Basic 2015 or Microsoft Visual C 2015.
Can you point me to some examples please (I have no experience in this matter…)
Thank You !

1 Like

You will need to write an application to receive the data over the Internet.
https://www.thethingsnetwork.org/docs/applications/options.html

2 Likes

Can someone give me a sample written in Visual Basic or Visual C ?
I want to know how can I begin…
Thank You !

I would start with using an SDK in a supported language such as python or java
https://www.thethingsnetwork.org/docs/applications/python/
https://www.thethingsnetwork.org/docs/applications/java/

Learn how to use them and then create a port to your target language with the additional SDK features.

Refer to SDK’s for use of API and connection management to MQTT
https://www.thethingsnetwork.org/docs/applications/sdks.html

Reference for API end-points
https://www.thethingsnetwork.org/docs/applications/mqtt/api.html

Did you mean Visual C++ or Visual C#?

There are MQTT examples available for C#


https://www.hivemq.com/blog/mqtt-client-library-encyclopedia-m2mqtt/
https://code.msdn.microsoft.com/windowsapps/M2Mqtt-MQTT-client-library-ac6d3858

You need to do some reading first, look at the integrations in the apps on the console.

Hello again !

I tried the sample from here : https://gist.github.com/cwschroeder/7b5117dca561c01def041e7d4c6d2771
compiled with Microsoft Visual Studio C# 2015 as a WPF Application and it doesn’t work at all …

I get no errors but when I click the buttons nothing happens…

Here you will find a screen capture with the running code :

Screen Capture

Can you tell me why ?

Thank You !

Perhaps you can also use storage integration in your TTN and make an api call in your application.

Hello.
I need to develop a desktop application to read and get the data from LoRa - TTN Network.

I just had an other idea for you
How you can mange getting data from TTN.
I think you can call an URL also in your desktop application.

You can use Node-Red to get Data from your application. (seen ttn-node) But that means, you will need a local computer running node red.

I want to develop a Visual C# desktop application based on the GitHub sample provided above
to read and get the data from LoRa - TTN Network with MQTT library.
I don’t want to use a computer running Node Red.
I just want to get the data from LoRa - TTN Network directly into my PC.
Can somebody tell me why the GitHub sample from the link above is not working even if it is running without any errors? (when I click every button : it does nothing but the code is running. I tried display a message in the click event of the Subscribe button and the result was : no message. I don’t know how to debug that sample).
Thank You !

Topic and ceredtials right? See https://www.thethingsnetwork.org/docs/applications/mqtt/api.html

Topic: [AppID]/devices/[DevID]/up (You can use + as a wildcard, so maybe +/devices/+/up)
Server: eu.thethings.network
Username: [AppID]
Password: [AccessKey]

If you just want to collect data when the desktop application is on, then ok. If you need to capture every LoRaWAN packet, in some place you need a server (at least for storage).

I think you are right about the data storage first.It is better that way. After that you can extract the data any time you want from that database.

Can you provide me a simple and automatic solution to insert the sensor’s data from LoRa - TTN Network into a MSSQL or MySQL server database ?

About to read the data from LoRa - TTN Network into a desktop application, I have found here :
https://github.com/ekwus/ALoRa a Visual C# working sample.

Thank You All !