RAK7204 stops sending data after some days of operations

Issue:

After some days of operations (3-15 days) the device suddenly stops sending data. I don’t see anything on the gateway side (RAK7258), while I continue to see packets arriving from other devices of different type. In my environment I currently have only 1 RAK7204.
In the last 2 months it happened 3 times, randomly between 3 and 15 days operations.

When I experience the issue (no data sent), if I connect via the serial connection, the device responds to AT commands, but I am forced to software reset (at+set_config=device:restart), or unplug the battery, to resume normal operations.

Setup:

RAK7204 LoRa Environmental Sensor, with Firmware Version: RUI v3.0.0.12.H.T.
Sending data to a RAK7258 Gateway, Firmware Version 1.1.0062_Release r202
Device-gateway is about 20mt (test environment)

Server:

RAK7258 Gateway, Firmware Version 1.1.0062_Release r202, sending data for this and other devices to TTN. The gateway regularly delivers packet from other devices.

Details:

INITIAL CONFIGURATION

at+version
Wake up

at+version
at+version
Firmware Version: RUI v3.0.0.12.H.T
OK

at+get_config=device:status
at+get_config=device:status
OK.


===============Device Status List================
Board Core: RAK811
MCU: STM32L151CB_A
LoRa chip: SX1276

Battery Voltage:3.553 V
BME680 sensor data:
Humidity:55.27 %RH
Temperature:26.89 degree
Pressure:1004.29 hPa
Gas_resistance: 3214 ohms
===================List End======================


at+get_config=lora:status
at+get_config=lora:status
OK.


==============LoRaWAN Status List================
Work Mode: LoRaWAN
Region: EU868
Send_interval: 1800s
Auto send status: true.
Send_interval work at sleep
Join_mode: OTAA
DevEui: 60C5A8FFFE******
AppEui: 70B3D57ED0******
AppKey: 790197D88C303D1C0F4872050D******
Class: A
Joined Network:true
IsConfirm: false
AdrEnable: true
EnableRepeaterSupport: false
RX2_CHANNEL_FREQUENCY: 869525000, RX2_CHANNEL_DR:3
RX_WINDOW_DURATION: 3000ms
RECEIVE_DELAY_1: 1000ms
RECEIVE_DELAY_2: 2000ms
JOIN_ACCEPT_DELAY_1: 5000ms
JOIN_ACCEPT_DELAY_2: 6000ms
Current Datarate: 5
Primeval Datarate: 5
ChannelsTxPower: 0
UpLinkCounter: 1
DownLinkCounter: 0
===================List End======================


Latest reading (via TTN)

{
“barometer”: “999.2hPa”,
“battery”: “3.52V”,
“device_id”: “weather_00”,
“gasResistance”: “6.2KΩ”,
“humidity”: “48%RH”,
“raw”: “CAIBYAdoYAZzJwgCZwEJBAICbA==”,
“temperature”: “26.5°C”,
“time”: “2020-05-14T19:42:17.147522721Z”
}
]

AFTER THE ISSUE

at+version
Wake up

at+get_config=device:status
at+get_config=device:status
OK.


===============Device Status List================
Board Core: RAK811
MCU: STM32L151CB_A
LoRa chip: SX1276

Battery Voltage:3.516 V
BME680 sensor data:
Humidity:48.89 %RH
Temperature:26.59 degree
Pressure:999.20 hPa
Gas_resistance: 6208 ohms
===================List End======================


at+get_config=lora:status
at+get_config=lora:status
OK.


==============LoRaWAN Status List================
Work Mode: LoRaWAN
Region: EU868
Send_interval: 1800s
Auto send status: true.
Send_interval work at sleep
Join_mode: OTAA
DevEui: 60C5A8FFFE******
AppEui: 70B3D57ED0******
AppKey: 790197D88C303D1C0F4872050D******
Class: A
Joined Network:true
IsConfirm: false
AdrEnable: true
EnableRepeaterSupport: false
RX2_CHANNEL_FREQUENCY: 869525000, RX2_CHANNEL_DR:3
RX_WINDOW_DURATION: 3000ms
RECEIVE_DELAY_1: 1000ms
RECEIVE_DELAY_2: 2000ms
JOIN_ACCEPT_DELAY_1: 5000ms
JOIN_ACCEPT_DELAY_2: 6000ms
Current Datarate: 5
Primeval Datarate: 5
ChannelsTxPower: 0
UpLinkCounter: 45
DownLinkCounter: 0
===================List End======================


at+set_config=device:restart
at+set_config=device:restart
OK

========================================================


| ___ / _ \ | | / / | | | () | |
| |
/ / /\ | |/ / | | | | _ __ | | ___ ___ ___
| /| _ || \ | |/| | | '
/ _ \ |/ _ / __/ __|
| |\ | | | || |\ \ \ /\ / | | | __/ | /_ _
_| __| |
/_| _/ / /||| _|_|_||//


RAK7204 Version:3.0.0.12.H.T


========================================================

Selected LoRaWAN 1.0.2 Region: EU868
UART1 work mode: RUI_UART_NORAMAL
BME680 init success.
autosend_interval: 1800s
Initialization OK,Current work_mode:LoRaWAN, join_mode:OTAA, Class: A

OTAA Join Start…
[LoRa]:Join Success
OK
Battery Voltage = 3.510 V
BME680 sensor data:
Humidity:49.77 %RH
Temperature:27.45 degree
Pressure:1008.78 hPa
Gas_resistance: 2002 ohms

[LoRa]: send out <— THIS PACKET IS PROPERLY RECEIVED FROM THE GATEWAY
[LoRa]: RUI_MCPS_UNCONFIRMED send success
OK
Go to Sleep
OK

After the restart, the packet sent is properly received and processed by the gateway.

Can you place the module somewhere else to see if there is some electrical environment issue?

I can indeed move it of a few meters.

Update.

I moved the device to a new location as suggested (it’s an outdoor terrace, no electric/radio emissions nearby), restarted the RAK7204 with at+set_config=device:restart, and after a few hours of operations it stopped sending data again.

Latest messages sent

[…]
{
“barometer”: “1009.8hPa”,
“battery”: “3.52V”,
“device_id”: “weather_00”,
“gasResistance”: “6.93KΩ”,
“humidity”: “44%RH”,
“raw”: “CAIBYAdoWAZzJ3ICZwDrBAICtQ==”,
“temperature”: “23.5°C”,
“time”: “2020-05-15T21:17:19.007536348Z”
},
{
“barometer”: “1009.7hPa”,
“battery”: “3.52V”,
“device_id”: “weather_00”,
“gasResistance”: “7KΩ”,
“humidity”: “45.5%RH”,
“raw”: “CAIBYAdoWwZzJ3ECZwDpBAICvA==”,
“temperature”: “23.3°C”,
“time”: “2020-05-15T21:47:22.593582886Z”
}

The nothing else.

I checked the GW and TTN, all other devices are sending data regularly.

Now the device is in stuck state. It responds to AT commands but it doesn’t send data.

at+version
Wake up

at+get_config=device:status
at+get_config=device:status
OK.


===============Device Status List================
Board Core: RAK811
MCU: STM32L151CB_A
LoRa chip: SX1276

Battery Voltage:3.523 V
BME680 sensor data:
Humidity:45.898 %RH
Temperature:23.34 degree
Pressure:1009.74 hPa
Gas_resistance: 7008 ohms
===================List End======================


at+get_config=lora:status
at+get_config=lora:status
OK.


==============LoRaWAN Status List================
Work Mode: LoRaWAN
Region: EU868
Send_interval: 1800s
Auto send status: true.
Send_interval work at sleep
Join_mode: OTAA
DevEui: 60C5A8FFFE******
AppEui: 70B3D57ED0******
AppKey: 790197D88C303D1C0F4872050D******
Class: A
Joined Network:true
IsConfirm: false
AdrEnable: true
EnableRepeaterSupport: false
RX2_CHANNEL_FREQUENCY: 869525000, RX2_CHANNEL_DR:3
RX_WINDOW_DURATION: 3000ms
RECEIVE_DELAY_1: 1000ms
RECEIVE_DELAY_2: 2000ms
JOIN_ACCEPT_DELAY_1: 5000ms
JOIN_ACCEPT_DELAY_2: 6000ms
Current Datarate: 5
Primeval Datarate: 5
ChannelsTxPower: 0
UpLinkCounter: 28
DownLinkCounter: 0
===================List End======================


Is there any diagnostic data I can take for you to help you troubleshoot the issue?

Hi, same problem on four sensors.
I tried to change firmware but for the moment I have not solved,

1 Like

Is there anyway you can put a PC or similar on to the serial port to capture all the output from the device?

Yes, I can connect to the serial port.
Please give me directions on what AT commands to run, and for how long. Right now the device is configured with a send_interval of 1800s (30’)

I’d just leave it to run as is - you want to see what it was doing when it stops.

Test started on 2020-05-17 at 20:14:00

Connected to serial port, and run some at commands to make sure the device is responsive

at+version
at+version
Firmware Version: RUI v3.0.0.12.H.T
OK

at+get_config=device:status
at+get_config=device:status
OK.


===============Device Status List================
Board Core: RAK811
MCU: STM32L151CB_A
LoRa chip: SX1276

Battery Voltage:3.523 V
BME680 sensor data:
Humidity:45.898 %RH
Temperature:23.34 degree
Pressure:1009.74 hPa
Gas_resistance: 7008 ohms
===================List End======================


at+get_config=lora:status
at+get_config=lora:status
OK.


==============LoRaWAN Status List================
Work Mode: LoRaWAN
Region: EU868
Send_interval: 1800s
Auto send status: true.
Send_interval work at sleep
Join_mode: OTAA
DevEui: 60C5A8FFFE******
AppEui: 70B3D57ED0******
AppKey: 790197D88C303D1C0F4872050D******
Class: A
Joined Network:true
IsConfirm: false
AdrEnable: true
EnableRepeaterSupport: false
RX2_CHANNEL_FREQUENCY: 869525000, RX2_CHANNEL_DR:3
RX_WINDOW_DURATION: 3000ms
RECEIVE_DELAY_1: 1000ms
RECEIVE_DELAY_2: 2000ms
JOIN_ACCEPT_DELAY_1: 5000ms
JOIN_ACCEPT_DELAY_2: 6000ms
Current Datarate: 5
Primeval Datarate: 5
ChannelsTxPower: 0
UpLinkCounter: 28
DownLinkCounter: 0
===================List End======================


Device left connected to serial port

[…]
NO MESSAGES LOGGED
Serial port tool still connected
[…]

at 22:27:00
2h 13’ hours after, according to the set schedule (Send_interval: 1800s) the device should have sent 4 packets during this timeframe

The device is still responsive to at commands

at+get_config=device:status
at+get_config=device:status
OK.


===============Device Status List================
Board Core: RAK811
MCU: STM32L151CB_A
LoRa chip: SX1276

Battery Voltage:3.523 V
BME680 sensor data:
Humidity:45.898 %RH
Temperature:23.34 degree
Pressure:1009.74 hPa
Gas_resistance: 7008 ohms
===================List End======================


Hello,
Can anyone in RAK support please handle my case?

My RAK7204 is still in stuck status, and I left it in this status in case RAK supports requires additional diagnostics, beyond what already posted above. The device is responsive to AT commands via serial connection, but it has not sent anything out for the past 4 days.
Full story above, in this thread.

@pierluigi.rotondo
Do you have other spare batteries? Try again after replacing it.

Hi,

Don’t hold your breath waiting for a fix. There are a few issues with the RAK RUI which are yet to be fixed by RAK wireless.

I have been seeing the same issue on a RAK5205. After a lot of time investigating, I have found that the wake-up call back does not get called when the device wakes from sleep to do another transmit cycle. I have also found that the devices wake early and end up in some pseudo sleep mode but draws about 7mA which drains the battery rather quickly.

I have had to put a workaround in to check if the device was actually due to wake up yet, and, if not, put it back to sleep. When the device is due to wake, I have other code to detect this and calls the wake up function. This seems to work.

Unfortunately the bugs are in the RUI code which lives on the RAK server and gets compiled with the code the user uploads. The RUI code is not available to the public, so there is no way to fix the root cause of the problem yourself. Hope the code gurus at RAK can make the RUI stable soon…

Cheers,
Martin

Hello @martinlab3,

Have you get the solution to the problem ?
I am using RAK811 with RUI code.
The RAK811 stops sending data after some hours of operations.

Regards