I am trying to register my bluetooth SDP service in C linux as shown here: Example 4-9. Describing a service and, as I suppose, everything is fine.
My question is: where or how can I check exactly that the service is propperly registered? I've tried viewing all services while running bluetoothctl
or sdptool browse
comands but service with my UUID is not shown there.
I've also tried changing the service group (not sure how it is called) in sdp_uuid16_create(&rootUuid, PUBLIC_BROWSE_GROUP)
call to, for example, sdp_uuid16_create(&rootUuid, NAP_SVCLASS_ID)
and searching with sdptool search NAP
as it is shown here Bluetooth Profiles but it does not take any effect.
When I run discovering services program (first paragraph on the site) on my other PC, it findes the service pretty fine.
CodePudding user response:
The document you linked to is refering to a version of BlueZ that most systems don't run anymore.
Many of the tools it refers to (such as hciattach
, hciconfig
, hcitool
, hcidump
, rfcomm
, sdptool
, ciptool
, and gatttool
) were deprecated by the BlueZ project in 2017.
There is also the following SO question talking about the changes that have happened to BlueZ: Bluetooth SDP - where is sdpd?
Libraries such as https://github.com/nettlep/gobbledegook are examples of using the new D-Bus API in C.
The BlueZ documentation for the APIs are available at: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc