Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Mar 2015 23:34:28 -0700
From:      Waitman Gobble <gobble.wa@gmail.com>
To:        maksim yevmenkin <maksim.yevmenkin@gmail.com>
Cc:        "freebsd-bluetooth@freebsd.org" <freebsd-bluetooth@freebsd.org>
Subject:   Re: register HID with SDP error
Message-ID:  <CAFuo_fye5RWNtjsutHa%2BbXL0AYHYRpJxW-b=48o0iMwX227wdA@mail.gmail.com>
In-Reply-To: <0AD7A2F7-37BE-4F6A-9FD6-F6C81B2CAF36@gmail.com>
References:  <CAFuo_fy9xRU2T3GUPY8116yZCUd8sL9pBQ9ixXnMwO56niJFog@mail.gmail.com> <CAFuo_fzdmB79qdoH8P5EcO_ZZoa=_id6h=eqFBXvP_a%2B3WMkLw@mail.gmail.com> <CAFuo_fzB3A5L3vivH7Z80OEoBtVEHftEYE4LUkhnrkguzL5GDA@mail.gmail.com> <CAFuo_fzrk%2BWLXivZrnTsGQD%2BS7mq%2BUSXB7Mn6%2BJT=y64JakGSw@mail.gmail.com> <CAFPOs6q3iVcNthF=S--UgTm=5wA0HM6coqB7AcmCKb=55OWdTQ@mail.gmail.com> <CAFuo_fxgBVKxmzbJs%2B-XDz%2Bu4tb2_i3eYXSa-oiOoU%2BQD6ApwQ@mail.gmail.com> <CAFPOs6r_D7bcGCMP_bP%2BQtZgKt7Oj5jRJ2v872RODekn%2B6xv1Q@mail.gmail.com> <CAFuo_fwPuaD4bYwfZou0RBswZsTmdtVZA1B2GqUdo3ZJJiWRQg@mail.gmail.com> <0AD7A2F7-37BE-4F6A-9FD6-F6C81B2CAF36@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 16, 2015 at 1:41 PM, maksim yevmenkin
<maksim.yevmenkin@gmail.com> wrote:
>
> Thanks, that helps alot.
>
> I am also working on my other issue, the bluetooth stack not starting. The
> example in the manual shows the same vendor CSR but product 0x0001, I
> believe all my bt devices are 0x0002. It seems that the bluetooth stack will
> fail if it does not identify the device.. so I'm tracking down where to add
> it.. this device is actually functioning even without the bluetooth stack
> starting.
>
>
> Device vendor and product id pair should not matter too much. The driver
> makes the match based on usb interface class and subclass. If device is
> fully confirms to the spec then it usually just works.
>
> Some devices (Atheros and Broadcom for example) may require some sort of
> firmware download. I've also seen all sort of weirdness in devices usually
> requiring special driver or shim.
>
> In most cases, if ng_ubt(4) driver attaches to the device, then it should
> work. If yo get usb transfer errors then I would suspect usb. I've seen this
> before. Also what version of FreeBSD are you running this on ?
>
> Thanks
> Max

I reviewed the HID_SPEC_V11 PDF and think i'm getting closer.
not yet sure about 11 & 12

11) HIDDescriptorList 0x0206
12) HIDLANGIDBaseList 0x0207

I think 12 is a list of available character encodings
I can't seem to find examples of people using several of the
'mandatory' attributes.

I'm not yet certain if i wrote
hid_profile_create_additional_protocol_descriptor_list correctly, it
looks like it's the same list as the protocol descriptor list, except
one level deeper nesting and I think this is supposed to have
reference to the interrupt PSM. At the moment i'm presuming it's the
control channel + 2 -- but I seem to remember seeing an example dump
that shows "Protocol specific parameter #2" with the interrupt
channel. I'll check it out tomorrow.

https://github.com/waitman/sdpd/blob/master/hid.c


./sdpcontrol -l search HID

Record Handle: 0x00000002
Service Class ID List:
        Human Interface Device (0x1124)
Protocol Descriptor List:
        L2CAP (0x0100)
                Protocol specific parameter #1: u/int/uuid16 17
        HIDP (0x0011)
Bluetooth Profile Descriptor List:
        Human Interface Device (0x1124) ver. 1.0


system ->
# uname -a
FreeBSD afia.waitman.net 11.0-CURRENT FreeBSD 11.0-CURRENT #0
r279971M: Mon Mar 16 14:03:44 PDT 2015
waitman@afia.waitman.net:/usr/obj/usr/src/sys/AFIA  amd64

The bt device appears to work properly, except I have no /dev/ubt0 and
get errors if I try to start the 'bluetooth' service.

ubt0: <vendor 0x0a12 CSR8510 A10, class 224/1, rev 2.00/88.91, addr 4> on usbus0
WARNING: attempt to domain_add(netgraph) after domainfinalize()

# service bluetooth start ubt0
/etc/rc.d/bluetooth: ERROR: Unable to setup Bluetooth stack for device ubt0


I changed sdpcontrol a bit for a little more debugging help
https://github.com/waitman/sdpcontrol
The changes are not that great but /slightly/ more messages in syslog.

Thanks alot for your help.

-- 
Waitman Gobble
Los Altos California USA
510-830-7975



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFuo_fye5RWNtjsutHa%2BbXL0AYHYRpJxW-b=48o0iMwX227wdA>