LORAWAN - LSN50 negative temperatures problem

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

Can you show (screen shot or something) what the actual full payload you are seeing in the application/device console?

28
Here is a screenshot.

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…

LSN50

from the site

Thank you BoRRoZ,

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! :frowning: sigh

This way 18 01 represents both 24.1°C and -24.1°C too :frowning:

It seemed impossible to me but I’ve opened this:

Thank you for your help.

I think your right… its a bug not a feature

bug seems fixed now according to the dragino githhub

can you tell me how to decode the full payload?