Serial port stopped working

Hello.

I need some help.

I’m using qFlipper (1.3.0) running 0.82.3 firmware on a Linux system. Until yesterday everything worked fine. From today, when I try to connect Flipper Zero with qFlipper, I see a lot of errors saying:

Trying serial port at /dev/ttyACM0

and then the connection fails.

I already tried the following:

  • changed usb cable
  • reinstalled the rules, but no effect
  • I’m able to connect the serial port with “screen -a /dev/ttyACM0 -b 115200” and I see the Flipper CLI, so the connection seems to be fine
  • I tried the “Repair” procedure. It works fine until the last step, when the Flipper is rebooted, then the same error appear
  • I tried the “Factory reset” procedure (under Storage)

So at the end FlipperZero is working fine, but the serial connection with qFlipper is not working any more. Any suggestion?

Thanks,

2 Likes

I would uninstall the qFlipper app and reinstall it. It seems clear the serial port if working. I’m not sure what else to try.

Thanks.
No, it didn’t work.
I tried to install qFlipper on a Windows system and it is working. So, probably this has something to do with my Linux installation, even if I don’t have any idea on what is going wrong.

Thanks,

1 Like

I am seeing the same issue on Debian 11 with the flatpak qFlipper.

The serial port is definitely available to my user and I can access the CLI as well. However, qFlipper (started from the same terminal window that can access the CLI) can not access the serial port:

185 [APP] qFlipper version 1.3.0 commit 01fcfec9 2023-03-27T11:51:38
185 [APP] OS info: KDE Flatpak runtime 5.15-21.08 5.10.0-22-amd64 Qt 6.4.3
202 [REG] Detected new device: VID_0x483:PID_0x5740
534 [UPD] Fetched update information from https://update.flipperzero.one/firmware/directory.json
553 [DBG] Trying serial port  at /dev/ttyACM0
553 [DBG] Trying serial port  at /dev/ttyUSB0
553 [DBG] Trying serial port  at /dev/ttyS0
...
3696 [DBG] Trying serial port  at /dev/ttyACM0
3696 [DBG] Trying serial port  at /dev/ttyUSB0
3696 [DBG] Trying serial port  at /dev/ttyS0
3720 [REG] Device initialization failed: Failed to find a suitable serial port
5589 [default] QStandardPaths: wrong permissions on runtime directory /run/user/1000, 0755 instead of 0700
23421 [APP] qFlipper exited

Last time I know it was working was on April 21:

239 [APP] qFlipper version 1.3.0 commit 01fcfec9 2023-03-27T11:51:38
239 [APP] OS info: KDE Flatpak runtime 5.15-21.08 5.10.0-21-amd64 Qt 6.4.3
256 [REG] Detected new device: VID_0x483:PID_0x5740
584 [DBG] Trying serial port flip_REDACTED at /dev/ttyACM0
584 [DBG] Using  serial port flip_REDACTED at /dev/ttyACM0
585 [RPC] Starting RPC session...
684 [RPC] RPC session started successfully.

Note how the serial port when working is “Trying serial port flip_REDACTED at /dev/ttyACM0” and “Trying serial at /dev/ttyACM0”. REDACTED is the name of my FZ, so qFlipper got that information from somewhere before trying to open ttyACM0. In other word, an error that is not logged occurs before access to the serial port fails.

  • other than updates, the computer did not change (e.g. no reconfiguration, no software install or uninstall)
  • qFlipper did not change
  • flatpak runtime did not change
  • Flipper Zero firmware did change (from 0.80.1 to 0.81.1) [behavior is the same with 0.82.3]

I suspect that a change in the Flipper Zero firmware is the culprit.

2 Likes

do you have any solution? i have the exact same issue.

From my side, no. The only solution was to switch to qFlipper for Windows :frowning:

1 Like

I have not found a solution except to use the iOS app.

What I notice (strace is your friend :wink:) is that qFlipper looks at the content of /sys/devices/platform/serial8250/tty and then tries to open the devices it finds there, which are ttyS0 through ttyS3.

However, it does not do the same for ttyACM0 (which is what appears when I plug in the Flipper). I see that it appears to find ttyACM0 in /sys/class/tty and resolves the symbolic link into /sys/devices/pci0000:00 but it never opens the device. This despite the log claiming that it is trying the serial port.

I guess the only way forward will be to look at the source code of qFlipper and figure it out. Frankly, I am kind of surprised there are not more people with this issue.

1 Like

Hello,

I got the same issue and fixed it by adding a custom udev rules to fix pci values, see: Unable to connect on Fedora Linux · Issue #154 · flipperdevices/qFlipper · GitHub

Thanks also to Reddit - Dive into anything