Hi all,
I am using some LSN50 nodes with the standard code onboard.
They have a DS18B20 temperature sensor each.
They succesfull connect to TTN console through LoraWan gateways.
Positive temperatures are correctly read (following the docs http://wiki.dragino.com/index.php?title=LoRa_Sensor_Node-LSN50 )
But negative temperatures are not considered/read (I receive always positive values. In the TTN console we should read 4 HEX char staring with an F (basing on the above mentioned docs), but we keep reading something like 1806H, 1501H that means 24.6°C and 21.1°C even if the fridge is at -23°C).
Do you know What could be wrong?
Thank you very much
Silvano
Meanwhile I’ve investigated over the problem and opened this issue:
It seems like a there’s a piece of code (inside the module standard code) “DS18B20_GetTemp_SkipRom()”
that looses the sign of the temperature read before sending to LORAWan…
but I started from that documentation… I know it.
That conversion code is executed on the LSN50 before sending the bytes to the TTN.
If you see the details after “For TTN(Version: 1.0)” label, you will see that LSN50 onboard code, manipulates temperature data read from DS18B20 and then sends it in a different format (2 digits MSB temperature converted to hexadecimal and then 2 digits LSB representing the decimal part). That conversion looses the sign! sigh
This way 18 01 represents both 24.1°C and -24.1°C too