Linux Phone Hub

On Mobian, running Phosh, I can get the Modem Firmware version in the settings, under “Mobile” → “Modem Details”.

1 Like

Could you provide a screenshot or transcription of what it says there, Max? I have that in Manjaro Phosh, but it basically is just the generic part of the firmware identifier saying it is for this modem, but it doesn’t have the actual version/revision number. ie mine says version EG25GGBR07A08M2G, but omits the part I’m interested in which would be something like 1.002.05

Mine says the same in arch+phosh. It looks like that is what you should get when using AT commands to query the modem directly so I have no idea how we could see specific versions.

1 Like

I wonder what the “MT Firmware” is.

1 Like

You’re referring to section 2.7 right? I just tried it using echo 'AT+CGMR' | sudo atinout - /dev/ttyUSB2 - (after installing atinout) and it just returned the same string with no version number.

1 Like

No need to.
Just thought I’d check myself. Luckyily, it’s super easy to get a root shell on the modem.

~$ adb shell
/ # cat /etc/quectel-project-version 
Project Name: EG25G
Project Rev : EG25GGBR07A08M2G_01.002.07
Branch  Name: 9x07_R07_NEW
Custom Name : STD
Build   Date: 2020-06-13,09:14

How to “root” your modem: Modem on PinePhone

4 Likes

yes. They say the command returns the same thing. I guess I was just wondering what MT and AT stand for. Like are they different pieces of hardware or…?

1 Like

cool will try this later. Thanks.

You can also use ModemManager to run AT commands(AT is a standard defining how modems communicate over serial lines to computers, among other things - Think of it as the modem control mechanism).

mmcli --command="AT+CGMR" -m "${MODEM}"
(Where ${MODEM} is the modem number, as in mmcli -L)

Other fun thing, because the modem handles GPS(Locations, really, as it also supports GNSS, cell towers, etc.):

mmcli -m "${MODEM}" --location-enable-gps-nmea
mmcli -m "${MODEM}" --location-get

Makes for a simple war-walking/driving script when combined with iwilist/aerodump-ng/etc …

2 Likes

Excited beginner here again.
Thought Id try out jellyfin’s flatpack app on latest arch phosh tonight. 1080p 60mbps is out of the question but at 720p 4mbps I had less issues then I have on android. Watched two episodes of Samurai Champloo on it with subs on. Worked nearly flawlessly. First time I saw the subs animate correctly on any device.
Got Komikku setup and working too via flatpack, works similar enough to tachiyomi if anyone here uses it. For the moment I’m still dailying my android but every day the pine gets better.

2 Likes

I could really use some extra guidance on the how to root process. I have the 8 digit adb key, and I downloaded the qadbkey_unlock.c file. Do I need to paste the key into the code somewhere? Or do I compile and call the program, passing the key into it somehow?

Exactly. If you look at line 11, you can see that:

printf("Usage: unlock <serial>(...)");

So, after compiling, call the compiled program with the result of AT+QADBKEY? as first parameter.

The program will give you some(cryptic) instructions on what to do next.
It outputs 3 AT commands for your modem.
You need to send them to the modem, I recommend using mmcli

First, get the list of available modems: mmcli -L(Note the number after the .../Modem/),
then use mmcli -m <modem number> --command="<command goes here>"

The first one(AT+QADBKEY="...") can be used to unlock the ADB access - You need to run that once, “it’s like the developer options on android”.

The second one(AT+QCFG="usbcfg",0x2C7C,0x125,1,1,1,1,1,1,0) sets the correct USB mode.
Beware that while the modem has the ADB USB mode it can’t enter deep-sleep mode(the program also warns you).

The third one just undoes the second one, it restores the USB mode to non-ADB, so your modem can sleep again.

3 Likes

Thank you for the extra elucidation. Sorry for my ignorance, but I’m running into another snag.

I run mmcli -m 0 --command="AT+QADBKEY="<16 chars>""

but I get error: command failed: 'GDBus.Error:org.freedesktop.ModemManager1.Error.MobileEquipment.Unknown: Unknown error'

The 16 chars are those output from qadbkey-unlock based on the 8 digit key I fed into it. Note: one of my 16 chars is a slash / and I wonder if that’s tripping things up or if the quotes around the 16 chars make that a non issue.

surplus info
mmcli -L yields /org/freedesktop/ModemManager1/Modem/0 [QUALCOMM INCORPORATED] QUECTEL Mobile Broadband Module

mmcli -m 0 --command="AT+QADBKEY?" yields response: '+QADBKEY: <8 digit code>'

Extraneous note: a thing that was hanging me up before was that qadbkey-unlock.c failed to compile as it didn’t have crypt defined. I guess it wasn’t pulling in unistd.h or something. Had to append -lcrypt (thanks stackoverflow) to the compile command and that made it happy.

1 Like

I wouldn’t worry about the / slash. It’s not treated specially by your shell.

But you need to quote the "'s, otherwise they will be eaten by your shell.
So, replace every " in the command with a \", so that you get something like:

mmcli -m 0 --command="AT+QADBKEY=\"<16 chars>\""
1 Like

Ah ha! That’s what I was missing. Thank you.

I now get response: '' as output from running the 16 char command and the same as output from running the usbcfg command, which I think is success, but running adb shell complains adb: insufficient permissions for device See [http://developer.android.com/tools/device.html] for more information

At least it sees the device now…

It seems you don’t have the ADB udev rules.
Try this:

# kill old user adb server
adb kill-server
# start adb as root
sudo adb devices
# you should now be able to get a shell, even without sudo(daemon runs as root in bg)
adb shell
1 Like

That’s done it! Thank you very much for walking me through this.

Project Name: EG25G
Project Rev : EG25GGBR07A08M2G_01.001.10
Branch Name: 9x07_R07_NEW
Custom Name : STD
Build Date: 2019-12-03,18:10

So yeah, looks like I am out of date.

I did remember to run that 2nd usbcfg command to let the modem sleep or whatever.

I noticed the modem id number seems to increment after the phone goes to deep sleep and reawakens.

I’ve now updated the modem firmware, which as it turns out was much easier than getting to the point of viewing what version I was running. I followed that guide I linked to, on the Pine64Arch github. Had I read it through rather than getting caught up on checking firmware version, I would have just flashed the current firmware and been done in like 5 minutes. But thanks to @max1220 I’ve been able to take a lovely little education adventure.

4 Likes
1 Like

I finally made a video… It’s soooooo bad, but I figured I need to get something out there to get me more motivated… or comfortable? Also, despite how it looks I’ve spent a lot of time on this, and I was shocked to see how bad it looks, I even tried my Gopro 7 Black but it looked even worse…

Enough excuses

Also, this will be available on Odysee if it’ll ever sync.

6 Likes