flipperdevices / qFlipper

qFlipper — desktop application for updating Flipper Zero firmware via PC
https://update.flipperzero.one
GNU General Public License v3.0
1.06k stars 142 forks source link

Use the correct serial port #147

Closed hramrach closed 1 year ago

hramrach commented 1 year ago

Before: 458 [APP] qFlipper version 1.2.2 commit 36784715 2022-12-15T15:32:42 458 [APP] OS info: openSUSE Tumbleweed 20221220 6.0.12-1-default Qt 5.15.7 861 [USB] Failed to open device 862 [REG] Detected new device: VID_0x483:PID_0x5740 971 [DBG] Trying serial port flip_Liwkiald at /dev/ttyACM0 971 [DBG] Trying serial port at /dev/ttyUSB0 971 [DBG] Using serial port at /dev/ttyUSB0 972 [UPD] Fetched update information from https://update.flipperzero.one/firmware/directory.json 973 [RPC] Starting RPC session... 2020 [RPC] Failed to start RPC session: Failed to open serial port: Device or resource busy 2020 [REG] Device initialization failed: Protobuf session error: Failed to open serial port: Device or resource busy

After: 464 [APP] qFlipper version 1.2.2 commit 36784715 2022-12-15T15:32:42 464 [APP] OS info: openSUSE Tumbleweed 20221220 6.0.12-1-default Qt 5.15.7 868 [USB] Failed to open device 868 [REG] Detected new device: VID_0x483:PID_0x5740 978 [DBG] Trying serial port flip_Liwkiald at /dev/ttyACM0 978 [DBG] Using serial port flip_Liwkiald at /dev/ttyACM0 979 [UPD] Fetched update information from https://update.flipperzero.one/firmware/directory.json 980 [RPC] Starting RPC session... 1093 [RPC] RPC session started successfully.

Signed-off-by: Michal Suchanek msuchanek@suse.de

aprosvetova commented 1 year ago

@hramrach This is incorrect. The correct port is flip_Hakino.

gsurkov commented 1 year ago

First things first, one should never hardcode their (unique) serial number. The port serial number is read during device initialisation. From the log you have attached it's quite clear that it could not be read properly.

It does look like a permission issue. Have you installed the udev rules as described here? You can also copy this file directly to /etc/udev/rules.d.

Please open an issue if the problem persists. I cannot accept this code for the above mentioned reasons.

hramrach commented 1 year ago

It did not look all that unique to me. Anyway, the problem is bad error handling