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


Hristo Mitrev
 

Hi Brenton!

I'm also doing very similar setup in gsm_ppp.c and for now I think there's no alternative, but it seems that the problem is beeing addressed in https://github.com/zephyrproject-rtos/zephyr/pull/39727
Cheers!


On Jul 11 2022, at 3:45 pm, Brenton Chetty <brent7984@...> wrote:
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
Sent from Mailspring

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