• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
bluez version on netPi
#2
Hi Armin,

I started with the netpi-raspbian image. I shared the file /var/run/dbus/system_bus_socket and use the host network in the container and started the container in privileged mode so I can connect to the bluetoothd running on the host via dbus.
Then I built the bluez-5.41 from source to match the bluez version with the one of bluetoothd running on the host.
> cd bluez_source_dir
> ./configure
> ./make

There should be a file called bluez_sorce_dir/client/bluetoothctl which also uses the bluez dbus-API as I want to used from my own application. You have to start it as root.

After powering on the bluetooth adapter
> [bluetooth]# power on
scanning for bluetooth devices
> [bluetooth]# scan on
> [NEW] Device B0:91:22:68:27:01 Name: XXX
and connecting to a bluetooth device
> [bluetooth]# connect B0:91:22:68:27:01
there should appear a list of GATT characteristics depending on the bluetooth device.

Something like this:
[CHG] Device 5C:31:3E:71:0C:E7 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:31:3E:71:0C:E7 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:31:3E:71:0C:E7 UUIDs: 0000180f-0000-1000-8000-00805f9b34fb
[CHG] Device 5C:31:3E:71:0C:E7 UUIDs: 0d271100-f0d4-469d-afd3-605a6ebbdb13
[CHG] Device 5C:31:3E:71:0C:E7 UUIDs: 0d27fa01-f0d4-469d-afd3-605a6ebbdb13
[CHG] Device 5C:31:3E:71:0C:E7 UUIDs: 0d27fa60-f0d4-469d-afd3-605a6ebbdb13
[CHG] Device 5C:31:3E:71:0C:E7 UUIDs: 0d27ffc0-f0d4-469d-afd3-605a6ebbdb13
[NEW] Service /org/bluez/hci0/dev_5C_31_3E_71_0C_E7/service0010 Vendor specific (Primary)
[NEW] Characteristic /org/bluez/hci0/dev_5C_31_3E_71_0C_E7/service0010/char0011 Vendor specific
[NEW] Characteristic /org/bluez/hci0/dev_5C_31_3E_71_0C_E7/service0010/char0013 Vendor specific
[NEW] Characteristic /org/bluez/hci0/dev_5C_31_3E_71_0C_E7/service0010/char0015 Vendor specific
[NEW] Characteristic /org/bluez/hci0/dev_5C_31_3E_71_0C_E7/service0010/char0017 Vendor specific
[NEW] Characteristic /org/bluez/hci0/dev_5C_31_3E_71_0C_E7/service0010/char0019 Vendor specific
[NEW] Characteristic /org/bluez/hci0/dev_5C_31_3E_71_0C_E7/service0010/char001b Vendor specific
[NEW] Characteristic /org/bluez/hci0/dev_5C_31_3E_71_0C_E7/service0010/char001d Vendor specific
...

You can test with a fitness-tracker or another bluetooth peripheral using GATT. Or you could use an android phone. To start a GATT server and start advertising you can use the nRF Connect for Mobile app.

With bluez-5.41 the GATT-DBUS API is still experimental and the Characteristics are not discovered because you have to compile and run the bluetoothd with experimental features enabled. I expect it to work with bluez version >= 5.43 since this feature is no longer experimental from this point. I would prefer version 5.47 because the release notes state some fixes for GATT until there.

Regards
Thomas
  Reply


Messages In This Thread
Answer - by Thomas - November-6th-2017, 03:22 PM
Answer - by Thomas - November-7th-2017, 08:44 AM
Answer - by Armin@netPI - November-7th-2017, 10:28 AM
Answer - by Thomas - November-7th-2017, 11:42 AM
Answer - by Armin@netPI - November-7th-2017, 12:42 PM
Answer - by Thomas - November-7th-2017, 12:49 PM
Answer - by Armin@netPI - November-7th-2017, 01:29 PM
Answer - by Thomas - November-7th-2017, 02:34 PM
Answer - by Armin@netPI - November-7th-2017, 03:24 PM
Answer - by Thomas - November-7th-2017, 03:53 PM
Answer - by Thomas - November-7th-2017, 03:54 PM
Answer - by Armin@netPI - November-7th-2017, 04:18 PM
Answer - by Armin@netPI - November-7th-2017, 04:23 PM
Answer - by Armin@netPI - November-7th-2017, 05:05 PM
Answer - by Armin@netPI - November-7th-2017, 07:00 PM
Answer - by Armin@netPI - November-8th-2017, 06:52 AM
Answer - by Thomas - November-8th-2017, 10:23 AM
Answer - by Armin@netPI - November-8th-2017, 01:11 PM
Answer - by Armin@netPI - November-8th-2017, 03:25 PM
Answer - by Armin@netPI - November-9th-2017, 08:13 AM
Answer - by Thomas - November-10th-2017, 08:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Raspbian OS version of the latest hilschernetpi/netpi-raspbian tad 2 2,257 March-5th-2021, 11:25 AM
Last Post: tad
  BLE pairing problems with bluez 5.50 abmn 1 4,242 August-8th-2019, 08:51 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)