Automated MC7455 M2M Multi Carrier Custom APN Configuration

I need to automatically configure a MC7455 M2M modem that will be installed on Windows 10 computers around the US and Canada. Depending on where the computer will be located, the carrier that the computer will use will be based on the signal strength of the carrier in that area.

I need to perform the following via an automated process;

  1. Detect which carrier’s SIM card that is installed on the modem
  2. Apply the appropriate APN based on the detected carrier.
  3. Once the APN is applied, automatically connect to the cellular network with that APN and only use the custom APN.

I can accomplish part 1 by using the at+iccid command and looking for the issuer identifier in the iccid.
Once i have the carrier confirmed, I can use the at+cgdcont command to configure the custom APN for that carrier.
The trouble I am running into now is that it does not automatically connect once the APN is applied, unless I restart the modem with at!reset.

I’ve also noticed that that it will intermittently connect with a different APN such as “broadband” or “lwaactivate”.

Is there a command I can issue to connect to the applied APN without having to restart the modem?

Also this must be accomplished via an automated process. Since I’m using windows, I’ve been successful with using powershell to access the modem and send the appropriate AT commands. Once I’ve determined that the Windows computer has an internet connection, i disable the configuration script so doesn’t occur every time the computer starts.

My method of going about this is to do the following:

  1. computer boots, powershell launches and checks the modem port settings and create an object based off of the modem port settins such as com port number, baud rate etc.
  2. Open the port for the modem and use the at!cpin? command to see if the SIM is detected by the modem, if it is it continues the script, if it is not it will prompt the user to check the SIM card and restart the computer.
  3. Use the at!entercnd command to enter the admin password
  4. configure the modem usb composition with at!usbcomp=1,1,10d
  5. configure the custom APNs for each carrier on the GENERIC firmware image with:
    at+cgdcont=1,“IPV4V6”, “vzwinternet”, etc.
    at+cgdcont=2,“IPV4V6”, “custom AT&T apn”, etc.
    at+cgdcont=3,“IPV4V6”, “custom telus APN”, etc.
    at+cgdcont=4,“IPV4V6”, “custom rodgers APN”, etc.
  6. use the at+iccid command to get the ICCID number, if the issuer identifier matches for the specific carrier say AT&T for example
    use the at!scact=1,2 command to activate the data connection for AT&T
  7. i’ll then proceed to start the modem to apply the settings for the usb composition

The problem i’m running into now is that the when i run the at!scact command, i get an OK response but modem doesn’t connect to the cellular network.