register HID with SDP error

Maksim Yevmenkin maksim.yevmenkin at gmail.com
Mon Mar 16 17:15:35 UTC 2015


Hello,

> I'm having trouble registering HID service with sdpd, here is a simple example:
>
>
> sdp_sp_profile_t sp;
> bdaddr_t bt_addr_any;
> void *ss;
> uint32_t sdp_handle;
>
> memcpy(&addr, NG_HCI_BDADDR_ANY, sizeof(addr));
> memset(&sp, 0, sizeof(sp));
> sp.server_channel = 0;
>
> ss = sdp_open_local(NULL);
>
> sdp_register_service(ss, SDP_SERVICE_CLASS_HUMAN_INTERFACE_DEVICE,
>     &bt_addr_any, (void *)&sp, sizeof(sp),
>     &sdp_handle);

hmmm.... can you please explain what are you trying to do? as far as i
can see you are trying to use UUID for
SDP_SERVICE_CLASS_HUMAN_INTERFACE_DEVICE , but you are passing
sdp_sp_profile_t data structure (which is for
SDP_SERVICE_CLASS_SERIAL_PORT).

[...]

> I see /usr/src/usr.sbin/bluetooth/bthidd/ but I believe that's to
> connect to remote HID services.

well, yes and no. depending on what do you mean by "connecting to
remote HID services". bthidd(8) provides support for bluetooth
peripherals that implement bluetooth hid profile, for example
bluetooth keyboard and mouse.

> Also I went to the local electronics store and picked up every bt
> dongle they had on the shelf. (it looks like v4 bt devices they have
> use the CSR8510 chip despite the "brand name". but I also have v3, v2,
> and v1 devices to test). Starting the bluetooth service always seems
> to result in error for all the devices, however I can run sdpd and

if all devices give you errors, then, i would suggest starting looking
at your USB setup. are there any hubs for example? also, sometimes,
devices require some sort of firmware to be downloaded first to be
fully operational. i doubt its the case here. though.

> also browse remote services and pair from client to server and
> vice-versa, so I'm not exactly sure of the importance of the bluetooth
> service?

you can run sdpd(8) even if no bluetooth devices are connected to the
system. sdpd(8) is responsible for answering sdp queries from the
remote devices. it effectively advertises (to remove clients) what
bluetooth services are available on the local host.

thanks
max


More information about the freebsd-bluetooth mailing list