qFlipper AppImage Device initialization failed ... but managed to upgrade anyway ...?

We understand the need to support the gui crowd, they are the most abundant :slightly_smiling_face: … yet some lower level firmware update options would be nice to have for those of us who eschew the former environment.

Given a new .dfu firmware image, is there a path on the SD card that would allow an update to magically happen? (that would be the easiest…)

Oh well, on to qFlipper.
On Archlinux without an approved desktop, I run the AppImage from a command line:

$ ./qFlipper-x86_64-1.0.2.AppImage --appimage-extract-and-run

I initally got:

25806 [REG] Detected new device: VID_0x483:PID_0x5740
29102 [REG] Device initialization failed: Failed to find a suitable serial port

The usb tty is visible:

# lsusb
Bus 003 Device 091: ID 0483:5740 STMicroelectronics Virtual COM Port

and /dev/ttyACM0 appears as root:uucp and I have 'newgrp’ed to a uucp semi-privileged shell:

$ id
uid=1000(duanev) gid=986(uucp) groups=986(uucp),5(tty),984(users)

so minicom can talk with Flipper:

 A -    Serial Device      : /dev/ttyACM0                              
 B - Lockfile Location     : /var/run                                  
 C -   Callin Program      :                                           
 D -  Callout Program      :                                           
 E -    Bps/Par/Bits       : 115200 8N1                                
 F - Hardware Flow Control : No                                        
 G - Software Flow Control : No                                        
 H -     RS485 Enable      : No                                        
 I -   RS485 Rts On Send   : No                                        
 J -  RS485 Rts After Send : No                                        
 K -  RS485 Rx During Tx   : No                                        
 L -  RS485 Terminate Bus  : No                                        
 M - RS485 Delay Rts Before: 0                                         
 N - RS485 Delay Rts After : 0


  _.-------.._                    -,
  .-"```"--..,,_/ /`-,               -,  \
   .:"          /:/  /'\  \     ,_...,  `. |  |
  /       ,----/:/  /`\ _\~`_-"`     _;
 '      / /`"""'\ \ \.~`_-'      ,-"'/
|      | |  0    | | .-'      ,/`  /
   |    ,..\ \     ,.-"`       ,/`    /
  ;    :    `/`""\`           ,/--==,/-----,
  |    `-...|        -.___-Z:_______J...---;
  :         `                           _-'
 _L_  _     ___  ___  ___  ___  ____--"`___  _     ___
| __|| |   |_ _|| _ \| _ \| __|| _ \   / __|| |   |_ _|
| _| | |__  | | |  _/|  _/| _| |   /  | (__ | |__  | |
|_|  |____||___||_|  |_|  |___||_|_\   \___||____||___|

Welcome to Flipper Zero Command Line Interface!
Read Manual https://docs.flipperzero.one

Firmware version: 0.43.1 0.43.1 (a4267626 built on 20-12-2021)

>: ?
    Commands we have:
    !                             factory_reset
    ?                             free
    app_125_kHz_RFID              free_blocks
    app_Accessor                  gpio_set
    app_Bad_USB                   help
    app_Blink_Test                i2c
    app_Bluetooth_Debug           ikey
    app_Bluetooth_remote          input_dump
    app_Display_Test              input_send
    app_GPIO                      ir_rx
    app_Infrared                  ir_tx
    app_Irda_Monitor              led
    app_Keypad_Test               log
    app_LF-RFID_Debug             nfc_detect
    app_Music_Player              nfc_emulate
    app_NFC                       onewire
    app_Snake_Game                power_ext
    app_Sub-GHz                   power_info
    app_USB_Mouse_demo            power_otg
    app_USB_Test                  poweroff
    app_Uart_Echo                 ps
    app_Vibro_Test                reboot
    app_iButton                   rfid
    bt_info                       screen_stream
    bt_rx_carrier                 start_rpc_session
    bt_rx_pt                      storage
    bt_tx_carrier                 subghz
    bt_tx_pt                      subghz_rx
    crypto                        subghz_rx_carrier
    date                          subghz_tx
    device_info                   subghz_tx_carrier
    dfu                           vibro
    >:

The dfu command looks interesting … and causes Flipper to drop into update mode - yea!!

And, if I kill minicom from a different term, running qFlipper now succeeds! … so I feed it the newest .dfu via the GUI and click update:

164200 [DEV] Firmware install from file @Ugn0m START
164200 [RCY] Firmware Download @Ugn0m START
164351 [DBG] Device is not idle, resetting...
164416 [DBG] Erasing memory: 0%
164524 [DBG] Erasing memory: 1%
164632 [DBG] Erasing memory: 2%
164686 [DBG] Erasing memory: 3%
164794 [DBG] Erasing memory: 4%
...
173219 [DBG] Erasing memory: 98%
173327 [DBG] Erasing memory: 99%
173381 [DBG] Erase done.
173386 [DBG] Device is not idle, resetting...
173423 [DBG] Device reported transfer size: 1024
173467 [DBG] Bytes downloaded: 1024 0%
173732 [DBG] Bytes downloaded: 7168 1%
174040 [DBG] Bytes downloaded: 14336 2%
174304 [DBG] Bytes downloaded: 20480 3%
...
202114 [DBG] Bytes downloaded: 667648 98%
202422 [DBG] Bytes downloaded: 674816 99%
202683 [DBG] Bytes downloaded: 680704 100%
202683 [DBG] Download has finished.
202684 [RCY] Firmware Download @Ugn0m SUCCESS
202684 [RCY] Exit Recovery Mode @Ugn0m START
202688 [DBG] Device is not idle, resetting...
202732 [DBG] vvv ATTENTION: Ignore errors below until matching closing message. vvv
203991 [DBG] Failed to perform control transfer: LIBUSB_ERROR_NO_DEVICE
203991 [DBG] Unable to get device status
203991 [DBG] ^^^ ATTENTION: Ignore errors above until matching opening message. ^^^
203991 [DBG] vvv ATTENTION: Ignore errors below until matching closing message. vvv
203991 [DBG] Failed to release interface: LIBUSB_ERROR_NO_DEVICE
203992 [DBG] ^^^ ATTENTION: Ignore errors above until matching opening message. ^^^
203992 [REG] Device went offline: VID_0x483:PID_0xdf11
204618 [USB] Failed to open device
204618 [REG] Detected new device: VID_0x483:PID_0x5740
207896 [REG] Device initialization failed: Failed to find a suitable serial port
233527 [RCY] Exit Recovery Mode @Ugn0m ERROR: Failed to exit recovery: Operation timeout
233527 [DEV] Firmware install from file @Ugn0m ERROR: Failed to exit recovery: Operation timeout
233527 [BKD] Current operation finished with error: "Failed to exit recovery: Operation timeout"
245076 [BKD] Finalized current operation
245076 [REG] Removed offline device: Ugn0m

Which … um … I guess is ok? And now the display says “Unsupported radio stack” on the auto restart, and on every 3-second hard reset … but it seems the flash update happened. :+1:

However the ‘dfu’ command is gone and qFlipper again says ‘Device initialization failed’ so … how now to enter dfu mode from the 0.58.1 firmware for the NEXT update??

Ok, found the udev config - that lets qFlipper run smoothly … and then doing another update via qFlipper installed all the radio stacks, databases, etc. :+1: :+1:

1 Like