Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Mar 2015 12:48:10 -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_fzMaRu-VgP48GqETT6AfYT20eR6Ry13J=CiC=mibSvCig@mail.gmail.com>
In-Reply-To: <CAFPOs6rNSqS=ZyZKZDWy2T437bkoXpfKEFn_Znpo7X6UgXMNVw@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> <CAFuo_fzSMNvwewpkKxcLr9aHyTcwaVgcreLtexSo=FNzNhC6og@mail.gmail.com> <CAFPOs6rJ_SaKjmXrbr%2Bpa9BoVL2HtjkzoyBo015BFK1QB9ZVsQ@mail.gmail.com> <CAFuo_fxGgWYp5x=xWbFogj8F8ZMULFQw_HOWZiJ42=vDO7tXnQ@mail.gmail.com> <CAFPOs6o7jrULqF%2BVSbZ0ckFx3MqAbO-eHyL5FfToTL4xMxSBLQ@mail.gmail.com> <CAFuo_fxocC6KhHqXf2HWpMLFNMFo2tdmv4RMv1MYYBXkC=3FJg@mail.gmail.com> <CAFuo_fwp_Nb2kOk=7qKO6VV5%2Bu_MG5GwaKYkwKFDjUuVo%2BG-aw@mail.gmail.com> <CAFPOs6rNSqS=ZyZKZDWy2T437bkoXpfKEFn_Znpo7X6UgXMNVw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 19, 2015 at 8:53 AM, Maksim Yevmenkin
<maksim.yevmenkin@gmail.com> wrote:
> Hello,
>
>> maybe getting closer. bthidd connects and opens control and interrupt
>> channels, and i can see data on the interrupt line.
>
> [...]
>
>> send characters to FIFO
>> # echo "ABEF010231" >> /tmp/ain
>>
>> ...
>> sent data 3
>> sent data 4
>> sent data 7
>> sent data 8
>> sent data 38
>> sent data 29
>> sent data 38
>> sent data 30
>> sent data 31
>> sent data 29
>>
>> this shows up on the client .. simple syslog(LOG_ERR,"%s",data.b);
>>
>> Mar 18 21:23:32 rpidev bthidd[4948]: Opening outbound session for
>> 00:1b:dc:06:94:d3 (new_device=3D0, reconnect_initiate=3D0)
>> Mar 18 21:23:32 rpidev kernel: kbd2 at vkbd16
>> Mar 18 21:23:35 rpidev bthidd[4948]:
>> Mar 18 21:23:51 rpidev bthidd[4948]: =C2=A1^BM- ^C
>> Mar 18 21:23:51 rpidev bthidd[4948]: =C2=A1^BM- ^D
>> Mar 18 21:23:51 rpidev bthidd[4948]: =C2=A1^BM- ^G
>> Mar 18 21:23:51 rpidev bthidd[4948]: =C2=A1^BM- ^H
>> Mar 18 21:23:51 rpidev bthidd[4948]: =C2=A1^BM- &
>> Mar 18 21:23:51 rpidev bthidd[4948]: =C2=A1^BM- ^]
>> Mar 18 21:23:51 rpidev bthidd[4948]: =C2=A1^BM- &
>> Mar 18 21:23:51 rpidev bthidd[4948]: =C2=A1^BM- ^^
>> Mar 18 21:23:51 rpidev bthidd[4948]: =C2=A1^BM- ^_
>> Mar 18 21:23:51 rpidev bthidd[4948]: =C2=A1^BM- ^]
>>
>> I'm guessing I'll have to hook up a display to that machine to see if
>> the virtual keyboard device is working right.
>
> ok. so seems like your data are making it all the way to bthidd(8).
> its good. a couple things
>
> (1) please make sure your hid report is correctly encoded. i don't
> recall all the specifics at this time, but, i'm fairly certain you
> need to actually send two hid reports for each character, i.e. one for
> key being pressed and one for key being released;
>
> (2) with respect to virtual keyboard working, please make sure that
> machine that runs bthidd(8) also has kbdmux(4) loaded. kbdmux(4)
> should be enabled by default in GENERIC, but please double check. if
> its not, please make sure to either kldload kbdmux (you can do it from
> loader.conf), or, compile it into the kernel.
>
>> modified bthidd https://github.com/waitman/bthidd
>
> can you please point me to your modifications?

Hi,

It's not for production use, but if someone comes across this post in
the future maybe save a few minutes when tinkering and
troubleshooting.

I changed the Makefile so it will 'more easily' build as a standalone
outside /usr/src
I added the syslog line around ln 324 in server.c - just wanted to see
that data was coming in.

do {
len =3D read(fd, &data, to_read);
syslog(LOG_ERR,"%s",data.b);
} while (len < 0 && errno =3D=3D EINTR);





>
> [...]
>
>> I'm going to have to go through everything from the beginning and make
>> sure everything is correct.
>
> i suspect that your hid reports are not quite correct.


>
>> Here's what I did to generate bthidd.conf - maybe I can make a man
>> page for bthidd.conf? There's a note on the bthidd man page about
>> needing a bthidd.conf man page. (but maybe there's a better way than
>> the way I did it?)
>
> i think the way you did it is correct. bthidd.conf contains entries
> produced by "bthidcontrol query" command. normally it is not needed to
> do modify entries in any way.

Ok great i'll create a man page for bthidd.conf

>
>> also, I'll try the manual restart of bluetooth stack and let you know
>> if that works.
>
> you really should not need to do anything manually. everything should
> be started automatically (from devd.conf) when ng_ubt(4) device
> attaches.
>

Sorry, I was referring to your previous message about trying to
restart bluetooth 'manually' to see if it works.

> thanks,
> max



--=20
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_fzMaRu-VgP48GqETT6AfYT20eR6Ry13J=CiC=mibSvCig>