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

App crashes when bluetooth LE connects to a device which is not blue tooth enabled. #60

Open
6 tasks
ellelili2025 opened this issue Dec 16, 2021 · 3 comments
Assignees
Labels

Comments

@ellelili2025
Copy link
Contributor

ellelili2025 commented Dec 16, 2021

Describe the bug
When lots of users start to use microbit in App Inventor, they get used to manipulate .hex code and don't realize that their .hex code disables blue tooth service accidentally. App Inventor works with Microbit through blue tooth LE extension, App crashes when it tries to connect to microbit through blue tooth LE while blue tooth service is not available in the microbit. We should display an error message and remind users to enable blue tooth service in the device when that happens instead of crashing the companion, which puzzles users.

Affects

  • Designer
  • Blocks editor
  • [ x] Companion
  • Compiled apps
  • Buildserver
  • Debugging
  • Other... (please describe)

Expected behavior

Use the attached the .hex code and .aia project file. App Inventor should gracefully let users know that blue tooth service in microbit is not available instead of crashing.

Steps to reproduce

Upload the attached .hex code to microbit and use the attached . aia project file.
open the project file in App Inventor.
click the scan button
click the stop scanning button
Select your microbit device discovered by App Inventor
click connect
Companion disappears.

microbit-empty.hex.zip
MicrobitLED.aia.zip

@ellelili2025
Copy link
Contributor Author

@QunCAO1 Could you start looking at this and I will look for another project for you after it?

@QunCAO1
Copy link
Collaborator

QunCAO1 commented Jan 15, 2022

Hi LiLi,

After I have reproduce the bug, I got the following error message
image

I found that in order to modify the error message to notify users to enable blue tooth service, we should change the code in edu.mit.appinventor.ble.BluetoothLEint, and here is the modified version.
BluetoothLEint.zip

Thanks,
Cloth, CAO Qun

@dalemi666
Copy link

Hi QunCAO1 did you solve this issue ?
I am having the same problem with BLE and android > 12 but i cannot found any new version of the app inventor extension.
I am not able to deal with java unfortunately...
Emilio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants