This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Asset_tracker V2 APN

Hi,

I have a few thingy:91 devices (~10) and when using the IBasis SIM card, I'll randomly be connected to Telus, Bell, Rogers or Videotron. Some of them do not support PSM when roaming which mean no GPS. I also notice that no matter which iBasis SIM I use in which device, the device are stick to the same network provider.

I'm compiling asset_tracker V2 for the thingy:91 with LTE-M. I need a way to configure the APN when building the asset_tracker v2. (I could use V1 if that help)

I also have other SIM card but they all need a custom APN that I need to manually set using LTE monitor. I again would need to configure the APN for them.

Note: I did try : CONFIG_PDN_DEFAULT_APN and that doesn't seam to work.

Thanks !

  • Hello, 

     

    I did try : CONFIG_PDN_DEFAULT_APN and that doesn't seam to work.

     Can you please elaborate on what did not work? Did you get an error? Have you verified correct APN?

    Thanks.

    Øyvind

  • Thanks Øyvind,

    As a reference, here are the AT commands I use to configure the APN to Bell mobility on my device (this works perfectly but it's not persisted on the device)

    AT+CFUN=4
    AT+COPS=1,2,"302610"
    AT+CGDCONT=0,"IP","pda.bell.ca"
    AT+CFUN=1

    When I build the asset_tracker (v2), I use this configuration : (C:\Users\username\ncs\v1.6.1\nrf\applications\asset_tracker_v2\prj.conf)

    CONFIG_PDN_DEFAULT_APN="pda.bell.ca"

    I don't get any error when importing the project or compiling but when I check with LTE Monitor, Bell is not used. Is there a way to also configure the MCCMNC ? or is it simply possible to set AT commands at bootup ?

    Thanks,
    Kevin

  • Hi Kevin,  

    kgilbert said:
    As a reference, here are the AT commands I use to configure the APN to Bell mobility on my device (this works perfectly but it's not persisted on the device)

    Are you manually sending those commands or are they executed in code?

     I have not been able to get in contact with our modem team, however, I was referred to the PDN LIbrary in NCS. Have a look at these tickets regarding APN: 243753 and 263705.

  • Hi Øyvind,
    thanks for your reply.

    The AT commands that I posted are the commands that I manually enter in LTE monitor to "force" an APN.

    I'm looking for the simpler way to build the asset_tracker_v2 and configure the MCCMNC + APN so that I don't have to use LTE monitor everytime I restart the device.

    According to one of the ticket you posted, there is no way to persist the APN using AT commands, this is why I'm looking for a way to configure it on the FW

    Thanks !

  • Hi Kevin,

    I've talked to our nRF91 team. The PDN library is used to configure a secondary PDN, not the default PDN. Try adding the following:

    CONFIG_PDN=y
    CONFIG_PDN_SYS_INIT=y
    CONFIG_PDN_DEFAULTS_OVERRIDE=y
    CONFIG_PDN_DEFAULT_APN="pda.bell.ca"

    If this does not help, then please check to verify that the APN is correct. Or perhaps the best solution would be to add the AT commands at the startup of your application, if the CGDCONT command works for you. E.g.

    err = at_cmd_write(AT+CGDCONT=0,\"IP\",\"pda.bell.ca\", NULL, 0, NULL);
    if (err) {
    		LOG_ERR("Could not define PDP context +CGDCONT, error: %d", err);
    		return err;
    	}



Related