From owner-freebsd-bluetooth@FreeBSD.ORG Sun May 13 14:19:25 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CBF1216A405 for ; Sun, 13 May 2007 14:19:25 +0000 (UTC) (envelope-from sec@42.org) Received: from ice.42.org (ice.42.org [194.77.85.2]) by mx1.freebsd.org (Postfix) with ESMTP id 7564113C489 for ; Sun, 13 May 2007 14:19:25 +0000 (UTC) (envelope-from sec@42.org) Received: by ice.42.org (Postfix, from userid 1000) id 36EE9C46C; Sun, 13 May 2007 16:01:48 +0200 (CEST) Date: Sun, 13 May 2007 16:01:48 +0200 From: Stefan `Sec` Zehl To: freebsd-bluetooth@freebsd.org Message-ID: <20070513140148.GA24803@ice.42.org> X-Current-Backlog: 2705 messages Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i I-love-doing-this: really X-Modeline: vim:set ts=8 sw=4 smarttab tw=72 si noic notitle: Accept-Languages: de, en X-URL: http://sec.42.org/ Subject: send something TO a hid device X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2007 14:19:25 -0000 Hi, I have just acquired a Bluetooth "Media Pad", which is basically a small keyboard with an LCD display above it. The keypad part works ok with bthidd (some special keys don't yet send keycodes, but that should be easily fixable). The more interesting part is that I have found some rudimentary info on how to send something to that display, and wanted to implement that for FreeBSD. The problem I have is that bthidd is not designed to receive data from somewhere else and send it to the device. As a test, I have successfully hardcoded some data and sent it to the device already, but that data needs to come from outside bthidd in the long run. What would be the preferred way to get such data into the bthidd? The obvious idea seams to be to make bthidd listen on a local socket, and implement an ad hoc protocol. Are there any better ideas? Is there perhaps a way to send information "backwards" through a vkbd device? CU, Sec -- I'm convinced that, if you could decode the 'unused' bits of our DNA, they'd read: "Copyright 50000BC, Regents of the University of California" From owner-freebsd-bluetooth@FreeBSD.ORG Sun May 13 23:14:29 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A152E16A400 for ; Sun, 13 May 2007 23:14:29 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248]) by mx1.freebsd.org (Postfix) with ESMTP id 61BBB13C465 for ; Sun, 13 May 2007 23:14:29 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by an-out-0708.google.com with SMTP id d23so359824and for ; Sun, 13 May 2007 16:14:28 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FbYFCo2IDw0X4AS0iVQn01ZsphoxkMxY5xzD4+IM57hIfQulz4shZGMDxiLtlTihuzz741hha8YQQEYwvFY6ER72Xth/pULZe1XMxCDp4s3q8G0B+FoJ5blTiFxnRKAR9UVKrY/Y+PFYhR/3KUnJIpOLJj2m2jvXiHgWK123g9U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fyACVA1+GyGZCu4p4qUyG1sBmUfPSj1PClcovC4Pp5CPCsPUyac3e8v5sZ1UuxcSbt0xmCAqcGsB9OtBrpSxlG4XFcPy0Dzv0hgoEIspEYCobYkdCp/hE8QKwn3YudnMoidjitF01NoncMyRi7rwUzjy9wl2+DcsbyjR73MyQPQ= Received: by 10.100.144.11 with SMTP id r11mr3005458and.1179098068774; Sun, 13 May 2007 16:14:28 -0700 (PDT) Received: by 10.100.111.13 with HTTP; Sun, 13 May 2007 16:14:28 -0700 (PDT) Message-ID: Date: Sun, 13 May 2007 16:14:28 -0700 From: "Maksim Yevmenkin" To: "Stefan `Sec` Zehl" In-Reply-To: <20070513140148.GA24803@ice.42.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070513140148.GA24803@ice.42.org> Cc: freebsd-bluetooth@freebsd.org Subject: Re: send something TO a hid device X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 May 2007 23:14:29 -0000 Hello, > I have just acquired a Bluetooth "Media Pad", which is basically a small > keyboard with an LCD display above it. you are talking about logitech dinovo pad, are you not? > The keypad part works ok with bthidd (some special keys don't yet send > keycodes, but that should be easily fixable). ok. patches are welcome. > The more interesting part is that I have found some rudimentary info on > how to send something to that display, and wanted to implement that for > FreeBSD. > > The problem I have is that bthidd is not designed to receive data from > somewhere else and send it to the device. As a test, I have successfully > hardcoded some data and sent it to the device already, but that data > needs to come from outside bthidd in the long run. What would be the > preferred way to get such data into the bthidd? it depends. what are you planning to do with the lcd display? also would be nice to have hid descriptor dump (i assume hid reports are used to send information to the pad). > The obvious idea seams to be to make bthidd listen on a local socket, > and implement an ad hoc protocol. Are there any better ideas? Is there > perhaps a way to send information "backwards" through a vkbd device? local unix or inet (on 127.0.0.1) is the way to go imo. putting stuff into vkbd(4) is a bad idea, because one side (keyboard) of vkbd is grabbed by the kernel another (device) is grabbed by the bthidd(8) and there is no easy way to stuff extra data into vkbd(4). implementing a "pass-through" type of interface in bthidd(8) makes more sense, however, there is aways a risk that someone will use "pass-through" interface incorrectly and will, for example, mess with keyboard lights or something. i'm not a really big fan of displays on keyboards, but someone might find them useful in an "eye candy" soft of way :) the "pass-through" interface idea might have some value, though. i'm hoping for "smart" hid devices, i.e. keyboards with programmable layouts, etc. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Mon May 14 08:20:42 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CC92416A403 for ; Mon, 14 May 2007 08:20:42 +0000 (UTC) (envelope-from sec@42.org) Received: from ice.42.org (ice.42.org [194.77.85.2]) by mx1.freebsd.org (Postfix) with ESMTP id 5EDB113C458 for ; Mon, 14 May 2007 08:20:42 +0000 (UTC) (envelope-from sec@42.org) Received: by ice.42.org (Postfix, from userid 1000) id B0BA2C46F; Mon, 14 May 2007 10:20:40 +0200 (CEST) Date: Mon, 14 May 2007 10:20:40 +0200 From: Stefan `Sec` Zehl To: Maksim Yevmenkin Message-ID: <20070514082040.GB24803@ice.42.org> X-Current-Backlog: 2709 messages References: <20070513140148.GA24803@ice.42.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i I-love-doing-this: really X-Modeline: vim:set ts=8 sw=4 smarttab tw=72 si noic notitle: Accept-Languages: de, en X-URL: http://sec.42.org/ Cc: freebsd-bluetooth@freebsd.org Subject: Re: send something TO a hid device X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 08:20:42 -0000 Hi, On Sun, May 13, 2007 at 16:14 -0700, Maksim Yevmenkin wrote: > >I have just acquired a Bluetooth "Media Pad", which is basically a small > >keyboard with an LCD display above it. > you are talking about logitech dinovo pad, are you not? Yes. I got only the "media pad" part from a friend who doesn't need it any more. > >The keypad part works ok with bthidd (some special keys don't yet send > >keycodes, but that should be easily fixable). > ok. patches are welcome. At the moment I am trying to convert the hid report descriptor to see wether there is a bug in the FreeBSD parser or the descriptor. I have found only a windows tool which didn't really work, so I am searching for a spec to do it myself (in perl). From what I've seen, this shouldn't be too difficult. > it depends. what are you planning to do with the lcd display? also > would be nice to have hid descriptor dump (i assume hid reports are > used to send information to the pad). So far not. The information I got was from a Linux patch which just assembles raw packets (probably gained by sniffing). When I have a text version of the descriptor, I can tell you more about that. If it isn't in that descriptor, I will look into producing an updated descriptor, but from what I've seen, I'm not sure this will be easy. [...] > local unix or inet (on 127.0.0.1) is the way to go imo. putting stuff > into vkbd(4) is a bad idea, because one side (keyboard) of vkbd is > grabbed by the kernel another (device) is grabbed by the bthidd(8) and > there is no easy way to stuff extra data into vkbd(4). > > implementing a "pass-through" type of interface in bthidd(8) makes > more sense, however, there is aways a risk that someone will use > "pass-through" interface incorrectly and will, for example, mess with > keyboard lights or something. > > i'm not a really big fan of displays on keyboards, but someone might > find them useful in an "eye candy" soft of way :) > > the "pass-through" interface idea might have some value, though. i'm > hoping for "smart" hid devices, i.e. keyboards with programmable > layouts, etc. The problem is, I have abolutely no idea how to implement a device, so thats why I suggested a local socket. The problem with that is, that we need some kind of "ad hoc" protocol to select which device to talk to (as bthidd can have multiple connections at once, iirc). I am planning on a simple linewise text-based thing, but I'm not completely sure on that yet. And yes, Eye-candy is what I'm after. That and some kind of new-mail-or-something indicator :) CU, Sec -- I didn't say we *can't* do it. In fact we can. We also can calculate digits of sqrt(2) in the background, drive space shuttles, or have an AI algorithm write poems in Swahili while inside the pager. -- daia@stoilow.imar.ro From owner-freebsd-bluetooth@FreeBSD.ORG Mon May 14 09:28:30 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5049016A406 for ; Mon, 14 May 2007 09:28:30 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 08E2613C45E for ; Mon, 14 May 2007 09:28:29 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54a5d654.dip.t-dialin.net [84.165.214.84]) by redbull.bpaserver.net (Postfix) with ESMTP id 4709C2E04D; Mon, 14 May 2007 11:00:06 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 9665F5B48A3; Mon, 14 May 2007 10:59:50 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.13.8/8.13.8/Submit) id l4E8xoga032797; Mon, 14 May 2007 10:59:50 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Mon, 14 May 2007 10:59:50 +0200 Message-ID: <20070514105950.9lzjygx8o440gg8c@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Mon, 14 May 2007 10:59:50 +0200 From: Alexander Leidinger To: Stefan `Sec` Zehl References: <20070513140148.GA24803@ice.42.org> <20070514082040.GB24803@ice.42.org> In-Reply-To: <20070514082040.GB24803@ice.42.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) / FreeBSD-7.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-15.364, required 8, autolearn=not spam, BAYES_00 -15.00, DK_POLICY_SIGNSOME 0.00, FORGED_RCVD_HELO 0.14, SMILEY -0.50) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-bluetooth@freebsd.org Subject: Re: send something TO a hid device X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 09:28:30 -0000 Quoting Stefan `Sec` Zehl (from Mon, 14 May 2007 10:20:40 +0200= ): > Hi, > > On Sun, May 13, 2007 at 16:14 -0700, Maksim Yevmenkin wrote: >> >I have just acquired a Bluetooth "Media Pad", which is basically a small >> >keyboard with an LCD display above it. >> you are talking about logitech dinovo pad, are you not? > > Yes. I got only the "media pad" part from a friend who doesn't need it > any more. Does someone of you if the new one works? I'm talking about the new =20 slim black one with touch sensors for the loudness which is very =20 expensive but would do great in my living room in the media center... =20 I want to buy it, but so far my brain tells me it is too expensive to =20 just give it a try and hope it works well with FreeBSD. > And yes, Eye-candy is what I'm after. That and some kind of > new-mail-or-something indicator :) The black one is clearly an eye-candy thing... if someone tells me it =20 doesn't work, I save 150 bucks. If it works, I have to come up with =20 another reason to not buy it... :) Bye, Alexander. --=20 History repeats itself -- the first time as a tragi-comedy, the second time as bedroom farce. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-bluetooth@FreeBSD.ORG Mon May 14 17:25:15 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F8F516A403 for ; Mon, 14 May 2007 17:25:15 +0000 (UTC) (envelope-from sec@42.org) Received: from ice.42.org (ice.42.org [194.77.85.2]) by mx1.freebsd.org (Postfix) with ESMTP id 693E213C448 for ; Mon, 14 May 2007 17:25:14 +0000 (UTC) (envelope-from sec@42.org) Received: by ice.42.org (Postfix, from userid 1000) id D1435C475; Mon, 14 May 2007 19:25:12 +0200 (CEST) Date: Mon, 14 May 2007 19:25:12 +0200 From: Stefan `Sec` Zehl To: Maksim Yevmenkin Message-ID: <20070514172512.GC24803@ice.42.org> X-Current-Backlog: 2709 messages References: <20070513140148.GA24803@ice.42.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i I-love-doing-this: really X-Modeline: vim:set ts=8 sw=4 smarttab tw=72 si noic notitle: Accept-Languages: de, en X-URL: http://sec.42.org/ Cc: freebsd-bluetooth@freebsd.org Subject: Mediapad HID dump (was Re: send something TO a hid device) X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 17:25:15 -0000 Hi, On Sun, May 13, 2007 at 16:14 -0700, Maksim Yevmenkin wrote: > also > would be nice to have hid descriptor dump (i assume hid reports are > used to send information to the pad). I have now completed my rudimentary HID report descriptor parser, and can now present the parsed HID: As far as I can see, it is a basic Keyboard-Style HID, with two different "Reports", one for the normal keys, one for the "Media Keys" using the "Consumer Control" page. Sending to the device is only decribed as two different-length "Vendor-defined" statements. The "Security Code Character Entered" are (I assume) what Windows uses to display "*"s when entering the PIN during the pairing process. This dump also conforms my suspicion of an error inside the FreeBSD hid parser. The report ID 0x03 specifies 16-bit keypresses, which are parsed incorrectly. -- I will dig into that, and try to produce a patch for it tomorrow. 05 01 | Usage Page(Generic desktop controls) 09 06 | Usage(Keyboard) a1 01 | Collection(Application (mouse,keyboard)) 05 07 | Usage Page(Key Codes) 85 01 | Report ID(0x01) 19 e0 | Usage Minimum(0xe0:Keyboard LeftControl) 29 e7 | Usage Maximum(0xe7:Keyboard Right GUI) 15 00 | Logical Minimum(0) 25 01 | Logical Maximum(1) 75 01 | Report Size(1) 95 08 | Report Count(8) 81 02 | --- Input(Data,Variable) 95 01 | Report Count(1) 75 08 | Report Size(8) 81 01 | --- Input(Constant) 95 05 | Report Count(5) 75 01 | Report Size(1) 05 08 | Usage Page(LEDs) 19 01 | Usage Minimum(0x01:Num Lock) 29 05 | Usage Maximum(0x05:Kana) 91 02 | --- Output(Data,Variable) 95 01 | Report Count(1) 75 03 | Report Size(3) 91 01 | --- Output(Constant) 95 06 | Report Count(6) 75 08 | Report Size(8) 15 00 | Logical Minimum(0) 26 a4 00| Logical Maximum(164) 05 07 | Usage Page(Key Codes) 19 00 | Usage Minimum(0x00:Reserved (no event indicated)) 29 a4 | Usage Maximum(0xa4:Keyboard ExSel) 81 00 | --- Input(Data) c0 | End Collection 05 0c | Usage Page(Consumer) 09 01 | Usage(Consumer Control) a1 01 | Collection(Application (mouse,keyboard)) 85 03 | Report ID(0x03) 75 10 | Report Size(16) 95 02 | Report Count(2) 15 01 | Logical Minimum(1) 26 8c 02| Logical Maximum(652) 19 01 | Usage Minimum(0x01:Consumer Control) 2a 8c 02| Usage Maximum(0x028c:Not in Definition List: 652) 81 60 | --- Input(Data,NoPreferred,NullState) c0 | End Collection 06 00 ff| Usage Page(Vendor-Defined) 09 01 | Usage(1) a1 01 | Collection(Application (mouse,keyboard)) 85 10 | Report ID(0x10) 75 08 | Report Size(8) 95 06 | Report Count(6) 15 00 | Logical Minimum(0) 26 ff 00| Logical Maximum(255) 09 01 | Usage(1) 81 00 | --- Input(Data) 09 01 | Usage(1) 91 00 | --- Output(Data) c0 | End Collection 06 00 ff| Usage Page(Vendor-Defined) 09 02 | Usage(2) a1 01 | Collection(Application (mouse,keyboard)) 85 11 | Report ID(0x11) 75 08 | Report Size(8) 95 13 | Report Count(19) 15 00 | Logical Minimum(0) 26 ff 00| Logical Maximum(255) 09 02 | Usage(2) 81 00 | --- Input(Data) 09 02 | Usage(2) 91 00 | --- Output(Data) c0 | End Collection 05 06 | Usage Page(Generic device controls) 09 27 | Usage(Reserved(39)) a1 01 | Collection(Application (mouse,keyboard)) 85 ff | Report ID(0xff) 95 01 | Report Count(1) 75 02 | Report Size(2) 09 24 | Usage(Security Code Character Entered) 09 26 | Usage(Security Code Cleared) 81 02 | --- Input(Data,Variable) 75 06 | Report Size(6) 81 01 | --- Input(Constant) c0 | End Collection CU, Sec -- I have seen things you people wouldn't believe. Attack ships on fire off the shoulder of Orion. I watched C-beams glitter in the dark near the Tannhauser Gate. All those moments will be lost in time, like tears in rain. Time to die. From owner-freebsd-bluetooth@FreeBSD.ORG Mon May 14 17:41:11 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E695D16A402 for ; Mon, 14 May 2007 17:41:10 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.244]) by mx1.freebsd.org (Postfix) with ESMTP id A11D713C4AD for ; Mon, 14 May 2007 17:41:10 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by an-out-0708.google.com with SMTP id d23so422459and for ; Mon, 14 May 2007 10:41:10 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ioho439IvCtG1KwpYs+eHoLlUdWoCMEV8hKVmB6kAAfssac/HnmhhQCTCBgDtp6i8D7XsXEK6gGpAKPds8ZFHn5dMcEJP6NilLiY/jHjv5ctuM7ETFbctfnzRqoyaR0+ZfkhvWfc3IgCG7dU1cUAEy/Ho24YVQHwZR4GZVFU4LM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Oj2CUvEBhxHW9QK8JWdWCX/nopNk3Qh7DFrFX8HWZHv6jl30PD6WNxIe2zDZeTik3vqWSoU1zli2dmfkS47rt3iKa1l8jb2wPqbH3SfG7v3xfL0BbcJjnms9osQrfO+rWdNTZessBY5OVT/yh0GJGlhLiEmePWzXIzyh9HxrT5k= Received: by 10.100.31.2 with SMTP id e2mr4692779ane.1179164469627; Mon, 14 May 2007 10:41:09 -0700 (PDT) Received: by 10.100.111.13 with HTTP; Mon, 14 May 2007 10:41:09 -0700 (PDT) Message-ID: Date: Mon, 14 May 2007 10:41:09 -0700 From: "Maksim Yevmenkin" To: "Stefan `Sec` Zehl" In-Reply-To: <20070514082040.GB24803@ice.42.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070513140148.GA24803@ice.42.org> <20070514082040.GB24803@ice.42.org> Cc: freebsd-bluetooth@freebsd.org Subject: Re: send something TO a hid device X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 17:41:11 -0000 [...] > > >The keypad part works ok with bthidd (some special keys don't yet send > > >keycodes, but that should be easily fixable). > > ok. patches are welcome. > > At the moment I am trying to convert the hid report descriptor to see > wether there is a bug in the FreeBSD parser or the descriptor. I have > found only a windows tool which didn't really work, so I am searching > for a spec to do it myself (in perl). From what I've seen, this > shouldn't be too difficult. how about posting descriptor here in hex form, i.e. the same form you put it into bthidd.conf? > > it depends. what are you planning to do with the lcd display? also > > would be nice to have hid descriptor dump (i assume hid reports are > > used to send information to the pad). > > So far not. The information I got was from a Linux patch which just > assembles raw packets (probably gained by sniffing). When I have a text > version of the descriptor, I can tell you more about that. > > If it isn't in that descriptor, I will look into producing an updated > descriptor, but from what I've seen, I'm not sure this will be easy. > > [...] > > local unix or inet (on 127.0.0.1) is the way to go imo. putting stuff > > into vkbd(4) is a bad idea, because one side (keyboard) of vkbd is > > grabbed by the kernel another (device) is grabbed by the bthidd(8) and > > there is no easy way to stuff extra data into vkbd(4). > > > > implementing a "pass-through" type of interface in bthidd(8) makes > > more sense, however, there is aways a risk that someone will use > > "pass-through" interface incorrectly and will, for example, mess with > > keyboard lights or something. > > > > i'm not a really big fan of displays on keyboards, but someone might > > find them useful in an "eye candy" soft of way :) > > > > the "pass-through" interface idea might have some value, though. i'm > > hoping for "smart" hid devices, i.e. keyboards with programmable > > layouts, etc. > > The problem is, I have abolutely no idea how to implement a device, so > thats why I suggested a local socket. The problem with that is, that we > need some kind of "ad hoc" protocol to select which device to talk to > (as bthidd can have multiple connections at once, iirc). I am planning > on a simple linewise text-based thing, but I'm not completely sure on > that yet. again, you do not really need a device. socket will do just fine. local client(s) can connect to the bthidd and identify which hid device it (they) will be taking to, i.e. tell hid device's bd_addr. then client(s) simply sends hid reports to the bthidd via socket and it will relay them the hid device via bluetooth. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Mon May 14 23:34:39 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5EE716A404 for ; Mon, 14 May 2007 23:34:39 +0000 (UTC) (envelope-from sec@42.org) Received: from ice.42.org (ice.42.org [194.77.85.2]) by mx1.freebsd.org (Postfix) with ESMTP id 759B613C458 for ; Mon, 14 May 2007 23:34:39 +0000 (UTC) (envelope-from sec@42.org) Received: by ice.42.org (Postfix, from userid 1000) id 2779BC46C; Tue, 15 May 2007 01:34:38 +0200 (CEST) Date: Tue, 15 May 2007 01:34:38 +0200 From: Stefan `Sec` Zehl To: freebsd-bluetooth@freebsd.org, freebsd-usb@freebsd.org Message-ID: <20070514233438.GD24803@ice.42.org> X-Current-Backlog: 2710 messages Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i I-love-doing-this: really X-Modeline: vim:set ts=8 sw=4 smarttab tw=72 si noic notitle: Accept-Languages: de, en X-URL: http://sec.42.org/ Cc: Subject: libusbhid bug? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 23:34:40 -0000 Hi, I've been playing around with a Bluetooth HID device. Bluetooth uses the same HID format as USB, so libusbhid is used to parse these messages. While debugging, I've found what I think is a mistake in parsing "Array"-type input messages: In my HID descriptor, there is the following snippet: | 95 06 | Report Count(6) | 75 08 | Report Size(8) | 15 00 | Logical Minimum(0) | 26 a4 00| Logical Maximum(164) | 05 07 | Usage Page(Key Codes) | 19 00 | Usage Minimum(0x00) | 29 a4 | Usage Maximum(0xa4) | 81 00 | Input(Data,Array,Absolute) The current usbhid only parses one item of Report_Size (8bit). According to the spec it should parse Report_Count items: | An array provides an alternate means for | describing the data returned from a group of | buttons. Arrays are more efficient, if less flexible | than variable items. Rather than returning a single | bit for each button in the group, an array returns an | index in each field that corresponds to the pressed | button (like keyboard scan codes). An out-of range | value in and array field is considered no controls | asserted. Buttons or keys in an array that are | simultaneously pressed need to be reported in | multiple fields. Therefore, the number of fields in | an array input item (Report Count) dictates the | maximum number of simultaneous controls that | can be reported. A keyboard could report up to | three simultaneous keys using an array with three | 8-bit fields (Report Size = 8, Report Count = 3). I have created a patch which changes that behaviour, and attached it below. My sample code works fine with these changes, but as I don't have an USB Keyboard, it would be great if someone could check that this doesn't break anything. --- parse.c.org Wed Feb 11 22:09:13 2004 +++ parse.c Tue May 15 01:26:08 2007 @@ -54,6 +54,7 @@ int multimax; int kindset; int reportid; + int isarray; /* * The start of collection item has no report ID set, so save @@ -100,6 +101,7 @@ s->kindset = kindset; s->reportid = id; s->hassavedcoll = 0; + s->isarray = 0; return (s); } @@ -182,6 +184,16 @@ hid_clear_local(c); } } + if(s->isarray) { + REPORT_SAVED_COLL; + *h = *c; + h->next = 0; + h->pos = s->kindpos[c->kind]; + s->kindpos[c->kind] += c->report_size ; + if(--s->isarray ==0) + hid_clear_local(c); + return(1); + }; for (;;) { p = s->p; if (p >= s->end) @@ -262,14 +274,9 @@ } else { if (s->minset) c->usage = c->usage_minimum; - *h = *c; - h->next = 0; - h->pos = s->kindpos[c->kind]; - s->kindpos[c->kind] += - c->report_size * c->report_count; - hid_clear_local(c); s->minset = 0; - return (1); + s->isarray=c->report_count; + goto top; } case 9: /* Output */ retkind = hid_output; CU, Sec -- "The General who in a hundred battles is always victorious is not as great as the one who achieves his objectives without fighting." -- Sun Tzu From owner-freebsd-bluetooth@FreeBSD.ORG Mon May 14 23:39:47 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FAC116A400 for ; Mon, 14 May 2007 23:39:47 +0000 (UTC) (envelope-from sec@42.org) Received: from ice.42.org (ice.42.org [194.77.85.2]) by mx1.freebsd.org (Postfix) with ESMTP id BB48313C448 for ; Mon, 14 May 2007 23:39:46 +0000 (UTC) (envelope-from sec@42.org) Received: by ice.42.org (Postfix, from userid 1000) id D76E4C475; Tue, 15 May 2007 01:39:45 +0200 (CEST) Date: Tue, 15 May 2007 01:39:45 +0200 From: Stefan `Sec` Zehl To: Maksim Yevmenkin Message-ID: <20070514233945.GE24803@ice.42.org> X-Current-Backlog: 2710 messages References: <20070513140148.GA24803@ice.42.org> <20070514082040.GB24803@ice.42.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i I-love-doing-this: really X-Modeline: vim:set ts=8 sw=4 smarttab tw=72 si noic notitle: Accept-Languages: de, en X-URL: http://sec.42.org/ Cc: freebsd-bluetooth@freebsd.org Subject: Re: send something TO a hid device X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 23:39:47 -0000 On Mon, May 14, 2007 at 10:41 -0700, Maksim Yevmenkin wrote: > how about posting descriptor here in hex form, i.e. the same form you > put it into bthidd.conf? Oh, if you don't like the parsed output in my last mail, here is the binary descriptor: hid_descriptor { 0x05 0x01 0x09 0x06 0xa1 0x01 0x05 0x07 0x85 0x01 0x19 0xe0 0x29 0xe7 0x15 0x00 0x25 0x01 0x75 0x01 0x95 0x08 0x81 0x02 0x95 0x01 0x75 0x08 0x81 0x01 0x95 0x05 0x75 0x01 0x05 0x08 0x19 0x01 0x29 0x05 0x91 0x02 0x95 0x01 0x75 0x03 0x91 0x01 0x95 0x06 0x75 0x08 0x15 0x00 0x26 0xa4 0x00 0x05 0x07 0x19 0x00 0x29 0xa4 0x81 0x00 0xc0 0x05 0x0c 0x09 0x01 0xa1 0x01 0x85 0x03 0x75 0x10 0x95 0x02 0x15 0x01 0x26 0x8c 0x02 0x19 0x01 0x2a 0x8c 0x02 0x81 0x60 0xc0 0x06 0x00 0xff 0x09 0x01 0xa1 0x01 0x85 0x10 0x75 0x08 0x95 0x06 0x15 0x00 0x26 0xff 0x00 0x09 0x01 0x81 0x00 0x09 0x01 0x91 0x00 0xc0 0x06 0x00 0xff 0x09 0x02 0xa1 0x01 0x85 0x11 0x75 0x08 0x95 0x13 0x15 0x00 0x26 0xff 0x00 0x09 0x02 0x81 0x00 0x09 0x02 0x91 0x00 0xc0 0x05 0x06 0x09 0x27 0xa1 0x01 0x85 0xff 0x95 0x01 0x75 0x02 0x09 0x24 0x09 0x26 0x81 0x02 0x75 0x06 0x81 0x01 0xc0 }; > again, you do not really need a device. socket will do just fine. > local client(s) can connect to the bthidd and identify which hid > device it (they) will be taking to, i.e. tell hid device's bd_addr. > then client(s) simply sends hid reports to the bthidd via socket and > it will relay them the hid device via bluetooth. Ok, sorry. I think I misunderstood part of your mail. I'm planning on using a socket, and selecting via the bd_addr. My first attempt will probably do a binary pass-through to the HID until I figure out how to use libusbhid to use the Output definitions of the descriptor. CU, Sec -- Consider the need for having to type "www.domain.name" a little IQ test that you have to take before you can access my web site.' -- Wietse From owner-freebsd-bluetooth@FreeBSD.ORG Mon May 14 23:42:44 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9CA4B16A402 for ; Mon, 14 May 2007 23:42:44 +0000 (UTC) (envelope-from sec@42.org) Received: from ice.42.org (ice.42.org [194.77.85.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3E11313C480 for ; Mon, 14 May 2007 23:42:44 +0000 (UTC) (envelope-from sec@42.org) Received: by ice.42.org (Postfix, from userid 1000) id 59FEFC474; Tue, 15 May 2007 01:42:43 +0200 (CEST) Date: Tue, 15 May 2007 01:42:43 +0200 From: Stefan `Sec` Zehl To: Alexander Leidinger Message-ID: <20070514234243.GF24803@ice.42.org> X-Current-Backlog: 2710 messages References: <20070513140148.GA24803@ice.42.org> <20070514082040.GB24803@ice.42.org> <20070514105950.9lzjygx8o440gg8c@webmail.leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070514105950.9lzjygx8o440gg8c@webmail.leidinger.net> User-Agent: Mutt/1.4.2.2i I-love-doing-this: really X-Modeline: vim:set ts=8 sw=4 smarttab tw=72 si noic notitle: Accept-Languages: de, en X-URL: http://sec.42.org/ Cc: freebsd-bluetooth@freebsd.org Subject: Re: send something TO a hid device X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 23:42:44 -0000 Hi, On Mon, May 14, 2007 at 10:59 +0200, Alexander Leidinger wrote: > Does someone of you if the new one works? I'm talking about the new > slim black one with touch sensors for the loudness which is very > expensive but would do great in my living room in the media center... > I want to buy it, but so far my brain tells me it is too expensive to > just give it a try and hope it works well with FreeBSD. I'm sorry, I only have the old one here. So I can't tell for sure. But honestly, as the old one conforms to the HID spec, I would assume that the new one does, too. > >And yes, Eye-candy is what I'm after. That and some kind of > >new-mail-or-something indicator :) > > The black one is clearly an eye-candy thing... if someone tells me it > doesn't work, I save 150 bucks. If it works, I have to come up with > another reason to not buy it... :) The media keys won't work out of the box. The bthidd needs to learn about these keys first, but that shouldn't be easily fixable. CU, Sec -- "Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws." - Plato(?) (427-347 B.C.) From owner-freebsd-bluetooth@FreeBSD.ORG Tue May 15 07:59:52 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BC80616A4FC for ; Tue, 15 May 2007 07:59:52 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.swip.net [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id 2EB0C13C4C3 for ; Tue, 15 May 2007 07:59:51 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.lan) by mailfe13.swip.net (CommuniGate Pro SMTP 5.1.7) with ESMTPA id 96929481; Tue, 15 May 2007 08:59:49 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, Markus Brueffer Date: Tue, 15 May 2007 08:59:37 +0200 User-Agent: KMail/1.9.5 References: <20070514233438.GD24803@ice.42.org> In-Reply-To: <20070514233438.GD24803@ice.42.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705150859.37126.hselasky@c2i.net> Cc: freebsd-bluetooth@freebsd.org, Stefan `Sec` Zehl Subject: Re: libusbhid bug? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2007 07:59:53 -0000 Hi, I think Markus Brueffer is working on a new HID parser. --HPS On Tuesday 15 May 2007 01:34, Stefan `Sec` Zehl wrote: > Hi, > > I've been playing around with a Bluetooth HID device. Bluetooth uses the > same HID format as USB, so libusbhid is used to parse these messages. > > While debugging, I've found what I think is a mistake in parsing > "Array"-type input messages: > > In my HID descriptor, there is the following snippet: > | 95 06 | Report Count(6) > | 75 08 | Report Size(8) > | 15 00 | Logical Minimum(0) > | 26 a4 00| Logical Maximum(164) > | 05 07 | Usage Page(Key Codes) > | 19 00 | Usage Minimum(0x00) > | 29 a4 | Usage Maximum(0xa4) > | 81 00 | Input(Data,Array,Absolute) > > The current usbhid only parses one item of Report_Size (8bit). According > > to the spec it should parse Report_Count items: > | An array provides an alternate means for > | describing the data returned from a group of > | buttons. Arrays are more efficient, if less flexible > | than variable items. Rather than returning a single > | bit for each button in the group, an array returns an > | index in each field that corresponds to the pressed > | button (like keyboard scan codes). An out-of range > | value in and array field is considered no controls > | asserted. Buttons or keys in an array that are > | simultaneously pressed need to be reported in > | multiple fields. Therefore, the number of fields in > | an array input item (Report Count) dictates the > | maximum number of simultaneous controls that > | can be reported. A keyboard could report up to > | three simultaneous keys using an array with three > | 8-bit fields (Report Size = 8, Report Count = 3). > > I have created a patch which changes that behaviour, and attached it > below. My sample code works fine with these changes, but as I don't have > an USB Keyboard, it would be great if someone could check that this > doesn't break anything. > > --- parse.c.org Wed Feb 11 22:09:13 2004 > +++ parse.c Tue May 15 01:26:08 2007 > @@ -54,6 +54,7 @@ > int multimax; > int kindset; > int reportid; > + int isarray; > > /* > * The start of collection item has no report ID set, so save > @@ -100,6 +101,7 @@ > s->kindset = kindset; > s->reportid = id; > s->hassavedcoll = 0; > + s->isarray = 0; > return (s); > } > > @@ -182,6 +184,16 @@ > hid_clear_local(c); > } > } > + if(s->isarray) { > + REPORT_SAVED_COLL; > + *h = *c; > + h->next = 0; > + h->pos = s->kindpos[c->kind]; > + s->kindpos[c->kind] += c->report_size ; > + if(--s->isarray ==0) > + hid_clear_local(c); > + return(1); > + }; > for (;;) { > p = s->p; > if (p >= s->end) > @@ -262,14 +274,9 @@ > } else { > if (s->minset) > c->usage = c->usage_minimum; > - *h = *c; > - h->next = 0; > - h->pos = s->kindpos[c->kind]; > - s->kindpos[c->kind] += > - c->report_size * c->report_count; > - hid_clear_local(c); > s->minset = 0; > - return (1); > + s->isarray=c->report_count; > + goto top; > } > case 9: /* Output */ > retkind = hid_output; > > CU, > Sec From owner-freebsd-bluetooth@FreeBSD.ORG Tue May 15 14:22:52 2007 Return-Path: X-Original-To: bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 542C116A402 for ; Tue, 15 May 2007 14:22:52 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vbook.fbsd.ru (swsoft-mipt-nat.sw.ru [195.214.233.10]) by mx1.freebsd.org (Postfix) with ESMTP id 126EC13C46A for ; Tue, 15 May 2007 14:22:52 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.67 (FreeBSD)) (envelope-from ) id 1HnxUB-000BiZ-DX for bluetooth@freebsd.org; Tue, 15 May 2007 17:54:43 +0400 From: Vladimir Grebenschikov To: bluetooth Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: SWsoft Date: Tue, 15 May 2007 17:54:43 +0400 Message-Id: <1179237283.1397.25.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov Cc: Subject: Bluetooth Proximity Monitor on FreeBSD ? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2007 14:22:52 -0000 Hi Does anybody plays with scrips like that: http://gentoo-wiki.com/TIP_Bluetooth_Proximity_Monitor I guess it should be easy to patch it for FreeBSD, but probably somebody already did it ? -- Vladimir B. Grebenschikov SWsoft Inc. vova@swsoft.com From owner-freebsd-bluetooth@FreeBSD.ORG Wed May 16 05:20:06 2007 Return-Path: X-Original-To: bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7226016A403 for ; Wed, 16 May 2007 05:20:06 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id 46E9A13C455 for ; Wed, 16 May 2007 05:20:06 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from neutrino.centtech.com (andersonbox1.centtech.com [192.168.42.21]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id l4G4uSTU020604; Tue, 15 May 2007 23:56:29 -0500 (CDT) (envelope-from anderson@freebsd.org) Message-ID: <464A8EFC.7060308@freebsd.org> Date: Tue, 15 May 2007 23:56:28 -0500 From: Eric Anderson User-Agent: Thunderbird 2.0.0.0 (X11/20070420) MIME-Version: 1.0 To: Vladimir Grebenschikov References: <1179237283.1397.25.camel@localhost> In-Reply-To: <1179237283.1397.25.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/3250/Tue May 15 21:38:24 2007 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: bluetooth Subject: Re: Bluetooth Proximity Monitor on FreeBSD ? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2007 05:20:06 -0000 On 05/15/07 08:54, Vladimir Grebenschikov wrote: > Hi > > Does anybody plays with scrips like that: > http://gentoo-wiki.com/TIP_Bluetooth_Proximity_Monitor > > I guess it should be easy to patch it for FreeBSD, but probably somebody > already did it ? > Like this: http://www.googlebit.com/doku.php?id=bt_proximity Didn't take too long to do it up for FreeBSD, and works great!! Thanks for the nudge.. Eric From owner-freebsd-bluetooth@FreeBSD.ORG Wed May 16 08:37:22 2007 Return-Path: X-Original-To: bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC5C716A401 for ; Wed, 16 May 2007 08:37:22 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vbook.fbsd.ru (swsoft-mipt-nat.sw.ru [195.214.233.10]) by mx1.freebsd.org (Postfix) with ESMTP id 6354813C447 for ; Wed, 16 May 2007 08:37:22 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.67 (FreeBSD)) (envelope-from ) id 1HoF0a-000NBt-Id; Wed, 16 May 2007 12:37:20 +0400 From: Vladimir Grebenschikov To: Eric Anderson In-Reply-To: <464A8EFC.7060308@freebsd.org> References: <1179237283.1397.25.camel@localhost> <464A8EFC.7060308@freebsd.org> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Wed, 16 May 2007 12:37:20 +0400 Message-Id: <1179304640.45992.8.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov Cc: bluetooth Subject: Re: Bluetooth Proximity Monitor on FreeBSD ? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2007 08:37:22 -0000 =F7 =D7=D4, 15/05/2007 =D7 23:56 -0500, Eric Anderson =D0=C9=DB=C5=D4: > On 05/15/07 08:54, Vladimir Grebenschikov wrote: > > Hi > >=20 > > Does anybody plays with scrips like that: > > http://gentoo-wiki.com/TIP_Bluetooth_Proximity_Monitor > >=20 > > I guess it should be easy to patch it for FreeBSD, but probably somebod= y > > already did it ? > >=20 >=20 >=20 > Like this: >=20 > http://www.googlebit.com/doku.php?id=3Dbt_proximity >=20 > Didn't take too long to do it up for FreeBSD, and works great!! Requires a bit modification to work for me and finally works very unstable: # /usr/sbin/hccontrol -n ubt0hci create_connection e60 BD_ADDR: e60 Connection handle: 11 Encryption mode: Disabled [0] # /usr/sbin/hccontrol -n ubt0hci read_connection_list Remote BD_ADDR Handle Type Mode Role Encrypt Pending Queue State e60 11 ACL 0 MAST NONE 0 0 OPEN # /usr/sbin/hccontrol -n ubt0hci read_connection_list Remote BD_ADDR Handle Type Mode Role Encrypt Pending Queue State e60 11 ACL 0 MAST NONE 0 0 OPEN # /usr/sbin/hccontrol -n ubt0hci read_connection_list Remote BD_ADDR Handle Type Mode Role Encrypt Pending Queue State e60 11 ACL 0 MAST NONE 0 0 OPEN # /usr/sbin/hccontrol -n ubt0hci read_connection_list Remote BD_ADDR Handle Type Mode Role Encrypt Pending Queue State e60 11 ACL 0 MAST NONE 0 0 OPEN # /usr/sbin/hccontrol -n ubt0hci read_connection_list Remote BD_ADDR Handle Type Mode Role Encrypt Pending Queue State # dmesg | tail -n 1 ng_l2cap_lp_discon_ind: ubt0l2cap - unexpected LP_DisconnectInd event. Conn= ection does not exist, con_handle=3D11 # Connection expires somehow in ~5 secs after creation. Probably there is some way to do keep-alive connection ? My device is Nokia E60. PPP over telephone Bluetooth works more or less stable. Of course, I can just use l2ping or 'hccontrol Inquiry' to check device presence, but how to read signal quality in that case ? > Thanks for the nudge.. >=20 > Eric >=20 --=20 Vladimir B. Grebenschikov SWsoft Inc. vova@swsoft.com From owner-freebsd-bluetooth@FreeBSD.ORG Wed May 16 11:13:03 2007 Return-Path: X-Original-To: bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9CFAD16A404 for ; Wed, 16 May 2007 11:13:03 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh2.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id 6A0A613C455 for ; Wed, 16 May 2007 11:13:03 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from neutrino.centtech.com (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.8/8.13.8) with ESMTP id l4GBD1oA078239; Wed, 16 May 2007 06:13:01 -0500 (CDT) (envelope-from anderson@freebsd.org) Message-ID: <464AE73D.8010307@freebsd.org> Date: Wed, 16 May 2007 06:13:01 -0500 From: Eric Anderson User-Agent: Thunderbird 2.0.0.0 (X11/20070420) MIME-Version: 1.0 To: Vladimir Grebenschikov References: <1179237283.1397.25.camel@localhost> <464A8EFC.7060308@freebsd.org> <1179304640.45992.8.camel@localhost> In-Reply-To: <1179304640.45992.8.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV 0.88.4/3256/Wed May 16 03:40:07 2007 on mh2.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh2.centtech.com Cc: bluetooth Subject: Re: Bluetooth Proximity Monitor on FreeBSD ? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2007 11:13:03 -0000 On 05/16/07 03:37, Vladimir Grebenschikov wrote: > В вт, 15/05/2007 в 23:56 -0500, Eric Anderson пишет: >> On 05/15/07 08:54, Vladimir Grebenschikov wrote: >>> Hi >>> >>> Does anybody plays with scrips like that: >>> http://gentoo-wiki.com/TIP_Bluetooth_Proximity_Monitor >>> >>> I guess it should be easy to patch it for FreeBSD, but probably somebody >>> already did it ? >>> >> >> Like this: >> >> http://www.googlebit.com/doku.php?id=bt_proximity >> >> Didn't take too long to do it up for FreeBSD, and works great!! > > Requires a bit modification to work for me and finally works very > unstable: > > # /usr/sbin/hccontrol -n ubt0hci create_connection e60 > BD_ADDR: e60 > Connection handle: 11 > Encryption mode: Disabled [0] > # /usr/sbin/hccontrol -n ubt0hci read_connection_list > Remote BD_ADDR Handle Type Mode Role Encrypt Pending Queue State > e60 11 ACL 0 MAST NONE 0 0 OPEN > # /usr/sbin/hccontrol -n ubt0hci read_connection_list > Remote BD_ADDR Handle Type Mode Role Encrypt Pending Queue State > e60 11 ACL 0 MAST NONE 0 0 OPEN > # /usr/sbin/hccontrol -n ubt0hci read_connection_list > Remote BD_ADDR Handle Type Mode Role Encrypt Pending Queue State > e60 11 ACL 0 MAST NONE 0 0 OPEN > # /usr/sbin/hccontrol -n ubt0hci read_connection_list > Remote BD_ADDR Handle Type Mode Role Encrypt Pending Queue State > e60 11 ACL 0 MAST NONE 0 0 OPEN > # /usr/sbin/hccontrol -n ubt0hci read_connection_list > Remote BD_ADDR Handle Type Mode Role Encrypt Pending Queue State > # dmesg | tail -n 1 > ng_l2cap_lp_discon_ind: ubt0l2cap - unexpected LP_DisconnectInd event. Connection does not exist, con_handle=11 > # > > Connection expires somehow in ~5 secs after creation. > Probably there is some way to do keep-alive connection ? > > My device is Nokia E60. > > PPP over telephone Bluetooth works more or less stable. > > Of course, I can just use l2ping or 'hccontrol Inquiry' to check device > presence, but how to read signal quality in that case ? Hmm.. Seems as my Palm Treo 700p leaves the connection open as long as both are within range. If the polling is set less than 5 seconds, you should be able to add some kind of command (like the l2ping or whatever) right before it does the connection testing. That way each time it polls it renews the connection timeout. Did you try something like that? Eric From owner-freebsd-bluetooth@FreeBSD.ORG Wed May 16 17:11:01 2007 Return-Path: X-Original-To: bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C225A16A401 for ; Wed, 16 May 2007 17:11:01 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 787E513C4AE for ; Wed, 16 May 2007 17:11:01 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by an-out-0708.google.com with SMTP id d23so55083and for ; Wed, 16 May 2007 10:11:00 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EMZRB3uGcM5O84dYjf0vETGOywIcSbg1bdABF/mrfSOwqSjbwf9AH7SXysqJT2xVx2nkYeW+PYOEsmOYo8Me92cobKIEaW2kkvBUqSaRKmHIUt+VEBUOfnMPWKs+H1dQDKc0HwM6tQY4dD+MBmvFS9BSeuvIe3MFoZ3qt07qTY4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MPrPd5KV2de0KIF1DdcIRrEm0iwGWENitvbhwcX0GiiYqvqd4KV/F2hg1nQ8F7uGkW7eLaTATpN4hcDK8RTRl5uKnP10jhkYPCfm3vLkfQT22UQWtwSiKXVoc/SysjIywhaQ7j3FAgRzraxTjJHYHG1XfBOKrSzZVxPsVvQTZjk= Received: by 10.100.226.15 with SMTP id y15mr6333897ang.1179333929550; Wed, 16 May 2007 09:45:29 -0700 (PDT) Received: by 10.100.111.13 with HTTP; Wed, 16 May 2007 09:45:29 -0700 (PDT) Message-ID: Date: Wed, 16 May 2007 09:45:29 -0700 From: "Maksim Yevmenkin" To: "Vladimir Grebenschikov" In-Reply-To: <1179304640.45992.8.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: base64 Content-Disposition: inline References: <1179237283.1397.25.camel@localhost> <464A8EFC.7060308@freebsd.org> <1179304640.45992.8.camel@localhost> Cc: bluetooth Subject: Re: Bluetooth Proximity Monitor on FreeBSD ? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2007 17:11:01 -0000 T24gNS8xNi8wNywgVmxhZGltaXIgR3JlYmVuc2NoaWtvdiA8dm92YUBzdy5ydT4gd3JvdGU6Cj4g 9yDX1CwgMTUvMDUvMjAwNyDXIDIzOjU2IC0wNTAwLCBFcmljIEFuZGVyc29uINDJ28XUOgo+ID4g T24gMDUvMTUvMDcgMDg6NTQsIFZsYWRpbWlyIEdyZWJlbnNjaGlrb3Ygd3JvdGU6Cj4gPiA+IEhp Cj4gPiA+Cj4gPiA+IERvZXMgYW55Ym9keSBwbGF5cyB3aXRoIHNjcmlwcyBsaWtlIHRoYXQ6Cj4g PiA+IGh0dHA6Ly9nZW50b28td2lraS5jb20vVElQX0Js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WtlCgoxKSBoY2NvbnRyb2wgcmVhZF9jb25u ZWN0aW9uX2xpc3QgLS0tIGFuZCBzZWUgaWYgYmFzZWJhbmQgY29ubmVjdGlvbiBpcyBwcmVzZW50 CgoxLjEpIGlmIHByZXNlbnQsIHJlbWVtYmVyIGhhbmRsZQoKMS4yKSBpZiBub3QsIGhjY29udHJv bCBjcmVhdGVfY29ubmVjdGlvbiAtLSBhbmQgcmVtZW1iZXIgaGFuZGxlCgoyKSBoY2NvbnRyb2wg cmVhZF9yc3NpIDxoYW5kbGU+CgozKSBzbGVlcCBhbmQgcmVwZWF0Cgp0aGFua3MsCm1heAo= From owner-freebsd-bluetooth@FreeBSD.ORG Wed May 16 17:33:54 2007 Return-Path: X-Original-To: bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE20216A401; Wed, 16 May 2007 17:33:54 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vbook.fbsd.ru (swsoft-mipt-nat.sw.ru [195.214.233.10]) by mx1.freebsd.org (Postfix) with ESMTP id 97B1913C457; Wed, 16 May 2007 17:33:54 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.67 (FreeBSD)) (envelope-from ) id 1HoNNm-0000Tt-TQ; Wed, 16 May 2007 21:33:50 +0400 From: Vladimir Grebenschikov To: Maksim Yevmenkin In-Reply-To: References: <1179237283.1397.25.camel@localhost> <464A8EFC.7060308@freebsd.org> <1179304640.45992.8.camel@localhost> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Wed, 16 May 2007 21:33:49 +0400 Message-Id: <1179336829.1498.9.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov Cc: bluetooth Subject: Re: Bluetooth Proximity Monitor on FreeBSD ? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2007 17:33:55 -0000 =F7 =D3=D2, 16/05/2007 =D7 09:45 -0700, Maksim Yevmenkin =D0=C9=DB=C5=D4: > > Connection expires somehow in ~5 secs after creation. > > Probably there is some way to do keep-alive connection ? > > > > My device is Nokia E60. >=20 > run hcidump and see who initiated disconnect. my guess, its your nokia > phone kills baseband after some period of inactivity. if that is the > case then you have to use l2ping or something else. the idea is to > keep sending stuff over baseband connection to keep it alive. Hm, l2ping does not helps (output just after connecting): # l2ping -a e60 0 bytes from e60 seq_no=3D0 time=3D65.077 ms result=3D0=20 0 bytes from e60 seq_no=3D1 time=3D52.096 ms result=3D0=20 0 bytes from e60 seq_no=3D2 time=3D54.053 ms result=3D0=20 0 bytes from e60 seq_no=3D3 time=3D42.082 ms result=3D0=20 0 bytes from e60 seq_no=3D4 time=3D42.151 ms result=3D0=20 0 bytes from e60 seq_no=3D5 time=3D5129.224 ms result=3D0x4 <<< connection lost here=20 ... hcidump (without l2ping): # hcidump -xt HCIDump - HCI packet analyzer ver 1.5 device: any snap_len: 65535 filter: 0xffffffff 1179336718.824335 < HCI Command: Create Connection(0x01|0x0005) plen 13 36 E3 48 D1 12 00 18 4C 00 00 00 00 01=20 1179336718.827102 > HCI Event: Command Status(0x0f) plen 4 00 01 05 04=20 1179336719.858619 > HCI Event: Connect Complete(0x03) plen 11 00 0B 00 36 E3 48 D1 12 00 01 00=20 1179336719.858674 < HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4 0B 00 0F 00=20 1179336719.861166 > HCI Event: Command Complete(0x0e) plen 6 01 0D 08 00 0B 00=20 1179336719.881159 > HCI Event: Max Slots Change(0x1b) plen 3 0B 00 05=20 1179336729.090790 > HCI Event: Disconn Complete(0x05) plen 4 00 0B 00 13=20 # > > PPP over telephone Bluetooth works more or less stable. > > > > Of course, I can just use l2ping or 'hccontrol Inquiry' to check device > > presence, but how to read signal quality in that case ? >=20 > bluetooth 2.0 defines 'inquiry with rssi' command. of course your > nokia phone should be 'visible/discoverable'. someone was working on > making bluetooth 2.0 commands available in hccontrol. inquiry is relatively long command, no I'm trying to avoid deal with it for just proximity monitor. Probably some obex activity will make connection keep-alive ? > of course you could always do something like >=20 > 1) hccontrol read_connection_list --- and see if baseband connection is p= resent >=20 > 1.1) if present, remember handle >=20 > 1.2) if not, hccontrol create_connection -- and remember handle >=20 > 2) hccontrol read_rssi >=20 > 3) sleep and repeat Yes, it is possible. > thanks, > max >=20 --=20 Vladimir B. Grebenschikov SWsoft Inc. vova@swsoft.com From owner-freebsd-bluetooth@FreeBSD.ORG Wed May 16 19:26:55 2007 Return-Path: X-Original-To: bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3CCD816A400 for ; Wed, 16 May 2007 19:26:55 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.230]) by mx1.freebsd.org (Postfix) with ESMTP id DE57C13C45D for ; Wed, 16 May 2007 19:26:54 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by wr-out-0506.google.com with SMTP id 70so315677wra for ; Wed, 16 May 2007 12:26:54 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=uK4akdWs2vwqDY70na/vW/q6Dgsrfk5xEz3/q6WoD/frL2jDT1vSPRDzX4BCVfBt6UYG/nofHPtX12j+innE/AHV7BLAXKqzXegeLcwYdofyeQC8QtRqWyIPilJpdfaavy5aqBeEpErAcptNBly15NhcZe0X7BFbkXg1y1clmQo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=E6wd+7B2N2U+tcNoS2z6M+aSx7dRFI3youjKC/ygJhthWlOKM0+rmd/Ud+bJPJgRfnpqBeJ1Y/soUbAGWcIr5hE5tIBzcvNJ0Ccm8meWegnTOlPB5VY/as3CRtl5u99NN6UkOaS44mLzDZ3B4564R7sYFY2ZFxmbf63nVUJpFVA= Received: by 10.100.57.14 with SMTP id f14mr6646798ana.1179343613896; Wed, 16 May 2007 12:26:53 -0700 (PDT) Received: by 10.100.111.13 with HTTP; Wed, 16 May 2007 12:26:53 -0700 (PDT) Message-ID: Date: Wed, 16 May 2007 12:26:53 -0700 From: "Maksim Yevmenkin" To: "Vladimir Grebenschikov" In-Reply-To: <1179336829.1498.9.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: base64 Content-Disposition: inline References: <1179237283.1397.25.camel@localhost> <464A8EFC.7060308@freebsd.org> <1179304640.45992.8.camel@localhost> <1179336829.1498.9.camel@localhost> Cc: bluetooth Subject: Re: Bluetooth Proximity Monitor on FreeBSD ? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2007 19:26:55 -0000 T24gNS8xNi8wNywgVmxhZGltaXIgR3JlYmVuc2NoaWtvdiA8dm92YUBzdy5ydT4gd3JvdGU6Cj4g 9yDT0iwgMTYvMDUvMjAwNyDXIDA5OjQ1IC0wNzAwLCBNYWtzaW0gWWV2bWVua2luINDJ28XUOgo+ Cj4gPiA+IENvbm5lY3Rpb24gZXhwaXJlcyBzb21laG93IGluIH41IHNlY3MgYWZ0ZXIgY3JlYXRp b24uCj4gPiA+IFByb2JhYmx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gweDAzKSBwbGVu IDExCj4gICAwMCAwQiAwMCAzNiBFMyA0OCBEMSAxMiAwMCAwMSAwMAo+IDExNzkzMzY3MTkuODU4 Njc0IDwgSENJIENvbW1hbmQ6IFdyaXRlIExpbmsgUG9saWN5IFNldHRpbmdzKDB4MDJ8MHgwMDBk KQo+IHBsZW4gNAo+ICAgMEIgMDAgMEYgMDAKPiAxMTc5MzM2NzE5Ljg2MTE2NiA+IEhDSSBFdmVu dDogQ29tbWFuZCBDb21wbGV0ZSgweDBlKSBwbGVuIDYKPiAgIDAxIDBEIDA4IDAwIDBCIDAwCj4g MTE3OTMzNjcxOS44ODExNTkgPiBIQ0kgRXZlbnQ6IE1heCBTbG90cyBDaGFuZ2UoMHgxYikgcGxl biAzCj4gICAwQiAwMCAwNQo+IDExNzkzMzY3MjkuMDkwNzkwID4gSENJIEV2ZW50OiBEaXNjb25u IENvbXBsZXRlKDB4MDUpIHBsZW4gNAo+ICAgMDAgMEIgMDAgMTMKPiAjCgp5ZXAsIGl0IHNlZW1z IGxpa2Ugbm9raWEga2lsbHMgYmFzZWJhbmQgOigKCnRoYW5rcywKbWF4Cg== From owner-freebsd-bluetooth@FreeBSD.ORG Wed May 16 19:37:03 2007 Return-Path: X-Original-To: bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 427E416A400; Wed, 16 May 2007 19:37:03 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vbook.fbsd.ru (swsoft-mipt-nat.sw.ru [195.214.233.10]) by mx1.freebsd.org (Postfix) with ESMTP id D004B13C44C; Wed, 16 May 2007 19:37:02 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.67 (FreeBSD)) (envelope-from ) id 1HoPIy-0004wX-Ed; Wed, 16 May 2007 23:37:00 +0400 From: Vladimir Grebenschikov To: Maksim Yevmenkin In-Reply-To: References: <1179237283.1397.25.camel@localhost> <464A8EFC.7060308@freebsd.org> <1179304640.45992.8.camel@localhost> <1179336829.1498.9.camel@localhost> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Wed, 16 May 2007 23:36:59 +0400 Message-Id: <1179344219.1498.20.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov Cc: bluetooth Subject: Re: Bluetooth Proximity Monitor on FreeBSD ? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2007 19:37:03 -0000 =F7 =D3=D2, 16/05/2007 =D7 12:26 -0700, Maksim Yevmenkin =D0=C9=DB=C5=D4: > On 5/16/07, Vladimir Grebenschikov wrote: > > =F7 =D3=D2, 16/05/2007 =D7 09:45 -0700, Maksim Yevmenkin =D0=C9=DB=C5= =D4: > > > > > > Connection expires somehow in ~5 secs after creation. > > > > Probably there is some way to do keep-alive connection ? > > > > > > > > My device is Nokia E60. > > > > > > run hcidump and see who initiated disconnect. my guess, its your noki= a > > > phone kills baseband after some period of inactivity. if that is the > > > case then you have to use l2ping or something else. the idea is to > > > keep sending stuff over baseband connection to keep it alive. > > > > Hm, l2ping does not helps (output just after connecting): > > # l2ping -a e60 > > 0 bytes from e60 seq_no=3D0 time=3D65.077 ms result=3D0 > > 0 bytes from e60 seq_no=3D1 time=3D52.096 ms result=3D0 > > 0 bytes from e60 seq_no=3D2 time=3D54.053 ms result=3D0 > > 0 bytes from e60 seq_no=3D3 time=3D42.082 ms result=3D0 > > 0 bytes from e60 seq_no=3D4 time=3D42.151 ms result=3D0 > > 0 bytes from e60 seq_no=3D5 time=3D5129.224 ms result=3D0x4 <<< connec= tion > > lost here > > ... >=20 > well, that is just weird. while zero bytes response is normal (for > nokia's), killing baseband connection while l2ping (in other words > l2cap control channel) is active, is just does not make any sense. can > you provide hcidump with l2ping active? i'd like to see who is killing > baseband. # hcidump -xt HCIDump - HCI packet analyzer ver 1.5 device: any snap_len: 65535 filter: 0xffffffff 1179344009.007333 < HCI Command: Create Connection(0x01|0x0005) plen 13 36 E3 48 D1 12 00 18 CC 00 00 00 00 01=20 1179344009.010333 > HCI Event: Command Status(0x0f) plen 4 00 01 05 04=20 1179344009.744420 > HCI Event: Connect Complete(0x03) plen 11 00 0B 00 36 E3 48 D1 12 00 01 00=20 1179344009.744434 < HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4 0B 00 0F 00=20 1179344009.744443 < ACL data: handle 0x000b flags 0x02 dlen 52 L2CAP(s): Echo req: dlen 44 00 00 00 00 35 36 37 38 39 30 2D 31 32 33 34 35 36 37 38 39=20 30 2D 31 32 33 34 35 36 37 38 39 30 2D 31 32 33 34 35 36 37=20 38 39 30 2D=20 1179344009.745326 > HCI Event: Command Complete(0x0e) plen 6 01 0D 08 00 0B 00=20 1179344009.766310 > HCI Event: Max Slots Change(0x1b) plen 3 0B 00 05=20 1179344009.890323 > ACL data: handle 0x000b flags 0x02 dlen 8 L2CAP(s): Echo rsp: dlen 0 1179344009.896345 > HCI Event: Number of Completed Packets(0x13) plen 5 01 0B 00 01 00=20 1179344010.891077 < ACL data: handle 0x000b flags 0x02 dlen 52 L2CAP(s): Echo req: dlen 44 00 00 00 01 35 36 37 38 39 30 2D 31 32 33 34 35 36 37 38 39=20 30 2D 31 32 33 34 35 36 37 38 39 30 2D 31 32 33 34 35 36 37=20 38 39 30 2D=20 1179344010.951285 > ACL data: handle 0x000b flags 0x02 dlen 8 L2CAP(s): Echo rsp: dlen 0 1179344011.133469 < HCI Command: Create Connection(0x01|0x0005) plen 13 36 E3 48 D1 12 00 18 4C 00 00 00 00 01=20 1179344011.134318 > HCI Event: Command Status(0x0f) plen 4 0B 01 05 04=20 1179344011.145286 > HCI Event: Number of Completed Packets(0x13) plen 5 01 0B 00 01 00=20 1179344011.952045 < ACL data: handle 0x000b flags 0x02 dlen 52 L2CAP(s): Echo req: dlen 44 00 00 00 02 35 36 37 38 39 30 2D 31 32 33 34 35 36 37 38 39=20 30 2D 31 32 33 34 35 36 37 38 39 30 2D 31 32 33 34 35 36 37=20 38 39 30 2D=20 1179344012.008275 > ACL data: handle 0x000b flags 0x02 dlen 8 L2CAP(s): Echo rsp: dlen 0 1179344012.145298 > HCI Event: Number of Completed Packets(0x13) plen 5 01 0B 00 01 00=20 1179344013.009054 < ACL data: handle 0x000b flags 0x02 dlen 52 L2CAP(s): Echo req: dlen 44 00 00 00 03 35 36 37 38 39 30 2D 31 32 33 34 35 36 37 38 39=20 30 2D 31 32 33 34 35 36 37 38 39 30 2D 31 32 33 34 35 36 37=20 38 39 30 2D=20 1179344013.071313 > ACL data: handle 0x000b flags 0x02 dlen 8 L2CAP(s): Echo rsp: dlen 0 1179344013.270323 > HCI Event: Number of Completed Packets(0x13) plen 5 01 0B 00 01 00=20 1179344014.072079 < ACL data: handle 0x000b flags 0x02 dlen 52 L2CAP(s): Echo req: dlen 44 00 00 00 04 35 36 37 38 39 30 2D 31 32 33 34 35 36 37 38 39=20 30 2D 31 32 33 34 35 36 37 38 39 30 2D 31 32 33 34 35 36 37=20 38 39 30 2D=20 1179344014.135304 > ACL data: handle 0x000b flags 0x02 dlen 8 L2CAP(s): Echo rsp: dlen 0 1179344014.270322 > HCI Event: Number of Completed Packets(0x13) plen 5 01 0B 00 01 00=20 1179344015.058336 > HCI Event: Disconn Complete(0x05) plen 4 00 0B 00 13=20 1179344015.136021 < HCI Command: Create Connection(0x01|0x0005) plen 13 36 E3 48 D1 12 00 18 CC 00 00 00 00 01=20 1179344015.137302 > HCI Event: Command Status(0x0f) plen 4 00 01 05 04=20 1179344020.265307 > HCI Event: Connect Complete(0x03) plen 11 04 0B 00 36 E3 48 D1 12 00 01 00=20 1179344021.266433 < HCI Command: Create Connection(0x01|0x0005) plen 13 36 E3 48 D1 12 00 18 CC 00 00 00 00 01=20 1179344021.268281 > HCI Event: Command Status(0x0f) plen 4 00 01 05 04=20 1179344022.535338 > HCI Event: Connect Complete(0x03) plen 11 00 0B 00 36 E3 48 D1 12 00 01 00=20 1179344022.535348 < HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4 0B 00 0F 00=20 1179344022.535363 < ACL data: handle 0x000b flags 0x02 dlen 52 L2CAP(s): Echo req: dlen 44 00 00 00 06 35 36 37 38 39 30 2D 31 32 33 34 35 36 37 38 39=20 30 2D 31 32 33 34 35 36 37 38 39 30 2D 31 32 33 34 35 36 37=20 38 39 30 2D=20 1179344022.538258 > HCI Event: Command Complete(0x0e) plen 6 01 0D 08 00 0B 00=20 1179344022.558262 > HCI Event: Max Slots Change(0x1b) plen 3 0B 00 05=20 1179344022.705290 > ACL data: handle 0x000b flags 0x02 dlen 8 L2CAP(s): Echo rsp: dlen 0 1179344022.770280 > HCI Event: Number of Completed Packets(0x13) plen 5 01 0B 00 01 00=20 1179344023.706407 < ACL data: handle 0x000b flags 0x02 dlen 52 L2CAP(s): Echo req: dlen 44 00 00 00 07 35 36 37 38 39 30 2D 31 32 33 34 35 36 37 38 39=20 30 2D 31 32 33 34 35 36 37 38 39 30 2D 31 32 33 34 35 36 37=20 38 39 30 2D=20 1179344023.763282 > ACL data: handle 0x000b flags 0x02 dlen 8 L2CAP(s): Echo rsp: dlen 0 1179344023.895291 > HCI Event: Number of Completed Packets(0x13) plen 5 01 0B 00 01 00=20 ^C > btw, but if you let l2ping to continue to run it should re-establish > baseband connection again. Yes, every ~5s it timeouts and then it re-establish connection and then gets several replays with usual delay # /usr/sbin/hccontrol -n ubt0hci read_connection_list Remote BD_ADDR Handle Type Mode Role Encrypt Pending Queue State e60 3869 ACL 0 MAST NONE 0 0 W4_CONN_COMPLETE ... 0 bytes from e60 seq_no=3D47 time=3D1162.826 ms result=3D0=20 0 bytes from e60 seq_no=3D48 time=3D68.149 ms result=3D0=20 0 bytes from e60 seq_no=3D49 time=3D45.690 ms result=3D0=20 0 bytes from e60 seq_no=3D50 time=3D50.061 ms result=3D0=20 0 bytes from e60 seq_no=3D51 time=3D65.745 ms result=3D0=20 0 bytes from e60 seq_no=3D52 time=3D1142.827 ms result=3D0=20 0 bytes from e60 seq_no=3D53 time=3D62.854 ms result=3D0=20 0 bytes from e60 seq_no=3D54 time=3D42.855 ms result=3D0=20 0 bytes from e60 seq_no=3D55 time=3D58.678 ms result=3D0=20 0 bytes from e60 seq_no=3D56 time=3D51.960 ms result=3D0=20 0 bytes from e60 seq_no=3D57 time=3D1183.973 ms result=3D0=20 0 bytes from e60 seq_no=3D58 time=3D57.024 ms result=3D0=20 0 bytes from e60 seq_no=3D59 time=3D55.461 ms result=3D0=20 0 bytes from e60 seq_no=3D60 time=3D58.316 ms result=3D0=20 0 bytes from e60 seq_no=3D61 time=3D42.456 ms result=3D0=20 0 bytes from e60 seq_no=3D62 time=3D5129.594 ms result=3D0x4=20 0 bytes from e60 seq_no=3D63 time=3D1497.149 ms result=3D0=20 ... > yep, it seems like nokia kills baseband :( Any hint how encourage it to keep connection ? > thanks, > max >=20 --=20 Vladimir B. Grebenschikov SWsoft Inc. vova@swsoft.com From owner-freebsd-bluetooth@FreeBSD.ORG Wed May 16 21:03:50 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E6A1A16A403 for ; Wed, 16 May 2007 21:03:50 +0000 (UTC) (envelope-from sec@42.org) Received: from ice.42.org (ice.42.org [194.77.85.2]) by mx1.freebsd.org (Postfix) with ESMTP id 9F6F013C483 for ; Wed, 16 May 2007 21:03:49 +0000 (UTC) (envelope-from sec@42.org) Received: by ice.42.org (Postfix, from userid 1000) id EEB57C46E; Wed, 16 May 2007 23:03:47 +0200 (CEST) Date: Wed, 16 May 2007 23:03:47 +0200 From: Stefan `Sec` Zehl To: Maksim Yevmenkin Message-ID: <20070516210347.GC40029@ice.42.org> X-Current-Backlog: 2716 messages References: <20070513140148.GA24803@ice.42.org> <20070514082040.GB24803@ice.42.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i I-love-doing-this: really X-Modeline: vim:set ts=8 sw=4 smarttab tw=72 si noic notitle: Accept-Languages: de, en X-URL: http://sec.42.org/ Cc: freebsd-bluetooth@freebsd.org Subject: Re: send something TO a hid device X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2007 21:03:51 -0000 --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, On Mon, May 14, 2007 at 10:41 -0700, Maksim Yevmenkin wrote: > again, you do not really need a device. socket will do just fine. > local client(s) can connect to the bthidd and identify which hid > device it (they) will be taking to, i.e. tell hid device's bd_addr. > then client(s) simply sends hid reports to the bthidd via socket and > it will relay them the hid device via bluetooth. I have a first (rudimentary) version. The patch is below, any comments would be appreciated. It addas a new commandline option "-b" which makes bthidd listen on port 12345. I think, either the port number to listen on should be configurable, or it should perhaps better listen on a unix domain socket "/tmp/.bthidd-socket" or somesuch. It can currently only cope with one backchannel connection at a time. This could be changed, if anyone thinks keeping it that way would be too limiting. There is only one interesting command implemented: "raw BD_ADDR hexbytes" which simply sends the hexbytes to that device. I'm currently thinking about sending the device answer back over the tcp channel. At least the media pad has query functions, too. CU, Sec -- "Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws." - Plato(?) (427-347 B.C.) --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bthidd_backchannel.diff" --- bthidd.c.org Mon Oct 9 23:00:17 2006 +++ bthidd.c Wed May 16 02:45:30 2007 @@ -66,14 +66,15 @@ struct sigaction sa; char const *pid_file = BTHIDD_PIDFILE; char *ep; - int32_t opt, detach, tval; + int32_t opt, detach, tval, do_backchannel; memset(&srv, 0, sizeof(srv)); memset(&srv.bdaddr, 0, sizeof(srv.bdaddr)); detach = 1; tval = 10; /* sec */ + do_backchannel=0; - while ((opt = getopt(argc, argv, "a:c:dH:hp:t:")) != -1) { + while ((opt = getopt(argc, argv, "a:bc:dH:hp:t:")) != -1) { switch (opt) { case 'a': /* BDADDR */ if (!bt_aton(optarg, &srv.bdaddr)) { @@ -85,6 +86,9 @@ memcpy(&srv.bdaddr, he->h_addr, sizeof(srv.bdaddr)); } break; + case 'b': /* enable backchannel */ + do_backchannel=1; + break; case 'c': /* config file */ config_file = optarg; @@ -153,6 +157,9 @@ if (read_config_file() < 0 || read_hids_file() < 0 || server_init(&srv) < 0 || write_pid_file(pid_file) < 0) + exit(1); + + if (do_backchannel && backchannel_init(&srv) < 0) exit(1); for (done = 0; !done; ) { --- bthidd.h.org Mon Oct 9 23:00:17 2006 +++ bthidd.h Tue May 15 23:29:54 2007 @@ -45,6 +45,8 @@ int32_t cons; /* /dev/consolectl */ int32_t ctrl; /* control channel (listen) */ int32_t intr; /* intr. channel (listen) */ + int32_t back; /* backchannel (listen) */ + int32_t backconn; /* backchannel (connected) */ int32_t maxfd; /* max fd in sets */ fd_set rfdset; /* read descriptor set */ fd_set wfdset; /* write descriptor set */ @@ -78,6 +80,8 @@ void server_shutdown (bthid_server_p srv); int32_t server_do (bthid_server_p srv); +int32_t backchannel_init (bthid_server_p srv); + int32_t client_rescan (bthid_server_p srv); int32_t client_connect (bthid_server_p srv, int fd); @@ -85,6 +89,7 @@ bthid_session_p session_by_bdaddr(bthid_server_p srv, bdaddr_p bdaddr); bthid_session_p session_by_fd (bthid_server_p srv, int32_t fd); void session_close (bthid_session_p s); +void backchannel_close(bthid_server_p srv); int32_t hid_control (bthid_session_p s, uint8_t *data, int32_t len); int32_t hid_interrupt (bthid_session_p s, uint8_t *data, int32_t len); --- server.c.org Mon Oct 9 23:00:17 2006 +++ server.c Wed May 16 02:48:36 2007 @@ -46,6 +46,8 @@ #include "bthid_config.h" #include "bthidd.h" #include "kbd.h" +#include +#include #undef max #define max(x, y) (((x) > (y))? (x) : (y)) @@ -53,6 +55,9 @@ static int32_t server_accept (bthid_server_p srv, int32_t fd); static int32_t server_process(bthid_server_p srv, int32_t fd); +static int32_t backchannel_accept (bthid_server_p srv, int32_t fd); +static int32_t backchannel_process(bthid_server_p srv, int32_t fd); + /* * Initialize server */ @@ -164,6 +169,45 @@ } /* + * Create backchannel socket + */ + +int32_t +backchannel_init(bthid_server_p srv) +{ + struct sockaddr_in sin; + bzero(&sin, sizeof (struct sockaddr_in)); + int x=1; + + sin.sin_family = AF_INET; + sin.sin_port = htons(12345); +// inet_aton("194.77.85.2",&sin.sin_addr); + + srv->back = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if(srv->back<0){ + syslog(LOG_ERR, "Could not create backchannel socket. " \ + "%s (%d)", strerror(errno), errno); + return (-1); + }; + if (bind(srv->back, (struct sockaddr*)&sin, sizeof (struct sockaddr)) < 0){ + syslog(LOG_ERR, "Could not bind backchannel socket. " \ + "%s (%d)", strerror(errno), errno); + return (-1); + }; + setsockopt(srv->back,SOL_SOCKET,SO_REUSEADDR,&x,sizeof(x)); + if(listen(srv->back,1)<0){ + syslog(LOG_ERR, "Could not listen on backchannel socket. " \ + "%s (%d)", strerror(errno), errno); + return (-1); + }; + + FD_SET(srv->back, &srv->rfdset); + srv->maxfd = max(srv->back, srv->maxfd); + + return(0); +} + +/* * Do one server iteration */ @@ -201,6 +245,10 @@ if (fd == srv->ctrl || fd == srv->intr) server_accept(srv, fd); + else if (fd == srv->back) + backchannel_accept(srv, fd); + else if (fd == srv->backconn) + backchannel_process(srv, fd); else server_process(srv, fd); } else if (FD_ISSET(fd, &wfdset)) { @@ -290,6 +338,44 @@ } /* + * Accept new backchannel connection + */ + +static int32_t +backchannel_accept(bthid_server_p srv, int32_t fd) +{ + int32_t new_fd; + struct sockaddr_in addr; + socklen_t len; + const char *data="ERR: Only one connection at a time.\n"; + + len = sizeof(addr); + if ((new_fd = accept(fd, (struct sockaddr*)&addr, &len)) < 0) { + syslog(LOG_ERR, "Could not accept backchannel connection. %s (%d)", + strerror(errno), errno); + return (-1); + } + + if(srv->backconn){ + syslog(LOG_NOTICE, "Refused second backchannel connection."); + write(new_fd,data,strlen(data)); + close(new_fd); + return(-1); + }; + + FD_SET(new_fd, &srv->rfdset); + if (new_fd > srv->maxfd) + srv->maxfd = new_fd; + + srv->backconn=new_fd; + + syslog(LOG_NOTICE, "Accepted backchannel connection from %s", + inet_ntoa(addr.sin_addr)); + + return(0); +}; + +/* * Process data on the connection */ @@ -345,5 +431,134 @@ (*cb)(s, (uint8_t *) &data, len); return (0); +} + +/* + * Process command on the backchannel connection + */ + +static int32_t +backchannel_process(bthid_server_p srv, int32_t fd) +{ + uint8_t data[1024]; + int32_t len, to_read; + char *p, *word; + const char *out; + bdaddr_t bdaddr; + + to_read = sizeof(data); + + do { + len = read(fd, &data, to_read); + } while (len < 0 && errno == EINTR); + + if (len < 0) { + syslog(LOG_ERR, "Could not read data from backchannel. %s (%d)", + strerror(errno), errno); + backchannel_close(srv); + return (0); + } + + if (len == 0) { + syslog(LOG_NOTICE, "Backchannel has closed connection"); + backchannel_close(srv); + return (0); + } + + data[len]=0; + p=data; +#define OPTION(x) ( (!strncasecmp(p, x, strlen(x))) && (p += strlen(x)) ) + out=NULL; + if( OPTION("raw ")){ + bthid_session_p s; +#define MAXOUTLEN 22 + uint8_t outb[MAXOUTLEN]; + uint8_t val=0,idx=0; + char shift=0; + + word=p; + for(word=p;*p && *p!=' ';p++); + if(!*p){ + out="ERR: Missing parameter.\n"; + goto err; + }; + *p=0; + if (!bt_aton(word, &bdaddr)) { + struct hostent *he; + + if ((he = bt_gethostbyname(word)) == NULL){ + out="ERR: Can't parse BD_ADDR.\n"; + goto err; + }; + memcpy(&bdaddr, he->h_addr, sizeof(bdaddr)); + } + s=session_by_bdaddr(srv,&bdaddr); + if(s==NULL || s->intr == 0){ + out="ERR: Device not connected\n"; + goto err; + }; + for(p++;*p;p++){ + shift=4-shift; + if(*p>='0' && *p <= '9') + val=val|((*p-'0')<='a' && *p <= 'f') + val=val|((*p-'a'+10)<='A' && *p <= 'F') + val=val|((*p-'A'+10)<intr,outb,idx)<0){ + syslog(LOG_ERR, "Backchannel write failed: " \ + "%s (%d).", strerror(errno), errno); + out="ERR: Write failed.\n"; + goto err; + } + out="OK: Sent.\n"; + + }else if(OPTION("quit")){ + syslog(LOG_NOTICE, "closing backchannel connection"); + backchannel_close(srv); + return (0); + }else if(OPTION("help")){ + out="ERR: Commands:\n" + "ERR: - raw BD_ADDR hexstring.\n" + "ERR: - help\n"; + "ERR: - quit\n"; + }else{ + out="ERR: Unknown command. Try help.\n"; + }; +err: + if(out) + write(srv->backconn,out,strlen(out)); } --- session.c.org Mon Oct 9 23:00:17 2006 +++ session.c Tue May 15 23:17:53 2007 @@ -182,3 +182,15 @@ free(s); } +/* + * Close backchannel + */ + +void +backchannel_close(bthid_server_p srv) +{ + FD_CLR(srv->backconn, &srv->rfdset); + FD_CLR(srv->backconn, &srv->wfdset); + close(srv->backconn); + srv->backconn=0; +} --NzB8fVQJ5HfG6fxh-- From owner-freebsd-bluetooth@FreeBSD.ORG Wed May 16 22:39:00 2007 Return-Path: X-Original-To: bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C94516A404 for ; Wed, 16 May 2007 22:39:00 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247]) by mx1.freebsd.org (Postfix) with ESMTP id 58C2C13C45D for ; Wed, 16 May 2007 22:39:00 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by an-out-0708.google.com with SMTP id d23so82456and for ; Wed, 16 May 2007 15:38:59 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Fkc2dKbb23O0Oxvpa8mLKjgzoyuUzdHu5ByhlKoUE8ZKHdwCK1G74yL8RAQtQ64Tw2DcmiOWfF2MGySCqscF8wA5jGV0qQn3iZT8CFYzsfl1rCaeP/HBCVA1xNReH48oX/z+PolJRe/UpluKmgMxGboFYlz6qQiIuVtRjP4kRzc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kfhbpqF3j7TKWt8GoybhWNk5KbMpuk9Ilivn07+jWV/ry2rwTYz2ZUGDnrZKqTCl7sb6/M8JKqMyFsiHa2tLGEH1YkSYlbMItma3UIFcl4/kvlph4Vrsl7i5HfQlE/cfVEaZr1hSR3AN3KNomMX3kzL6qC5h4bUXSsvIqOcVMEc= Received: by 10.101.66.11 with SMTP id t11mr6893160ank.1179355139124; Wed, 16 May 2007 15:38:59 -0700 (PDT) Received: by 10.100.111.13 with HTTP; Wed, 16 May 2007 15:38:59 -0700 (PDT) Message-ID: Date: Wed, 16 May 2007 15:38:59 -0700 From: "Maksim Yevmenkin" To: "Vladimir Grebenschikov" In-Reply-To: <1179344219.1498.20.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: base64 Content-Disposition: inline References: <1179237283.1397.25.camel@localhost> <464A8EFC.7060308@freebsd.org> <1179304640.45992.8.camel@localhost> <1179336829.1498.9.camel@localhost> <1179344219.1498.20.camel@localhost> Cc: bluetooth Subject: Re: Bluetooth Proximity Monitor on FreeBSD ? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2007 22:39:00 -0000 T24gNS8xNi8wNywgVmxhZGltaXIgR3JlYmVuc2NoaWtvdiA8dm92YUBzdy5ydT4gd3JvdGU6Cj4g 9yDT0iwgMTYvMDUvMjAwNyDXIDEyOjI2IC0wNzAwLCBNYWtzaW0gWWV2bWVua2luINDJ28XUOgo+ ID4gT24gNS8xNi8wNywgVmxhZGltaXIgR3JlYmVuc2NoaWtvdiA8dm92YUBzdy5ydT4gd3JvdGU6 Cj4gPiA+IPcg09IsIDE2LzA1LzIwMDcg1yAwOTo0NSAtMDcwMCwgTWFrc2ltIFlldm1lbmtpbiDQ ydvF1DoKPiA+ID4KPiA+ID4gPiA+IENvbm5lY3Rpb24gZXhwaXJlcyBzb21laG93IGluIH41IHNl Y3MgYWZ0ZXIgY3JlYXRpb24uCj4gPiA+ID4gPiBQcm9iYWJseSB0aGVyZSBpcyBzb21lIHdheSB0 byBkbyBrZWVwLWFsaXZlIGNvbm5lY3Rpb24gPwo+ID4gPiA+ID4KPiA+ID4gPiA+IE15IGRldmlj ZSBpcyBOb2tpYSBFNjAuCj4gPiA+ID4KPiA+ID4gPiBydW4gaGNpZHVtcCBhbmQgc2VlIHdobyBp bml0aWF0ZWQgZGlzY29ubmVjdC4gbXkgZ3Vlc3MsIGl0cyB5b3VyIG5va2lhCj4gPiA+ID4gcGhv bmUga2lsbHMgYmFzZWJhbmQgYWZ0ZXIgc29tZSBwZXJpb2Qgb2YgaW5hY3Rpdml0eS4gaWYgdGhh dCBpcyB0aGUKPiA+ID4gPiBjYXNlIHRoZW4geW91IGhhdmUgdG8gdXNlIGwycGluZyBvciBzb21l dGhpbmcgZWxzZS4gdGhlIGlkZWEgaXMgdG8KPiA+ID4gPiBrZWVwIHNlbmRpbmcgc3R1ZmYgb3Zl ciBiYXNlYmFuZCBjb25uZW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XN1bHQ9MAo+IDAgYnl0ZXMgZnJvbSBlNjAg c2VxX25vPTYyIHRpbWU9NTEyOS41OTQgbXMgcmVzdWx0PTB4NAo+IDAgYnl0ZXMgZnJvbSBlNjAg c2VxX25vPTYzIHRpbWU9MTQ5Ny4xNDkgbXMgcmVzdWx0PTAKPiAuLi4KPgo+ID4geWVwLCBpdCBz ZWVtcyBsaWtlIG5va2lhIGtpbGxzIGJhc2ViYW5kIDooCj4KPiBBbnkgaGludCBob3cgZW5jb3Vy YWdlIGl0IHRvIGtlZXAgY29ubmVjdGlvbiA/CgppIGRvIG5vdCB0aGluayB0aGVyZSBpcyBhIHdh eSBkbyB0byBpdCBvdGhlciB0aGFuIHVzaW5nIGJsdWV0b290aApzZXJ2aWNlcyBvbiB0aGUgcGhv bmUsIGZvciBleGFtcGxlIGtlZXAgcmZjb21tIGxpbmsgb3BlbiAoaS5lLiBjb25uZWN0CnRvIHNl cmlhbCBwb3J0IHNlcnZpY2UpLgoKdGhhbmtzLAptYXgK From owner-freebsd-bluetooth@FreeBSD.ORG Thu May 17 10:50:14 2007 Return-Path: X-Original-To: bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ABDCD16A405 for ; Thu, 17 May 2007 10:50:14 +0000 (UTC) (envelope-from bel@orel.ru) Received: from mail.orel.ru (relay.orel.ru [89.113.48.6]) by mx1.freebsd.org (Postfix) with ESMTP id 0463813C447 for ; Thu, 17 May 2007 10:50:13 +0000 (UTC) (envelope-from bel@orel.ru) Received: from [192.168.99.99] (ford.ct.orel.ru [89.113.48.75]) by mail.orel.ru (8.13.8/8.13.8) with ESMTP id l4HAMka1059183; Thu, 17 May 2007 14:22:48 +0400 (MSD) (envelope-from bel@orel.ru) Message-ID: <464C2CF6.9040707@orel.ru> Date: Thu, 17 May 2007 14:22:46 +0400 From: Andrew Belashov Organization: ORIS User-Agent: Thunderbird 1.5.0.7 (X11/20061017) MIME-Version: 1.0 To: Vladimir Grebenschikov References: <1179237283.1397.25.camel@localhost> <464A8EFC.7060308@freebsd.org> <1179304640.45992.8.camel@localhost> <1179336829.1498.9.camel@localhost> <1179344219.1498.20.camel@localhost> In-Reply-To: <1179344219.1498.20.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: Dr.Web (R) for Mail Servers on mail.orel.ru host X-Antivirus-Code: 100000 X-Zombi-Check: on netra2.orel.ru Cc: bluetooth Subject: Re: Bluetooth Proximity Monitor on FreeBSD ? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2007 10:50:14 -0000 Hello, Vladimir! Vladimir Grebenschikov wrote: > Any hint how encourage it to keep connection ? Try this script: -- With Best Regards, Andrew Belashov.