dragino / Arduino-Profile-Examples

Example for Dragino LoRa Devices.
http://www.dragino.com
84 stars 189 forks source link

LG-01 Sensor Data is gibberish #7

Open geofbaum opened 6 years ago

geofbaum commented 6 years ago

After attempting to connect to TTN, and somehow having it work once, my gateway is no longer connected and any attempt at sending data from a node is pretty much junk. Either way, I followed the wiki page, http://wiki.dragino.com/index.php?title=Connect_to_TTN and specifically looked at the 915Mhz section for my node which oddly enough doesn't seem to be the problem as I can see the correct data reaching the gateway through serial. Following through the, TTN setup, uploaded the v003 of the packet forwarder hex file and then rebooted. Followed that up by setting my radio settings for a correct frequency, 902.3 is what I used, and then adding router.us.thethings.network as my server, server port 1700, and my gateway id as the eui id for the gateway from TTN without the eui- prefix. Still nothing, and as I mentioned it was connected once, which I verified through the API, http://noc.thethingsnetwork.org:8085/api/v2/gateways/eui-b61a3cc70cd5f0b3 , though I'm not even sure anymore how it connected that one time and now is no longer connecting. Running through the RX/TX frequencies for TTN hasn't seemed to help either so I'm at a loss now.

Finally, the crux here is that checking the Sensor Data through the Web interface shows me something's happening:

0000000 9747 ffae 4188 c9fa ba03 491e 627f 94da
0000010 128c 3107 a076 d243 6592 3d0e 2355 22f0
0000020 8e9e d2dd e4e7 8988 7e3f a2ba 1e3d 3cbe
0000030 b4a9 2aaf 88f9 1801 da97 15e1 4161 125f
0000040 1379 9bdb 460c 0e14 be7f 97a7 73c0 3ed3
0000050 0d0d 2617 f29f ec69 84d0 1700 f223 2bb4
0000060 b45a aa1f b6c3 6fe7 810e               
000006a

But taking a look at the ASCII output gets me this

?G??A???Ib???1?v?Ce?=#U"????版~???=<???*???ڗ?Aa_y??F???s?>?

&??i???#+??Z???o?

So case in point, pretty much gibberish.

pkjavali commented 5 years ago

Hi, I am beginner on this. Did you ever figure out how to interpret this data? In my case, I am getting following sensor data. Could you please help me how to decipher this? 0000000 0000 0000 0000 0000 005a 4603 feff 5817 0000010 a820 c9f2 d0ec 0200
0000017 Thank you!

geofbaum commented 5 years ago

@pkjavali Sorry I haven't had a lot of time to go back and look at what readout looks like now. Since I've posted this I'm able to connect to TTN and my own server backend now so if I can remember to do so I'll try to check the output from the gateway now to see how things look.

haidarm commented 4 years ago

i have the same problem just add void setup() {

Serial.begin(115200); Serial.begin(115200); Serial.println(F("Starting")); to ur setup method will fix the encoded message and go to tool image and fix the encoding message and upload will fix ur issue

haidarm commented 4 years ago

@geofbaum select the right serial port (9600 0r 115200)