RAK5010 Serial COM and GSM Cellular issues

Hi all,

I bought RAK5010 tracker and trying to test it with Ooredoo GSM Network in Qatar, kindly help me to resolve the following issues.

First of all, I tried to duplicate the setup in RAK5010_Quick_Start_Guide.pdf, I downloaded RAK5010_V3.0.0.6.hex firmware into the Flash, then I opened RTT debug and UART Serial window using RAK SERIAL PORT tool.

Issue #1:
In the attached RAK SERIAL PORT tool screenshot, I can get AT response printed on the terminal, however when I send AT commands (like. at+version) from the sending terminal I didn’t get any response on both receiving terminal or RTT log as shown below.

It seems that I there an issue with transmitting AT commands to the modem


////////////////
RTT Log
//////////////
00> [01:40:05.899,000] app: GMS_PowerUp
00>
00> [01:42:00.695,000] app: Gsm_SetEchoCmd ret= -1
00>
00> [01:42:00.982,000] app: AT+QGPSCFG= ret= 0
00>
00> [01:42:33.884,000] app: AT+QGPS ret= 0
00>
00> [01:43:06.676,000] app: LIS3DH_GetWHO_AM_I = 51
00> [01:43:06.814,000] app: opt3001:manufacture_id=5449 device_id=3001
00>
00> [01:43:23.220,000] app: shtc3 id = 2119
00> [01:43:23.238,000] app: wdt_timer_handler wdt feed
00> [01:43:23.249,000] app: wdt_timer_handler wdt feed
00> [01:51:37.157,000] app:
00> +COPS: (2,“Ooredoo”,“Ooredoo”,“42701”,0),(1,“vodafone”,“VF-QA”,“42702”,0),(0,1,2,3,4),(0,1,2)
00>
00> OK
00> [01:51:37.164,000] app: wdt_timer_handler wdt feed
00> [01:51:37.178,000] app: wdt_timer_handler wdt feed
00> [02:08:03.237,000] app:
00>
00> +CME ERROR: 30
00>
00> [02:08:03.243,000] app: wdt_timer_handler wdt feed
00> [02:08:03.256,000] app: wdt_timer_handler wdt feed
00> [02:08:03.562,000] app:
00> OK
00> [02:08:03.566,000] app: wdt_timer_handlerwdt feed
00> [02:08:03.577,000] app: wdt_timer_handler wdt feed
00> [02:24:29.565,000] app:
00>
00> [02:24:29.586,000] app: pressure = 1008 hPa
00>
00> [02:24:29.621,000] app: acceleration x = -275.00
00> [02:24:29.625,000] app: acceleration y = -144.00
00> [02:24:29.629,000] app: acceleration z = 955.00
00> [02:24:29.648,000] app: light strength = 465.92
00> [02:24:30.021,000] app: temperature = 25.02
00> [02:24:30.024,000] app: humidity = 46.00
00> [00:00:00.000,000] app: RUI Version: v3.0.0.6
00> [00:00:00.000,000] app: Setting vector table to bootloader: 0x000F8000
00> [00:00:00.000,000] app: Setting vector table to main app: 0x00026000
00> [00:00:00.000,000] app: GMS_PowerUp
00>
00> [00:00:00.000,000] app: Gsm_SetEchoCmd ret= -1
00>
00> [00:00:00.000,000] app: AT+QGPSCFG= ret= -1
00>
00> [00:00:00.000,000] app: AT+QGPS ret= 0
00>
00> [00:00:00.000,000] app: LIS3DH_GetWHO_AM_I = 51
00> [00:00:00.000,000] app: opt3001:manufacture_id=5449 device_id=3001
00>
00> [00:00:00.000,000] app: shtc3 id = 2119
00> [00:00:00.011,000] app: power save open!
00>
00> [00:00:00.176,000] app: USB power detected
00> [00:00:00.213,000] app: USB ready
00> [00:32:46.090,000] app: wdt_timer_handler wdt feed
00> [01:05:32.170,000] app: wdt_timer_handler wdt feed
00> [01:38:18.250,000] app: wdt_timer_handler wdt feed
00> [01:39:00.179,000] app: app_task!!!
00> [01:39:00.181,000] app: wdt_timer_handler wdt feed
00> [01:40:05.751,000] app: GMS_PowerUp
00>
00> [01:42:00.546,000] app: Gsm_SetEchoCmd ret= -1
00>
00> [01:42:00.866,000] app: AT+QGPSCFG= ret= 0
00>
00> [01:42:33.768,000] app: AT+QGPS ret= 0
00>
00> [01:43:06.560,000] app: LIS3DH_GetWHO_AM_I = 51
00> [01:43:06.698,000] app: opt3001:manufacture_id=5449 device_id=3001
00>
00> [01:43:23.104,000] app: shtc3 id = 2119
00> [01:43:23.122,000] app: wdt_timer_handler wdt feed
00> [01:43:23.133,000] app: wdt_timer_handler wdt feed
00> [01:50:13.703,000] app:
00> +COPS: (1,“Ooredoo”,“Ooredoo”,“42701”,0),(1,“vodafone”,“VF-QA”,“42702”,0),(0,1,2,3,4),(0,1,2)
00>
00> OK
00> [01:50:13.711,000] app: wdt_timer_handler wdt feed
00> [01:50:13.725,000] app: wdt_timer_handler wdt feed
00> [02:06:39.833,000] app:
00>
00> [02:06:39.838,000] app: wdt_timer_handler wdt feed
00> [02:06:39.851,000] app: wdt_timer_handler wdt feed
00> [02:06:39.986,000] app:
00> OK
00> [02:06:39.989,000] app: wdt_timer_handler wdt feed
00> [02:06:40.000,000] app: wdt_timer_handler wdt feed
00> [02:23:05.996,000] app:

Issue #2:
I inserted Ooredoo sim card, and at+COPS return two network operators, however I don’t know why the firmware keep connecting to CHINA MOBILE network, I was expecting it should connects to Ooredoo one.

AT+COPS=?
+COPS: (2,“Ooredoo”,“Ooredoo”,“42701”,0),(1,“vodafone”,“VF-QA”,“42702”,0),(0,1,2,3,4),(0,1,2)

OKAT+COPS=1,0,“CHINA MOBILE”,0
+CME ERROR: 30
AT+QICSGP=1,1,“CMCC”,"","",1
OKAT+QIACT=1

Issue #3:
After the modem fail to connects to connects to the right network, the modem restart and keep doing the same process again, as shown in RTT viewer above.

Thank you,
Salah

Hi, it looks like you did not set net parameters. Did you use the period task to send sensors data to your server? it is just a demo to our server via CHINA MOBILE? Maybe you can do as flow:

  1. First , reflash. period task likes running now, stop it. Then search the net. I see it is successful.
  2. send at+set_config=cellular:(AT+COPS=1,0,“Ooredoo”,0)
  3. send at+set_config=cellular:(AT+QICSGP=1,1,“Ooredoo”,"","",1)
  4. send at+set_config=cellular:(AT+QIACT=1)
  5. Here has join your net
  6. then you can open tcp or udp, More details about at below is shown in bg96 At guide.
    https://www.quectel.com/product/bg96.htm

We just supply the way to send AT command to bg96 without change. So you may find other user’s demo on the forum with same cellular operator.

Hello nero,

Thanks for your reply, I will try these steps, but please clarify the following

1- How can I stop periodic tasks, Is it through UART serial terminal? what is the command?
2- currently I have an issue with sending AT command to RAK5010, as I mentioned in issue #1 above, any suggestions?
3- when you say reflash, you mean download the fireware again before I start access UART AT command?

Thank you,
Salah

Ok,
Q1: send at+set_config=cellular:send_interval:0,180000, it will stop
Q2: at+get_config=device:status, this command will get all sensors data back. It will cost at least 6s(no gps indoor ).If outdoor it will be back soon. Other command about bg96 will be decided by its guide, like AT+COPS=?. Besides, you should wait previous command back, then send next
Q3: Yes, download again. But if you stop the task by at+set_config=cellular:send_interval:0,180000, there is no need to flash. However, when period task (set start before) is not running, 5010 is in sleep and uart is closed either. Download is a better solution, the task is not suit for your use.

Actually our hex is supported for usb, maybe you can use it(your usb power supply should be stable). It is better than uart. Our serial tool is not support DTR(it is need), you can use Xshell or Putty serial port.

Thanks nero,

now I got the serial terminat working fine, and tried the commands that you sent, and I got +CME ERROR = 22, below the complete log. any advice?

00>
00> [00:00:00.000,000] app: shtc3 id = 2119
00> [00:00:00.012,000] app: USB power detected
00> [00:00:00.050,000] app: USB ready
00> [00:01:56.593,000] app: at_parse: at+version
00> [00:01:56.597,000] app: Firmware Version: RUI v3.0.0.6
00> [00:03:18.468,000] app: at_parse: at+version
00> [00:03:18.472,000] app: Firmware Version: RUI v3.0.0.6
00> [00:05:24.884,000] app: at_parse: at+set_config=cellular:send_interval:0,180000
00> [00:05:24.892,000] app: g_rui_cfg_t.sleep_enable = 0
00> [00:05:24.895,000] app: g_rui_cfg_t.sleep_period = 180000
00> [00:06:57.239,000] app: at_parse: at+set_config=cellular:(AT+COPS=?)
00> [00:06:57.251,000] app: gsm_cmd: AT+COPS=?
00> [00:06:57.254,000] app: wdt_timer_handler wdt feed
00> [00:06:57.262,000] app: wdt_timer_handler wdt feed
00> [00:14:57.433,000] app:
00> +COPS: (2,“Ooredoo”,“Ooredoo”,“42701”,0),(3,“vodafone”,“VF-QA”,“42702”,0),(0,1,2,3,4),(0,1,2)
00>
00> OK
00> [00:16:25.124,000] app: at_parse: at+set_config=cellular:(AT+COPS=1,0,“Ooredoo”,0)
00> [00:16:25.138,000] app: gsm_cmd: AT+COPS=1,0,“Ooredoo”,0
00> [00:16:25.142,000] app: wdt_timer_handler wdt feed
00> [00:16:25.152,000] app: wdt_timer_handler wdt feed
00> [00:32:51.719,000] app:
00>
00> +CME ERROR: 22
00>
00> [00:32:51.724,000] app: wdt_timer_handler wdt feed
00> [00:47:30.564,000] app: at_parse: at+set_config=cellular:(AT+QICSGP=1,1,“Ooredoo”,"","",1)
00> [00:47:30.580,000] app: gsm_cmd: AT+QICSGP=1,1,“Ooredoo”,"","",1
00> [00:47:30.584,000] app: wdt_timer_handler wdt feed
00> [00:47:30.594,000] app: wdt_timer_handler wdt feed
00> [01:03:56.640,000] app:
00> RDY
00> AT+QICSGP=1,1,“Ooredoo”,"","",1
00> ERROR
00>
00> RDY
00>
00> [01:05:32.171,000] app: wdt_timer_handler wdt feed
00> [01:14:48.064,000] app: at_parse: at+set_config=cellular:(AT+COPS?)
00> [01:14:48.075,000] app: gsm_cmd: AT+COPS?
00> [01:14:48.078,000] app: wdt_timer_handler wdt feed
00> [01:14:48.087,000] app: wdt_timer_handler wdt feed
00> [01:14:48.228,000] app:
00> RDY
00>
00> RDY
00> AT+COPS?
00> +COPS: 1
00>
00> OK
00> [01:19:21.199,000] app: at_parse: at+set_config=cellular:(AT+QIACT=1)
00> [01:19:21.211,000] app: gsm_cmd: AT+QIACT=1
00> [01:19:21.214,000] app: wdt_timer_handler wdt feed
00> [01:19:21.223,000] app: wdt_timer_handler wdt feed
00> [01:35:47.229,000] app:
00> AT+QIACT=1
00> ERROR
00>
00> [01:38:18.251,000] app: wdt_timer_handler wdt feed

I also tried the AT+QNWINFO and it shows me +QNWINFO: “EDGE”,“42701”,“GSM 1800”,639

00> [02:13:54.234,000] app: at_parse: at+set_config=cellular:(AT+COPS=1,0,“Ooredoo”,0)
00> [02:13:54.248,000] app: gsm_cmd: AT+COPS=1,0,“Ooredoo”,0
00> [02:13:54.252,000] app: wdt_timer_handler wdt feed
00> [02:13:54.262,000] app: wdt_timer_handler wdt feed
00> [02:30:20.314,000] app:
00>
00> RDY
00>
00> RDY
00>
00> RDY
00> AT+COPS=1,0,“Ooredoo”,0
00> +CME ERROR: 22
00>
00> RDY
00>
00> [02:42:10.029,000] app: at_parse: at+set_config=cellular:(AT+QNWINFO)
00> [02:42:10.041,000] app: gsm_cmd: AT+QNWINFO
00> [02:42:10.044,000] app: wdt_timer_handler wdt feed
00> [02:42:10.053,000] app: wdt_timer_handler wdt feed
00> [02:42:10.284,000] app: AT+QNWINFO
00> +QNWINFO: “EDGE”,“42701”,“GSM 1800”,639
00>
00> OK
00> [02:43:50.411,000] app: wdt_timer_handler wdt feed
00> [03:16:36.491,000] app: wdt_timer_handler wdt feed
00> [03:49:22.571,000] app: wdt_timer_handler wdt feed
00> [04:22:08.651,000] app: wdt_timer_handler wdt feed

00> [00:16:25.124,000] app: at_parse: at+set_config=cellular:(AT+COPS=1,0,“Ooredoo”,0)
00> [00:16:25.138,000] app: gsm_cmd: AT+COPS=1,0,“Ooredoo”,0
00> [00:16:25.142,000] app: wdt_timer_handler wdt feed
00> [00:16:25.152,000] app: wdt_timer_handler wdt feed
00> [00:32:51.719,000] app:
00>
00> +CME ERROR: 22
[/quote]

Why the command at+set_config=cellular:(AT+COPS=1,0,“Ooredoo”,0) has this character “? it should be at+set_config=cellular:(AT+COPS=1,0,“Ooredoo”,0). You can try again, and I am looking for the command sequence of your net operator. Reply later you.

Hi, I have test my GSM, below is log:

[10:17:09.091]OUT→◇at+set_config=cellular:(AT+COPS=?)

[10:17:24.623]IN←◆
+COPS: (2,“CHINA MOBILE”,“CMCC”,“46000”,0),(0,1,2,3,4),(0,1,2)

OK
[10:17:27.019]OUT→◇at+set_config=cellular:(AT+QIACT=1)

[10:17:27.613]IN←◆

OK
[10:17:30.619]OUT→◇at+set_config=cellular:(AT+COPS?)

[10:17:30.637]IN←◆

+COPS: 1,0,“CHINA MOBILE CMCC”,0

OK
[10:17:32.739]OUT→◇at+set_config=cellular:(AT+CSQ)

[10:17:32.750]IN←◆

+CSQ: 30,0

OK
[10:17:41.306]OUT→◇AT+COPS=1,0,“CHINA MOBILE”,0

[10:17:41.310]IN←◆Invalid at command.

ERROR
RET_CODE:80

[10:17:56.755]OUT→◇at+set_config=cellular:(AT+COPS=1,0,“CHINA MOBILE”,0)

[10:17:56.796]IN←◆

OK
[10:17:59.427]OUT→◇at+set_config=cellular:(AT+CSQ)

[10:17:59.438]IN←◆

+CSQ: 30,99

OK

So it loos like you use gsm too. You just do as follow:

  1. at+set_config=cellular:(AT+COPS=?) //search net
  2. at+set_config=cellular:(AT+COPS=1,0,“Ooredoo”,0) // register to Ooredoo
  3. at+set_config=cellular:(AT+QIACT=1) // active apn
  4. at+set_config=cellular:(AT+COPS?) // query register or not
  5. at+set_config=cellular:(AT+CSQ) // query quality of net, if return A(between 0 and 31), 99, join ok!

Continuing the discussion from RAK5010 Serial COM and GSM Cellular issues:

Hi I have also same problem like this, I am using Sprint sim card but could not solve the problem. Did your problem solved, Salah?

Yes the problem is solved, it turned out that I have to deregister from the network before doing manual cell selection.
check this link