the-modem-distro / pinephone_modem_sdk

Pinephone Modem SDK: Tools to build your own bootloader, kernel and rootfs
GNU General Public License v3.0
597 stars 64 forks source link

(0.6.4) couldn't query SIM slots: QMI protocol error (94): 'NotSupported' #103

Closed Piraty closed 2 years ago

Piraty commented 2 years ago

Hi, thanks for work on modem firmware.

@Biktorgj feel free to modify the issue title if you come up with something more meaningful / appropriate

system

pinephone, postmarketos-edge (phosh)

issue

I flashed 0.6.4 via the firmware-GUI, it worked for one day.

I was using the phone to navigate (https://github.com/rinigus/pure-maps, which uses geoclue), when at one point (i think i switched screen rotation at the same time, but i doubt this is related) the modem disappeared from phosh icon bar. I briefly investigated ad hoc, restartet eg25-manager and modemmanager services, entered sim pin and log similar to what's posted below.

I unpowered the modem (removed the battery), re-flashed the firmware, but to no avail.

Now, when entering sim pin, modemmanager says this:

$ (terminal0) logread -f | tee modemfail.log
$ (terminal1) sudo mmcli --sim=any --pin=XXXX
doas (user@pine64-pinephone) password: 
successfully sent PIN code to the SIM

$ cat modemfail.log
May 25 19:38:32 pine64-pinephone authpriv.info : user ran command mmcli --sim=any --pin=XXXX as root from /home/user
May 25 19:38:35 pine64-pinephone daemon.info [2136]: <info>  [modem0] state changed (locked -> initializing)
May 25 19:38:35 pine64-pinephone daemon.warn [2136]: <warn>  [modem0] couldn't query SIM slots: QMI protocol error (94): 'NotSupported'
May 25 19:38:35 pine64-pinephone daemon.warn [2136]: <warn>  [modem0/sim0] couldn't load operator identifier: Couldn't get home network: QMI protocol error (16): 'NotProvisioned'
May 25 19:38:35 pine64-pinephone daemon.warn [2136]: <warn>  [modem0/sim0] couldn't load operator name: Couldn't get home network: QMI protocol error (16): 'NotProvisioned'
May 25 19:38:35 pine64-pinephone daemon.warn [2136]: <warn>  [modem0] couldn't load UE mode of operation for EPS: Couldn't parse UE mode of operation: '+CPIN: READY^M ^M ^M +QIND: SMS DONE^M ^M +QIND: PB DONE^M ^M +CEMODE: 1' (value 0)
May 25 19:38:35 pine64-pinephone daemon.info [2136]: <info>  [modem0] state changed (initializing -> disabled)

$ echo 'ATI' | sudo atinout - /dev/ttyUSB2 -

Quectel
EG25
Revision: EG25GGBR07A08M2G

OK

$ echo "AT+QGMR" | sudo atinout - /dev/ttyUSB2 -

0.6.4

OK

$ echo 'AT+CPIN?' | sudo atinout - /dev/ttyUSB2 -

+CPIN: READY

$ echo 'AT+COPS=?' | sudo atinout - /dev/ttyUSB2 -

ERROR

$ echo 'AT+COPS?' | sudo atinout - /dev/ttyUSB2 -

+COPS: 0

OK

$ echo 'AT+CREG?' | sudo atinout - /dev/ttyUSB2 -

+CREG: 0,0

OK
Piraty commented 2 years ago

as it turned out, the "screen rotation" during navitagion session was related afterall ... i must have hit the "mobile network" icon next to "screen rotation", which then made phosh not use the modem, yet phosh asks for sim pin on boot.

sorry for the noise