From owner-freebsd-bluetooth@FreeBSD.ORG Thu Mar 19 15:53:11 2015 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9938711B for ; Thu, 19 Mar 2015 15:53:11 +0000 (UTC) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D9725F8 for ; Thu, 19 Mar 2015 15:53:11 +0000 (UTC) Received: by igcqo1 with SMTP id qo1so78789870igc.0 for ; Thu, 19 Mar 2015 08:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=5OMNhcKS3Eya9vvL3qEiOAcq98vkyThbZhi5ViSh20g=; b=PtjRwiV2Q/zSYgM/aEP2arOPdqN1NxlTTrPHBRd+Lhqm07Wv4LxLhjNlGOpj7K0mXy drQsoN0ebyzplARmomIRG42k0XT8ScmgWS8+b+Ice0bsqVWSvG7kj9JNA7lmPzG36Gje jAThGgsioVirAGug93slJ0Rpm44G6diYrIUt62pKJSTtAdm1UcG22VHh1bKbaUNe7uYc nCbUpASNIPd8TPMKI7ZoLE+PJj7hiWNMzegpe7Owapn84SJ8Ww/JWkTwUv5lA4QW6gSi 5YbOxHWi8AeE/WS2OOwuuKhucOw7e02uXnzfVC4RRSvHvxAbiLKU5yWHClX1Ty7zzQxT wGuQ== MIME-Version: 1.0 X-Received: by 10.42.79.8 with SMTP id p8mr10401945ick.51.1426780390608; Thu, 19 Mar 2015 08:53:10 -0700 (PDT) Received: by 10.36.66.74 with HTTP; Thu, 19 Mar 2015 08:53:10 -0700 (PDT) In-Reply-To: References: <0AD7A2F7-37BE-4F6A-9FD6-F6C81B2CAF36@gmail.com> Date: Thu, 19 Mar 2015 08:53:10 -0700 Message-ID: Subject: Re: register HID with SDP error From: Maksim Yevmenkin To: Waitman Gobble Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-bluetooth@freebsd.org" , Iain Hibbert X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2015 15:53:11 -0000 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? [...] > 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. > 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. thanks, max