flipperdevices / qFlipper

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

qFlipper fails on first flash after Factory #74

Closed crashahotrod closed 2 years ago

crashahotrod commented 2 years ago

I'm not sure if this is a qFlipper issue or a firmware issue, but I figured I'd post it here.

The first flash to 0.58.1 using qFlipper 1.0.2 out of the box fails and gets stuck on "Co-Processor Firmware Download @FlipperName START"

Doing a flipper reboot with (left arrow + back) allows it to reflash and it will flash successfully. I haven't had any issues flashing firmware since that first flash.

Logs: https://pastebin.com/5f1yYCcw

Discord thread of me trying to get advice when I first had the issue https://discordapp.com/channels/740930220399525928/954422815749181461/975953270470242324

Other users with the same issue: https://discordapp.com/channels/740930220399525928/954422815749181461/976264825212641291 https://discordapp.com/channels/740930220399525928/954422815749181461/970119913115107348 https://discordapp.com/channels/740930220399525928/746304505879986267/969611979432001606 https://discordapp.com/channels/740930220399525928/746304505879986267/967167818325954600 https://discordapp.com/channels/740930220399525928/954422815749181461/967150834616008744 https://discordapp.com/channels/740930220399525928/954422815749181461/955511152476033074 https://discordapp.com/channels/740930220399525928/746304505879986267/953076397130276914 many more... (search co processor in the discord, 25 results a few are unrelated but most are the same issue)

gsurkov commented 2 years ago

The co-processor firmware update procedure is quite fragile because of too many variables (ST's buggy proprietary ROM, the user's particular hardware setup, the phase of the moon and whatnot), so it's nearly impossible to make it working 100% of the time. Judging from the log you have provided, it looks like a problem with ST's proprietary firmware upgrade service (FUS). It's used to update the radio stack (it doesn't need to be updated very often) and once it's done, it doesn't get used anymore. That's why the subsequent updates usually go without any problems.

To mitigate that to some degree, we have employed a new update method, that delegates the update procedure to the firmware, thus eliminating a lot of unknowns from the process and making it much more stable. The mobile apps already support this feature, and qFlipper is getting it in the upcoming version.

Unfortunately, this won't solve this problem for those who will receive a device with the old firmware (that doesn't support it yet), but it will be enabled after updating once.

Newer flipper batches will come already with the new update method support and shouldn't suffer from this problem.