In ABP mode does LPS8-N manage Lora radio settings

102 views
Skip to first unread message

Richard Cooke

unread,
Feb 7, 2023, 8:59:47 AM2/7/23
to Dragino-user
My gateway:
Device Model:    LPS8-N
Hostname:    dragino-22d428
Firmware:    lgw-5.4.1672392160
Build Time:    Build Fri 30 Dec 2022 05:22:40 PM CST
FWD version:    Release:2022-12-27 09:29:23, Version:2.7.6
Cellular :    Not Detected
System Time:    Tue Feb 7 13:44:04 UTC 2023
Uptime:    4 days
Load Avg:    45, load average
Memory:    Free Memory: 18324 / Total Memory: 60192kB
IoT Service:    mqtt

I have 3 sensors:
 - Laird RS191
 - Dragino LHT65
 - Dragino LHT65N

My system does not have access to the internet. So I put my two Dragino sensors into ABP mode. The Laird only supports OTAA, so I expect it will stop working at some point.

I program the sensors at my desk which is close to the gateway.  Then I put a sensor several rooms away. One Dragino and the Laird are in opposite corners of my office.

I set all sensors to report every 30 seconds. But I see frequent 2-3 minute gaps between messages from the LHT sensors.

How can I tell what is causing this?  I can see it being any of:
  1. Is 30 Seconds too fast for LoRa, causing RF conflicts, should I increase to 1 min or 2 min?
  2. Is the LPS8-N gateway not increasing the radio power or reducing data rate when I move the sensor further away? As in, is a LoraWan server needed for that?
  3. Other?
Thanks in Advance

Edwin Chen

unread,
Feb 7, 2023, 10:16:53 AM2/7/23
to Richard Cooke, Dragino-user
Hi, Richard, 

What frequency band do you use? If you use 72 channels , you need to set it to correct band.


Best Regards
Edwin Chen
Many of my emails have been forwarded to my spam folder recently.  
If I don't reply in 3 days, please resend the email to ed...@dragino.cc & ed...@dragino.com




From:Richard Cooke <rcook...@gmail.com>
Date:2023-02-07 21:59
Subject:In ABP mode does LPS8-N manage Lora radio settings
To:dragino-user <dragin...@googlegroups.com>
--
You received this message because you are subscribed to the Google Groups "Dragino-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dragino-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dragino-user/57687f3c-f473-4b16-8890-e9a8a2bd5416n%40googlegroups.com.

Richard Cooke

unread,
Feb 7, 2023, 10:52:35 AM2/7/23
to Dragino-user
Hi Ed - Happy New Year!

I am in Canada, so I originally set up my system with TTN using US915 band 2. That enabled me to get everything going quickly with OTAA.  When I changed the LHT65 sensor to ABP mode I used the last TTN device ID and keys, for the LHT65N I re-used the LHT65 keys and used the serial number for device ID. I have captured the AT+CFG so I can see what settings they are using. I have not figured out if they are changing on their own.

This is something I need to understand.  If I know a device is going to be at extreme range to the gateway, should I manually set it up with lowest data rate?  Or should I figure out how to send out radio settings updates via MQTT - I read that is possible.  Or maybe this is the real reason i need to install Chirpstack on my local server - so it can manage the radio settings for me?

Edwin Chen

unread,
Feb 7, 2023, 11:00:28 AM2/7/23
to Richard Cooke, Dragino-user
1. For subband issue. 
You can check what AT+CHE settings you have there. If you have AT+CHE=0, this will have problem and you need to set AT+CHE=2. 

2. For distance possibility. 
You can check this for how to set to have the longest distance. 

What is RSSI you get now from Gateway? 








From:Richard Cooke <rcook...@gmail.com>
Date:2023-02-07 23:52
Subject:Re: In ABP mode does LPS8-N manage Lora radio settings
To:dragino-user <dragin...@googlegroups.com>

Richard Cooke

unread,
Feb 7, 2023, 11:37:07 AM2/7/23
to Dragino-user
Here is my latest config, with the first few lines deleted:

[11:17:39:769] AT+DADDR=60000700
[11:17:39:929] AT+ADR=1
[11:17:39:929] AT+TXP=14
[11:17:39:945] AT+DR=0
[11:17:39:945] AT+DCS=0
[11:17:39:961] AT+PNM=1
[11:17:39:977] AT+RX2FQ=923300000
[11:17:39:993] AT+RX2DR=8
[11:17:40:009] AT+RX1DL=5000
[11:17:40:025] AT+RX2DL=6000
[11:17:40:041] AT+JN1DL=5000
[11:17:40:057] AT+JN2DL=6000
[11:17:40:073] AT+NJM=0
[11:17:40:073] AT+NWKID=00 00 00 00
[11:17:40:105] AT+FCU=35
[11:17:40:121] AT+FCD=0
[11:17:40:121] AT+CLASS=A
[11:17:40:137] AT+NJS=1
[11:17:40:153] AT+RECVB=0:
[11:17:40:168] AT+RECV=
[11:17:40:168] AT+VER=US915 v1.3.2
[11:17:40:200] AT+CFM=0,7,0
[11:17:40:216] AT+SNR=0
[11:17:40:216] AT+RSSI=0
[11:17:40:232] AT+TDC=90000
[11:17:40:248] AT+PORT=2[11:17:40:280] AT+CHS=0
[11:17:40:280] AT+CHE=0
[11:17:40:296] AT+SLEEP=0
[11:17:40:312] AT+EXT=1
[11:17:40:312] AT+BAT=2984
[11:17:40:328] AT+WMOD=0
[11:17:40:344] AT+ARTEMP=-40,125
[11:17:40:360] AT+CITEMP=1
[11:17:40:376] AT+RJTDC=20
[11:17:40:392] AT+RPL=0
[11:17:40:408] AT+TIMESTAMP=systime= 1970/1/1 00:56:09 (3369)
[11:17:40:456] AT+LEAPSEC=18
[11:17:40:472] AT+SYNCMOD=1
[11:17:40:488] AT+SYNCTDC=10
[11:17:40:504] AT+PID=0
[11:17:40:504] AT+DDETECT=1,1440,2880
[11:17:40:536] AT+SETMAXNBTRANS=1,0[11:17:40:584] AT+PNACKMD=0
[11:17:40:600] AT+EPLOGIC=0
[11:17:40:616] AT+LEDALARM=0

I use Mosquito sub to monitor all the MQTT messages coming in, here is the last bunch, but first where the sensors are:
 - Device 26099EAA is my LHT65 furthest away from the gateway (probe is inside a freezer), 2 rooms away one with cement brick wall about 20m.
 - Device 60000700 is my LHT65N, on my desk about 3m from gateway and beside my desktop computer
 - Device 2609FEE9 is my LAIRD RS191, in the corner about 4m from gateway on a table with clear line of sight.

dragino-22d428/26099EAA/data {"Hum_SHT":29.8,"BatV":2.975,"TempC_DS":-15.56,"EXT":"Temperature Sensor","RSSI":-71,"TempC_SHT":21.43,"SNR":12.7,"ext_sensor":1}
dragino-22d428/2609FEE9/data {"rssi": "-31", "payload": "0101081c14150300000000","snr": "13"}
dragino-22d428/2609FEE9/data {"rssi": "-32", "payload": "01010d1c13150300000000","snr": "13"}
dragino-22d428/26099EAA/data {"Hum_SHT":29.8,"BatV":2.975,"TempC_DS":-16.68,"EXT":"Temperature Sensor","RSSI":-68,"TempC_SHT":21.42,"SNR":14,"ext_sensor":1}
dragino-22d428/26099EAA/data {"Hum_SHT":29.8,"BatV":2.975,"TempC_DS":-17.25,"EXT":"Temperature Sensor","RSSI":-69,"TempC_SHT":21.42,"SNR":13.2,"ext_sensor":1}
dragino-22d428/2609FEE9/data {"rssi": "-30", "payload": "01011c1c13150300000000","snr": "13"}
dragino-22d428/2609FEE9/data {"rssi": "-31", "payload": "0101191c11150300000000","snr": "8"}
dragino-22d428/2609FEE9/data {"rssi": "-31", "payload": "0101191c11150300000000","snr": "13"}
dragino-22d428/2609FEE9/data {"rssi": "-30", "payload": "0101171c11150300000000","snr": "13"}
dragino-22d428/60000700/data {"Hum_SHT":29.5,"BatV":2.986,"TempC_DS":327.67,"EXT":"Temperature Sensor","RSSI":-92,"TempC_SHT":21.44,"SNR":8.2,"ext_sensor":0}
dragino-22d428/2609FEE9/data {"rssi": "-30", "payload": "0101161c0f150300000000","snr": "14"}
dragino-22d428/60000700/data {"Hum_SHT":29.5,"BatV":2.985,"TempC_DS":327.67,"EXT":"Temperature Sensor","RSSI":-74,"TempC_SHT":21.42,"SNR":13.5,"ext_sensor":0}

I was able to quickly write a Python decoder for the LAIRD payload that runs on my server inside my MQTT client. I have not had time to figure out a LUA version or a Python version that will run on the gateway.

and...@arcadius.com.au

unread,
Feb 7, 2023, 11:44:43 AM2/7/23
to Richard Cooke, Dragino-user

If you install Chirpstack and use OTAA and enable ADR, the channels and power levels are managed.

You set the sub band and channels up in Chirpstack.

When a device uses OTAA to Join, the server will tell it what channels to use.

Join is always done at the lowest allowed datarate for the channel.

If ADR is enabled, the device and the network will try higher datarates over time according to what the signal strength is seen. Higher DR reduces Tx time which saves battery.

Manually setting the sub band in the end device just makes the Join process quicker at the expense of management- if you ever need to change sub band you have to then reconfigure the end devices too. I personally don't use this feature for that reason.


From: dragin...@googlegroups.com <dragin...@googlegroups.com> on behalf of Richard Cooke <rcook...@gmail.com>
Sent: Wednesday, 8 February 2023, 2:52 am
To: Dragino-user <dragin...@googlegroups.com>
Subject: Re: In ABP mode does LPS8-N manage Lora radio settings

Hi Ed - Happy New Year!

I am in Canada, so I originally set up my system with TTN using US915 band 2. That enabled me to get everything going quickly with OTAA.  When I changed the LHT65 sensor to ABP mode I used the last TTN device ID and keys, for the LHT65N I re-used the LHT65 keys and used the serial number for device ID. I have captured the AT+CFG so I can see what settings they are using. I have not figured out if they are changing on their own.

This is something I need to understand.  If I know a device is going to be at extreme range to the gateway, should I manually set it up with lowest data rate?  Or should I figure out how to send out radio settings updates via MQTT - I read that is possible.  Or maybe this is the real reason i need to install Chirpstack on my local server - so it can manage the radio settings for me?

On Tuesday, February 7, 2023 at 10:16:53 AM UTC-5 ed...@dragino.com wrote:
Hi, Richard, 

What frequency band do you use? If you use 72 channels , you need to set it to correct band.


Best Regards
Edwin Chen
Many of my emails have been forwarded to my spam folder recently.  
If I don't reply in 3 days, please resend the email to ed...@dragino.cc & ed...@dragino.com




From:Richard Cooke <rcook...@gmail.com>
Date:2023-02-07 21:59
Subject:In ABP mode does LPS8-N manage Lora radio settings
To:dragino-user <dragin..@googlegroups.com>

Edwin Chen

unread,
Feb 7, 2023, 10:39:07 PM2/7/23
to Richard Cooke, Dragino-user
You can change AT+CHE=0 to AT+CHE=2. This is the issue. The LHT65N sending in 72 channels and the gateway only support 8+1 channels. So you will only get one packet in 8 transmit. 

Detail explain for the subband matter is here: 

Best Regards
Edwin Chen
Many of my emails have been forwarded to my spam folder recently.  
If I don't reply in 3 days, please resend the email to ed...@dragino.cc & ed...@dragino.com




From:Richard Cooke <rcook...@gmail.com>
Date:2023-02-08 00:37
Subject:Re: Re: In ABP mode does LPS8-N manage Lora radio settings
To:dragino-user <dragin...@googlegroups.com>

Edwin Chen

unread,
Feb 7, 2023, 10:43:42 PM2/7/23
to Andrew Larkin, Richard Cooke, Dragino-user
Hi, Andrew, 

Richard uses ABP mode so he has to manually set the subband because there is no OTAA Join Process here. The default subband for LHT65N is set to support all sub-bands so he see packets lost.

Richard has a LPS8N server and he wants to point to MQTT server so he has to set the end node to works in ABP mode. because LPS8N doesn't have LoRaWAN server inside. For the new model LPS8v2, there is built-in LoRaWAN server and support OTAA mode. So for LPS8v2, no need to use ABP mode, can use the built-in LoRaWAN server (TTN Stack v3 + NodeRed) to send data to a external MQTT server.

Best Regards
Edwin Chen
Many of my emails have been forwarded to my spam folder recently.  
If I don't reply in 3 days, please resend the email to ed...@dragino.cc & ed...@dragino.com




From:andrewl <and...@arcadius.com.au>
Date:2023-02-08 00:44
Subject:Re: In ABP mode does LPS8-N manage Lora radio settings
To:rcooke1963 <rcook...@gmail.com>;dragino-user <dragin...@googlegroups.com>

Richard Cooke

unread,
Feb 9, 2023, 10:39:05 AM2/9/23
to Dragino-user
Thanks Edwin!

You very concisely describe my setup!

Andrew's comments are "helping" push me towards trying out Chirpstack.

Because in my system, I expect not all sensors are going to be able to reach my LPS8N gateway.  I will have to run network cables out to a few remote buildings and install either more LPS8Ns or DLOS8Ns. Actually, I would prefer DLOS8N since they have POE, one less plug to worry about.

I don't fancy setting up each gateways ABP and MQTT modes for each sensor. I'm thinking it would be a lot easier to set up Chirpstack on my server, and configure all the gateways to forward to it.

That would give me a central place to manage all my sensors - possibly fiddling with radio settings by adjusting Chirpstack defaults. (not sure if this would be needed or possible).

But, more importantly, handle all of the OTAA Join requests for me. I'm also playing with a LAIRD sensor, and it only supports OTAA.

Another subtle benefit is it would also handle shifting DEVICE IDs. Although I know they should not change in ABP mode, but if they do that really messes up my system because DEVICE ID is the only identifier I get over MQTT. So if it changes for any reason, my application thinks the old sensor is offline and a new sensor has appeared.

I'm not crazy about this though. Its going to obsolete at least 1- maybe 2-man years of my custom software. A huge simplification, but not backwards compatible with my older (pre-LoRa) systems.
Reply all
Reply to author
Forward
0 new messages