10-06-2021, 04:02 AM
So I got my Pinephone last Friday and I would like it to be my daily driver. The problem with that is that the modem doesn't want to connect to my carrier (Freedom Mobile, in Canada) when I'm at home or work. Somewhere on my commute though, the stars align and I receive any and all texts and missed call notifications that have built up over time.
I've been poking the modem with AT+ commands to try to figure out what's going on. To be clear, this is the behavior I've been observing sitting on my home workstation, ssh'd in.
My atinout session goes as follows. If you want to follow along I'm using the manual here.
This line is really just to make AT+COPS=? return faster. Rather than scanning every LTE band the EG25 supports we scan only the bands the modem and my carrier has in common. If you're running AT+COPS=? scans a lot consider using a binary->hex converter and issuing a similar command, it shaved around 40 seconds off the scan time and that adds up quick.
So what do I interpret from this output? AT+QNWINFO seems to show that the modem is correctly looking at my carrier and trying to connect on compatible bands, every so often giving up for 10 or so seconds. AT+QSPN however, shows that I'm not registering successfully and it's bouncing around different bands.
Backing that interpretation up:
AT+CREG returns the registration mode and the modem's state. The interesting part is the second entry; 2 corresponds to "Not registered, searching for new operator". Success it seems is making that 2 into a 1.
If I try to force the issue and manually connect...
And for now that's it. ModemManager will be on the debug logging level during my next commute. I may well be back with another post in a couple of days with how I end up paring that monster of a log down to something useful.
In the meantime I hope someone else has a use for this, that the steps I've taken aren't too insane and offer a decent starting point for anyone else troubleshooting their modem. If you do have insight or ideas please do chime in, if ~30 minutes of debug logs turn out to be as impenetrable as I fear they will be I'm more or less at a wall.
I've been poking the modem with AT+ commands to try to figure out what's going on. To be clear, this is the behavior I've been observing sitting on my home workstation, ssh'd in.
My atinout session goes as follows. If you want to follow along I'm using the manual here.
Quote:AT+QCFG="band",0,2000001048,0
This line is really just to make AT+COPS=? return faster. Rather than scanning every LTE band the EG25 supports we scan only the bands the modem and my carrier has in common. If you're running AT+COPS=? scans a lot consider using a binary->hex converter and issuing a similar command, it shaved around 40 seconds off the scan time and that adds up quick.
Quote:AT+COPS=?This confirms that my phone can see my carrier. Sometimes AT+COPS=? returns slightly different results, but I can always see that first entry.
+COPS: (1,"Freedom","Freedom","302490",7),(1,"TELUS","TELUS","302220",7),(1,"Bell","Bell","302610",7),(1,"Rogers Wireless","ROGERS","302720",7),,(0-4),(0-2)
Quote:AT+QNWINFOSome time (~1min) later...
+QNWINFO: "FDD LTE","302490","LTE BAND 4",2225
Quote:+QNWINFO: "FDD LTE","302490","LTE BAND 13",5205And every so often
Quote:+QNWINFO: No ServiceAt any point in between these calls the following holds
Quote:AT+QSPN
ERROR
So what do I interpret from this output? AT+QNWINFO seems to show that the modem is correctly looking at my carrier and trying to connect on compatible bands, every so often giving up for 10 or so seconds. AT+QSPN however, shows that I'm not registering successfully and it's bouncing around different bands.
Backing that interpretation up:
Quote:AT+CREG?
+CREG: 1,2
AT+CREG returns the registration mode and the modem's state. The interesting part is the second entry; 2 corresponds to "Not registered, searching for new operator". Success it seems is making that 2 into a 1.
If I try to force the issue and manually connect...
Quote:AT+COPS=1,0,"Freedom"So no joy there. Error 30 according to the manual is "No Network Service".
+CME ERROR: 30
And for now that's it. ModemManager will be on the debug logging level during my next commute. I may well be back with another post in a couple of days with how I end up paring that monster of a log down to something useful.
In the meantime I hope someone else has a use for this, that the steps I've taken aren't too insane and offer a decent starting point for anyone else troubleshooting their modem. If you do have insight or ideas please do chime in, if ~30 minutes of debug logs turn out to be as impenetrable as I fear they will be I'm more or less at a wall.