Users Manual
www.dragino.com
LSN50 LoRa Sensor Node User Manual 24 / 55
The above photos shows the two parts of the magnetic switch fitted to a door.
The software by default uses the falling edge on the signal line as an interrupt. We need to
modify it to accept both the rising edge (0v --> VCC , door close) and the falling edge (VCC -->
0v , door open) as the interrupt.
The command is:
AT+INTMOD=1 //(more info about INMOD please refer AT Command Manual. )
Below shows some screen captures in TTN:
In MOD=1, user can use byte 6 to see the status for door open or close. TTN decoder
is as below:
door= (bytes[6] & 0x80)? "CLOSE":"OPEN";