# Getting data from LoRa - TTN network

**URL:** <https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596>\
**Category:** Application Development\
**Created:** [November 10, 2019, 10:39pm UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596 "2019-11-10T22:39:12Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmax](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lmax/32/25844_2.png) [@lmax](https://www.thethingsnetwork.org/forum/u/lmax)\
**Post date:** [November 10, 2019, 10:39pm UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/1 "2019-11-10T22:39:12Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![jreiss](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jreiss/32/46529_2.png) [@jreiss](https://www.thethingsnetwork.org/forum/u/jreiss)\
**Post date:** [November 10, 2019, 11:58pm UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/2 "2019-11-10T23:58:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lmax](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lmax/32/25844_2.png) [@lmax](https://www.thethingsnetwork.org/forum/u/lmax)\
**Post date:** [November 11, 2019, 11:03am UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/3 "2019-11-11T11:03:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jreiss](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jreiss/32/46529_2.png) [@jreiss](https://www.thethingsnetwork.org/forum/u/jreiss)\
**Post date:** [November 11, 2019, 1:49pm UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/4 "2019-11-11T13:49:26Z")

</div>

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/python/)  
[https://www.thethingsnetwork.org/docs/applications/java/](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](https://www.thethingsnetwork.org/docs/applications/sdks.html)

Reference for API end-points  
[https://www.thethingsnetwork.org/docs/applications/mqtt/api.html](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://gist.github.com/cwschroeder/7b5117dca561c01def041e7d4c6d2771>

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

---

<div class="post-metadata">

**Author:** ![jezd](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jezd/32/46461_2.png) [@jezd](https://www.thethingsnetwork.org/forum/u/jezd)\
**Post date:** [November 11, 2019, 1:50pm UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/5 "2019-11-11T13:50:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lmax](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lmax/32/25844_2.png) [@lmax](https://www.thethingsnetwork.org/forum/u/lmax)\
**Post date:** [November 17, 2019, 11:55pm UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/6 "2019-11-17T23:55:57Z")

</div>

Hello again !

I tried the sample from here : [https://gist.github.com/cwschroeder/7b5117dca561c01def041e7d4c6d2771](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](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/8/4/8415ceedb0af5940024965b56b41efe0f0d951f7.jpeg)

Can you tell me why ?

Thank You !

---

<div class="post-metadata">

**Author:** ![MOS-FET](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/mos-fet/32/35697_2.png) [@MOS-FET](https://www.thethingsnetwork.org/forum/u/MOS-FET)\
**Post date:** [November 18, 2019, 8:14am UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/7 "2019-11-18T08:14:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lmax](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lmax/32/25844_2.png) [@lmax](https://www.thethingsnetwork.org/forum/u/lmax)\
**Post date:** [November 18, 2019, 9:11am UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/8 "2019-11-18T09:11:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MOS-FET](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/mos-fet/32/35697_2.png) [@MOS-FET](https://www.thethingsnetwork.org/forum/u/MOS-FET)\
**Post date:** [November 18, 2019, 9:51am UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/9 "2019-11-18T09:51:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![EFthings01](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/efthings01/32/47451_2.png) [@EFthings01](https://www.thethingsnetwork.org/forum/u/EFthings01)\
**Post date:** [November 18, 2019, 10:29am UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/10 "2019-11-18T10:29:50Z")

</div>

You can use Node-Red to get Data from your application. (seen [ttn-node](https://flows.nodered.org/node/node-red-contrib-ttn)) But that means, you will need a local computer running node red.

---

<div class="post-metadata">

**Author:** ![lmax](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lmax/32/25844_2.png) [@lmax](https://www.thethingsnetwork.org/forum/u/lmax)\
**Post date:** [November 18, 2019, 2:40pm UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/11 "2019-11-18T14:40:23Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![EFthings](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/efthings/32/30670_2.png) [@EFthings](https://www.thethingsnetwork.org/forum/u/EFthings)\
**Post date:** [November 18, 2019, 4:47pm UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/12 "2019-11-18T16:47:25Z")

</div>

Topic and ceredtials right? See [https://www.thethingsnetwork.org/docs/applications/mqtt/api.html](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]

---

<div class="post-metadata">

**Author:** ![UdLoRa](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/udlora/32/45330_2.png) [@UdLoRa](https://www.thethingsnetwork.org/forum/u/UdLoRa)\
**Post date:** [November 18, 2019, 8:15pm UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/13 "2019-11-18T20:15:40Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![lmax](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/lmax/32/25844_2.png) [@lmax](https://www.thethingsnetwork.org/forum/u/lmax)\
**Post date:** [November 19, 2019, 6:57am UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/14 "2019-11-19T06:57:23Z")

</div>

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](https://github.com/ekwus/ALoRa) a Visual C# working sample.

Thank You All !

---

<div class="post-metadata">

**Author:** ![SennahW](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/sennahw/32/25844_2.png) [@SennahW](https://www.thethingsnetwork.org/forum/u/SennahW)\
**Post date:** [February 17, 2020, 9:22am UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/15 "2020-02-17T09:22:58Z")

</div>

Hi  
I am very new to this, is there a simple way to to interpret the data I have on TTN. I am using some simple Arduino sensors via a MikroTik gateway and it is working fine, I get the needed info showing up as payload in TTN. I would like some sort of webpage/application that can communicate with TTN, preferably a GUI to analyse the sensor reading, make a decision and send a response back to my sensor.

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [February 17, 2020, 5:29pm UTC](https://www.thethingsnetwork.org/forum/t/getting-data-from-lora-ttn-network/31596/16 "2020-02-17T17:29:15Z")

</div>

Search the forum (and check the documentation) for integrations. There are several options, most have been extensively covered so no need to rehash that in this topic.
