RAK5860 LTE-M AT command set

I need to know which AT-command set I can use in order to change/make the Cellular_Ping example script configuration usable for KPN provider. (LTE-M)

I already changed the setting for KPN to:

AT+CGDCONT=1,“IP”,“kpnthings.iot”

BR,
Jeroen

Dear @beegee,

Could you pinpoint me to the correct working related command set?

BR,
Jeroen

Please be patient.
In my country is no CAT-M or NB-IoT available, so I cannot test anything. But I will loop in one of my team members.

1 Like

If you need help for testing purposes, please let me know.

Hello @JeroenKl,
To help solve the problem could you please share the output of the serial console? After sending the command AT+QNWINFO

I’m testing with this code in order to get a LTE-M connection:

// should result in +CPIN: READY, if not sim pin is required
bg77_at(“AT+CPIN?”, 500);
delay(2000);
// frequency band
bg77_at(“AT+QCFG=“band”,1,80000,80000,1”, 500);
delay(2000);
// mode of operation
bg77_at(“AT+QCFG=“iotopmode”,0,1”, 500);
delay(2000);
// networkscan sequence
bg77_at(“AT+QCFG=“nwscanseq”,020202,1”, 500);
delay(2000);
// netwerk scan mode
bg77_at(“AT+QCFG=“nwscanmode”,3,1”, 500);
delay(2000);
// Roaming service (NOT WORKING)
//bg77_at(“AT+QCFG=“roamservice”,2,1”, 500);
//delay(2000);

// KPN (Dutch provider) LTE-M APN
bg77_at(“AT+CGDCONT=1,“IP”,“kpnthings.iot””, 500);
delay(2000);
// operator selection (auto)
bg77_at(“AT+COPS=0,2”, 500);
delay(2000);
// restart modem
bg77_at(“AT+CFUN=1,1”, 500);
delay(2000);

// registration status: +CREG: 0,1 means registered
bg77_at(“AT+CREG?”, 500);
delay(2000);
// connected? +CGATT: 1 means connected
bg77_at(“AT+CGATT?”, 500);
delay(2000);
// bg77_at(“AT+CGATT=1”, 500);
// delay(2000);
// IP address (NOT WORKING)
bg77_at(“AT+CGPADDR?”, 500);
delay(2000);

bg77_at(“AT+QNWINFO”, 500);
delay(2000);
bg77_at(“AT+QCSQ”, 500);
delay(2000);
// Signal level like: +CSQ: 24,99 (not: 99,99)
bg77_at(“AT+CSQ”, 500);
delay(2000);
bg77_at(“AT+QIACT=1”, 500);
delay(2000);
}

Serial Output (NOT STABLE):

18:28:44.206 -> RAK4630 Cellular TEST With KPN NL LTE-M sim card!
18:28:48.196 -> BG77 power up!
18:28:48.715 ->
18:28:48.715 -> RDY
18:28:48.715 -> ATI

18:28:48.715 -> Quectel
18:28:48.715 -> BG77
18:28:48.715 -> Revision: BG77LAR02A02
18:28:48.715 ->
18:28:48.715 -> OK
18:28:48.715 ->
18:28:51.208 ->
18:28:53.696 ->
18:28:53.696 -> RDY
18:28:53.696 ->
18:28:56.185 ->
18:28:56.185 -> RDY
18:28:56.185 -> AT+QCFG=“iotopmode”,0,1

18:28:56.185 -> OK
18:28:56.185 ->
18:28:58.680 ->
18:28:58.680 -> RDY
18:28:58.680 ->
18:29:01.173 ->
18:29:03.669 ->
18:29:03.669 -> RDY
18:29:03.669 ->
18:29:06.160 ->
18:29:06.160 -> RDY
18:29:06.160 -> AT+CGDCONT=1,“IP”,“kpnthings.iot”

18:29:06.160 -> OK
18:29:06.160 ->
18:29:08.699 ->
18:29:11.192 ->
18:29:11.192 -> RDY
18:29:11.192 ->
18:29:13.670 ->
18:29:13.670 -> RDY
18:29:13.670 -> AT+CREG?

18:29:13.670 -> +CREG: 0,2
18:29:13.670 ->
18:29:13.670 -> OK
18:29:13.670 ->
18:29:16.181 ->
18:29:16.181 -> APP RDY
18:29:16.181 ->
18:29:18.665 ->
18:29:18.665 -> RDY
18:29:18.665 -> AT+CGATT=1

18:29:21.182 ->
18:29:21.182 -> OK
18:29:21.182 -> AT+CGPADDR?

18:29:21.182 -> ERROR
18:29:21.182 ->
18:29:23.675 -> AT+QNWINFO

18:29:23.675 -> +QNWINFO: “eMTC”,“20408”,“LTE BAND 20”,6400
18:29:23.675 ->
18:29:23.675 -> OK

18:29:26.168 -> AT+QCSQ

18:29:26.168 -> +QCSQ: “eMTC”,-80,-109,118,-13
18:29:26.168 ->
18:29:26.168 -> OK
18:29:26.168 ->
18:29:28.666 -> AT+CSQ

18:29:28.666 -> +CSQ: 17,99
18:29:28.666 ->
18:29:28.666 -> OK
18:29:28.666 ->
18:29:33.618 -> AT+QIACT=1

18:29:33.618 -> OK
18:29:33.618 ->
18:29:35.586 -> Begin receive packet from www.kpn.nl!
18:29:45.375 -> AT+QPING=1,”1.1.1.1”,4,4

18:29:45.375 -> ERROR

any advice?

BR,

Jeroen

Hello @JeroenKl,
I can’t found the at command AT+QICSGP to configure APN


For example: Using hologram sim card

@JeroenKl

“apn_name”, username, password

Set the APN to “hologram” with no username or password.

AT+QICSGP=1,1,"hologram","","",1

Then Activate the PDP context.

AT+QIACT=1

If ok you then you can establish the TCP connection and send AT+QPING

Hi @marcio,

It looks like ‘Hologram’ isn’t the correct way in order to set the APN for KPN provider in the Netherlands. I made progress with:
AT+CGDCONT=1,“IP”,“kpnthings.iot” and AT+CGACT=1,1

Now I’m getting an IP address but still not able to ping the WAN network:

21:42:46.685 -> AT+CGATT=1
21:42:46.685 -> OK

21:42:51.196 -> AT+CGDCONT=1,“IP”,“kpnthings.iot”
21:42:51.196 -> OK

21:42:55.716 -> AT+CGACT=1,1
21:42:55.716 -> OK

21:43:00.194 -> AT+CGPADDR=1
21:43:00.194 -> +CGPADDR: 1,10.11.1.231
21:43:00.194 -> OK

21:43:04.706 -> AT+QNWINFO
21:43:04.706 -> +QNWINFO: “eMTC”,“20408”,“LTE BAND 20”,6400
21:43:04.706 -> OK

21:43:09.180 -> AT+QCSQ
21:43:09.180 -> +QCSQ: “eMTC”,-83,-111,117,-12
21:43:09.180 -> OK

21:43:13.694 -> AT+CSQ
21:43:13.694 -> +CSQ: 15,99
21:43:13.694 -> OK

21:43:18.205 -> AT+QIACT=1
21:43:18.205 -> OK

21:43:22.202 -> Begin receive packet from www.kpn.nl!
21:43:31.945 -> AT+QPING=1,”8.8.8.8”

21:43:31.945 -> ERROR
21:43:31.945 ->
21:43:32.976 -> Begin receive packet from www.kpn.nl!

Why can I not ping to WAN (yet)?

BR,
Jeroen

Hi @JeroenKl,

Can you try “internet” as the APN? Where did you find “kpnthings.iot” as the APN for KPN?

This APN is provided by KPN together with 2 test LTE-M sims I received.

I see. It seems if you will use their standard cellular connection (2G, 3G, LTE), you can use “internet” but you got an IoT sim for LTE-M that’s why you need to use kpnthings.iot. That’s how I understand it, I might be wrong.

Also, on your screenshot, you have multiple RDY replies from module. That can be an indicator that the module doesn’t not have a good power source.

Hello @JeroenKl,
Hologram is global sim card.
(Hologram
KPNThings has another APN.
Have you tested kpn sim card on cell phone?
For hologram sim card you need to activate it before using.

I do not have Hologram SIM, but I have KPN LTE-M Sims with KPN APN which I need to use according KPN.
It is activated, I get a connection and IP address but cannot ping (error message)

You are right, this is the case

I’m using the Cellular_ping INO which requires a terminal connection. So the device is hooked up to my laptop.
I can change the setting so the device will run without a serial connection but then I cannot see if the ping is working.

I think it is time to provide a ‘example, solution’ script (INO)

Hi @carlrowan,

Could you please check if the LTE-M (CAT-M1) functionality is tested thoroughly and confirmed it should work according specs?

BR,
Jeroen

Hi @JeroenKl,

Marcio already tested it on his hologram sim and it works. Quectel forum is a good reference as well if a user from Netherlands successfully used KPN LTE-M1 connection using BG77.

Hi @carlrowan,

Thanks, of course I will not rest to have the KPN fixed so I’ll investigate further and keep you updated.
Any topic on Quectel forum you can pinpoint me regarding KPN LTE-M1?

Br,
Jeroen

@JeroenKl
The error message does not help much. You can add AT+CMEE=2 command to get more error details.
I also used the command AT+CFUN=1,0 before activate the PDP context.