Hey Bruce, Thanks to everyone who joined the discussion, all the points already raised are valid. Just some small notes from my side.
> > I have a question about using both QMI and the serial interface with > ModemManager. > > I had little difficulty getting ModemManager's SimpleModem to connect to > T-Mobile (USA) using a Quectel EG25-G, but we found that modem wasn't > compatible with AT&T and/or a private APN used by one of our customers. We > were advised to use the Quectel EC25, and after engaging both Quectel and > AT&T, we were told that we need to insert the APN into the modem using an AT > command, AT+CGDCONT=1,"IPV4V6","mcm.com.attz". I had to tweak the kernel > config and the ModemManager build. That command is exclusively changing the contents of the connection profile stored with ID 1 in the modem. This profile with ID 1 is the one typically used for the LTE attach procedure during the registration process in Qualcomm based modems. You cannot change these APN settings with Simple.Connect(), as this API is used to establish a new connection attempt after you have been registered already. In your case, you need to change the settings before registering (they're really persistent, so changing once would be enough), and then you can reuse the same settings for the connection attempt. You can change the APN settings used during LTE registration using mmcli --3gpp-set-initial-eps-bearer-settings="apn=mcm.com.attz,ip-type=ipv4v6", you don't need to do it via AT commands. The next registration attempt after the settings are changed will be done with those new settings. After the registration happens, the "3GPP EPS" section in the mmcli output may include an "initial bearer path", and if you print the contents of the bearer using mmcli -b N, you can see the actual APN settings agreed with the network. -- Aleksander