AT+CGDCONT? read command is not providing APN configuration details in response.

Hi Team,

We are using nRF9160 modem and SDK 1.7 version with Segger Embedded Studio.

Using at_client sample code, observations as below.

1. Tried to read APN configuration using AT+CGDCONT command with below flow.

    - Issued AT+CFUN=1 and checked for AT+CEREG? and got response as 0,4 and waited 2-5minutes and checked AT+CEREG? and still same, even though issued AT+CGDCONT? and got just "OK" response not the APN configuration.

2. Tried to write APN configuration using AT+CGDCONT command with below flow.

    -Issued AT+CFUN=4 and then issued AT+CGDCONT=0,"IPV4V6","internet.m2mportal.de" and then issued AT+CFUN=0. Then tried to read APN configuration by issuing AT+CGDCONT? and got just "OK" response not the APN configuration. Power cycled and tried reading still getting just "OK" response. Why unable to read the APN configuration using AT+CGDCONT? read command. Is there any other way to confirm that the data written using AT+CGDCONT is successful? 

uisng azure_iot_hub sample code, observations as below.

1. Loaded 'azure_iot_hub' sample code and try to read APN configuration using below function in azure sample code after connecting to network but still no response.

#define AT_CGDCONT_READ_CMD   "AT+CDGCONT?\r\n"

err = at_cmd_write(AT_CGDCONT_READ_CMD, buf, sizeof(buf), NULL);

Why unable to read the APN configuration using AT+CGDCONT? read command to confirm that whatever we have written are successfully configured or not. So, not sure wether configuration is successful or not.

Can you please provide your valuable inputs.

Regards,

Sravan Rikka

Parents
  • Hello Team,

    Can you please respond.

    Regards,

    Sravan Rikka

  • Hello Sravan,

    We now have Easter holiday here in Norway.

    I will get back to you in the middle of the next week.

    Best regards,

    Michal

  • Tried to configure APN in azure sample code but getting err = 0Xfffffff8 as below. I hope no need to use \r\n at end of the command for “at_cmd_write()” function, even by keeping \r\n also getting same error.

    Getting proper response for AT+CFUN?, AT+CFUN=4, AT+CEREG? So “at_cmd_write()” function is working but why giving error response for AT+CGDCONT write and read command?

    Am I missing anything please advice.

    Code snippet.

    #define AT_CGDCONT_WRITE_CMD  "AT+CDGCONT=1,\"IPV4V6\",\"internet.m2mportal.de\""

    #define AT_CGDCONT_READ_CMD   "AT+CDGCONT?"

    #define AT_CFUN_OFF_CMD   "AT+CFUN=4"

    err = at_cmd_write(AT_CFUN_OFF_CMD, NULL, 0, NULL);
    sprintf(testbuf, "AT_CFUN_OFF_CMD:%s", buf);
    k_sleep(K_MSEC(20u));
    //printk("AT_CFUN_OFF_CMD:%s", buf);
    printk(testbuf);
    if(err < 0)
    printk("Failed AT_CFUN_OFF_CMD\r\n");

    err = at_cmd_write(AT_CGDCONT_WRITE_CMD, buf, sizeof(buf), NULL);
    k_sleep(K_MSEC(20u));
    printk("AT_CGDCONT_WRITE_CMD:%s\n", buf);
    if (err < 0) {
    printk("Failed to set APN using AT_CGDCONT_WRITE_CMD\r\n");
    } else {
    printk("APN set to 'sravan' successfully.\n");
    }

    k_sleep(K_MSEC(200u));
    err = at_cmd_write(AT_CGDCONT_READ_CMD, buf, sizeof(buf), NULL);
    printk("APN: %s", buf);
    if(err < 0)
    printk("Failed AT_CGDCONT_READ_CMD\r\n");
    else
    printk("Success AT_CGDCONT_READ_CMD\r\n");

  • I have found the issue I think.

    In your #defines you have the command written as AT+CDGCONT

    The correct way is AT+CGDCONT (as you have yourself written other places).

    Best regards,

    Michal

Reply Children
No Data
Related