Modem send AT commands without altering gsm_ppp.c file? #gsm_modem


Brenton Chetty
 

Hi, I am using the gsm_modem sample with a nrf5340dk and a LARA R211 gsm evk. I have added 3 AT commands to gsm_ppp.c:

static const struct setup_cmd setup_cmds[] = {
    SETUP_CMD_NOHANDLE("AT+CGATT=0"),
    SETUP_CMD_NOHANDLE("AT+CGREG=1"),
    SETUP_CMD_NOHANDLE("AT+CGATT=1"),
    /* no echo */
    SETUP_CMD_NOHANDLE("ATE0"),
    /* hang up */
    SETUP_CMD_NOHANDLE("ATH"),
    /* extended errors in numeric form */
    SETUP_CMD_NOHANDLE("AT+CMEE=1"),
    /* disable unsolicited network registration codes */
    SETUP_CMD_NOHANDLE("AT+CREG=0"),
    /* create PDP context */
    SETUP_CMD_NOHANDLE("AT+CGDCONT=1,\"IP\",\"" CONFIG_MODEM_GSM_APN "\""),
};


I just wanted to find out, is there any other approach I can take towards adding those 3 AT commands without altering the gsm_ppp.c file. Is there some approach similar to using an overlay file in the applications directory?

Regards
Brenton

Join devel@lists.zephyrproject.org to automatically receive all group messages.