R412M 2G example

Hello guys,

I have been using the sodaq N211 sara board succesfully for NB-IOT applications. I am now using a Sodaq R412M board to go to 2G data communication. I wanted to check with you whether there are any examples available to start testing on this?

I have looked into your GPRSbee and 3G_bee code, tried to adapt it for the R412M board, but not succesfully at this time. Is it possible to provide a simple GPRS example for this board? I would already be happy with a basic AT+ command sequence for starters.

Thanks very much!

Kind regards

@Piet_Callemeyn

I got these AT commands:
I didnt test them, please let me know if you can connect.

AT+URAT=9
AT+URAT?
AT+CMEE=2
AT+CGDCONT=1,“IP”,“live.vodafone.com
AT+CGDCONT?
AT+CFUN=1
AT+COPS=1,2,“20404”
AT+CSQ
AT+CREG=2
AT+CREG?
AT+CGPADDR

Kind regards,
Jan

Hi @Jan

When I try the commands above the second one already fails. For NB-IoT the command AT+URAT=8 and AT+URAT? succeed with the response of the urat = 8. But with URAT 9 the result is ERROR for AT+URAT?

Is this the specific part to connect with 2G for R412M?

kind regards

Same here, AT+URAT=9 seems to fail.

Can this be related to incompatible sim-cards?

@great7ven
The R410M does not support 2G, only the R412M does.

@Piet_Callemeyn
You could try with your regular phone simcard to see if the 2G works.

@Jan
I’m happy so… My device is the R412M and the topic also?

Im using a 412M and 2G GPRS is working.

ATE0
-> ATE0
-> OK
AT+GMR
-> M0.03.00 [Feb 08 2018 15:21:44]
AT+CREG=0;+CEREG=0;+COPS=2
-> OK
AT+CGDCONT=1,“IP”,“internet”
-> OK
AT+UAUTHREQ=1,0
-> OK
AT+URAT=7,9
-> OK
AT+CMEE=2;+CREG=2;+CEREG=3;+CMGF=1;+CSDH=0;+CNMI=2,1;+COPS=0
-> OK
AT+CSQ
-> +CSQ: 22,99
-> OK
AT+CGACT=1
-> OK
AT+CSQ;+CREG?;+CEREG?;+CGDCONT?;+COPS?
-> +CSQ: 22,99
-> +CREG: 2,1,“DB”,“58E0”,0
-> +CEREG: 3,4
-> +CGDCONT: 1,“IP”,“internet”,“100.116.150.210”,0,0,0,0
-> +COPS: 0,0,“vodafone NL”,0

Hello Cor,

Thank you for the reply. I have followed every step and this is working fine. I get similar results at the end when asking the module for CSQ, CREG, CEREG, CGDCONT and COPS. (and I have the exact same firmware version as you have)

However, after this I am trying to do a DNS resolve via:
AT+UDNSRN=0,“www.google.com

This fails, the module returns “ERROR”.

I always interpreted this as having no 2G connectivity. How were you able to verify that you have a working 2G connection?

Best regards,

Piet

Hallo Piet,

I can confim the 2G connection. I’m using the following commands:

AT+USOCR=6
-> +USOCR: 1
-> OK
AT+USOCO=1,“xxxxx”,xx
-> OK
AT+USOWR=1,26
-> @
-> +USOWR: 1,26
-> OK
-> +UUSORD: 1,13
AT+USORD=1,13
-> +USORD: 1,13,"
-> OK

Regards,

After contact with the SIM card provider, it seems that we are in his 2G “tunnel” with no access to the internet. Will have to test this with another SIM card. Will keep you posted.

Thanks for the help, much appreciated!

To conclude this story, one year later I revisited the R412 board with another SIM. Cor’s suggestions worked perfectly. Another way you can test this is by using the UBLOX echo server as follows:

write to the UBLOX echo server:
AT+USOCR=6
+USOCR: 1 => this is the socket handle (1) to be used for further commands
AT+USOCO=1,“195.34.89.241”,7 connect to ublox echo server on socket handle 1
AT+USORD=1,32 read welcome message
AT+USOWR=1,4,“Test” write
AT+USORD=1,4 read

An important point here: I was using the ublox DNS resolve command to check my 2G connectivity (cf. supra). However, this command is in the datasheet but not implemented on the R412 module… So be warned when trying that :slight_smile:

Hi @Piet_Callemeyn,

We also experienced that not all commands in the datasheet were actually in the early firmware version. And it wasn’t always clear if the command was actually there and doing something.
Since we are now a year later, did you try again after updating the module to the latest firmware?

Best regards,
Jan

Hi @Jan,

No, I am still on the M0.03.00 version (Feb 8 2018). Indeed a good point to try that with the new firmware.

Thanks,

Piet