vovagorodok / ble_ota_app

Upload firmware over Bluetooth
MIT License
15 stars 3 forks source link

Stuck on connecting #6

Closed Pikokosan closed 1 year ago

Pikokosan commented 1 year ago

App shows bluetooth device but sticks on connecting

Build info

App: Android studio with flutter installed.

Arduinobleota: Arduin ide with build flag to use nimble Compiled and tried both basic example and full example.

drawing
vovagorodok commented 1 year ago

Are you using example from ArduinoBleOta or code from Your project? Are you using VS Code with platformio or arduino IDE?

Pikokosan commented 1 year ago

Added what I used to first post.

App code was compiled as is using android studio with flutter plugin

Firmware code was compiled in arduino ide with the build flag for nimble added. Tried both the basic and full example. No modifications to the code.

vovagorodok commented 1 year ago

Thanks!

I'm using VS Code with Platformio plugin. Arduino IDE wasn't tested. I'll do it later.

Issue can be in Arduino IDE compiler. Can be different than Platformio use in their toolchain.

Can I ask You to try VS Code with Platformio plugin? It will help me to eliminate where is issue

Pikokosan commented 1 year ago

Yes sir and sorry for the poor information in the comments. Late-night testing and was very tired.

Tonight I will try with platformio. already have it setup for my other projects.

Pikokosan commented 1 year ago

Tried compiling the example code for the esp32 with nimble with platformio in vscode still has the same issue of being stuck on connecting.

I think i may have found the issue. looks like its not setting the bluetooth permissions correctly. getting the following error Need android.permission.BLUETOOTH_CONNECT permission for AttributionSource

vovagorodok commented 1 year ago

Hmm, I have this permission in manifest file: https://github.com/vovagorodok/ble_ota_app/blob/0116ef0dd9d70739418b245d00d90b0965359929/android/app/src/main/AndroidManifest.xml#L4 Added additional request: https://github.com/vovagorodok/ble_ota_app/commit/0116ef0dd9d70739418b245d00d90b0965359929

Where AttributionSource is located?

Pikokosan commented 1 year ago

Still having issues. confirmed its not my setup. compiled another app using the flutter_reactive_ble library and was able to connect with out issues.

vovagorodok commented 1 year ago

Ok, lets think what happens with mobile app.

Do you have latest version of ble_ota_app ?

Can you show permissions for this app on your phone?

Compiled latest version of app: https://drive.google.com/drive/folders/1eecDHMeSXJvnvmYwe7gSEt2qfrEXoRBq?usp=sharing By command: flutter build apk

Pikokosan commented 1 year ago

Compiled version of the app provided works. i just pulled the new version down and compiled it. confirmed it is working as well.