I have a Dragino LSN50 v2 (bought July 2020) connected to the TTN; the DS18B20 temp sensor works correctly, but I am having issues with a door sensor.
If I connect the doorsensor as a digital input on VCC and PA12, it will correctly indicated Digital_IStatus ‘H’ or ‘L’.
But I’d like to use the ‘Digital Interrupt’ feature (VCC and PB14) where an interrupt is generated using the falling edge. This does not work. Any idea how I can get this to work ?
Additional question: will using the ‘Digital Interrupt’ feature create an immeadiate Lora transmission (I assume that) or will it just report it’s status at the next (5 min) transmission interval ?
If it does not immeadiately transmit, I can use the existing digital input option.
I did not use an AT-command; according to the manual the default setting is ‘falling edge’ - but you’re right, I will I’ll double check the settings & Firmware version - need to find my USB-TTL adapter.
I’ve changed INTMOD to 1 and now it is working on falling & raising edge - no idea why it did not work before, I’ll let it run for a while before I install it.
thanks for your help
I also need to improve my design by modifying the behaviour of the sensor node by changing the default behaviour. The interrupt mode needs to be configured so that both raising edge and falling edge changes would trigger an event.
Configuring LSN50 devices with AT-commands is a time consuming task involving quite some mechanical work. Connecting a few devices manually can easily be achieved, but it is not very practical in a project context involving a number of sensors.
Fortunately there is an alternative way. The same behaviour can be achieved by setting bits in the sixth byte(?) of the payload in a downlink payload handler. I would be inclined to read the current settings from an uplink record and then make the relevant change in the relevant downlink handler.
Such a procedure also has the advantage that it can be made when the devices are already installed in the users’ households.
I wonder if anybody would have experience of how configuration by uplink messages can be best achieved. Should I construct yet another application for this task or what should preferably be done?