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

strange behaviours #3

Closed
muziofg opened this issue Oct 4, 2024 · 11 comments
Closed

strange behaviours #3

muziofg opened this issue Oct 4, 2024 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@muziofg
Copy link

muziofg commented Oct 4, 2024

I updated the app to the latest version available at https://lab.flipper.net/apps/upython excited at the idea of ​​being able to use an interactive shell.

but I have encountered two strange behaviours:
One, non fatal, happens when upython is launched and Flipper already has a /dev/ttyACM0 connected and used by a terminal client; App and device crashing immediately (reporting "bus fail").
Another, very strange and makes feature unusable is: how to confirm and execute an interactive command? return key won't work inside py shell. I've tried with "screen" and "putty" terminal client without success

@ofabel
Copy link
Owner

ofabel commented Oct 5, 2024

@muziofg thank you for your bug report!

Does it say "bus fail" or "bus fault" ? For me, sounds quite familiar to this issue here: flipperdevices/flipperzero-firmware#3927

About the second issue: Damn, that should not happen! I always connect to the app with the ufbt cli (out of convenience). But just tried with minicom and can confirm the behaviour you describe. This must have something to do with the line endings, seems only ufbt cli is sending \r\n. I will fix that right away, you can expect an update within the next days. In the meantime, you can try the following:

ofabel added a commit that referenced this issue Oct 5, 2024
@ofabel ofabel self-assigned this Oct 5, 2024
@ofabel ofabel added the bug Something isn't working label Oct 5, 2024
@ofabel
Copy link
Owner

ofabel commented Oct 5, 2024

Commit c0d6c6e should solve this problem by only accepting \r for a new line. Any \n character is ignored. A nice explanation of why \r and not \n or any combination of it can be found on superuser.com.

@ofabel ofabel closed this as completed Oct 5, 2024
@muziofg
Copy link
Author

muziofg commented Oct 5, 2024

Does it say "bus fail" or "bus fault" ? For me, sounds quite familiar to this issue here: flipperdevices/flipperzero-firmware#3927

"bus fault", sorry
and happens only if also the flipper is connected with flipper android app through bluetooth

@muziofg
Copy link
Author

muziofg commented Oct 5, 2024

* Change screen or PuTTY to send different line endings: `\r\n`

* Try https://github.com/ofabel/fssdk with `fssdk cli`

Also I can get around this by using CTRL+J

thanks in advance

@ofabel
Copy link
Owner

ofabel commented Oct 5, 2024

happens only if also the flipper is connected with flipper android app through bluetooth

Hmm, it's possible that the active BT stack uses too much RAM. So there is not enough left for the uPython app to start. Unfortunately this leads to a Bus Fault at the moment. Again, thanks for the feedback - I'll see what I can do about it.

Also I can get around this by using CTRL+J

Ah, great - glad that you found such a simple solution!

@muziofg
Copy link
Author

muziofg commented Oct 15, 2024

I've updated to 1.5 today
Now I'm unable to start flawlessly the app, I get a BusFault every try to start
Also without smartphone not connected, also with BT disabled

I think you can run the app, what is your configuration?
What can I do to debug this crash?

@ofabel
Copy link
Owner

ofabel commented Oct 16, 2024

@muziofg yes, it seems that the application became a bit more unstable 😢

But the core developers are working on this issue, see flipperdevices/flipper-application-catalog#522 for details.

I usually start the application over the serial CLI, but same here - success rate is about 80%. I also shutdown any background tasks (like Bluetooth or Subghz) to have as much RAM space as possible.

@muziofg
Copy link
Author

muziofg commented Oct 16, 2024 via email

@muziofg
Copy link
Author

muziofg commented Nov 11, 2024

magically, after upgrade to the next stable v1.1.2 this flipper application works, also works with bluetooth enabled

@ofabel
Copy link
Owner

ofabel commented Nov 12, 2024

@muziofg Yes, the managed to fix flipperdevices/flipperzero-firmware#3927 and added some tweaks to free more RAM for applications.

Thanks for the feedback about the Bluetooth connection !

@muziofg
Copy link
Author

muziofg commented Nov 19, 2024

Version 1.6 crashes again when app is connected via BT
Hope the fix (not merged yet) solves the issue
flipperdevices/flipperzero-firmware#3992

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants