LPS8N disconnect/reconnect about every minute

I configured the Dragino LPS8N as “Basic Station – TTN”.
But it disconnects/reconnects about every minute.


How could I find out what’s the reason for this behaviour?

Have you checked the log on the gateway?

Yes, I checked it.
Maybe I’m wrong. But for me it looks like the thinks stack is stopping the communication.
But I have no idea why.

2023-05-16 18:35:14.694 [TCE:VERB] Connected to MUXS.
2023-05-16 18:35:14.719 [SYS:VERB] rinit.sh: Forked, waiting...
2023-05-16 18:35:14.723 [SYS:DEBU] execvp argv[0]: </bin/sh>
2023-05-16 18:35:14.723 [SYS:DEBU]        argv[1]: <-c>
2023-05-16 18:35:14.723 [SYS:DEBU]        argv[2]: <rinit.sh>
2023-05-16 18:35:14.723 [SYS:DEBU]        argv[3]: <rinit.sh>
2023-05-16 18:35:14.723 [SYS:DEBU]        argv[4]: </dev/spidev1.0>
2023-05-16 18:35:20.815 [SYS:INFO] Process rinit.sh (pid=5608) completed
2023-05-16 18:35:20.816 [RAL:INFO] Lora gateway library version: Release:2023-03-28 07:41:37,  Version:2.8.5
2023-05-16 18:35:20.828 [RAL:INFO] [LGW sx1302] full_duplex=0 clksrc=0 lorawan_public=1
2023-05-16 18:35:20.829 [RAL:DEBU] SX130x txlut table (16 entries)
2023-05-16 18:35:20.829 [RAL:INFO] SX1302 txlut  0:  rf_power=12 pa_gain=0 pwr_idx=19
2023-05-16 18:35:20.829 [RAL:INFO] SX1302 txlut  1:  rf_power=13 pa_gain=0 pwr_idx=20
2023-05-16 18:35:20.829 [RAL:INFO] SX1302 txlut  2:  rf_power=14 pa_gain=0 pwr_idx=21
2023-05-16 18:35:20.829 [RAL:INFO] SX1302 txlut  3:  rf_power=15 pa_gain=0 pwr_idx=22
2023-05-16 18:35:20.829 [RAL:INFO] SX1302 txlut  4:  rf_power=16 pa_gain=1 pwr_idx=3
2023-05-16 18:35:20.829 [RAL:INFO] SX1302 txlut  5:  rf_power=17 pa_gain=1 pwr_idx=4
2023-05-16 18:35:20.829 [RAL:INFO] SX1302 txlut  6:  rf_power=18 pa_gain=1 pwr_idx=5
2023-05-16 18:35:20.830 [RAL:INFO] SX1302 txlut  7:  rf_power=19 pa_gain=1 pwr_idx=6
2023-05-16 18:35:20.830 [RAL:INFO] SX1302 txlut  8:  rf_power=20 pa_gain=1 pwr_idx=7
2023-05-16 18:35:20.830 [RAL:INFO] SX1302 txlut  9:  rf_power=21 pa_gain=1 pwr_idx=8
2023-05-16 18:35:20.830 [RAL:INFO] SX1302 txlut 10:  rf_power=22 pa_gain=1 pwr_idx=9
2023-05-16 18:35:20.830 [RAL:INFO] SX1302 txlut 11:  rf_power=23 pa_gain=1 pwr_idx=10
2023-05-16 18:35:20.830 [RAL:INFO] SX1302 txlut 12:  rf_power=24 pa_gain=1 pwr_idx=12
2023-05-16 18:35:20.830 [RAL:INFO] SX1302 txlut 13:  rf_power=25 pa_gain=1 pwr_idx=13
2023-05-16 18:35:20.830 [RAL:INFO] SX1302 txlut 14:  rf_power=26 pa_gain=1 pwr_idx=17
2023-05-16 18:35:20.830 [RAL:INFO] SX1302 txlut 15:  rf_power=27 pa_gain=1 pwr_idx=22
2023-05-16 18:35:20.830 [RAL:INFO]  RX/TX RF0:    867.5MHz rssi_offset=-215.4 type=5 rssi_tcomp=0.000 0.000 20.410 2162.560 0.000
2023-05-16 18:35:20.831 [RAL:INFO]  RX    RF1:    868.5MHz rssi_offset=-215.4 type=5 rssi_tcomp=0.000 0.000 20.410 2162.560 0.000
2023-05-16 18:35:20.831 [RAL:INFO]  [mSF]   0:    868.1MHz rf=1 freq=-400.0 datarate=0
2023-05-16 18:35:20.832 [RAL:INFO]  [mSF]   1:    868.3MHz rf=1 freq=-200.0 datarate=0
2023-05-16 18:35:20.832 [RAL:INFO]  [mSF]   2:    868.5MHz rf=1 freq=  +0.0 datarate=0
2023-05-16 18:35:20.833 [RAL:INFO]  [mSF]   3:    867.1MHz rf=0 freq=-400.0 datarate=0
2023-05-16 18:35:20.833 [RAL:INFO]  [mSF]   4:    867.3MHz rf=0 freq=-200.0 datarate=0
2023-05-16 18:35:20.833 [RAL:INFO]  [mSF]   5:    867.5MHz rf=0 freq=  +0.0 datarate=0
2023-05-16 18:35:20.834 [RAL:INFO]  [mSF]   6:    867.7MHz rf=0 freq=+200.0 datarate=0
2023-05-16 18:35:20.834 [RAL:INFO]  [mSF]   7:    867.9MHz rf=0 freq=+400.0 datarate=0
2023-05-16 18:35:20.834 [RAL:INFO]  [STD]   8:    868.3MHz rf=1 freq=-200.0 datarate=7 bw=5 Explicit header
2023-05-16 18:35:20.835 [RAL:INFO]  [FSK]   9:    868.8MHz rf=1 freq=+300.0 datarate=50000 bw=0 sync_word=0/0
2023-05-16 18:35:20.835 [RAL:INFO] Station device: spi:/dev/spidev1.0 (PPS capture disabled)
2023-05-16 18:35:23.433 [RAL:INFO] Concentrator started (2s597ms)
2023-05-16 18:35:23.433 [S2E:INFO] Configuring for region: EU868 -- 863.0MHz..870.0MHz
2023-05-16 18:35:23.433 [S2E:INFO]   DR0  SF12/BW125 
2023-05-16 18:35:23.433 [S2E:INFO]   DR1  SF11/BW125 
2023-05-16 18:35:23.433 [S2E:INFO]   DR2  SF10/BW125 
2023-05-16 18:35:23.433 [S2E:INFO]   DR3  SF9/BW125 
2023-05-16 18:35:23.433 [S2E:INFO]   DR4  SF8/BW125 
2023-05-16 18:35:23.433 [S2E:INFO]   DR5  SF7/BW125 
2023-05-16 18:35:23.433 [S2E:INFO]   DR6  SF7/BW250 
2023-05-16 18:35:23.433 [S2E:INFO]   DR7  FSK 
2023-05-16 18:35:23.433 [S2E:INFO]   DR8  FSK 
2023-05-16 18:35:23.433 [S2E:INFO]   DR9  FSK 
2023-05-16 18:35:23.434 [S2E:INFO]   DR10 FSK 
2023-05-16 18:35:23.434 [S2E:INFO]   DR11 FSK 
2023-05-16 18:35:23.434 [S2E:INFO]   DR12 FSK 
2023-05-16 18:35:23.434 [S2E:INFO]   DR13 FSK 
2023-05-16 18:35:23.434 [S2E:INFO]   DR14 FSK 
2023-05-16 18:35:23.434 [S2E:INFO]   DR15 FSK 
2023-05-16 18:35:23.434 [S2E:INFO]   TX power: 16.0 dBm EIRP
2023-05-16 18:35:23.434 [S2E:INFO]             27.0 dBm EIRP for 869.4MHz..869.65MHz
2023-05-16 18:35:23.434 [S2E:INFO]   JoinEui list: 0 entries
2023-05-16 18:35:23.434 [S2E:INFO]   NetID filter: FFFFFFFF-FFFFFFFF-FFFFFFFF-FFFFFFFF
2023-05-16 18:35:23.434 [S2E:INFO]   Dev/test settings: nocca=1 nodc=1 nodwell=1
2023-05-16 18:35:23.434 [S2E:INFO] Beaconing every 2m8s on 869.525MHz(1) @ DR3 (frame layout 2/8/17)
2023-05-16 18:35:23.434 [S2E:INFO] Beaconing suspend - missing GPS data: time 
2023-05-16 18:35:23.436 [___:INFO] lgw_stop:1202:  --- IN
Note: LoRa concentrator was not started...
lgw_board_setconf:483: Note: board configuration: com_type: SPI, com_path: /dev/spidev1.0, lorawan_public:1, clksrc:0, full_duplex:0
lgw_rxrf_setconf:542: Note: rf_chain 0 configuration; en:1 freq:867500000 rssi_offset:-215.399994 radio_type:5 tx_enable:1 single_input_mode:0
lgw_rxrf_setconf:542: Note: rf_chain 1 configuration; en:1 freq:868500000 rssi_offset:-215.399994 radio_type:5 tx_enable:0 single_input_mode:0
lgw_rxif_setconf:667: Note: LoRa 'multi' if_chain 0 configuration; en:1 freq:-400000
lgw_rxif_setconf:667: Note: LoRa 'multi' if_chain 1 configuration; en:1 freq:-200000
lgw_rxif_setconf:667: Note: LoRa 'multi' if_chain 2 configuration; en:1 freq:0
lgw_rxif_setconf:667: Note: LoRa 'multi' if_chain 3 configuration; en:1 freq:-400000
lgw_rxif_setconf:667: Note: LoRa 'multi' if_chain 4 configuration; en:1 freq:-200000
lgw_rxif_setconf:667: Note: LoRa 'multi' if_chain 5 configuration; en:1 freq:0
lgw_rxif_setconf:667: Note: LoRa 'multi' if_chain 6 configuration; en:1 freq:200000
lgw_rxif_setconf:667: Note: LoRa 'multi' if_chain 7 configuration; en:1 freq:400000
lgw_rxif_setconf:640: Note: LoRa 'std' if_chain 8 configuration; en:1 freq:-200000 bw:5 dr:7
lgw_rxif_setconf:704: Note: FSK if_chain 9 configuration; en:1 freq:300000 bw:5 dr:50000 (50000 real dr) sync:0x12686529
2023-05-16 18:35:58.729 [SYS:INFO] Logging     : /var/iot/station.log (maxsize=10000000, rotate=3)
2023-05-16 18:35:58.729 [SYS:INFO] Station Ver : 2.8.5(mips-openwrt/dragino) 2023-03-28 07:42:15
2023-05-16 18:35:58.730 [SYS:INFO] Package Ver : (null)
2023-05-16 18:35:58.730 [SYS:INFO] mbedTLS Ver : 2.28.0
2023-05-16 18:35:58.730 [SYS:INFO] proto EUI   : a840:41ff:ff24:da34	(station.conf)
2023-05-16 18:35:58.730 [SYS:INFO] prefix EUI  : ::1	(builtin)
2023-05-16 18:35:58.730 [SYS:INFO] Station EUI : a840:41ff:ff24:da34
2023-05-16 18:35:58.730 [SYS:INFO] Station home: /etc/station/	(--home)
2023-05-16 18:35:58.731 [SYS:INFO] Station temp: /var/tmp/	(builtin)
2023-05-16 18:35:58.739 [SYS:INFO] DAEMON: Station process 6252 started...
2023-05-16 18:35:58.941 [TCE:INFO] Starting TC engine
2023-05-16 18:35:58.945 [AIO:INFO] /etc/station/tc.trust: 
cert. version     : 3
serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
issued  on        : 2015-06-04 11:04:38
expires on        : 2035-06-04 11:04:38
signed using      : RSA with SHA-256
RSA key size      : 4096 bits
basic constraints : CA=true
key usage         : Key Cert Si2023-05-16 18:35:58.945 [TCE:INFO] Connecting to INFOS: wss://eu1.cloud.thethings.network:8887
2023-05-16 18:35:59.001 [CUP:INFO] Starting a CUPS session in 0 seconds.
2023-05-16 18:35:59.002 [CUP:INFO] Starting a CUPS session now.
2023-05-16 18:35:59.002 [CUP:INFO] Connecting to CUPS ... https://eu1.cloud.thethings.network:443 (try #1)
2023-05-16 18:35:59.021 [AIO:INFO] /etc/station/cups.trust: 
cert. version     : 3
serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
issued  on        : 2015-06-04 11:04:38
expires on        : 2035-06-04 11:04:38
signed using      : RSA with SHA-256
RSA key size      : 4096 bits
basic constraints : CA=true
key usage         : Key Cert 2023-05-16 18:35:59.069 [CUP:VERB] Retrieving update-info from CUPS https://eu1.cloud.thethings.network:443...
2023-05-16 18:35:59.071 [CUP:DEBU] CUPS Request: {"router":"a840:41ff:ff24:da34","cupsUri":"https://eu1.cloud.thethings.network:443","tcUri":"wss://eu1.cloud.thethings.network:8887","cupsCredCrc":42728900,"tcCredCrc":1261184206,"station":"2.8.5(mips-openwrt/dragino) 2023-03-28 07:42:12","model":"mips-openwrt","package":null,"keys":[]}
2023-05-16 18:36:00.203 [TCE:INFO] Infos: a840:41ff:ff24:da34 muxs-::0 wss://eu1.cloud.thethings.network:8887/traffic/eui-A84041FFFF24DA34
2023-05-16 18:36:00.203 [AIO:DEBU] [4] ws_close reason=1000
2023-05-16 18:36:00.203 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
2023-05-16 18:36:00.203 [AIO:DEBU] [4] WS connection shutdown...
2023-05-16 18:36:00.205 [AIO:INFO] /etc/station/tc.trust: 
cert. version     : 3
serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
issued  on        : 2015-06-04 11:04:38
expires on        : 2035-06-04 11:04:38
signed using      : RSA with SHA-256
RSA key size      : 4096 bits
basic constraints : CA=true
key usage         : Key Cert Si2023-05-16 18:36:00.206 [TCE:VERB] Connecting to MUXS...
2023-05-16 18:36:00.259 [AIO:DEBU] [6] HTTP connection shutdown...
2023-05-16 18:36:00.261 [CUP:INFO] Interaction with CUPS done (no updates) - next regular check in 1d

IIRC cups is the first stage of connection setup just to get the configuration. There should be a ‘permanent’ connection opened after it for actual data transfer. Looks like that is not happening?
Hopefully someone with more experience regarding BasicStation can chime in…

There multiple components in Basic Station, which is itself comprised of two protocols: CUPS and LNS.

CUPS is a single HTTP request-response protocol through which the gateway finds out the credentials it should use to connect to the server for traffic exchange, along with the server address. You can see the response from our CUPS in the log, and it’s pretty normal - we just reply and then close the connection. The lines marked with CUP relate to it.

LNS is the WebSockets based protocol which is used for traffic exchange. In LNS the first message from the server is the router_config, which contains the channel plan. You can see that our LNS provides this, as the frequencies are visible in the log. The lines marked with TCE relate to this, and you can see that your gateway is connected from the first log line.

You need to check for TCE log lines that would signal that the connection is lost, but I don’t see these in your logs. I also recommend double checking that you have the latest firmware installed.

I’ve seen similar messages. A reboot of dragino helped.