RAK5010 - Connectivity Issue over Time

Hello! I received my two RAK5010 devices for a new project that we are working on and I’m getting mix results on having the default just run successfully over night.

I’ve looked through numerous topics and the Quick Start guide. It appears that if I follow the setup and then manually send data to the server, it’ll continue to work, but when I put it into the mode to Sleep and restart/resend data every 3 minutes, after 45 minutes or so it will stop connecting to the internet. I’ve tried two different SIMs and various scan/connections options. I’m located in the USA. Thoughts?

The Setup and various validations:

at+set_config=cellular:(AT)

at+set_config=cellular:(AT+CGDCONT?)
AT+CGDCONT?
+CGDCONT: 1,“IP”,“data00.telnyx”,“0.0.0.0”,0,0,0,0

at+set_config=cellular:(AT+CPIN?)

AT+CPIN?
+CPIN: READY

at+set_config=cellular:(AT+QNWINFO)

AT+QNWINFO
+QNWINFO: “CAT-M1”,“310410”,“LTE BAND 12”,5110

at+set_config=cellular:(ATI)

ATI
Quectel
BG96
Revision: BG96MAR02A07M1G

OK
at+set_config=cellular:(AT+CFUN?)

AT+CFUN?
+CFUN: 1

OK
at+set_config=cellular:(AT+QGMR)

AT+QGMR
BG96MAR02A07M1G_01.007.01.007

OK
at+set_config=cellular:(AT+GSN)

AT+GSN
864431043840372

OK
at+set_config=cellular:(AT+CSQ)

AT+CSQ
+CSQ: 24,99

OK
at+set_config=cellular:(AT+QCSQ)

AT+QCSQ
+QCSQ: “CAT-M1”,-65,-92,158,-10

OK
at+set_config=cellular:(AT+COPS?)

AT+COPS?
+COPS: 1,0,“AT&T Telnyx”,8
OK
at+set_config=cellular:(AT+QIACT=1)
AT+QIACT=1
OK

at+set_config=cellular:71.64.97.145:31003:internet:internet:data00.telnyx:0
at+set_config=cellular:71.64.97.145:31003:internet:internet:data00.telnyx:0
OK

Manual Test:
[I can continue to run this for a long time by just resending manually data every 5 or 10 minutes]

at+send=cellular:123456

AT+QIOPEN=1,0,“TCP”,“71.64.97.145”,31003,0,1
OK

+QIOPEN: 0,0

+QIURC: “recv”,0,4
OK

AT+QISEND=0,7

123456
SEND OK
AT+QICLOSE=0
OK

Setup to automate:
at+set_config=cellular:send_interval:1:180000
at+set_config=cellular:send_interval:1:180000
OK
at+set_config=device:restart

Every 3 minutes to my server.
[Debug output from the UART]
[This works for about 45 minutes]

********************************************************
RAK5010 Version:3.0.0.10
********************************************************
========================================================
AT+COPS=?
AT+COPS=1,0,"internet",0
AT+QICSGP=1,1,"internet","","",1
AT+QIACT=1
+COPS: (1,"313 100","313 100","313100",8),(1,"Verizon","Verizon","311480",8),(1,"311 490","311 490","311490",8),(2,"AT&T","AT&T","310410",8),(1,"T-Mobile","T-Mobile","310260",8),(1,"T-Mobile","T-Mobile","310260",0),(1,"AT&T","AT&T","310410",9),(1,"Verizon","Verizon","311480",9),(1,"T-Mobile","T-Mobile","310260",9),,(0,1,2,3,4),(0,1,2)
OK

AT+QIOPEN=1,0,"TCP","71.64.97.145",31003,0,1
OK
+QIOPEN: 0,0
+QIURC: "recv",0,4
OK
AT+QISEND=0,142Acc:-412.00,-246.00,822.00; Tem:29.06;Hum:26.35; Pre:984.19; Lig:151.80; Lat(0-N,1-S):0,4117.499611,Lon(0-E,1-W):1,8128.893995; Battery:4.20;
>
SEND OK
AT+QICLOSE=0
+QIURC: "recv",0,4
OK

After 45 minutes, I continue to get stuck in this pattern:

********************************************************
RAK5010 Version:3.0.0.10
********************************************************
========================================================
AT+COPS=?
AT+COPS=1,0,"internet",0
AT+QICSGP=1,1,"internet","","",1
AT+QIACT=1
========================================================

[Pattern repeats every 3 minutes so it’s trying to connect.]

I appreciate any help/guidance.

Further testing…

I am able to register on a network and send data every 3 minutes. I’m connected to the UART with a monitor to record data. I see the typical “RAKWireless” Boot screen and RAK5010 Version:3.0.0.11 on the screen.

The “app_task” function fires up and I see that it does the correct work and my server receives the data.

But after 45 minutes to an hour, the “app_task” function still executes, however it doesn’t connect to the network or send data to my server. The messages displayed on the screen are a bit different.

Working:

********************************************************
RAK5010 Version:3.0.0.11
********************************************************
AT+QCFG="band",F,180A,180A
                           OKAT+QCFG="iotopmode",2

                                                    OKAT+QCFG="nwscanseq",020301

                                                                                  OKAT+QCFG="nwscanmode",0

     OKAT+CFUN=0

                  OKAT+COPS?

                              +COPS: 2

[Yes formatting is a bit odd, but what is even more strange is that when it fails the formatting changes to this:]

********************************************************
RAK5010 Version:3.0.0.11
********************************************************
========================================================
AT+QCFG="band",F,180A,180AAT+QCFG="iotopmode",2AT+QCFG="nwscanseq",020301AT+QCFG="nwscanmode",0AT+CFUN=0AT+COPS?AT+CFUN=1AT+COPS=0AT+COPS?AT+CREG?AT+QICSGP=1,1,"data00.telnyx","","",1AT+QIACT=1AT+COPS?========================================================

NOTICE: The CR\LFs are no longer sent and I do NOT get any OK responses.

Unplug the battery, plug the battery back in and everything starts to work again.

Anyone have the “app_task” functioning for more than an hour?

Another day of testing and it appears that the issue is that over time the BG96 is not coming back on to send AT commands to. The RAK Firmware (my updated code) is running and trying to send AT commands, but they all time out.

I’m still waiting for my J-Link to be able to watch for more debug details, but is this a problem with the RAK5010? Is it a RUI code issue?

Hi Carlton,

It’s quite some time since I did something with the Quectel modems.
The change of the format in the debug output could be caused by the modem being stuck in “Data Mode”.
What you could try is to send “+++” to the modem before trying to connect.
If the modem is not in “Data Mode” the command would not cause any harm, but if it is, it should bring it back.

Other than that, I will involve our specialist here.

Hi Carlton,
My colleague was running the RAK5010 with automatic sending every 3 minutes for for more than an hour and he couldn’t see the problem.
Are you using the original AT firmware or did you do some changes?

Bernd,

I tested both the “stock” firmware – version 3.0.0.10 and 3.0.0.11 – and my custom firmware built from the RAK5010 sample in GitHub with some minor modifications. They all exhibit the same behavior.

Last nights test ran 2 hours and 33 minutes before it stopped working. I tried the “+++” command you suggested and I didn’t see any differences.

Today I expect my JLink to arrive so I’ll grab some additional logs and see what might be going on.

Regards,
Carlton

Hi, when we test the firmware, we set the interval time as 20 min. That means board sends 3 times in an hour. And it can work for a long time. Because during the sleep, the board will power off BG96 and then power on if wake up. Frequent on and off may lead to the bg96 work unnormally. So I advise you set the time longer, maybe 20 or 30 min to send.Then you can check whether it works ok or not. We will do at the same time and then tell you the result.

Zhangtao,

Thanks for the follow up.

I was able to create an Arduino application that reads all sensors, GPS, send to my server via TCP then tells the BG96 to power off. After 3 minutes I start the loop again.

I did discover a couple items.