I’m using the Linux QMI SDK (complete: 04.00.22) and I just want to “soundcheck” my algorithm for checking/changing an APN and then rebooting the modem (without having to reboot the host: ie the computer the modem is installed on) so that I get a “clean” initialization of the modem (which has an updated APN value).
Algorithm Pseudo Code:
- Find your current Profile using one of the following: GetDefaultProfile(), GetDefaultProfileLTE() or SLQSGetProfile(). From one of these function calls, get current APN and check it against your desired APN setting.
- If current vs desired are not equal, use one of the SetDefaultProfile function calls to set the APN val to the desired setting.
- Reboot just the Modem somehow…? There are functions for powering down/up slots (I think) and functions for powering up/down the sim card. Would I use one of these to “reboot” the modem? Help!
Is my thinking correct or am I way off base?