Closed Vadimledyaev closed 2 years ago
Hi Vadimledyaev!
Thank you for reporting this issue, I have a couple of questions in order to better fix this:
EDIT:
I see that you were able to discover the characteristics:
{characteristic_uuid:00002a00-0000-1000-8000-00805f9b34fb, readable:True, real_mask:2, service_uuid:00001800-0000-1000-8000-00805f9b34fb, writable:False, writable_no_response:False} 06-03 13:23:38.582 21822 21840 I godot : [13:23:38] [_on_characteristic_found] {characteristic_uuid:00002a01-0000-1000-8000-00805f9b34fb, readable:True, real_mask:2, service_uuid:00001800-0000-1000-8000-00805f9b34fb, writable:False, writable_no_response:False} 06-03 13:23:38.583 21822 21840 I godot : [13:23:38] [_on_characteristic_found] {characteristic_uuid:00002a02-0000-1000-8000-00805f9b34fb, readable:True, real_mask:10, service_uuid:00001800-0000-1000-8000-00805f9b34fb, writable:True, writable_no_response:False} 06-03 13:23:38.584 21822 21840 I godot : [13:23:38] [_on_characteristic_found] {characteristic_uuid:00002a03-0000-1000-8000-00805f9b34fb, readable:True, real_mask:10, service_uuid:00001800-0000-1000-8000-00805f9b34fb, writable:True, writable_no_response:False} 06-03 13:23:38.586 21822 21840 I godot : [13:23:38] [_on_characteristic_found] {characteristic_uuid:00002a04-0000-1000-8000-00805f9b34fb, readable:True, real_mask:2, service_uuid:00001800-0000-1000-8000-00805f9b34fb, writable:False, writable_no_response:False} 06-03 13:23:38.588 693 17950 I vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Received IBS_SLEEP_IND: 0xFE 06-03 13:23:38.588 21822 21840 I godot : [13:23:38] [_on_characteristic_found] {characteristic_uuid:00002a05-0000-1000-8000-00805f9b34fb, readable:False, real_mask:32, service_uuid:00001801-0000-1000-8000-00805f9b34fb, writable:False, writable_no_response:False} 06-03 13:23:38.590 21822 21840 I godot : [13:23:38] [_on_characteristic_found] {characteristic_uuid:0000ffe1-0000-1000-8000-00805f9b34fb, readable:True, real_mask:22, service_uuid:0000ffe0-0000-1000-8000-00805f9b34fb, writable:False, writable_no_response:True}
Make sure you are changing the service ID and the characteristic IDs by the appropriate UUIDS. From your code I would change the following code from the Demo:
var service_uuid = "6e400001-b5a3-f393-e0a9-e50e24dcca9e" var read_uuid = "6e400003-b5a3-f393-e0a9-e50e24dcca9e" var write_uuid = "6e400002-b5a3-f393-e0a9-e50e24dcca9e"
To:
var service_uuid = "0000ffe0-0000-1000-8000-00805f9b34fb" var read_uuid = "00002a05-0000-1000-8000-00805f9b34fb" var write_uuid = "0000ffe1-0000-1000-8000-00805f9b34fb"
As an example. Of course it depends on the characteristics you need to write/read from. I highly recommend using nRF Connect for Mobile to discover and interact with the services first.
Oh I didn't know that! Thanks for clarifying. I thought this plugin works with UART data, only, so it wouldn't be so complicated to get the data.
I'm connecting my smartphone to a clone of HC-06 Bluetooth UART module . As you probably know, it can send text data, only.
I have tried different values and only these works:
var service_uuid = "0000ffe0-0000-1000-8000-00805f9b34fb" var write_uuid = "0000ffe1-0000-1000-8000-00805f9b34fb" var read_uuid = "0000ffe1-0000-1000-8000-00805f9b34fb"
Works like magic!
Is there a way to determine uuids of different UART devices automatically? I thought about sharing my project with public but the IDs part makes it almost impossible. The working read/write uuid is the only one that is readable AND writable_no_response. As far as I understand, the application should look for such a uuid, get it's service uuid and use it for the UART, right?
Awesome work, thanks a lot! I will send you an update on my project when it is ready.
I am glad that it worked! I should explain that better then.
Is there a way to determine uuids of different UART devices automatically?
Yes! Actually the first thing that the Demo does is read those characteristics. Then you can just subscribe/write to your preferred one.
As far as I understand, the application should look for such a uuid, get it's service uuid and use it for the UART, right? Exactly, and you can be subscribed to more than one characteristic and services.
Awesome work, thanks a lot! I will send you an update on my project when it is ready. Very glad I could help! Looking forward to seeing your project!
I will close this issue now, feel free to open it if anything is unclear :)
Hi Pablo, thanks a lot for developing this plugin!
However, there's probably a bug in it. The app crashes after connecting to the device (line 153) Here's the logcat output:
Is there any chance you can fix it? Thanks.