0

I am trying to connect to an iPad app from a linux based system (PetaLinux to be presice) using bluetooth LE. The data exchange is raw binary data so vendor specific characteristic UUID is used. The problem is iPad app (which is developed inhouse and is working with another esp32 based BLE project) is not listing the UUIDs after connection and thus bluetoothctl is not able to register using register-attribute and thus cannot write the data In this case how do I write the data to this characteristic? Just to note, this characteristic is able to receive the data from iPad app just fine the issue is only for sending. I am trying to figure how to send data using bluetoothctl. select-attribute on this custom characteristic UUID returns nothing and write command fails with no attribute selected.

Here is my local profile

[67-43-ED-7E-98-10]# list-attributes local
Primary Service (Handle 0x0015)
        /org/bluez/app/service0
        0bd51666-e7cb-469b-8e4d-2742f1ba77cc
        Vendor specific
Characteristic (Handle 0x0017)
        /org/bluez/app/service0/chrc0
        e7add780-b042-4876-aae1-112855353cc1
        Vendor specific
Descriptor (Handle 0x001a)
        /org/bluez/app/service0/chrc0/desc0
        00002901-0000-1000-8000-00805f9b34fb
        Characteristic User Description
Descriptor (Handle 0x0019)
        /org/bluez/app/service0/chrc0/desc1
        00002902-0000-1000-8000-00805f9b34fb
        Client Characteristic Configuration

And here is the dump from `bluetoothctl' right after connecting to the app which shows available services but it does not include the one we are using for raw data exchange. This does not include the entire dump because its too long.

[CHG] Device 4C:A7:D5:C2:41:DE UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:A7:D5:C2:41:DE UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:A7:D5:C2:41:DE UUIDs: 00001805-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:A7:D5:C2:41:DE UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:A7:D5:C2:41:DE UUIDs: 0000180f-0000-1000-8000-00805f9b34fb
[CHG] Device 4C:A7:D5:C2:41:DE UUIDs: 7905f431-b5ce-4e99-a40f-4b1e122d00d0
[CHG] Device 4C:A7:D5:C2:41:DE UUIDs: 89d3502b-0f36-433a-8ef4-c502ad55f8dc
[CHG] Device 4C:A7:D5:C2:41:DE UUIDs: 9fa480e0-4967-4542-9390-d343dc5d04ae
[CHG] Device 4C:A7:D5:C2:41:DE UUIDs: d0611e78-bbb4-4591-a5f8-487910ae4366
[CHG] Device 4C:A7:D5:C2:41:DE ServicesResolved: yes
[CHG] Device 4C:A7:D5:C2:41:DE Name: iPad
[CHG] Device 4C:A7:D5:C2:41:DE Alias: iPad
[CHG] Device 4C:A7:D5:C2:41:DE Appearance: 0x0280
[CHG] Device 4C:A7:D5:C2:41:DE Icon: multimedia-player
[4C-A7-D5-C2-41-DE]#

4
  • A Bluetooth BLE connection is made of two devices with different roles. There is a peripheral that advertises it services and is connected to by a central. From your question it is not clear what role the iPad and the Linux system are playing. Does your iPad connect to the Linux system? Or are you connecting to the iPad from the Linux system? It seems like you are doing the latter which is why it looks like bluetoothctl is in the central role and reporting what is available on the iPad Commented Jun 26, 2024 at 7:18
  • @ukBaz good point. The linux should be peripheral and iPad should be central. On the iPad app, user selects one of the devices from the available list of devices and the connection takes place with linux. Thus I assumed that linux is peripheral. Commented Jun 26, 2024 at 11:32
  • And have you created the peripheral with something like this? stackoverflow.com/a/52982329/7721752 Commented Jun 26, 2024 at 19:07
  • @ukBaz yes I created the peripheral the same way by adding UUIDs and registering the application. Just to reiterate, I am able to receive the data sent from iPad app to the custom characteristic UUID. Its just that I am not able to figure out how to send the data out using the same UUID. Also I do have access to the iPad app's source and I can confirm that it is using the same UUID for receiving the data. Thanks! Commented Jun 26, 2024 at 23:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.