PINE64
Modem showing up at /dev/ttyS2 instead of /dev/ttyUSB1 and factorytest times out - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Hardware (https://forum.pine64.org/forumdisplay.php?fid=122)
+--- Thread: Modem showing up at /dev/ttyS2 instead of /dev/ttyUSB1 and factorytest times out (/showthread.php?tid=9934)



Modem showing up at /dev/ttyS2 instead of /dev/ttyUSB1 and factorytest times out - mil - 05-23-2020

So testing on multiple images (pmOS & debian) there is a new behavior showing up for me on my Pinephone where instead of the normal /dev/ttyUSB{1,2,3} showing up; instead now /dev/ttyS{0,2,3} shows up.

I can still see the modem is functional as I can `screen /dev/ttyS2 115200` and play around with `AT` commands; however modemmanager completely ignores /dev/ttyS* devices (there maybe a fix for mm by forcing it to use ttyS* and pointing it to the quectel plugin - but this shouldn't be needed...).

As well, booting up the factorytest image that the device shipped with and trying the modem test - it just shows "Waiting for modem" for a few minutes and then "Boot timeout".

The strange thing is this just started happening all of the sudden and things used to work fine and show up as ttyUSB* - only thing I can think of is maybe force shutting down messed something up (have a habit of just pulling battery out of phone to restart).

Anyone have an idea of how to debug/fix this?


RE: Modem showing up at /dev/ttyS2 instead of /dev/ttyUSB1 and factorytest times out - mil - 06-06-2020

Ok so I've solved this (or well atleast figured out how to work around this issue). Essentially the core of the issue is that for whatever reason the USB devices provided by the EG25 modem don't register. However /dev/ttyS* devices are still available and making calls / texts via raw AT commands work. For Sxmo, since everything is based on modemmanager, I've just created a udev rule to have mm access the raw serial AT device instead of the USB device.

If anyone else gets stuck on this issue basically what you can do to get modemmanager back working is create the udev rule:

Code:
ACTION!="add|change|move|bind", GOTO="mm_whitelist_end"
DEVPATH=="/devices/platform/soc/1c28c00.serial/tty/ttyS2" ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1"
DEVPATH=="/devices/platform/soc/1c28c00.serial/tty/ttyS2" ENV{ID_MM_DEVICE_PROCESS}="1"
DEVPATH=="/devices/platform/soc/1c28c00.serial/tty/ttyS2" ENV{ID_MM_TTY_BAUDRATE}="115200"
DEVPATH=="/devices/platform/soc/1c28c00.serial/tty/ttyS2" ENV{ID_MM_TTY_FLOW_CONTROL}="none"
DEVPATH=="/devices/platform/soc/1c28c00.serial/tty/ttyS2" ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1"
LABEL="mm_whitelist_end"


Add the above snippet to /etc/udev/rules.d/60-modemfix.rules and you should see your modem appearing again in mmcli.

Also, incoming dialing might be broken since I believe by default the EG25 uses a separate port for rings/texts; to resolve this issue you can run the raw AT command:

Code:
AT+QURCCFG="urcport","uart1"

This will force the modem to ring/use the URC port the same as the primary serial device.

---

This fix isn't ideal and I still would like to figure out how to get USB modem devices back; seems like this may be a hardware or maybe a software issue (though if software there's probably only some quite low-level fix because multiple distros exhibit this problem, and this issue started spontaneously..); So I think the USB devices disappearing / breaking very well could be a PP hardware issue. I'm not entirely sure.

But atleast now I haveĀ  calls and texts back on Sxmo on my (well.. probably somehow broken Pinephone) and can get back to improve the dialer UIĀ  Shy


RE: Modem showing up at /dev/ttyS2 instead of /dev/ttyUSB1 and factorytest times out - Dmytro - 06-07-2020

(05-23-2020, 04:36 PM)mil Wrote: ...
(have a habit of just pulling battery out of phone to restart).

Bad, bad, bad Wink
Why not just reboot? That would be correct Linux way Smile
Otherwise, I'm following your progress and it looks very interesting to me. :thumbs-up:
And I'm gona try it as PP arrives.


RE: Modem showing up at /dev/ttyS2 instead of /dev/ttyUSB1 and factorytest times out - Subsentient - 07-13-2020

I would advise you to contact Quectel and ask them for a copy of the firmware for the EG25-G, along with the latest update tools for Linux. They do have a special application you can compile on AArch64 to flash the modem. I flashed mine. I'd post the firmware here, but it seems they don't want you to do that. Their license for some of it is actually illegal, so it muddies the water. One of the tools, I forget which, claims "Public domain -- for Quectel customers, nobody else is allowed" or something like that. You'll have to ask Quectel directly. They also have a good, knowledgeable tech support team, they may be able to help.

I can't promise it will be possible to flash the modem over serial, but it's worth a try.

EDIT: If you PM me, I can send you the email of the technician that was most helpful to me.


RE: Modem showing up at /dev/ttyS2 instead of /dev/ttyUSB1 and factorytest times out - afigegoznaet - 07-15-2020

Can you try to flash the Fedora image and see if it sees your modem?
For me, this is a trick that worked, although the modem disappears again if I start another image, or if I update Fedora.