Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Mar 2015 19:59:37 -0700
From:      Waitman Gobble <gobble.wa@gmail.com>
To:        Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Cc:        "freebsd-bluetooth@freebsd.org" <freebsd-bluetooth@freebsd.org>, Iain Hibbert <plunky@ogmig.net>
Subject:   Re: register HID with SDP error
Message-ID:  <CAFuo_fzSMNvwewpkKxcLr9aHyTcwaVgcreLtexSo=FNzNhC6og@mail.gmail.com>
In-Reply-To: <CAFuo_fw5-YtH_sj3Ft52hpfXEP8QCkweptJzT0eUSos9DoBZ%2BA@mail.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> <CAFuo_fye5RWNtjsutHa%2BbXL0AYHYRpJxW-b=48o0iMwX227wdA@mail.gmail.com> <alpine.NEB.2.11.1503170658130.4414@galant.ogmig.net> <CAFuo_fx47uRC-eKD_KtsSsrMCQZauyHyCOgRxGbtp_WEZ49o_Q@mail.gmail.com> <CAFPOs6rYXOFPk5_nqXivToUvGRjXDMS=XL60RyKbMQm7nP8wFg@mail.gmail.com> <CAFuo_fw5-YtH_sj3Ft52hpfXEP8QCkweptJzT0eUSos9DoBZ%2BA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 17, 2015 at 7:22 PM, Waitman Gobble <gobble.wa@gmail.com> wrote:
> On Tue, Mar 17, 2015 at 9:33 AM, Maksim Yevmenkin
> <maksim.yevmenkin@gmail.com> wrote:
>>> Thanks, that's very helpful. I added the 0x0206 and 0x0207 but NOW i
>>> see i didn't do it correctly based on your information.
>>>
>>> btw i tried running 'bluetoothctl' on a machine running mainline Linux
>>> kernel with 'hcidump' running on the FreeBSD machine, kinda looks like
>>> a good way to find issues/debug. I don't yet see how to query from
>>> FreeBSD so that it's 'parsing' the sdp records.
>>
>> can't you just use bthidcontrol(8)? the "query" command is what you
>> are looking for.
>>
>> thanks,
>> max
>
>
> Yes, bthidcontrol does work, thank you Max, that really helps.
> Debugging has been a great deal of trouble for me without seeing this
> information.
>
> scan from r277133 machine
> https://gist.github.com/waitman/d08c2a027479137c2a3a
>
> dump (r279971M machine)
> https://gist.github.com/waitman/c5cc2c9a75eefcf9231a
>
> still more items to
>
> I'm still troubled by the bluetooth errors though.. I wish I could
> solve that problem. This device reports mfg 0x0a12 product 0x0001
> (well idProduct is 0x0001, iProduct is 0x0002?)
>
> on a laptop running r275492,  I cannot get bluetooth to work at all
> with any of the CSR devices I have on hand. (apparently all bt devices
> at the local electronics store are CSR based. I bought every V1, 2, 3,
> 4 device they had on the shelf )
>
> here's log from that r275492 machine.
> https://gist.github.com/waitman/d5659088f572f431b20b
>
> Yes that laptop it is past due for a system rebuild... about 5k commits back.
>
> I can order some bt dongles online with an aim to get various
> chipsets, which I should probably do anyway to experiment. BUT, i'm
> curious mostly because the example in the FreeBSD manual page actually
> shows the 0x0a12 0x0001 device as working. :)
> I don't think these devices require firmware, they seem to work fine
> (without bluetooth stack 'running') with the work I've been doing so
> far on two machines, just not the laptop.
>
>
> --
> Waitman Gobble
> Los Altos California USA
> 510-830-7975


I think I'm getting close, I finally have a good scan with bthidcontrol

Note that bthidcontrol doesn't seem to connect after sdpd is restarted
on the server, unless I do sdpcontrol browse first.

#sdpcontrol -a 00:1b:dc:06:94:d3 browse

Record Handle: 00000000
Service Class ID List:
        Service Discovery Server (0x1000)
Protocol Descriptor List:
        L2CAP (0x0100)
        SDP (0x0001)
Bluetooth Profile Descriptor List:
        Service Discovery Server (0x1000) ver. 1.0

Record Handle: 0x00000001
Service Class ID List:
        Browse Group Descriptor (0x1001)

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

# bthidcontrol -a 00:1b:dc:06:94:d3 query
device {
        bdaddr                  00:1b:dc:06:94:d3;
        control_psm             0x11;
        interrupt_psm           0x13;
        reconnect_initiate      false;
        battery_power           false;
        normally_connectable    false;
        hid_descriptor          {
                0x05 0x01 0x09 0x06 0xa1 0x01 0x85 0x01
                0x05 0x07 0x19 0xe0 0x29 0xe7 0x15 0x00
                0x25 0x01 0x75 0x01 0x95 0x08 0x81 0x02
                0x75 0x08 0x95 0x01 0x81 0x01 0x75 0x01
                0x95 0x05 0x05 0x08 0x19 0x01 0x29 0x05
                0x91 0x02 0x75 0x03 0x95 0x01 0x91 0x01
                0x75 0x08 0x95 0x06 0x15 0x00 0x26 0xff
                0x00 0x05 0x07 0x19 0x00 0x2a 0xff 0x00
                0x81 0x00 0x75 0x01 0x95 0x01 0x15 0x00
                0x25 0x01 0x05 0x0c 0x09 0xb8 0x81 0x06
                0x09 0xe2 0x81 0x06 0x09 0xe9 0x81 0x02
                0x09 0xea 0x81 0x02 0x75 0x01 0x95 0x04
                0x81 0x01 0xc0
        };
}

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

I didn't see a "bool(8)" defined in sdp.h, I was thinking maybe it was
the same as UINT8 but then I noticed Iain's post that showed a
'bool(8)' as 0x28 instead of 0x08, thank you.

-- 
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_fzSMNvwewpkKxcLr9aHyTcwaVgcreLtexSo=FNzNhC6og>