Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB-UART Bridge error: Flipper Zero crashed. #4008

Closed
EstebanFuentealba opened this issue Nov 18, 2024 · 17 comments · Fixed by #4025
Closed

USB-UART Bridge error: Flipper Zero crashed. #4008

EstebanFuentealba opened this issue Nov 18, 2024 · 17 comments · Fixed by #4025
Assignees
Labels
Bug Triage Issues under initial investigation

Comments

@EstebanFuentealba
Copy link

EstebanFuentealba commented Nov 18, 2024

Describe the bug.

Hi,

I have a board (MALVEKE) where I’ve always flashed its firmware using the Flipper Zero’s USB-UART Bridge.

Previously, I was using firmware version 0.105.0, and everything worked perfectly.

Recently, I updated to version 1.1.2 and tried flashing the firmware to my boards, but now I’m encountering errors.

I’ve tested with several MALVEKE boards I used previously for development and troubleshooting. I even swapped the USB cable to rule out any issues with it, but I’m still frequently seeing errors like the following:

Captura de pantalla 2024-11-18 a la(s) 7 05 21 p  m

Video:
https://www.youtube.com/watch?v=FLeudK6qEv4

Captura de pantalla 2024-11-18 a la(s) 7 05 05 p  m

IMG_20241118_195551

Video:
https://www.youtube.com/watch?v=RtA6t9S1A90

Reproduction

  1. Connect the module to the Flipper Zero.
  2. Navigate to GPIO > USB-UART Bridge.
  3. Put the board into boot mode.
  4. Flash the firmware.

Target

GPIO

Logs

No response

Anything else?

No response

@EstebanFuentealba EstebanFuentealba changed the title USB-UART Bridge error USB-UART Bridge error: Flipper Zero crashed. Nov 18, 2024
@EstebanFuentealba
Copy link
Author

I downgraded to version 0.105.0, and the error no longer occurs.

@kbembedded
Copy link
Contributor

kbembedded commented Nov 19, 2024

To add some context, additional testing, and other references, here are links to some conversations in flipper discord:
https://discord.com/channels/740930220399525928/967843558520418384/1308199204719431731
https://discord.com/channels/740930220399525928/967843558520418384/1308520453848961094
https://discord.com/channels/740930220399525928/765282833744265246/1308166431896244264

EDIT: My apologies, I misremembered and thought the 3rd link was also experiencing a crash.

@GangsterFox
Copy link

Adding some context to the third link above.
The issue there which I am facing is the lack of data accuracy and data loss at higher baud rates using the UART to USB Bridge, similar to this issue and shouldn't be focused on in this issue.

@valievdmitrii
Copy link

valievdmitrii commented Nov 20, 2024

i have this issue too.
by steps:

  1. open gpio -> uart-bridge
  2. conect (for ex. openwrt board to uart)
  3. open putty and open connect (speed transfer 115200)
  4. input "dmesg"
  5. after 20-30 lines putty show message - comport is out --> flipper is die.

FW ver: 1.1.2 HW 12.F7B9C6

@APF-MRoger
Copy link

Adding to this, trying to flash a ESP32 board over UART using the Flipper in USB-UART mode (so USB to PC and 13/14 to the ESP32), the flipper crashes. Sometimes right at the flashing start, sometimes at the baudrate change to higher speed for the actual bulk of the flashing.

@doomwastaken doomwastaken added the Triage Issues under initial investigation label Nov 21, 2024
@doomwastaken doomwastaken self-assigned this Nov 21, 2024
@doomwastaken
Copy link
Member

Greetings, we will verify it and if issue is there, will add it to test cases / create a ticket for it. Will update on it later

@AeneasChristodoulou
Copy link

AeneasChristodoulou commented Nov 21, 2024

Adding to this, trying to flash a ESP32 board over UART using the Flipper in USB-UART mode (so USB to PC and 13/14 to the ESP32), the flipper crashes. Sometimes right at the flashing start, sometimes at the baudrate change to higher speed for the actual bulk of the flashing.

I am experiencig the exact same issues, reading values from UART (e.g. Serial output) works with my ESPs, but if you want to flash the firmware or sometimes even on Baudrate change, the Flipper will crash with differing Error messages including hard fault and "MPU Fault, possible stack overflow"

@Astrrra Astrrra self-assigned this Nov 27, 2024
@dshcherb
Copy link

Same here, very easy to trigger even on basic transfers: tested with different devices like a WaveShare's USB UART (PL2303). Sending a bunch characters via the keyboard causes a crash pretty quickly - don't even need to pass a lot of data.

Definitely started happening after the upgrade to 1.1.2.

@modemrunner
Copy link

Same here, with 1.1.2 firmware. Crashed with raspberry Pi 3 with Hard Fault error, 115200 baudrate. after some amount of RX data.

@doomwastaken
Copy link
Member

We are already working on fix.

@Astrrra
Copy link
Member

Astrrra commented Dec 2, 2024

@EstebanFuentealba uploaded a fix to #4025, pls check if that one works

@modemrunner
Copy link

@EstebanFuentealba uploaded a fix to #4025, pls check if that one works

For me it work very well! Used with Raspberry Pi 3, no crash detected. Thank you for your work!!!

@EstebanFuentealba
Copy link
Author

I tested again with a widely used firmware like CameraSuite, but now the Flipper freezes. I think it has so many features now that there's no memory left 🥲.

VID_20241219_100528.2.mp4

@EstebanFuentealba
Copy link
Author

EstebanFuentealba commented Dec 19, 2024

This works CameraSuite with firmware version 1.0.1.
@Astrrra @skotopes @doomwastaken

VID_20241219_102544.1.mp4

@doomwastaken
Copy link
Member

Will do some additional tests then, lets see if anything else is affected. We could probably rule out low memory possibility by taking latest tag firmware and clearing some space there

@skotopes
Copy link
Member

@EstebanFuentealba can you also show us serial logs from your device? (change log serial port in setting if you need main serial for your extension board)

@EstebanFuentealba
Copy link
Author

can you also show us serial logs from your device? (change log serial port in setting if you need main serial for your extension board)

Are you referring to the ufbt cli -> log trace logs? Or to connecting an ST-Link for debugging?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Triage Issues under initial investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.