I'm trying to do a little different than this tutorial by using a List Picker to open a new list with all BT (nicer would be to open the app, click a research button and connect automatically with Arduino, without showing a list, but I would be happy if already this list here would work).
I've been able to populate the list with BT devices nearby, but when I try to connect with my Arduino: black screen and it freezes.
I did what you suggested but this is how appears the app.
Empty in the main screen (and I don't understand why because everything disappeared after a modification I did to the blocks but don't understand which one, instead of the one on the right) and in the device list.
I don't have much experience with BLE, but something is wrong. After starting the project, it grants all permissions. When I start scanning with the "StartScanning" block, the "Scanning" block still returns false, as if scanning was not started at all. I also tried asking for permissions for scanning and connection, but it didn't help. Android14
Ok, I had location turned off on my phone.
Now everything works.
Because you set the height of Label2 to 100%, so it takes up the height of the entire screen, and everything else has been moved off screen...
Ah... I thought it would take the 100% height of the horizontal alignment box.
Thanks!
About the BLE,
first question: why do I need the position on when I want to set a BT connection? Because now I can see the list of BT devices nearby, and after few attempts, also my Arduino and also many BT devices, incrementing in number, everytime that I close/open the window. I suppose this is not correct. Especially all the null -# MAC address. Is it possible to keep the list updating while being on the list screen?
With nRF Connect app I find my board correctly. I also can find it in the BT connection of my phone (in Settings -> BT)
When I connect to my device an error appears on the screen saying "Runtime Error. Invalid UUID: 0" but I checked in my .ino script (after changing with lowercase letters the UUID variables), I should have set everything
Scanning searches for all found devices. The extension does not know what bt device you need. You can always filter the list of devices to display, for example, a device with a given mac number.
All your characteristicUuids are identical, and set to 0.0. I don't think this is correct.
Yes I was trying to add a single button to connect directly with the specific MAC address but always gives me timeout even if the device is found correctly by android.
While if I connect through the pickerlist, it connects but vices me Invalid UUID:
0
for the characteristics, I followed the tutorial where if I get correctly the logic, he set the initial value 0.0. I could try to generate/change the characteristicsUUIDs if you think this might be the problem
Mmm I might got lost then. I corrected it with the actual UUIDs (each one different) and now I don't get the UUIDs error.
I still get the timeout error in connection tho
Probably the device you want to connect to does not accept this connection. Check if you are connecting to the correct device. And check if the arduino code is correct regarding accepting the connection. What ble module are you using? Also your uuids in the blocks must match those in the arduino.
If nRF Connect is able to connect to Arduino board, I guess there are no problem in the BT connection itself between the board and the smartphone, but it is rather a problem in the configuration (either app or code).
I checked all the characteristics names and UUIDs, service names and it seams their ok. Each UUID has its own code (service + 6 outputs). I'm attaching the new .aia and .ino files in case you'r like to have a look for big mistakes.
I'm using BluetoothLE extension found here. This Arduino has a BLE 4.2 and WiFi connection. I could try with wifi but I didn't want to use this module to connect to a smartphone BR_Detector2.ino.ino (7.4 KB) Breath_Rate_Monitor.aia (204.5 KB)