From owner-freebsd-bluetooth@FreeBSD.ORG Tue Mar 14 18:26: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 5EFB316A401 for ; Tue, 14 Mar 2006 18:26:50 +0000 (UTC) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id F35A943D45 for ; Tue, 14 Mar 2006 18:26:49 +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 k2EIQdM16216; Tue, 14 Mar 2006 13:26:40 -0500 Message-ID: <44170ADD.3080706@savvis.net> Date: Tue, 14 Mar 2006 10:26:37 -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> <44107678.1080206@savvis.net> <1142195365.759631.5369.nullmailer@galant.ukfsn.org> <44160BE9.9020306@savvis.net> <1142325762.357474.659.nullmailer@galant.ukfsn.org> In-Reply-To: <1142325762.357474.659.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: Tue, 14 Mar 2006 18:26:50 -0000 Iain, >>>Its just that to add a mouse to the system, I needed to enter details in 3 >>>files (and, details are held in two more) which could be considered a bit >>>much just for a mouse :) >> >>3 files, i assume, are: /etc/bluetooth/hosts, /etc/bluetooth/hcsecd.conf and >>/etc/bluetooth/bthidd.conf. entry in /etc/bluetooth/hosts file is optional. >> >>i'm not sure which other 2 files you are talking about. > > /var/db/bthcid.keys & /var/db/bthidd.hids > > which are automatic, though may need attention when batteries are changed? yes, they these are "configuration files", but they are not really "configuration files" :) these are "persistent store". the only purpose of these is to preserve state between restarts. i doubt that these will need any attention when battery changed, because the remote device (i.e. mouse, keyboard etc.) has its own "persistent store" where all link keys and other settings are kept. it should almost never be required to modify /var/db/bthcid.keys file. /var/db/bthidd.hids may need some attention (depending on the remote device), but bthidcontrol(8) "forget" command can be used for this. >>>vaguely related to this, would the attached patch work to reload >>>bthidd.conf on SIGHUP? It seems that it should, though I'm not sure if the >>>fact that the new_device field is set would be an issue (maybe not, if the >>>session already exists?) >> >>there is one problem with this particular patch. please see my comments inline > > Ok, this should be better - seems to work for me, thanks! > > (also you may need to enable "reload" in /etc/rc.d/bthidd?) > > -- > > On another issue, in libsdp/session.c you have > > sa.l2cap_psm = htole16(NG_L2CAP_PSM_SDP); > > which seems wrong? (will work ok on little endian machine) actually, no. i think the problem is with bthidd(8) (and others, i.e. sdpd(8)). bluetooth byte order is le16. so, l2cap_psm field in sockaddr_l2cap should always be in le16 byte order. thanks for catching this! [...] > > + sas.sa_handler = sighup; this is obviously a typo. it should be "sa.sa_handler = sighup;". otherwise it wont compile. did you sent the patch before you have actually tried it? thanks, max