From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 7 18:24:52 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org Delivered-To: freebsd-bluetooth@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BAB016A422 for ; Tue, 7 Mar 2006 18:24:52 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF19143D68 for ; Tue, 7 Mar 2006 18:24:51 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k27IOoM24302 for ; Tue, 7 Mar 2006 13:24:51 -0500 Message-ID: <440DCFF0.6090809@savvis.net> Date: Tue, 07 Mar 2006 10:24:48 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-bluetooth@FreeBSD.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: apple bluetooth keyboard 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, 07 Mar 2006 18:24:52 -0000 Dear Bluetooth Users, i now own apple bluetooth keyboard. i had a minute to spare and tried bthidd(8) and bthidcontrol(8) with the most recent changes by Markus Brueffer. i'm very pleased to say that apple bluetooth keyboards almost works. in fact, i'm typing this email using apple bluetooth keyboard. so far, there are few obvious problems: 1) when keyboard is contacted for the very first time something goes wrong with the shift/ctrl state. it can be fixed by switching between X/console 2) for whatever reason, right shift does not work. both left and right ctrl, alt and left shift work as expected 3) bthidd(8) does not send hid reports to the keyboard, so the lights on the keyboard do not work 4) apple specific keys (clear, vol+, vol-, mute, eject, keypad =) send scancodes, but i'm not sure what they should do 5) key repeat does not work everything else seems to be working just fine. another minor issue, which has nothing to do with, bthidd(8) or bthidcontrol(8), is pairing procedure. it is not very user friendly, because there is no indication as to when user should type pin code on the keyboard. this can be addresses by teaching hcsecd(8) to use external processes to obtain pin codes. hcsecd(8) could call external process that will display dialog to the user and request pin code. now, when kbdmux(4) was fully integrated into -current and releng_6 it should be much more easier to use bluetooth keyboards with freebsd. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 7 20:05:30 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org Delivered-To: freebsd-bluetooth@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79F6B16A420 for ; Tue, 7 Mar 2006 20:05:30 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from mail01.svc.cra.dublin.eircom.net (mail01.svc.cra.dublin.eircom.net [159.134.118.17]) by mx1.FreeBSD.org (Postfix) with SMTP id E918743D45 for ; Tue, 7 Mar 2006 20:05:28 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 75827 messnum 7061714 invoked from network[83.70.176.191/unknown]); 7 Mar 2006 20:05:27 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail01.svc.cra.dublin.eircom.net (qp 75827) with SMTP; 7 Mar 2006 20:05:27 -0000 Received: (nullmailer pid 3735 invoked by uid 1000); Tue, 07 Mar 2006 20:04:55 -0000 Date: Tue, 7 Mar 2006 20:04:55 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <440DCFF0.6090809@savvis.net> References: <440DCFF0.6090809@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1141761895.037384.5308.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@FreeBSD.org Subject: Re: apple bluetooth keyboard 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, 07 Mar 2006 20:05:30 -0000 On Tue, 7 Mar 2006, Maksim Yevmenkin wrote: > i now own apple bluetooth keyboard. i had a minute to spare and tried > bthidd(8) and bthidcontrol(8) with the most recent changes by Markus Brueffer. > > i'm very pleased to say that apple bluetooth keyboards almost works. in fact, > i'm typing this email using apple bluetooth keyboard. Max, this is excellent news because mine arrived friday and I am about to start working on HID support for NetBSD. Mostly this means porting bthidd and bthidcontrol though we have wscons/wsmux here which I hope means I can inject events already. > another minor issue, which has nothing to do with, bthidd(8) or > bthidcontrol(8), is pairing procedure. it is not very user friendly, because > there is no indication as to when user should type pin code on the keyboard. > this can be addresses by teaching hcsecd(8) to use external processes to > obtain pin codes. hcsecd(8) could call external process that will display > dialog to the user and request pin code. How do bluez/linux manage this? I have seen mention of a 'bluepin' application but have no idea how it works.. iain From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 7 20:11:17 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4EC5B16A420 for ; Tue, 7 Mar 2006 20:11:17 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from mail04.svc.cra.dublin.eircom.net (mail04.svc.cra.dublin.eircom.net [159.134.118.20]) by mx1.FreeBSD.org (Postfix) with SMTP id C050543D45 for ; Tue, 7 Mar 2006 20:11:16 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 17325 messnum 5274631 invoked from network[83.70.176.191/unknown]); 7 Mar 2006 20:11:15 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail04.svc.cra.dublin.eircom.net (qp 17325) with SMTP; 7 Mar 2006 20:11:15 -0000 Received: (nullmailer pid 5091 invoked by uid 1000); Tue, 07 Mar 2006 20:10:44 -0000 Date: Tue, 7 Mar 2006 20:10:44 +0000 (GMT) To: freebsd-bluetooth@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1141762244.118700.5588.nullmailer@galant.ukfsn.org> From: Iain Hibbert Subject: whitespace 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, 07 Mar 2006 20:11:17 -0000 Oh, and while I remember.. Max, I've noticed some extraneous whitespace in the bluetooth source files that is bothering me (what can I say, I'm an irritable nerd :), will you take a patch if I make one? regards, iain From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 7 20:35:17 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8465C16A422 for ; Tue, 7 Mar 2006 20:35:17 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAC8B43D7C for ; Tue, 7 Mar 2006 20:35:16 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k27KZ6M27894; Tue, 7 Mar 2006 15:35:08 -0500 Message-ID: <440DEE78.5020500@savvis.net> Date: Tue, 07 Mar 2006 12:35:04 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Hibbert References: <1141762244.118700.5588.nullmailer@galant.ukfsn.org> In-Reply-To: <1141762244.118700.5588.nullmailer@galant.ukfsn.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: whitespace 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, 07 Mar 2006 20:35:17 -0000 Iain, > Oh, and while I remember.. > > Max, I've noticed some extraneous whitespace in the bluetooth source files > that is bothering me (what can I say, I'm an irritable nerd :), will you > take a patch if I make one? of course. i will take patches from anybody (as long as it conforms to style(9)) :) why do you even ask? :) thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 7 20:56:58 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org Delivered-To: freebsd-bluetooth@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB78416A420 for ; Tue, 7 Mar 2006 20:56:58 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 378CC43D46 for ; Tue, 7 Mar 2006 20:56:58 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k27KunM28350; Tue, 7 Mar 2006 15:56:50 -0500 Message-ID: <440DF38F.7020707@savvis.net> Date: Tue, 07 Mar 2006 12:56:47 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Hibbert References: <440DCFF0.6090809@savvis.net> <1141761895.037384.5308.nullmailer@galant.ukfsn.org> In-Reply-To: <1141761895.037384.5308.nullmailer@galant.ukfsn.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@FreeBSD.org Subject: Re: apple bluetooth keyboard 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, 07 Mar 2006 20:56:58 -0000 Iain, >>i now own apple bluetooth keyboard. i had a minute to spare and tried >>bthidd(8) and bthidcontrol(8) with the most recent changes by Markus Brueffer. >> >>i'm very pleased to say that apple bluetooth keyboards almost works. in fact, >>i'm typing this email using apple bluetooth keyboard. > > Max, this is excellent news because mine arrived friday and I am about to > start working on HID support for NetBSD. Mostly this means porting bthidd > and bthidcontrol though we have wscons/wsmux here which I hope means I can > inject events already. yes, i think it should be pretty straight forward on netbsd. many people wanted to have wscons/wsmux in freebsd as well. >>another minor issue, which has nothing to do with, bthidd(8) or >>bthidcontrol(8), is pairing procedure. it is not very user friendly, because >>there is no indication as to when user should type pin code on the keyboard. >>this can be addresses by teaching hcsecd(8) to use external processes to >>obtain pin codes. hcsecd(8) could call external process that will display >>dialog to the user and request pin code. > > How do bluez/linux manage this? I have seen mention of a 'bluepin' > application but have no idea how it works.. well, i do not really know about {gnome|kde}bluetooth. linux used to have (and maybe still is) hcid daemon that would answer pin code requests. hcid would call external process (i.e. bluepin) and use simple stdin/stdout redirection to get pin from it. bluepin was/is essentially a python script that displays X dialog window with pin input box and some buttons and waits for user to enter a pin code. bluepin prints pin code on stdout, hcid gets it and sends pin code reply. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 7 21:46:22 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E52816A420 for ; Tue, 7 Mar 2006 21:46:22 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from mail03.svc.cra.dublin.eircom.net (mail03.svc.cra.dublin.eircom.net [159.134.118.19]) by mx1.FreeBSD.org (Postfix) with SMTP id ADD4143D49 for ; Tue, 7 Mar 2006 21:46:21 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 73916 messnum 271382 invoked from network[83.70.176.191/unknown]); 7 Mar 2006 21:46:19 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail03.svc.cra.dublin.eircom.net (qp 73916) with SMTP; 7 Mar 2006 21:46:19 -0000 Received: (nullmailer pid 8757 invoked by uid 1000); Tue, 07 Mar 2006 21:45:48 -0000 Date: Tue, 7 Mar 2006 21:45:48 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <440DEE78.5020500@savvis.net> References: <1141762244.118700.5588.nullmailer@galant.ukfsn.org> <440DEE78.5020500@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1141767948.252179.12317.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: whitespace 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, 07 Mar 2006 21:46:22 -0000 On Tue, 7 Mar 2006, Maksim Yevmenkin wrote: > of course. i will take patches from anybody (as long as it conforms to > style(9)) :) why do you even ask? :) Hey, maybe you are some kind of dragon? :) I just read this document though, and it seems that whitespace changes alone are not encouraged.. however, I got rid of them already in my porting, will see what other changes can be fed back.. In other news, some of what I said a few weeks ago is changed now, I put psm and channel into the sockaddr as it does look better than using setsockopt() for that. However, it still looks slightly different: struct sockaddr_bt { uint8_t bt_len; sa_family_t bt_family; bdaddr_t bt_bdaddr; uint16_t bt_psm; uint8_t bt_channel; }; ..because I am still using a single sockaddr type for all bluetooth family sockets. Protocols that dont use fields just ignore them, but if necessary for compatibility a #define can easily be used. iain From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 7 21:59:27 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5923B16A420 for ; Tue, 7 Mar 2006 21:59:27 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 025A343D60 for ; Tue, 7 Mar 2006 21:59:26 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k27LxHM29765; Tue, 7 Mar 2006 16:59:18 -0500 Message-ID: <440E0233.7080703@savvis.net> Date: Tue, 07 Mar 2006 13:59:15 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Hibbert References: <1141762244.118700.5588.nullmailer@galant.ukfsn.org> <440DEE78.5020500@savvis.net> <1141767948.252179.12317.nullmailer@galant.ukfsn.org> In-Reply-To: <1141767948.252179.12317.nullmailer@galant.ukfsn.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: whitespace 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, 07 Mar 2006 21:59:27 -0000 Iain Hibbert wrote: >>of course. i will take patches from anybody (as long as it conforms to >>style(9)) :) why do you even ask? :) > > Hey, maybe you are some kind of dragon? :) > > I just read this document though, and it seems that whitespace changes > alone are not encouraged.. however, I got rid of them already in my > porting, will see what other changes can be fed back.. sounds good > In other news, some of what I said a few weeks ago is changed now, I put > psm and channel into the sockaddr as it does look better than using > setsockopt() for that. However, it still looks slightly different: > > struct sockaddr_bt { > uint8_t bt_len; > sa_family_t bt_family; > bdaddr_t bt_bdaddr; > uint16_t bt_psm; > uint8_t bt_channel; > }; > > ..because I am still using a single sockaddr type for all bluetooth family > sockets. Protocols that dont use fields just ignore them, but if necessary > for compatibility a #define can easily be used. hmm.... i wonder if we can play "union { }" games here. basically, have struct sockaddr_bt { uint8_t bt_len; sa_family_t bt_family; union { uint8_t _placeholder[32]; struct { } _hci; struct { } _l2cap; struct { } _rfcomm; } bt_addr; }; then add appropriate #define's for shortcut access to the union fields. i can then change freebsd code to use single 'struct sockaddr_bt' as well. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 7 22:57:22 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org Delivered-To: freebsd-bluetooth@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3C5F16A420 for ; Tue, 7 Mar 2006 22:57:22 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from mail04.svc.cra.dublin.eircom.net (mail04.svc.cra.dublin.eircom.net [159.134.118.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 27FCC43D48 for ; Tue, 7 Mar 2006 22:57:21 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 62168 messnum 5265620 invoked from network[83.70.176.191/unknown]); 7 Mar 2006 22:57:19 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail04.svc.cra.dublin.eircom.net (qp 62168) with SMTP; 7 Mar 2006 22:57:19 -0000 Received: (nullmailer pid 14389 invoked by uid 1000); Tue, 07 Mar 2006 22:56:36 -0000 Date: Tue, 7 Mar 2006 22:56:36 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <440DF38F.7020707@savvis.net> References: <440DCFF0.6090809@savvis.net> <1141761895.037384.5308.nullmailer@galant.ukfsn.org> <440DF38F.7020707@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1141772196.551930.3681.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@FreeBSD.org Subject: Re: apple bluetooth keyboard 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, 07 Mar 2006 22:57:22 -0000 On Tue, 7 Mar 2006, Maksim Yevmenkin wrote: > > How do bluez/linux manage this? I have seen mention of a 'bluepin' > > application but have no idea how it works.. > > well, i do not really know about {gnome|kde}bluetooth. linux used to have (and > maybe still is) hcid daemon that would answer pin code requests. hcid would > call external process (i.e. bluepin) and use simple stdin/stdout redirection > to get pin from it. bluepin was/is essentially a python script that displays X > dialog window with pin input box and some buttons and waits for user to enter > a pin code. bluepin prints pin code on stdout, hcid gets it and sends pin code > reply. the problem I see with this, is that hcid (hcsecd) is running as a system daemon - if it wants to fire off a program to fetch a pin then it needs to know which user, and where to find them. This needs to be able to change as users log in and out I guess, so it should work the other way around.. In the hcsecd.conf file, you extend the 'pin' statement to specify that there is a) no pin, b) fixed pin, c) user pin. for user pin then, there would be a control pipe that hcsecd would shout PIN_CODE_REQUEST down If user 'blue' wants to enable pin code requests, he can run the pin program (maybe from .login) and it would open the control socket (which can have ownership and permissions specified?) and sleep, listening for pin requests, and wake up with a window when something happens. If user 'red' does not care about bluetooth, she just does nothing and will never be bothered. if the hcsecd program gets no response in a certain time (maybe nobody is listening..), then it replies with PIN_CODE_REQUEST_NEGATIVE_REPLY. Hm, but this does nothing to address the issue that when pairing outwards, there is no way to indicate that the user should enter the pin on the other device, or is that the same thing? Also, I am not sure how it would work with multiple users.. I haven't looked at this part of it in detail yet (I just borrowed hcsecd for that :) iain From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 7 23:39:58 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org Delivered-To: freebsd-bluetooth@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15BBE16A426 for ; Tue, 7 Mar 2006 23:39:58 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id F30C543D77 for ; Tue, 7 Mar 2006 23:39:00 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k27NcoM31951; Tue, 7 Mar 2006 18:38:50 -0500 Message-ID: <440E1988.10202@savvis.net> Date: Tue, 07 Mar 2006 15:38:48 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Hibbert References: <440DCFF0.6090809@savvis.net> <1141761895.037384.5308.nullmailer@galant.ukfsn.org> <440DF38F.7020707@savvis.net> <1141772196.551930.3681.nullmailer@galant.ukfsn.org> In-Reply-To: <1141772196.551930.3681.nullmailer@galant.ukfsn.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@FreeBSD.org Subject: Re: apple bluetooth keyboard 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, 07 Mar 2006 23:39:58 -0000 Iain Hibbert wrote: > On Tue, 7 Mar 2006, Maksim Yevmenkin wrote: > >>>How do bluez/linux manage this? I have seen mention of a 'bluepin' >>>application but have no idea how it works.. >> >>well, i do not really know about {gnome|kde}bluetooth. linux used to have (and >>maybe still is) hcid daemon that would answer pin code requests. hcid would >>call external process (i.e. bluepin) and use simple stdin/stdout redirection >>to get pin from it. bluepin was/is essentially a python script that displays X >>dialog window with pin input box and some buttons and waits for user to enter >>a pin code. bluepin prints pin code on stdout, hcid gets it and sends pin code >>reply. > > the problem I see with this, is that hcid (hcsecd) is running as a system > daemon - if it wants to fire off a program to fetch a pin then it needs to > know which user, and where to find them. This needs to be able to change > as users log in and out I guess, so it should work the other way around.. well, this is the completely different can of worms. both hcid (in linux) and hcsecd(8) (in freebsd), to some extend, assume that there is only one user. bluepin is just x11 application. it will display windows on whatever DISPLAY is set at the moment. > In the hcsecd.conf file, you extend the 'pin' statement to specify that > there is a) no pin, b) fixed pin, c) user pin. > > for user pin then, there would be a control pipe that hcsecd would > shout PIN_CODE_REQUEST down > > If user 'blue' wants to enable pin code requests, he can run the pin > program (maybe from .login) and it would open the control socket (which > can have ownership and permissions specified?) and sleep, listening for > pin requests, and wake up with a window when something happens. > > If user 'red' does not care about bluetooth, she just does nothing and > will never be bothered. may be. but what if user 'red' also wants to run pin program. now hcsecd(8) will have two control pipes. which pipe should it use? should it use both? are you suggesting that hcsecd(8) should be configured to redirect pin requests from specific devices to specific pipe? btw, what usage scenario do you have in mind that requires multiple users to access the same (or multiple) bluetooth devices on the same host? > if the hcsecd program gets no response in a certain time (maybe nobody is > listening..), then it replies with PIN_CODE_REQUEST_NEGATIVE_REPLY. yes > Hm, but this does nothing to address the issue that when pairing outwards, > there is no way to indicate that the user should enter the pin on the > other device, or is that the same thing? yes, its pretty much the same. both devices will get "pin code request" event at the same (more or less) time. for example, in windows xp you will get a dialog with few options: use pin code from documentation, generate pin code automatically, etc. once you enter pin, you go back to other device and enter the same pin again. so, i think, the something like bluepin will work just fine. the only issue here is that user required to run gui. > Also, I am not sure how it would work with multiple users.. > > I haven't looked at this part of it in detail yet (I just borrowed hcsecd > for that :) another option is to program link keys into the device itself. this, however, has another issue - if your device is stolen then link keys are compromised. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 7 23:39:58 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org Delivered-To: freebsd-bluetooth@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3099916A422 for ; Tue, 7 Mar 2006 23:39:58 +0000 (GMT) (envelope-from Alex.Kovalenko@verizon.net) Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0045D43D55 for ; Tue, 7 Mar 2006 23:38:59 +0000 (GMT) (envelope-from Alex.Kovalenko@verizon.net) Received: from RabbitsDen ([70.21.195.141]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IVS00B1X70SGDE8@vms046.mailsrvcs.net> for freebsd-bluetooth@FreeBSD.org; Tue, 07 Mar 2006 17:38:53 -0600 (CST) Date: Tue, 07 Mar 2006 18:38:43 -0500 From: "Alexandre \"Sunny\" Kovalenko" In-reply-to: <440DCFF0.6090809@savvis.net> To: Maksim Yevmenkin Message-id: <1141774723.753.9.camel@RabbitsDen> MIME-version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Content-type: text/plain; charset=iso-8859-5 Content-transfer-encoding: 8BIT References: <440DCFF0.6090809@savvis.net> Cc: freebsd-bluetooth@FreeBSD.org Subject: Re: apple bluetooth keyboard 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, 07 Mar 2006 23:39:58 -0000 On Tue, 2006-03-07 at 10:24 -0800, Maksim Yevmenkin wrote: > Dear Bluetooth Users, > > i now own apple bluetooth keyboard. i had a minute to spare and tried > bthidd(8) and bthidcontrol(8) with the most recent changes by Markus > Brueffer. > 2) for whatever reason, right shift does not work. both left and right > ctrl, alt and left shift work as expected It works on mine (-CURRENT from February 13). Does it work for you at all (e.g. Mac OS, Windows)? > everything else seems to be working just fine. combination in Gnome does something odd -- window switch box disappears as soon as you release without releasing . I did not investigate it much further though. > another minor issue, which has nothing to do with, bthidd(8) or > bthidcontrol(8), is pairing procedure. it is not very user friendly, > because there is no indication as to when user should type pin code on > the keyboard. this can be addresses by teaching hcsecd(8) to use > external processes to obtain pin codes. hcsecd(8) could call external > process that will display dialog to the user and request pin code. I know it is ugly, but running hcidump and typing in PIN and Enter when you see PIN request going out and stalling did the trick ;) > now, when kbdmux(4) was fully integrated into -current and releng_6 it > should be much more easier to use bluetooth keyboards with freebsd. > thanks, > max Thank you very much for doing this work! -- Alexandre "Sunny" Kovalenko (Олександр Коваленко) From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 7 23:59:19 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22EF916A420 for ; Tue, 7 Mar 2006 23:59:19 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from mail09.svc.cra.dublin.eircom.net (mail09.svc.cra.dublin.eircom.net [159.134.118.25]) by mx1.FreeBSD.org (Postfix) with SMTP id 8E59743D48 for ; Tue, 7 Mar 2006 23:59:17 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 27954 messnum 2872816 invoked from network[83.70.176.191/unknown]); 7 Mar 2006 23:59:16 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail09.svc.cra.dublin.eircom.net (qp 27954) with SMTP; 7 Mar 2006 23:59:16 -0000 Received: (nullmailer pid 18340 invoked by uid 1000); Tue, 07 Mar 2006 23:58:38 -0000 Date: Tue, 7 Mar 2006 23:58:38 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <440E0233.7080703@savvis.net> References: <1141762244.118700.5588.nullmailer@galant.ukfsn.org> <440DEE78.5020500@savvis.net> <1141767948.252179.12317.nullmailer@galant.ukfsn.org> <440E0233.7080703@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1141775918.215241.15084.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: whitespace 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, 07 Mar 2006 23:59:19 -0000 On Tue, 7 Mar 2006, Maksim Yevmenkin wrote: > then add appropriate #define's for shortcut access to the union fields. i can > then change freebsd code to use single 'struct sockaddr_bt' as well. Hm, this could work though there are a couple of differences still, in that I have used the bdaddr for HCI socket addressing where you use the text name of the node (I convert name->bdaddr via an ioctl() if necessary) Also, it is possible in my implementation to specify an alternate PSM for rfcomm sockets (as I read the spec, this is allowed..) iain From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 8 00:56:17 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org Delivered-To: freebsd-bluetooth@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 93D5C16A420 for ; Wed, 8 Mar 2006 00:56:17 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from mail02.svc.cra.dublin.eircom.net (mail02.svc.cra.dublin.eircom.net [159.134.118.18]) by mx1.FreeBSD.org (Postfix) with SMTP id 051A543D4C for ; Wed, 8 Mar 2006 00:56:16 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 34313 messnum 5244129 invoked from network[83.70.176.191/unknown]); 8 Mar 2006 00:56:15 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail02.svc.cra.dublin.eircom.net (qp 34313) with SMTP; 8 Mar 2006 00:56:15 -0000 Received: (nullmailer pid 3950 invoked by uid 1000); Wed, 08 Mar 2006 00:55:42 -0000 Date: Wed, 8 Mar 2006 00:55:42 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <440E1988.10202@savvis.net> References: <440DCFF0.6090809@savvis.net> <1141761895.037384.5308.nullmailer@galant.ukfsn.org> <440DF38F.7020707@savvis.net> <1141772196.551930.3681.nullmailer@galant.ukfsn.org> <440E1988.10202@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1141779342.768110.17808.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@FreeBSD.org Subject: Re: apple bluetooth keyboard 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, 08 Mar 2006 00:56:17 -0000 On Tue, 7 Mar 2006, Maksim Yevmenkin wrote: > well, this is the completely different can of worms. both hcid (in linux) and > hcsecd(8) (in freebsd), to some extend, assume that there is only one user. > > bluepin is just x11 application. it will display windows on whatever DISPLAY > is set at the moment. yes, but hcsecd cannot start it, because hcsecd is a different uid and has no permissions to access the display.. besides, it is not the function of a daemon to put windows on the display. Displays belong to users, if there are any. If they want windows to open, they will run programs that do that. > > If user 'blue' wants to enable pin code requests, he can run the pin > > program (maybe from .login) and it would open the control socket (which > > can have ownership and permissions specified?) and sleep, listening for > > pin requests, and wake up with a window when something happens. > > > > If user 'red' does not care about bluetooth, she just does nothing and > > will never be bothered. > may be. but what if user 'red' also wants to run pin program. now hcsecd(8) > will have two control pipes. which pipe should it use? should it use both? are > you suggesting that hcsecd(8) should be configured to redirect pin requests > from specific devices to specific pipe? that could be problematic - can a unix domain socket be opened by multiple users for read/write? In fact, multiple simultaneous users gets ugly, as sockets in general do not have access permissions in any case - if user 'blue' opens the baseband connection, then 'red' can access the device through another L2CAP or RFCOMM socket (well, they can in my world :) > btw, what usage scenario do you have in mind that requires multiple users to > access the same (or multiple) bluetooth devices on the same host? my thought was that users might be consecutive > so, i think, the something like bluepin will work just fine. the only issue > here is that user required to run gui. well, if you are trying to set up a pairing to another device from a computer with only a text console, you can always add the pin code to the config file directly? then hcsecd could use LOG_NOTICE instead of LOG_DEBUG at this point. alternatively, a helper application could be run in advance, if hcsecd would remember a given pin/device combo for N seconds % tiepin -a phone 1234 % rfcomm_sppd -a phone ? I can't think any more, its too late. iain From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 8 01:03:08 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3AFA116A420 for ; Wed, 8 Mar 2006 01:03:08 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id D70D443D49 for ; Wed, 8 Mar 2006 01:03:07 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k2812xM01557; Tue, 7 Mar 2006 20:02:59 -0500 Message-ID: <440E2D3F.6040800@savvis.net> Date: Tue, 07 Mar 2006 17:02:55 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Hibbert References: <1141762244.118700.5588.nullmailer@galant.ukfsn.org> <440DEE78.5020500@savvis.net> <1141767948.252179.12317.nullmailer@galant.ukfsn.org> <440E0233.7080703@savvis.net> <1141775918.215241.15084.nullmailer@galant.ukfsn.org> In-Reply-To: <1141775918.215241.15084.nullmailer@galant.ukfsn.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: whitespace 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, 08 Mar 2006 01:03:08 -0000 Iain Hibbert wrote: > On Tue, 7 Mar 2006, Maksim Yevmenkin wrote: > >>then add appropriate #define's for shortcut access to the union fields. i can >>then change freebsd code to use single 'struct sockaddr_bt' as well. > > Hm, this could work though there are a couple of differences still, in > that I have used the bdaddr for HCI socket addressing where you use the > text name of the node (I convert name->bdaddr via an ioctl() if necessary) another union inside _hci part? > Also, it is possible in my implementation to specify an alternate PSM for > rfcomm sockets (as I read the spec, this is allowed..) sure its allowed, but why would you want to do this? there is no way for the remote device to know that the local device runs rfcomm on some other (than 3) psm. in the same way you could run sdp on any psm. it will work, as long as you control both sides - server and client. changing "well known" psm is a sure way to get into all sorts of interoperability problems. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 8 01:23:03 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org Delivered-To: freebsd-bluetooth@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 232CD16A420 for ; Wed, 8 Mar 2006 01:23:03 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id B649943D49 for ; Wed, 8 Mar 2006 01:23:02 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k281MoM01919; Tue, 7 Mar 2006 20:22:52 -0500 Message-ID: <440E31E7.9050409@savvis.net> Date: Tue, 07 Mar 2006 17:22:47 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Hibbert References: <440DCFF0.6090809@savvis.net> <1141761895.037384.5308.nullmailer@galant.ukfsn.org> <440DF38F.7020707@savvis.net> <1141772196.551930.3681.nullmailer@galant.ukfsn.org> <440E1988.10202@savvis.net> <1141779342.768110.17808.nullmailer@galant.ukfsn.org> In-Reply-To: <1141779342.768110.17808.nullmailer@galant.ukfsn.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@FreeBSD.org Subject: Re: apple bluetooth keyboard 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, 08 Mar 2006 01:23:03 -0000 Iain Hibbert wrote: > On Tue, 7 Mar 2006, Maksim Yevmenkin wrote: > >>well, this is the completely different can of worms. both hcid (in linux) and >>hcsecd(8) (in freebsd), to some extend, assume that there is only one user. >> >>bluepin is just x11 application. it will display windows on whatever DISPLAY >>is set at the moment. > > yes, but hcsecd cannot start it, because hcsecd is a different uid and has > no permissions to access the display.. besides, it is not the function of > a daemon to put windows on the display. Displays belong to users, if there > are any. If they want windows to open, they will run programs that do > that. well, fine. in this case bluepin must register with hcsecd(8) to get notifications for the pin code requests. i have no problem with it. >>>If user 'blue' wants to enable pin code requests, he can run the pin >>>program (maybe from .login) and it would open the control socket (which >>>can have ownership and permissions specified?) and sleep, listening for >>>pin requests, and wake up with a window when something happens. >>> >>>If user 'red' does not care about bluetooth, she just does nothing and >>>will never be bothered. > >>may be. but what if user 'red' also wants to run pin program. now hcsecd(8) >>will have two control pipes. which pipe should it use? should it use both? are >>you suggesting that hcsecd(8) should be configured to redirect pin requests >>from specific devices to specific pipe? > > that could be problematic - can a unix domain socket be opened by multiple > users for read/write? sure, why not. > In fact, multiple simultaneous users gets ugly, as sockets in general do > not have access permissions in any case - if user 'blue' opens the you can pass credentials via unix sockets > baseband connection, then 'red' can access the device through another > L2CAP or RFCOMM socket (well, they can in my world :) you can do it with freebsd. i can open baseband by hand (as root) and then do sdp query and/or rfcomm session as another user. i'm not following you here. >>btw, what usage scenario do you have in mind that requires multiple users to >>access the same (or multiple) bluetooth devices on the same host? > > my thought was that users might be consecutive ?? please explain >>so, i think, the something like bluepin will work just fine. the only issue >>here is that user required to run gui. > > well, if you are trying to set up a pairing to another device from a > computer with only a text console, you can always add the pin code to the > config file directly? yes, you can. but its painful. > then hcsecd could use LOG_NOTICE instead of LOG_DEBUG at this point. yes, and again user has to watch the logs for the messages. > alternatively, a helper application could be run in advance, if hcsecd > would remember a given pin/device combo for N seconds > > % tiepin -a phone 1234 > % rfcomm_sppd -a phone > may be. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 8 01:50:04 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3788316A422 for ; Wed, 8 Mar 2006 01:50:04 +0000 (GMT) (envelope-from markus@brueffer.de) Received: from mailout02.sul.t-online.com (mailout02.sul.t-online.com [194.25.134.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A51143D45 for ; Wed, 8 Mar 2006 01:50:02 +0000 (GMT) (envelope-from markus@brueffer.de) Received: from fwd31.aul.t-online.de by mailout02.sul.t-online.com with smtp id 1FGnoO-00074V-00; Wed, 08 Mar 2006 02:50:00 +0100 Received: from ramses.kicks-ass.net (Z2Fe8mZX8ecZ1DQXrpORM9HclU3X9izDNmWrJfZoiwhQmomOQi444i@[80.143.241.88]) by fwd31.sul.t-online.de with esmtp id 1FGnoM-1lrrX60; Wed, 8 Mar 2006 02:49:58 +0100 Received: from localhost (dslb-084-061-028-125.pools.arcor-ip.net [84.61.28.125]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ramses.kicks-ass.net (Postfix) with ESMTP id 79556B833; Wed, 8 Mar 2006 02:50:04 +0100 (CET) From: Markus Brueffer To: freebsd-bluetooth@freebsd.org Date: Wed, 8 Mar 2006 02:49:05 +0100 User-Agent: KMail/1.9.1 References: <440DCFF0.6090809@savvis.net> In-Reply-To: <440DCFF0.6090809@savvis.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2351401.JH6eU5bo6J"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200603080249.11559.markus@brueffer.de> X-ID: Z2Fe8mZX8ecZ1DQXrpORM9HclU3X9izDNmWrJfZoiwhQmomOQi444i@t-dialin.net X-TOI-MSGID: ae5020ac-3d34-47b6-a726-99fa637eb88e Cc: Subject: Re: apple bluetooth keyboard 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, 08 Mar 2006 01:50:04 -0000 --nextPart2351401.JH6eU5bo6J Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Am Tuesday 07 March 2006 19:24 schrieb Maksim Yevmenkin: > i now own apple bluetooth keyboard. i had a minute to spare and tried > bthidd(8) and bthidcontrol(8) with the most recent changes by Markus > Brueffer. > > i'm very pleased to say that apple bluetooth keyboards almost works. in > fact, i'm typing this email using apple bluetooth keyboard. Nice! Could you please post the output of a bthidcontrol query? Markus =2D-=20 Markus Brueffer =9A =9A| GPG-Key: http://people.FreeBSD.org/~markus/markus.= asc markus@brueffer.de | FP: 3F9B EBE8 F290 E5CC 1447 8760 D48D 1072 78F8 A8D4 markus@FreeBSD.org | FreeBSD: The Power to Serve! --nextPart2351401.JH6eU5bo6J Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (FreeBSD) iD8DBQBEDjgX1I0Qcnj4qNQRAih3AJ4vfXro8Dk9Hm93s686eF4QKbNACgCg6jBZ faPja2PUqtA4L7WAbF5OaY8= =EWK/ -----END PGP SIGNATURE----- --nextPart2351401.JH6eU5bo6J-- From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 8 02:57:00 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8DA0216A420 for ; Wed, 8 Mar 2006 02:57:00 +0000 (GMT) (envelope-from Alex.Kovalenko@verizon.net) Received: from vms042pub.verizon.net (vms042pub.verizon.net [206.46.252.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D3C243D5E for ; Wed, 8 Mar 2006 02:56:57 +0000 (GMT) (envelope-from Alex.Kovalenko@verizon.net) Received: from RabbitsDen ([70.21.195.141]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IVS000SHG6WJZE0@vms042.mailsrvcs.net> for freebsd-bluetooth@freebsd.org; Tue, 07 Mar 2006 20:56:56 -0600 (CST) Date: Tue, 07 Mar 2006 21:56:45 -0500 From: "Alexandre \"Sunny\" Kovalenko" In-reply-to: <200603080249.11559.markus@brueffer.de> To: Markus Brueffer Message-id: <1141786606.753.11.camel@RabbitsDen> MIME-version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Content-type: text/plain; charset=iso-8859-5 Content-transfer-encoding: 8BIT References: <440DCFF0.6090809@savvis.net> <200603080249.11559.markus@brueffer.de> Cc: freebsd-bluetooth@freebsd.org Subject: Re: apple bluetooth keyboard 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, 08 Mar 2006 02:57:00 -0000 On Wed, 2006-03-08 at 02:49 +0100, Markus Brueffer wrote: > Am Tuesday 07 March 2006 19:24 schrieb Maksim Yevmenkin: > > i now own apple bluetooth keyboard. i had a minute to spare and tried > > bthidd(8) and bthidcontrol(8) with the most recent changes by Markus > > Brueffer. > > > > i'm very pleased to say that apple bluetooth keyboards almost works. in > > fact, i'm typing this email using apple bluetooth keyboard. > > Nice! Could you please post the output of a bthidcontrol query? > > Markus > If you would settle for mine, here it is ;) bthidcontrol -a a_kbd query device { bdaddr 00:0a:95:45:0d:a9; control_psm 0x11; interrupt_psm 0x13; reconnect_initiate true; battery_power false; normally_connectable true; hid_descriptor { 0x05 0x01 0x09 0x06 0xa1 0x01 0x85 0x01 0x05 0x07 0x19 0xe0 0x29 0xe7 0x15 0x00 0x25 0x01 0x75 0x01 0x95 0x08 0x81 0x02 0x75 0x08 0x95 0x01 0x81 0x01 0x75 0x01 0x95 0x05 0x05 0x08 0x19 0x01 0x29 0x05 0x91 0x02 0x75 0x03 0x95 0x01 0x91 0x01 0x75 0x08 0x95 0x06 0x15 0x00 0x26 0xff 0x00 0x05 0x07 0x19 0x00 0x2a 0xff 0x00 0x81 0x00 0x75 0x01 0x95 0x01 0x15 0x00 0x25 0x01 0x05 0x0c 0x09 0xb8 0x81 0x06 0x09 0xe2 0x81 0x06 0x09 0xe9 0x81 0x02 0x09 0xea 0x81 0x02 0x75 0x01 0x95 0x04 0x81 0x01 0xc0 }; } -- Alexandre "Sunny" Kovalenko (Олександр Коваленко) From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 8 08:53:06 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 596F216A420 for ; Wed, 8 Mar 2006 08:53:06 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from mail01.svc.cra.dublin.eircom.net (mail01.svc.cra.dublin.eircom.net [159.134.118.17]) by mx1.FreeBSD.org (Postfix) with SMTP id B8D2C43D46 for ; Wed, 8 Mar 2006 08:53:05 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 81370 messnum 7058776 invoked from network[83.70.176.191/unknown]); 8 Mar 2006 08:53:03 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail01.svc.cra.dublin.eircom.net (qp 81370) with SMTP; 8 Mar 2006 08:53:03 -0000 Received: (nullmailer pid 6618 invoked by uid 1000); Wed, 08 Mar 2006 08:52:11 -0000 Date: Wed, 8 Mar 2006 08:52:11 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <440E2D3F.6040800@savvis.net> References: <1141762244.118700.5588.nullmailer@galant.ukfsn.org> <440DEE78.5020500@savvis.net> <1141767948.252179.12317.nullmailer@galant.ukfsn.org> <440E0233.7080703@savvis.net> <1141775918.215241.15084.nullmailer@galant.ukfsn.org> <440E2D3F.6040800@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1141807931.899207.8150.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: whitespace 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, 08 Mar 2006 08:53:06 -0000 On Tue, 7 Mar 2006, Maksim Yevmenkin wrote: > another union inside _hci part? I think too many unions. Is the amount of padding really 32 bytes? (I think only 14 for NetBSD) how long can the netgraph node name be? any reason you can't just use a flat structure? struct { uint8_t len sa_family_t family bdaddr_t bdaddr uint16_t psm uint8_t channel char name[16] uint8_t _pad[7] } with this, you still get 34 bytes total and can have up to 23 bytes for the nodename (for HCI). Is there a reason to suppose that it should all be squashed up at the top of the structure in every instance? could also be struct { uint8_t len sa_family_t family union { uint8_t _pad[32] char name[nn] struct { bdaddr_t bdaddr uint16_t psm uint8_t channel } bar } foo } #define bt_name foo.name #define bt_bdaddr foo.bar.bdaddr #define bt_psm foo.bar.psm #define bt_channel foo.bar.channel My thought also is that if you split it up so each protocol has a separate section, you can't specify the offset of a field that appears in multiple sections (such as bdaddr) in a generic way since it would exist in more than one namespace, and my desire for a single namespace was what started this :) Hm, it occurs to me though that I am only thinking of source level compatibility, were you considering binary compat? That probably introduces additional considerations. > > Also, it is possible in my implementation to specify an alternate PSM for > > rfcomm sockets (as I read the spec, this is allowed..) > > sure its allowed, but why would you want to do this? there is no way for the > remote device to know that the local device runs rfcomm on some other (than 3) > psm. in the same way you could run sdp on any psm. it will work, as long as > you control both sides - server and client. changing "well known" psm is a > sure way to get into all sorts of interoperability problems. Well, I am not well versed in SDP because your libsdp managed to hide the details for me, but for example the SDP query on my phone produces this now: Record Handle: 0x00010000 Service Class ID List: Dial-Up Networking (0x1103) Generic Networking (0x1201) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 1 Bluetooth Profile Descriptor List: Dial-Up Networking (0x1103) ver. 1.0 whereas if it produced something like: Record Handle: 0x00010000 Service Class ID List: Dial-Up Networking (0x1103) Generic Networking (0x1201) Protocol Descriptor List: L2CAP (0x0100) (0x1007) Protocol specific parameter #1: u/int8/bool 1 Bluetooth Profile Descriptor List: Dial-Up Networking (0x1103) ver. 1.0 then it should 'just work' on psm 0x1007, no? Thats how I read it from "5.1.5 ProtoclDescriptorListAttribute" anyway but I havent tried it.. And, as to why somebody might want to do this, I dont know but it was easy to allow so I did :) iain From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 8 14:18:36 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D878916A420 for ; Wed, 8 Mar 2006 14:18:36 +0000 (GMT) (envelope-from markus@brueffer.de) Received: from mailout04.sul.t-online.com (mailout04.sul.t-online.com [194.25.134.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BBF243D46 for ; Wed, 8 Mar 2006 14:18:34 +0000 (GMT) (envelope-from markus@brueffer.de) Received: from fwd33.aul.t-online.de by mailout04.sul.t-online.com with smtp id 1FGzUn-0005Sj-01; Wed, 08 Mar 2006 15:18:33 +0100 Received: from ramses.kicks-ass.net (rXQXwrZvoergNrkbl-LVGNZLgQT5k1cIoFvN0vCayWExIQgOTeQVZD@[80.143.241.88]) by fwd33.sul.t-online.de with esmtp id 1FGzUb-1OTbay0; Wed, 8 Mar 2006 15:18:21 +0100 Received: from localhost (dslb-084-061-028-125.pools.arcor-ip.net [84.61.28.125]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ramses.kicks-ass.net (Postfix) with ESMTP id 853CBB833; Wed, 8 Mar 2006 15:18:27 +0100 (CET) From: Markus Brueffer To: freebsd-bluetooth@freebsd.org Date: Wed, 8 Mar 2006 15:17:38 +0100 User-Agent: KMail/1.9.1 References: <440DCFF0.6090809@savvis.net> <200603080249.11559.markus@brueffer.de> <1141786606.753.11.camel@RabbitsDen> In-Reply-To: <1141786606.753.11.camel@RabbitsDen> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2375551.KimLFVRyqO"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200603081517.43317.markus@brueffer.de> X-ID: rXQXwrZvoergNrkbl-LVGNZLgQT5k1cIoFvN0vCayWExIQgOTeQVZD@t-dialin.net X-TOI-MSGID: 60c1c388-91ed-46ea-ac5f-21074fe51f5d Cc: Subject: Re: apple bluetooth keyboard 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, 08 Mar 2006 14:18:37 -0000 --nextPart2375551.KimLFVRyqO Content-Type: text/plain; charset="iso-8859-5" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Am Wednesday 08 March 2006 03:56 schrieb Alexandre "Sunny" Kovalenko: > On Wed, 2006-03-08 at 02:49 +0100, Markus Brueffer wrote: > > Am Tuesday 07 March 2006 19:24 schrieb Maksim Yevmenkin: > > > i now own apple bluetooth keyboard. i had a minute to spare and tried > > > bthidd(8) and bthidcontrol(8) with the most recent changes by Markus > > > Brueffer. > > > > > > i'm very pleased to say that apple bluetooth keyboards almost works. = in > > > fact, i'm typing this email using apple bluetooth keyboard. > > > > Nice! Could you please post the output of a bthidcontrol query? > > > > Markus > > If you would settle for mine, here it is ;) Thanks! > > bthidcontrol -a a_kbd query > device { > bdaddr 00:0a:95:45:0d:a9; > control_psm 0x11; > interrupt_psm 0x13; > reconnect_initiate true; > battery_power false; ^^^^^ Odd, the keyboard is battery powered, isn't it? Markus =2D-=20 Markus Brueffer =A0 =A0| GPG-Key: http://people.FreeBSD.org/~markus/markus.= asc markus@brueffer.de | FP: 3F9B EBE8 F290 E5CC 1447 8760 D48D 1072 78F8 A8D4 markus@FreeBSD.org | FreeBSD: The Power to Serve! --nextPart2375551.KimLFVRyqO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (FreeBSD) iD8DBQBEDueH1I0Qcnj4qNQRAjnWAJ9qrWwb3We4HWtiq7MPFWgOqb7+/wCg8N2b jvMiQ6BF7ux4sheSaDewZv8= =aFM7 -----END PGP SIGNATURE----- --nextPart2375551.KimLFVRyqO-- From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 8 16:06:59 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAA2816A420 for ; Wed, 8 Mar 2006 16:06:59 +0000 (GMT) (envelope-from lopisaur@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C68C43D49 for ; Wed, 8 Mar 2006 16:06:59 +0000 (GMT) (envelope-from lopisaur@gmail.com) Received: by xproxy.gmail.com with SMTP id s9so150274wxc for ; Wed, 08 Mar 2006 08:06:58 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:from:reply-to:to:content-type:date:message-id:mime-version:x-mailer; b=rE/W3AqvisbnlUfDFonoA3dUsW3EtfHOtJQv94r2WkpIPeTNE+FTht/r60PTRhfQl+JHaurihx+tlL7f/gXO/l7PkNJld032R2s7fSqC5bp+DK4pbUind84C94Xux8b9+QrY6iDqdo1GEqDzFFWrGcVrSuczEFBiI96ixui/vZg= Received: by 10.70.117.5 with SMTP id p5mr999620wxc; Wed, 08 Mar 2006 08:06:56 -0800 (PST) Received: from hellion.clcw ( [200.105.219.96]) by mx.gmail.com with ESMTP id i40sm941310wxd.2006.03.08.08.06.54; Wed, 08 Mar 2006 08:06:56 -0800 (PST) From: Christian Lopez de Castilla Wagner To: freebsd-bluetooth@freebsd.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-bNqg+OIvu9qxF5uxOYBI" Date: Wed, 08 Mar 2006 12:08:54 -0400 Message-Id: <1141834134.24474.29.camel@hellion.clcw> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Subject: Siemens S55/56 synchronization options X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lopisaur@gmail.com List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2006 16:06:59 -0000 --=-bNqg+OIvu9qxF5uxOYBI Content-Type: multipart/mixed; boundary="=-p/KpUQ/KiiBXB0WW5htH" --=-p/KpUQ/KiiBXB0WW5htH Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi list, I'm trying to get data into/out of my Siemens S56 via BT. Inquiry: Inquiry result #0 BD_ADDR: CLCWS56 Page Scan Rep. Mode: 0x1 Page Scan Period Mode: 00 Page Scan Mode: 00 Class: 72:02:04 Clock offset: 0x4501 Inquiry complete. Status: No error [00] 00:01:e3:15:c1:64=20 OK, now: hellion# sdpcontrol -a CLCWS56 browse Record Handle: 0x00011101 Service Class ID List: Serial Port (0x1101) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 1 Bluetooth Profile Descriptor List: Serial Port (0x1101) ver. 1.0 Record Handle: 0x00011103 Service Class ID List: Dial-Up Networking (0x1103) Generic Networking (0x1201) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 1 Bluetooth Profile Descriptor List: Dial-Up Networking (0x1103) ver. 1.0 Record Handle: 0x00011111 Service Class ID List: Fax (0x1111) Generic Telephony (0x1204) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 1 Bluetooth Profile Descriptor List: Fax (0x1111) ver. 1.0 Record Handle: 0x00011105 Service Class ID List: OBEX Object Push (0x1105) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 4 OBEX (0x0008) Bluetooth Profile Descriptor List: OBEX Object Push (0x1105) ver. 1.0 Record Handle: 0x00011104 Service Class ID List: IrMC Sync (0x1104) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 5 OBEX (0x0008) Bluetooth Profile Descriptor List: IrMC Sync (0x1104) ver. 1.0 Record Handle: 0x00011112 Service Class ID List: Headset Audio Gateway (0x1112) Generic Audio (0x1203) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 2 Bluetooth Profile Descriptor List: Headset (0x1108) ver. 1.0 Record Handle: 0x0001111f Service Class ID List: Handsfree Audio Gateway (0x111f) Generic Audio (0x1203) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 3 Bluetooth Profile Descriptor List: Handsfree (0x111e) ver. 1.0 This is as far as I got. The OBEX man pages aren't helpful at all. I was wondering what the options are to get my phonebook out of the phone and to send files into the phone. Some examples would be greatly appreciated, if someone has any. I'm attaching the /etc/bluetooth config files. Thanks in advance. Just in case: hellion# uname -a FreeBSD hellion.clcw 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Thu Feb 16 10:35:13 BOT 2006 root@hellion.clcw:/usr/obj/usr/src/sys/20051212 i386 --=20 Christian Lopez de Castilla Wagner lopisaur@gmail.com lopisaur@acelerate.com (+591-705)98290 --=-p/KpUQ/KiiBXB0WW5htH Content-Disposition: attachment; filename=hosts Content-Type: text/plain; name=hosts; charset=ASCII Content-Transfer-Encoding: base64 IyAkSWQ6IGhvc3RzLHYgMS4xIDIwMDMvMDUvMjEgMTc6NDg6NDAgbWF4IEV4cCAkDQojICRGcmVl QlNEOiBzcmMvZXRjL2JsdWV0b290aC9ob3N0cyx2IDEuMSAyMDAzLzEwLzEyIDIyOjA0OjE4IGVt YXggRXhwICQNCiMNCiMgQmx1ZXRvb3RoIEhvc3QgRGF0YWJhc2UNCiMNCiMgVGhpcyBmaWxlIHNo b3VsZCBjb250YWluIHRoZSBCbHVldG9vdGggYWRkcmVzc2VzIGFuZCBhbGlhc2VzIGZvciBob3N0 cy4NCiMNCiMgQkRfQUREUiAgICAgICAgICAgICAgIE5hbWUgWyBhbGlhczAgYWxpYXMxIC4uLiBd DQoNCmZmOmZmOmZmOjAwOjAwOjAwCWxvY2FsaG9zdCBsb2NhbAkJIyBNYWdpYyBzZHBkIGFkZHJl c3MNCiMwMDowMTplMzowYjo3NToyZAlDTENXUzU1IFM1NSBNb2JpbGUJIyAyMDA1MDkyMTogU2ll bWVucyBTNTUNCjAwOjAxOmUzOjE1OmMxOjY0CQlDTENXUzU2IFM1NiBNb2JpbGUJIyAyMDA1MTEw OTogU2llbWVucyBTNTYNCg== --=-p/KpUQ/KiiBXB0WW5htH Content-Disposition: attachment; filename=hcsecd.conf Content-Transfer-Encoding: base64 Content-Type: text/plain; name=hcsecd.conf; charset=ASCII IyAkSWQ6IGhjc2VjZC5jb25mLHYgMS4xIDIwMDMvMDUvMjYgMjI6NTA6NDcgbWF4IEV4cCAkDQoj ICRGcmVlQlNEOiBzcmMvZXRjL2JsdWV0b290aC9oY3NlY2QuY29uZix2IDEuMiAyMDA0LzA2LzA2 IDExOjQ2OjI4IHNjaHdlaWtoIEV4cCAkDQojDQojIEhDSSBzZWN1cml0eSBkYWVtb24gY29uZmln dXJhdGlvbiBmaWxlDQojDQojIEZvcm1hdDoNCiMNCiMgZGV2aWNlIHsNCiMJb3B0aW9uCXZhbHVl IDsNCiMgfQ0KIw0KIyBQb3NzaWJsZSBvcHRpb25zIGFuZCB2YWx1ZXMNCiMNCiMgT3B0aW9ucwlW YWx1ZXMNCiMgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KIyBiZGFkZHIJeHg6 eHg6eHg6eHg6eHg6eHggOyAgCS0gcmVtb3RlIGRldmljZSBCRF9BRERSDQojIG5hbWUgCQkiYW55 IGNoYXIiIDsJCS0gdG8gc2V0IHVzZXIgZnJpZW5kbHkgZGV2aWNlIG5hbWUNCiMga2V5CQkweDEx MjIzMzQ0IHwgbm9rZXkgOwktIHRvIHNldCBsaW5rIGtleSBmb3IgdGhlIGRldmljZQ0KIyBwaW4J CSJzZWNyZXQiIHwgbm9waW4gOwktIHRvIFBJTiBjb2RlIGZvciB0aGUgZGV2aWNlDQojDQojIE5v dGVzOg0KIw0KIwlDdXJyZW50bHkgdGhlcmUgaXMgbm8gd2F5IHRvIHNlbGVjdCBrZXlzL1BJTiBj b2RlIGJhc2VkIG9uIHdoaWNoDQojCWxvY2FsIGRldmljZSByZWNlaXZlZCB0aGUgcmVxdWVzdC4g RXZlcnl0aGluZyBpcyBiYXNlZCBvbiByZW1vdGUNCiMJZGV2aWNlIEJEX0FERFIuDQojDQojCSJu b2tleSIJbWVhbnMgdGhhdCBubyBsaW5rIGtleSBoYXMgYmVlbiBkZWZpbmVkIGFuZCB3ZSBzaG91 bGQNCiMJCXNlbmQgTGlua19LZXlfTmVnYXRpdmVfUmVwbHkgY29tbWFuZCB0byB0aGUgZGV2aWNl Lg0KIw0KIwkibm9waW4iCW1lYW5zIHRoYXQgbm8gUElOIGNvZGUgaGFzIGJlZW4gZGVmaW5lZCBh bmQgd2Ugc2hvdWxkDQojCQlzZW5kIFBJTl9Db2RlX05lZ2F0aXZlX1JlcGx5IGNvbW1hbmQgdG8g dGhlIGRldmljZQ0KIw0KDQojIERlZmF1bHQgZW50cnkgaXMgYXBwbGllZCBpZiBubyBiZXR0ZXIg bWF0Y2ggZm91bmQNCiMgSXQgTVVTVCBoYXZlIDAwOjAwOjAwOjAwOjAwOjAwIGFzIGJkYWRkcg0K ZGV2aWNlIHsNCgliZGFkZHIJMDA6MDA6MDA6MDA6MDA6MDA7DQoJbmFtZQkiRGVmYXVsdCBlbnRy eSI7DQoJa2V5CW5va2V5Ow0KCXBpbglub3BpbjsNCn0NCg0KZGV2aWNlIHsNCgliZGFkZHIJMDA6 MDE6ZTM6MTU6YzE6NjQ7DQoJbmFtZQkiQ0xDV1M1NiI7DQoJa2V5CW5va2V5Ow0KCXBpbglub3Bp bjsNCn0NCg== --=-p/KpUQ/KiiBXB0WW5htH-- --=-bNqg+OIvu9qxF5uxOYBI Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (FreeBSD) iD8DBQBEDwGWBfwpMEg+qbYRAlBsAJ9VojJSMKKtMmhZvl7YI0f8BsKDjACfTTaI r1ulZ/Flh1X9iFRjGf6LVwk= =0G/k -----END PGP SIGNATURE----- --=-bNqg+OIvu9qxF5uxOYBI-- From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 8 18:40:57 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7CB916A420 for ; Wed, 8 Mar 2006 18:40:57 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5158043D5D for ; Wed, 8 Mar 2006 18:40:57 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k28IesM26776; Wed, 8 Mar 2006 13:40:54 -0500 Message-ID: <440F2534.4080205@savvis.net> Date: Wed, 08 Mar 2006 10:40:52 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Markus Brueffer References: <440DCFF0.6090809@savvis.net> <200603080249.11559.markus@brueffer.de> <1141786606.753.11.camel@RabbitsDen> <200603081517.43317.markus@brueffer.de> In-Reply-To: <200603081517.43317.markus@brueffer.de> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: apple bluetooth keyboard 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, 08 Mar 2006 18:40:57 -0000 >>>>i now own apple bluetooth keyboard. i had a minute to spare and tried >>>>bthidd(8) and bthidcontrol(8) with the most recent changes by Markus >>>>Brueffer. >>>> >>>>i'm very pleased to say that apple bluetooth keyboards almost works. in >>>>fact, i'm typing this email using apple bluetooth keyboard. >>> >>>Nice! Could you please post the output of a bthidcontrol query? >>> >>>Markus >> >>If you would settle for mine, here it is ;) > > Thanks! mine is identical (bdaddr is the only difference). >>bthidcontrol -a a_kbd query >>device { >> bdaddr 00:0a:95:45:0d:a9; >> control_psm 0x11; >> interrupt_psm 0x13; >> reconnect_initiate true; >> battery_power false; > ^^^^^ > Odd, the keyboard is battery powered, isn't it? yes, i noticed that too. strange... another unusual behavior is that the keyboard does not seem to close baseband connection. for example if i start bthidd(8) and press keys on the keyboard, it will connects to the bthidd(8) as expected. in other words baseband connection is initiated from the keyboard. however, if i kill bthidd(8) the keyboard keeps baseband connection open. now if start bthidd(8) the keyboard does not work. bthidd(8) waits for it to connect (because reconnect_initiate is set to true), but keyboard does not connect. you can get the keyboard re-connect by power cycling it or manually disconnecting baseband with hccontrol(8). also i think there is a bug in bthidd(8) kbd.c (kbd_process_keys function). i think it needs a rewrite :) thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Wed Mar 8 23:10:51 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B9F116A420 for ; Wed, 8 Mar 2006 23:10:51 +0000 (GMT) (envelope-from Alex.Kovalenko@verizon.net) Received: from vms042pub.verizon.net (vms042pub.verizon.net [206.46.252.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30A0D43D46 for ; Wed, 8 Mar 2006 23:10:51 +0000 (GMT) (envelope-from Alex.Kovalenko@verizon.net) Received: from RabbitsDen ([70.21.195.141]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IVU007KA0E1GOE0@vms042.mailsrvcs.net> for freebsd-bluetooth@freebsd.org; Wed, 08 Mar 2006 17:10:50 -0600 (CST) Date: Wed, 08 Mar 2006 18:10:18 -0500 From: "Alexandre \"Sunny\" Kovalenko" In-reply-to: <200603081517.43317.markus@brueffer.de> To: Markus Brueffer Message-id: <1141859419.753.15.camel@RabbitsDen> MIME-version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Content-type: text/plain; charset=iso-8859-5 Content-transfer-encoding: 8BIT References: <440DCFF0.6090809@savvis.net> <200603080249.11559.markus@brueffer.de> <1141786606.753.11.camel@RabbitsDen> <200603081517.43317.markus@brueffer.de> Cc: freebsd-bluetooth@freebsd.org Subject: Re: apple bluetooth keyboard 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, 08 Mar 2006 23:10:51 -0000 On Wed, 2006-03-08 at 15:17 +0100, Markus Brueffer wrote: > > > > bthidcontrol -a a_kbd query > > device { > > bdaddr 00:0a:95:45:0d:a9; > > control_psm 0x11; > > interrupt_psm 0x13; > > reconnect_initiate true; > > battery_power false; > ^^^^^ > Odd, the keyboard is battery powered, isn't it? > > Markus > It certainly is battery powered. I was contemplating looking at the query with hcidump, but I am not that familiar with bluetooth. If you think it might be of any use to you, I can either send you the dump or make available for download. -- Alexandre "Sunny" Kovalenko (Олександр Коваленко) From owner-freebsd-bluetooth@FreeBSD.ORG Thu Mar 9 08:52:58 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org Delivered-To: freebsd-bluetooth@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A7E416A420 for ; Thu, 9 Mar 2006 08:52:58 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from mail09.svc.cra.dublin.eircom.net (mail09.svc.cra.dublin.eircom.net [159.134.118.25]) by mx1.FreeBSD.org (Postfix) with SMTP id EE98E43D46 for ; Thu, 9 Mar 2006 08:52:51 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 8118 messnum 2870255 invoked from network[83.70.176.191/unknown]); 9 Mar 2006 08:52:49 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail09.svc.cra.dublin.eircom.net (qp 8118) with SMTP; 9 Mar 2006 08:52:49 -0000 Received: (nullmailer pid 1047 invoked by uid 1000); Thu, 09 Mar 2006 08:52:12 -0000 Date: Thu, 9 Mar 2006 08:52:12 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <440E31E7.9050409@savvis.net> References: <440DCFF0.6090809@savvis.net> <1141761895.037384.5308.nullmailer@galant.ukfsn.org> <440DF38F.7020707@savvis.net> <1141772196.551930.3681.nullmailer@galant.ukfsn.org> <440E1988.10202@savvis.net> <1141779342.768110.17808.nullmailer@galant.ukfsn.org> <440E31E7.9050409@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1141894332.239191.546.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@FreeBSD.org Subject: Re: apple bluetooth keyboard 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, 09 Mar 2006 08:52:58 -0000 On Tue, 7 Mar 2006, Maksim Yevmenkin wrote: > Iain Hibbert wrote: > > baseband connection, then 'red' can access the device through another > > L2CAP or RFCOMM socket (well, they can in my world :) > > you can do it with freebsd. i can open baseband by hand (as root) and then do > sdp query and/or rfcomm session as another user. i'm not following you here. My thought is exactly that. Once a device is authenticated, there is no way to restrict user access. User 'blue' might wish to copy pictures from his mobile phone, but that does not necessarily mean that user 'red' should be able to send a fax to a premium rate number.. I am ignoring this issue for now though, its too complex and I just want to get it working (which it does, I did some internet surfing at 9600bps for a while yesterday :) iain From owner-freebsd-bluetooth@FreeBSD.ORG Thu Mar 9 15:41:34 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8ABC016A420 for ; Thu, 9 Mar 2006 15:41:34 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from mail02.svc.cra.dublin.eircom.net (mail02.svc.cra.dublin.eircom.net [159.134.118.18]) by mx1.FreeBSD.org (Postfix) with SMTP id 0CD3643D55 for ; Thu, 9 Mar 2006 15:41:33 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 96857 messnum 5253405 invoked from network[83.70.176.191/unknown]); 9 Mar 2006 15:41:31 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail02.svc.cra.dublin.eircom.net (qp 96857) with SMTP; 9 Mar 2006 15:41:31 -0000 Received: (nullmailer pid 1745 invoked by uid 1000); Thu, 09 Mar 2006 15:40:55 -0000 Date: Thu, 9 Mar 2006 15:40:55 +0000 (GMT) To: freebsd-bluetooth@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1141918855.418446.1437.nullmailer@galant.ukfsn.org> From: Iain Hibbert Subject: config files 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, 09 Mar 2006 15:41:34 -0000 Hi, I have been playing with bthidd and bthidcontrol today, both are compiled on NetBSD (all keyboard/mouse interpretation is removed) And, I've been playing with my mouse trying to see it working so I know what to do, but gosh was having a terrible time of it. I worked out what my problem was (I thought it used no pin, when it should have been "0000" - the Apple documentation doesnt seem to mention this :) so I'm on track again I think. I was wondering though, if it would be more admin friendly to have a single "bluetooth.conf" file with a single parser (maybe in libbluetooth)? Each different program would never see the keywords that it didnt understand.. iain From owner-freebsd-bluetooth@FreeBSD.ORG Thu Mar 9 17:14:50 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8BFC16A420 for ; Thu, 9 Mar 2006 17:14:50 +0000 (GMT) (envelope-from lopisaur@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBB7C43D48 for ; Thu, 9 Mar 2006 17:14:47 +0000 (GMT) (envelope-from lopisaur@gmail.com) Received: by xproxy.gmail.com with SMTP id s9so351729wxc for ; Thu, 09 Mar 2006 09:14:47 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:from:reply-to:to:content-type:date:message-id:mime-version:x-mailer; b=pF1sfmxSeg6Q0UX531U5KAsIc5a6o6ADG7SEBrNClIg3woLdBamosz3INllDo0pkoNHuwC1SLpFd0tt16JZ3Gn9EzmCTfxx6wDozLee09uYaQmSCTkYMyqsG5nEVJNdqn4w0eJDXzQjkSjD5i029KW3E6dr0oksCh+6tdNMF3zI= Received: by 10.70.66.2 with SMTP id o2mr2516622wxa; Thu, 09 Mar 2006 09:14:47 -0800 (PST) Received: from hellion.clcw ( [206.107.150.10]) by mx.gmail.com with ESMTP id h37sm2185050wxd.2006.03.09.09.14.45; Thu, 09 Mar 2006 09:14:46 -0800 (PST) From: Christian Lopez de Castilla Wagner To: freebsd-bluetooth@freebsd.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-DaU3cC6CBA0t2ckLZudl" Date: Thu, 09 Mar 2006 13:16:45 -0400 Message-Id: <1141924605.54238.4.camel@hellion.clcw> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Subject: Siemens S55/56 synchronization options X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lopisaur@gmail.com List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Mar 2006 17:14:51 -0000 --=-DaU3cC6CBA0t2ckLZudl Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Oops, something went seriously wrong. Again, without attachments: Hi list, I'm trying to get data into/out of my Siemens S56 via BT. Inquiry: Inquiry result #0 BD_ADDR: CLCWS56 Page Scan Rep. Mode: 0x1 Page Scan Period Mode: 00 Page Scan Mode: 00 Class: 72:02:04 Clock offset: 0x4501 Inquiry complete. Status: No error [00] 00:01:e3:15:c1:64=20 OK, now: hellion# sdpcontrol -a CLCWS56 browse Record Handle: 0x00011101 Service Class ID List: Serial Port (0x1101) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 1 Bluetooth Profile Descriptor List: Serial Port (0x1101) ver. 1.0 Record Handle: 0x00011103 Service Class ID List: Dial-Up Networking (0x1103) Generic Networking (0x1201) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 1 Bluetooth Profile Descriptor List: Dial-Up Networking (0x1103) ver. 1.0 Record Handle: 0x00011111 Service Class ID List: Fax (0x1111) Generic Telephony (0x1204) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 1 Bluetooth Profile Descriptor List: Fax (0x1111) ver. 1.0 Record Handle: 0x00011105 Service Class ID List: OBEX Object Push (0x1105) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 4 OBEX (0x0008) Bluetooth Profile Descriptor List: OBEX Object Push (0x1105) ver. 1.0 Record Handle: 0x00011104 Service Class ID List: IrMC Sync (0x1104) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 5 OBEX (0x0008) Bluetooth Profile Descriptor List: IrMC Sync (0x1104) ver. 1.0 Record Handle: 0x00011112 Service Class ID List: Headset Audio Gateway (0x1112) Generic Audio (0x1203) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 2 Bluetooth Profile Descriptor List: Headset (0x1108) ver. 1.0 Record Handle: 0x0001111f Service Class ID List: Handsfree Audio Gateway (0x111f) Generic Audio (0x1203) Protocol Descriptor List: L2CAP (0x0100) RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 3 Bluetooth Profile Descriptor List: Handsfree (0x111e) ver. 1.0 This is as far as I got. The OBEX man pages aren't helpful at all. I was wondering what the options are to get my phonebook out of the phone and to send files into the phone. Some examples would be greatly appreciated, if someone has any. My /etc/bluetooth file has: ff:ff:ff:00:00:00 localhost local # Magic sdpd address 00:01:e3:15:c1:64 CLCWS56 S56 Mobile # 20051109: Siemens S56 hcsecd.conf: device { bdaddr 00:00:00:00:00:00; name "Default entry"; key nokey; pin nopin; } device { bdaddr 00:01:e3:15:c1:64; name "CLCWS56"; key nokey; pin nopin; } Thanks in advance. Just in case: hellion# uname -a FreeBSD hellion.clcw 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Thu Feb 16 10:35:13 BOT 2006 root@hellion.clcw:/usr/obj/usr/src/sys/20051212 i386 --=20 Christian Lopez de Castilla Wagner lopisaur@gmail.com lopisaur@acelerate.com (+591-705)98290 --=20 Christian Lopez de Castilla Wagner lopisaur@gmail.com lopisaur@acelerate.com (+591-705)98290 --=-DaU3cC6CBA0t2ckLZudl Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (FreeBSD) iD8DBQBEEGL9BfwpMEg+qbYRAviAAKDDMSnjo+kIWYKAfH7jBeObdRKAuwCeN3c2 hvdpr7Rp2Wh0iudq4MQPEE4= =82Zi -----END PGP SIGNATURE----- --=-DaU3cC6CBA0t2ckLZudl-- From owner-freebsd-bluetooth@FreeBSD.ORG Thu Mar 9 18:40:05 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CABA16A420 for ; Thu, 9 Mar 2006 18:40:05 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAB3543D4C for ; Thu, 9 Mar 2006 18:40:04 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k29IdsM31577; Thu, 9 Mar 2006 13:39:55 -0500 Message-ID: <44107678.1080206@savvis.net> Date: Thu, 09 Mar 2006 10:39:52 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Hibbert References: <1141918855.418446.1437.nullmailer@galant.ukfsn.org> In-Reply-To: <1141918855.418446.1437.nullmailer@galant.ukfsn.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: config files 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, 09 Mar 2006 18:40:05 -0000 Iain, > I have been playing with bthidd and bthidcontrol today, both are > compiled on NetBSD (all keyboard/mouse interpretation is removed) good > And, I've been playing with my mouse trying to see it working so I know > what to do, but gosh was having a terrible time of it. I worked out what > my problem was (I thought it used no pin, when it should have been "0000" > - the Apple documentation doesnt seem to mention this :) so I'm on track > again I think. yes. most (all?) mice/headsets and other devices with limited user interface have "fixed pin". it is usually "0000". > I was wondering though, if it would be more admin friendly to have a > single "bluetooth.conf" file with a single parser (maybe in libbluetooth)? > Each different program would never see the keywords that it didnt > understand.. i do not like this idea. having one huge config file for every possible bluetooth application seems like a bad thing to me. i agree, parser code can be moved in libbluetooth (or whatever), but config files should stay separate. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Thu Mar 9 19:06:14 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 803D016A420 for ; Thu, 9 Mar 2006 19:06:14 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1771243D45 for ; Thu, 9 Mar 2006 19:06:13 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k29J3tM00617; Thu, 9 Mar 2006 14:03:56 -0500 Message-ID: <44107C19.6050302@savvis.net> Date: Thu, 09 Mar 2006 11:03:53 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Hibbert References: <1141762244.118700.5588.nullmailer@galant.ukfsn.org> <440DEE78.5020500@savvis.net> <1141767948.252179.12317.nullmailer@galant.ukfsn.org> <440E0233.7080703@savvis.net> <1141775918.215241.15084.nullmailer@galant.ukfsn.org> <440E2D3F.6040800@savvis.net> <1141807931.899207.8150.nullmailer@galant.ukfsn.org> In-Reply-To: <1141807931.899207.8150.nullmailer@galant.ukfsn.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: whitespace 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, 09 Mar 2006 19:06:14 -0000 Iain Hibbert wrote: > On Tue, 7 Mar 2006, Maksim Yevmenkin wrote: > >>another union inside _hci part? > > I think too many unions. Is the amount of padding really 32 bytes? (I > think only 14 for NetBSD) how long can the netgraph node name be? any > reason you can't just use a flat structure? > > struct { > uint8_t len > sa_family_t family > bdaddr_t bdaddr > uint16_t psm > uint8_t channel > char name[16] > uint8_t _pad[7] > } > > with this, you still get 34 bytes total and can have up to 23 bytes for > the nodename (for HCI). Is there a reason to suppose that it should all be > squashed up at the top of the structure in every instance? node name size was bumped sometime ago to 32. that is why i put 32 in there. > could also be > > struct { > uint8_t len > sa_family_t family > union { > uint8_t _pad[32] > char name[nn] > struct { > bdaddr_t bdaddr > uint16_t psm > uint8_t channel > } bar > } foo > } > > #define bt_name foo.name > #define bt_bdaddr foo.bar.bdaddr > #define bt_psm foo.bar.psm > #define bt_channel foo.bar.channel > > My thought also is that if you split it up so each protocol has a separate > section, you can't specify the offset of a field that appears in multiple > sections (such as bdaddr) in a generic way since it would exist in more > than one namespace, and my desire for a single namespace was what started > this :) well, i still do not understand why you insist on flat sockaddr_bt structure. sockaddr_* structures exist for a reason. we do not lump together, say, sockaddr_in and sockaddr_ipx. those are different protocols are the fact that both can be run over ethernet does not require us to lump them. the same (in some sense) applies to bluetooth. sure, l2cap, rfcomm etc. run over acl link. sure, they share some common properties (i.e. bd_addr). the point is that those are different protocols. it makes sense (to me) to keep them separate. so, imo, unions would work. another way is to create struct sockaddr_bt { uint8_t len; sa_family_t family; uint8 addr[0]; /* variable size of len-sizeof(len)-sizeof(family) */ } then have bunch of sockaddr_bt_* structures that would go into addr[] field. similar to struct sockaddr, struct sockaddr_in etc. > Hm, it occurs to me though that I am only thinking of source level > compatibility, were you considering binary compat? That probably > introduces additional considerations. i we can get source compatibility that would be enough for me. binary compatibility is ideal. >>>Also, it is possible in my implementation to specify an alternate PSM for >>>rfcomm sockets (as I read the spec, this is allowed..) >> >>sure its allowed, but why would you want to do this? there is no way for the >>remote device to know that the local device runs rfcomm on some other (than 3) >>psm. in the same way you could run sdp on any psm. it will work, as long as >>you control both sides - server and client. changing "well known" psm is a >>sure way to get into all sorts of interoperability problems. > > Well, I am not well versed in SDP because your libsdp managed to hide the > details for me, but for example the SDP query on my phone produces this > now: > > Record Handle: 0x00010000 > Service Class ID List: > Dial-Up Networking (0x1103) > Generic Networking (0x1201) > Protocol Descriptor List: > L2CAP (0x0100) > RFCOMM (0x0003) > Protocol specific parameter #1: u/int8/bool 1 > Bluetooth Profile Descriptor List: > Dial-Up Networking (0x1103) ver. 1.0 > > > whereas if it produced something like: > > Record Handle: 0x00010000 > Service Class ID List: > Dial-Up Networking (0x1103) > Generic Networking (0x1201) > Protocol Descriptor List: > L2CAP (0x0100) > (0x1007) > Protocol specific parameter #1: u/int8/bool 1 > Bluetooth Profile Descriptor List: > Dial-Up Networking (0x1103) ver. 1.0 > > then it should 'just work' on psm 0x1007, no? well, not really, imo. the first element is protocol uuid, not psm. i think, you would have to add protocol specific parameter to l2cap protocol that tells which psm to use to get access to the higher level protocol (i.e. rfcomm). in other words Protocol Descriptor List: L2CAP (0x0100) Protocol specific parameter #1: u/int16 0x1007 -- l2cap psm for rfcomm RFCOMM (0x0003) Protocol specific parameter #1: u/int8/bool 1 -- rfcomm channel i have never seen anything like this, and i'm not sure if this will even work with other stacks. > Thats how I read it from "5.1.5 ProtoclDescriptorListAttribute" anyway but > I havent tried it.. > > And, as to why somebody might want to do this, I dont know but it was easy > to allow so I did :) i think if someone wants to use custom service they better off running it over l2cap. if rfcomm is required, then there are 32 available channels. also, it is possible to write rfcomm implementation completely in userspace and it on any psm. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Thu Mar 9 19:14:14 2006 Return-Path: X-Original-To: freebsd-bluetooth@FreeBSD.org Delivered-To: freebsd-bluetooth@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 454D816A420 for ; Thu, 9 Mar 2006 19:14:14 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id DAC1543D45 for ; Thu, 9 Mar 2006 19:14:13 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k29JBgM01116; Thu, 9 Mar 2006 14:11:43 -0500 Message-ID: <44107DEC.4060902@savvis.net> Date: Thu, 09 Mar 2006 11:11:40 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Hibbert References: <440DCFF0.6090809@savvis.net> <1141761895.037384.5308.nullmailer@galant.ukfsn.org> <440DF38F.7020707@savvis.net> <1141772196.551930.3681.nullmailer@galant.ukfsn.org> <440E1988.10202@savvis.net> <1141779342.768110.17808.nullmailer@galant.ukfsn.org> <440E31E7.9050409@savvis.net> <1141894332.239191.546.nullmailer@galant.ukfsn.org> In-Reply-To: <1141894332.239191.546.nullmailer@galant.ukfsn.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@FreeBSD.org Subject: Re: apple bluetooth keyboard 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, 09 Mar 2006 19:14:14 -0000 Iain Hibbert wrote: > On Tue, 7 Mar 2006, Maksim Yevmenkin wrote: > >>Iain Hibbert wrote: >> >>>baseband connection, then 'red' can access the device through another >>>L2CAP or RFCOMM socket (well, they can in my world :) >> >>you can do it with freebsd. i can open baseband by hand (as root) and then do >>sdp query and/or rfcomm session as another user. i'm not following you here. > > My thought is exactly that. Once a device is authenticated, there is no > way to restrict user access. User 'blue' might wish to copy pictures from > his mobile phone, but that does not necessarily mean that user 'red' > should be able to send a fax to a premium rate number.. well, this is the wrong protocol layer to implement this kind of restrictions. you simply do not have enough information to make a proper decision. it is up to the services themselves to verify user credentials and allow (or deny) access to the service. obex, for example, has built-in authentication facility. and, in theory, it is possible to authenticate obex requests (much like http). serial port profile, on the other hand, does not have built-in authentication facility. bluetooth is obviously positioned for personal use. so, "single pin code gives access to all services" model works here. > I am ignoring this issue for now though, its too complex and I just want > to get it working (which it does, I did some internet surfing at 9600bps > for a while yesterday :) cool! thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Thu Mar 9 20:02:12 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D82516A420 for ; Thu, 9 Mar 2006 20:02:12 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id A453B43D45 for ; Thu, 9 Mar 2006 20:02:11 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k29K2AM03858; Thu, 9 Mar 2006 15:02:10 -0500 Message-ID: <441089C0.9030300@savvis.net> Date: Thu, 09 Mar 2006 12:02:08 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: lopisaur@gmail.com References: <1141924605.54238.4.camel@hellion.clcw> In-Reply-To: <1141924605.54238.4.camel@hellion.clcw> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: Siemens S55/56 synchronization options 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, 09 Mar 2006 20:02:12 -0000 Christian Lopez de Castilla Wagner wrote: > Oops, something went seriously wrong. Again, without attachments: > > Hi list, > > I'm trying to get data into/out of my Siemens S56 via BT. > > Inquiry: > Inquiry result #0 [...] looks good > OK, now: > > hellion# sdpcontrol -a CLCWS56 browse > [...] looks good > This is as far as I got. The OBEX man pages aren't helpful at all. I was > wondering what the options are to get my phonebook out of the phone and > to send files into the phone. to put file you can use obexapp(1) from ports and obex push profile, i.e. % obexapp -c -a CLCWS56 -C opush -n put file_name to get files you could run obexapp(1) in server mode and push files from the phone to the pc, i.e. 1) make sure hcsecd(8) is running, "/etc/rc.d/hcsecd status" if not start it "/etc/rc.d/hcsecd start" 2) make sure sdpd(8) is running, "/etc/rc.d/sdpd status" if not start it "/etc/rc.d/sdpd start" 3) start obexapp(1) in server mode (as root) # obexapp -s -S -C 1 -u your_user_name now you should be able to push data from your phone to pc. all received files will be in your home directory > Some examples would be greatly appreciated, if someone has any. > My /etc/bluetooth file has: > > ff:ff:ff:00:00:00 localhost local # Magic sdpd address > 00:01:e3:15:c1:64 CLCWS56 S56 Mobile # 20051109: Siemens S56 looks fine > hcsecd.conf: > > device { > bdaddr 00:00:00:00:00:00; > name "Default entry"; > key nokey; > pin nopin; > } > > device { > bdaddr 00:01:e3:15:c1:64; > name "CLCWS56"; > key nokey; > pin nopin; > } i'm pretty sure you want to specify pin code for the phone. when phone asks for it - just enter the same pin code (i.e. pair). make sure hcsecd(8) and sdpd(8) are running at all times, i.e. add hcsecd_enable="YES" sdpd_enable="YES" to your /etc/rc.conf file to start them on boot. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Fri Mar 10 01:07:18 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6047B16A420 for ; Fri, 10 Mar 2006 01:07:18 +0000 (GMT) (envelope-from lopisaur@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE1D843D45 for ; Fri, 10 Mar 2006 01:07:17 +0000 (GMT) (envelope-from lopisaur@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so391992wxc for ; Thu, 09 Mar 2006 17:07:17 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:from:reply-to:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=uGZC/zxrVRGUZxlslfhKlbcLkbXCQ1hE5vjKnY7WD/2cF7Tk3gWsHKk10lAn0iZOvP5CCGD0jd5P2KFwab6R5h59ooKtmq/hp0bL42wh0uD8OE2fZgqCRyV0FJi4NPq8gtvxrwW/cC3UFnHy2UEFkDnadjgQKx5hc/vT8P8B9V4= Received: by 10.70.23.18 with SMTP id 18mr2824724wxw; Thu, 09 Mar 2006 17:07:16 -0800 (PST) Received: from hellion.clcw ( [200.105.221.232]) by mx.gmail.com with ESMTP id i13sm570199wxd.2006.03.09.17.07.15; Thu, 09 Mar 2006 17:07:16 -0800 (PST) From: Christian Lopez de Castilla Wagner To: Maksim Yevmenkin In-Reply-To: <441089C0.9030300@savvis.net> References: <1141924605.54238.4.camel@hellion.clcw> <441089C0.9030300@savvis.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Gz1Cl0tBmO6FyAuo8TOA" Date: Thu, 09 Mar 2006 21:09:22 -0400 Message-Id: <1141952962.30556.9.camel@hellion.clcw> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Cc: freebsd-bluetooth@freebsd.org Subject: Re: Siemens S55/56 synchronization options X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lopisaur@gmail.com List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Mar 2006 01:07:18 -0000 --=-Gz1Cl0tBmO6FyAuo8TOA Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Thanks a lot, you really helped me with that. The push is working as expected. What I'm having trouble with right now is the OBEX server mode. I read the man page for obexapp and just noticed you actually wrote it. Entering hellion# obexapp -s -S -C 1 just exits, as well as using the -d or -D (from what I reckon, -d should keep the session on the terminal and -D should do about the same). The server never actually starts. Is this due to the fact that I'm not using PIN codes and/or because I'm not using the -u user_name option? I have been trying to run the whole process as root and want to put the files in /root, that's why I'm not using -u. Anyway, I really appreciate the help. Thank you. On Thu, 2006-03-09 at 12:02 -0800, Maksim Yevmenkin wrote: > Christian Lopez de Castilla Wagner wrote: > > Oops, something went seriously wrong. Again, without attachments: > >=20 > > Hi list, > > using > > I'm trying to get data into/out of my Siemens S56 via BT. > >=20 > > Inquiry: > > Inquiry result #0 >=20 > [...] >=20 > looks good >=20 > > OK, now: > >=20 > > hellion# sdpcontrol -a CLCWS56 browse > >=20 > [...] >=20 > looks good >=20 > > This is as far as I got. The OBEX man pages aren't helpful at all. I wa= s > > wondering what the options are to get my phonebook out of the phone and > > to send files into the phone. >=20 > to put file you can use obexapp(1) from ports and obex push profile, i.e. >=20 > % obexapp -c -a CLCWS56 -C opush -n put file_name >=20 > to get files you could run obexapp(1) in server mode and push files from=20 > the phone to the pc, i.e. >=20 > 1) make sure hcsecd(8) is running, "/etc/rc.d/hcsecd status" if not=20 > start it "/etc/rc.d/hcsecd start" >=20 > 2) make sure sdpd(8) is running, "/etc/rc.d/sdpd status" if not start it=20 > "/etc/rc.d/sdpd start" >=20 > 3) start obexapp(1) in server mode (as root) >=20 > # obexapp -s -S -C 1 -u your_user_name >=20 > now you should be able to push data from your phone to pc. all received=20 > files will be in your home directory >=20 > > Some examples would be greatly appreciated, if someone has any. > > My /etc/bluetooth file has: > >=20 > > ff:ff:ff:00:00:00 localhost local # Magic sdpd address > > 00:01:e3:15:c1:64 CLCWS56 S56 Mobile # 20051109: Siemens S56 >=20 > looks fine >=20 > > hcsecd.conf: > >=20 > > device { > > bdaddr 00:00:00:00:00:00; > > name "Default entry"; > > key nokey; > > pin nopin; > > } > >=20 > > device { > > bdaddr 00:01:e3:15:c1:64; > > name "CLCWS56"; > > key nokey; > > pin nopin; > > } >=20 > i'm pretty sure you want to specify pin code for the phone. when phone=20 > asks for it - just enter the same pin code (i.e. pair). make sure=20 > hcsecd(8) and sdpd(8) are running at all times, i.e. add >=20 > hcsecd_enable=3D"YES" > sdpd_enable=3D"YES" >=20 > to your /etc/rc.conf >=20 > file to start them on boot. >=20 > thanks, > max --=20 Christian Lopez de Castilla Wagner lopisaur@gmail.com lopisaur@acelerate.com (+591-705)98290 --=-Gz1Cl0tBmO6FyAuo8TOA Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (FreeBSD) iD8DBQBEENHCBfwpMEg+qbYRAvUtAJoC/zfalRRLcKu46hX+e88tyQZvVgCfXiF8 rXfH9dyfhLCqJ0CMOVlFUUs= =lJEb -----END PGP SIGNATURE----- --=-Gz1Cl0tBmO6FyAuo8TOA-- From owner-freebsd-bluetooth@FreeBSD.ORG Fri Mar 10 08:57:34 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0FA2D16A420 for ; Fri, 10 Mar 2006 08:57:34 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from mail12.svc.cra.dublin.eircom.net (mail12.svc.cra.dublin.eircom.net [159.134.118.28]) by mx1.FreeBSD.org (Postfix) with SMTP id 687D243D45 for ; Fri, 10 Mar 2006 08:57:32 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 240 messnum 5765006 invoked from network[83.70.176.191/unknown]); 10 Mar 2006 08:57:30 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail12.svc.cra.dublin.eircom.net (qp 240) with SMTP; 10 Mar 2006 08:57:30 -0000 Received: (nullmailer pid 427 invoked by uid 1000); Fri, 10 Mar 2006 08:43:26 -0000 Date: Fri, 10 Mar 2006 08:43:26 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <44107C19.6050302@savvis.net> References: <1141762244.118700.5588.nullmailer@galant.ukfsn.org> <440DEE78.5020500@savvis.net> <1141767948.252179.12317.nullmailer@galant.ukfsn.org> <440E0233.7080703@savvis.net> <1141775918.215241.15084.nullmailer@galant.ukfsn.org> <440E2D3F.6040800@savvis.net> <1141807931.899207.8150.nullmailer@galant.ukfsn.org> <44107C19.6050302@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1141980206.657073.302.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: whitespace 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: Fri, 10 Mar 2006 08:57:34 -0000 On Thu, 9 Mar 2006, Maksim Yevmenkin wrote: > Iain Hibbert wrote: > well, i still do not understand why you insist on flat sockaddr_bt structure. Well, I still dont understand why it was created differently :) > sockaddr_* structures exist for a reason. we do not lump together, say, > sockaddr_in and sockaddr_ipx. those are different protocols are the fact that > both can be run over ethernet does not require us to lump them. Ok, we dont have sockaddr_ipx and I'm not sure what that is, but if you look at sockaddr_in and sockaddr_in6 they are different for a reason, because the addresses are different. But now, because they are different, they have a different sa_family type (AF_INET and AF_INET6) and when you look at the sockaddr you can tell which it is. It just makes no sense to me to have different structures with the same tag and there be no way to tell the difference. In my stack when you open an RFCOMM socket, it uses the sockaddr to open the L2CAP channel. When incoming connections are detected, the sockaddr is only created once, it just gets passed up. Actually, I can see a partial reason to have the HCI_RAW socket address different, in that bluetooth devices have no address available until they are up and running. I handled the device initiation in kernel and didnt notice that until recently. I am going to see what the netbsd opinion on this is, I can't claim to be an expert in these matters, heh.. > > then it should 'just work' on psm 0x1007, no? > > well, not really, imo. the first element is protocol uuid, not psm. i think, > you would have to add protocol specific parameter to l2cap protocol that tells > which psm to use to get access to the higher level protocol (i.e. rfcomm). in > other words > > Protocol Descriptor List: > L2CAP (0x0100) > Protocol specific parameter #1: u/int16 0x1007 -- l2cap psm for rfcomm > RFCOMM (0x0003) > Protocol specific parameter #1: u/int8/bool 1 -- rfcomm channel > > i have never seen anything like this, and i'm not sure if this will even work > with other stacks. Ah, thanks.. I see what they are saying now. I misinterpreted it because they have used the PSM as UUID. The example actually is: ((L2CAP, PSM=0x1001), (RFCOMM, CN=1), (Obex), (vCal)) ((L2CAP, PSM=0x1002), (RFCOMM, CN=1), (Obex), (Other)) which is as you said, but imho that should just work. Actually, to make that work was quite simple I think all I did in effect was to change the session lookup routine to ignore different psm values, and also set the psm to L2CAP_PSM_RFCOMM if it was unset. iain From owner-freebsd-bluetooth@FreeBSD.ORG Fri Mar 10 10:45:26 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3645D16A420 for ; Fri, 10 Mar 2006 10:45:26 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from mail10.svc.cra.dublin.eircom.net (mail10.svc.cra.dublin.eircom.net [159.134.118.26]) by mx1.FreeBSD.org (Postfix) with SMTP id A445D43D46 for ; Fri, 10 Mar 2006 10:45:24 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 79513 messnum 6681507 invoked from network[83.70.176.191/unknown]); 10 Mar 2006 10:45:23 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail10.svc.cra.dublin.eircom.net (qp 79513) with SMTP; 10 Mar 2006 10:45:23 -0000 Received: (nullmailer pid 1341 invoked by uid 1000); Fri, 10 Mar 2006 10:44:41 -0000 Date: Fri, 10 Mar 2006 10:44:41 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <44107678.1080206@savvis.net> References: <1141918855.418446.1437.nullmailer@galant.ukfsn.org> <44107678.1080206@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1141987481.199185.1325.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: config files 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: Fri, 10 Mar 2006 10:45:26 -0000 On Thu, 9 Mar 2006, Maksim Yevmenkin wrote: > yes. most (all?) mice/headsets and other devices with limited user interface > have "fixed pin". it is usually "0000". Ah, I think a note in the manpage (or example config file) to this effect could be good? I've inserted this: # "nopin" means that no PIN code has been defined and we should # send PIN_Code_Negative_Reply command to the device # # many bluetooth devices with limited user interfaces (eg mice, # headsets, ..) use a pin of "0000" rather than nopin, consult # your device manual for details. iain From owner-freebsd-bluetooth@FreeBSD.ORG Sat Mar 11 01:19:47 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC54816A41F for ; Sat, 11 Mar 2006 01:19:47 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 414C6482E7 for ; Fri, 10 Mar 2006 18:05:57 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k2AI5tM10100; Fri, 10 Mar 2006 13:05:55 -0500 Message-ID: <4411C000.8060303@savvis.net> Date: Fri, 10 Mar 2006 10:05:52 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: lopisaur@gmail.com References: <1141924605.54238.4.camel@hellion.clcw> <441089C0.9030300@savvis.net> <1141952962.30556.9.camel@hellion.clcw> In-Reply-To: <1141952962.30556.9.camel@hellion.clcw> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: Siemens S55/56 synchronization options 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: Sat, 11 Mar 2006 01:19:47 -0000 Christian Lopez de Castilla Wagner wrote: > Thanks a lot, you really helped me with that. The push is working as > expected. > What I'm having trouble with right now is the OBEX server mode. > I read the man page for obexapp and just noticed you actually wrote it. > > Entering > > hellion# obexapp -s -S -C 1 > > just exits, as well as using the -d or -D (from what I reckon, -d > should keep the session on the terminal and -D should do about the > same). The server never actually starts. please check /var/log/messages for error messages from the obexapp(1). my guess would be that /var/spool/obex directory does not exist. this is where obexapp(1) will store files by default. you can also use # obexapp -s -S -C 1 -r /root to override this (-r sets root folder) if you are running as root and do not want to use -u option. also make sure sdpd(8) is running. obexapp(1) will not start without sdpd(8) because it needs to register service. > Is this due to the fact that I'm not using PIN codes and/or because I'm > not using the -u user_name option? no, it is not because of pin code. and yes it is because you do not use -u or -r options. > I have been trying to run the whole process as root and want to put the > files in /root, that's why I'm not using -u. use -r to set root folder, or create /var/spool/obex directory thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Sat Mar 11 01:23:41 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70BB716A44B for ; Sat, 11 Mar 2006 01:23:36 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: from mail01.svc.cra.dublin.eircom.net (mail01.svc.cra.dublin.eircom.net [159.134.118.17]) by mx1.FreeBSD.org (Postfix) with SMTP id 9B76E49BD7 for ; Fri, 10 Mar 2006 20:24:07 +0000 (GMT) (envelope-from plunky@rya-online.net) Received: (qmail 7705 messnum 7066450 invoked from network[83.70.176.191/unknown]); 10 Mar 2006 20:24:05 -0000 Received: from unknown (HELO rya-online.net) (83.70.176.191) by mail01.svc.cra.dublin.eircom.net (qp 7705) with SMTP; 10 Mar 2006 20:24:05 -0000 Received: (nullmailer pid 3507 invoked by uid 1000); Fri, 10 Mar 2006 20:23:27 -0000 Date: Fri, 10 Mar 2006 20:23:27 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: <4411C626.8030702@savvis.net> References: <1141762244.118700.5588.nullmailer@galant.ukfsn.org> <440DEE78.5020500@savvis.net> <1141767948.252179.12317.nullmailer@galant.ukfsn.org> <440E0233.7080703@savvis.net> <1141775918.215241.15084.nullmailer@galant.ukfsn.org> <440E2D3F.6040800@savvis.net> <1141807931.899207.8150.nullmailer@galant.ukfsn.org> <44107C19.6050302@savvis.net> <1141980206.657073.302.nullmailer@galant.ukfsn.org> <4411C626.8030702@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1142022207.888900.3096.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: whitespace 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: Sat, 11 Mar 2006 01:23:41 -0000 On Fri, 10 Mar 2006, Maksim Yevmenkin wrote: > ok, i think, i understand what you are saying now. it seems like you are > objecting to the fact that all sockaddr_* in bluetooth domain have family set > AF_BLUETOOTH. Well yes and no - I agree that family should be AF_BLUETOOTH throughout of course :) I just feel that all addresses in the domain should be compatible. That seems to me to be partly the definition of the domain though its not strict - from netintro(4) --8<---- A protocol family may support multiple methods of addressing, though the current protocol implementations do not. [...] Protocols normally accept only one type of address format, usually determined by the addressing structure inherent in the design of the protocol family/network architecture. --8<---- and for me at least, it seemed much simpler and neater to use the same address type throughout, so I did. Until its published though, nothing is fixed in stone :) > this is somewhat similar to AF_INET family where you can have IP, ICMP, TCP, > UDP, etc. protocols. all within the same AF_INET family/domain. On NetBSD at least, all these use 'struct sockaddr_in' for addressing :) > please consider another example: lets say another rfcomm-like protocol is > defined and added to the bluetooth stack. if you have flat sockaddr_bt you > might need to add some fields to sockaddr_bt structure to implement new > protocol. this will likely to break binary compatibility. if you have separate > sockaddr_bt_x per protocol - you are safe. Hey thats a good point, it should be padded.. > > Actually, I can see a partial reason to have the HCI_RAW socket address > > different, in that bluetooth devices have no address available until they > > are up and running. I handled the device initiation in kernel and didnt > > notice that until recently. > > yes, that was the reason (at least for me) to keep initialization procedure in > user space. it seems like more flexible solution to me. i thinking about > manufacturer specific initialization sequences. Hm, yes but are there any? - actually the only initialisation that I do currently is Read_BDADDR and Read_Buffer_Size. > > ((L2CAP, PSM=0x1001), (RFCOMM, CN=1), (Obex), (vCal)) > > ((L2CAP, PSM=0x1002), (RFCOMM, CN=1), (Obex), (Other)) > > have you tried with, say, with mobile phone. have you tried to advertise > rfcomm-based service on different psm? did the phone made connection to the > right psm to open rfcomm session? No, I didnt try to get any incoming services running as yet, I'm having trouble setting up connections to my mouse and I'm not exactly sure why (though, it seems ok when the connection is up) Incidentally, in bthidd you used select() to wait on fd's and I notice that if the channel is lost for whatever reason, bthidd does not seem to close the socket. I guess this is because it is not selecting on 'exceptfds'? I'm not sure what 'an exceptional condition' is in any case, but I guess that the socket being disconnected could be part of that.. regards, iain From owner-freebsd-bluetooth@FreeBSD.ORG Sat Mar 11 01:57:12 2006 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8657516A441 for ; Sat, 11 Mar 2006 01:57:09 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0513488D7 for ; Fri, 10 Mar 2006 18:32:17 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id k2AIW8M10657; Fri, 10 Mar 2006 13:32:09 -0500 Message-ID: <4411C626.8030702@savvis.net> Date: Fri, 10 Mar 2006 10:32:06 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Iain Hibbert References: <1141762244.118700.5588.nullmailer@galant.ukfsn.org> <440DEE78.5020500@savvis.net> <1141767948.252179.12317.nullmailer@galant.ukfsn.org> <440E0233.7080703@savvis.net> <1141775918.215241.15084.nullmailer@galant.ukfsn.org> <440E2D3F.6040800@savvis.net> <1141807931.899207.8150.nullmailer@galant.ukfsn.org> <44107C19.6050302@savvis.net> <1141980206.657073.302.nullmailer@galant.ukfsn.org> In-Reply-To: <1141980206.657073.302.nullmailer@galant.ukfsn.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: whitespace 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: Sat, 11 Mar 2006 01:57:12 -0000 Iain Hibbert wrote: > On Thu, 9 Mar 2006, Maksim Yevmenkin wrote: > >>Iain Hibbert wrote: >>well, i still do not understand why you insist on flat sockaddr_bt structure. > > Well, I still dont understand why it was created differently :) again, because they are different protocols, and have different properties. >>sockaddr_* structures exist for a reason. we do not lump together, say, >>sockaddr_in and sockaddr_ipx. those are different protocols are the fact that >>both can be run over ethernet does not require us to lump them. > > Ok, we dont have sockaddr_ipx and I'm not sure what that is, but if you > look at sockaddr_in and sockaddr_in6 they are different for a reason, > because the addresses are different. But now, because they are different, > they have a different sa_family type (AF_INET and AF_INET6) and when you > look at the sockaddr you can tell which it is. It just makes no sense to > me to have different structures with the same tag and there be no way to > tell the difference. ok, i think, i understand what you are saying now. it seems like you are objecting to the fact that all sockaddr_* in bluetooth domain have family set AF_BLUETOOTH. i do not see this as a big problem. when socket(2) is called you have to specify "protocol" parameter (i'm talking about freebsd bluetooth sockets here). since bind(2), connect(2) etc. accept struct sockaddr pointer you have to cast pointer anyway, and, because you know which protocol you are dealing with, you can cast it to the correct struct sockaddr_X pointer anyway. this is somewhat similar to AF_INET family where you can have IP, ICMP, TCP, UDP, etc. protocols. all within the same AF_INET family/domain. in other words: AF_BLUETOOTH - defines domain, BLUETOOTH_PROTO_X defines protocol and tells which struct sockaddr_X must be used. for the reasons above, i decided to not introduce separate AF_BLUETOOTH_X families for different protocols. > In my stack when you open an RFCOMM socket, it uses the sockaddr to open > the L2CAP channel. When incoming connections are detected, the sockaddr is > only created once, it just gets passed up. i'm not really sure i understand what are you talking about here. to me, each socket have to have sockaddr_x anyway and you have to fill it with correct values. please consider another example: lets say another rfcomm-like protocol is defined and added to the bluetooth stack. if you have flat sockaddr_bt you might need to add some fields to sockaddr_bt structure to implement new protocol. this will likely to break binary compatibility. if you have separate sockaddr_bt_x per protocol - you are safe. > Actually, I can see a partial reason to have the HCI_RAW socket address > different, in that bluetooth devices have no address available until they > are up and running. I handled the device initiation in kernel and didnt > notice that until recently. yes, that was the reason (at least for me) to keep initialization procedure in user space. it seems like more flexible solution to me. i thinking about manufacturer specific initialization sequences. > I am going to see what the netbsd opinion on this is, I can't claim to be > an expert in these matters, heh.. ok >>>then it should 'just work' on psm 0x1007, no? >> >>well, not really, imo. the first element is protocol uuid, not psm. i think, >>you would have to add protocol specific parameter to l2cap protocol that tells >>which psm to use to get access to the higher level protocol (i.e. rfcomm). in >>other words >> >>Protocol Descriptor List: >> L2CAP (0x0100) >> Protocol specific parameter #1: u/int16 0x1007 -- l2cap psm for rfcomm >> RFCOMM (0x0003) >> Protocol specific parameter #1: u/int8/bool 1 -- rfcomm channel >> >>i have never seen anything like this, and i'm not sure if this will even work >>with other stacks. > > Ah, thanks.. I see what they are saying now. I misinterpreted it because > they have used the PSM as UUID. The example actually is: > > ((L2CAP, PSM=0x1001), (RFCOMM, CN=1), (Obex), (vCal)) > ((L2CAP, PSM=0x1002), (RFCOMM, CN=1), (Obex), (Other)) > > which is as you said, but imho that should just work. Actually, to make > that work was quite simple I think all I did in effect was to change the > session lookup routine to ignore different psm values, and also set the > psm to L2CAP_PSM_RFCOMM if it was unset. have you tried with, say, with mobile phone. have you tried to advertise rfcomm-based service on different psm? did the phone made connection to the right psm to open rfcomm session? thanks, max