From owner-freebsd-bluetooth@FreeBSD.ORG Sun Feb 18 04:05:19 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 639DD16A402 for ; Sun, 18 Feb 2007 04:05:19 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.227]) by mx1.freebsd.org (Postfix) with ESMTP id 269DD13C48D for ; Sun, 18 Feb 2007 04:05:19 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so1516741nzh for ; Sat, 17 Feb 2007 20:05:18 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=G0U70BH1e+YwQoctrIXyCXPWQbCdyyjf0zvj6fAmFD1rAOKn1556WjP9PziVJ8+9Ztszt1GJXpeAxK/tGhkgXQFxN5hC86bCOYCamWs/PNEprsqFGG4rV/03KJdpYX/cHMlg+y0ST6T6IfqzxGRkvpYBG5xHV1AbGqlai1fevtk= Received: by 10.65.180.7 with SMTP id h7mr7301049qbp.1171771518249; Sat, 17 Feb 2007 20:05:18 -0800 (PST) Received: by 10.65.137.19 with HTTP; Sat, 17 Feb 2007 20:05:18 -0800 (PST) Message-ID: Date: Sat, 17 Feb 2007 20:05:18 -0800 From: "Maksim Yevmenkin" To: "Eric Anderson" In-Reply-To: <45D68F37.7040105@centtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45D5F027.7060401@centtech.com> <45D68F37.7040105@centtech.com> Cc: "freebsd-bluetooth@freebsd.org" Subject: Re: Prioritizing bluetooth devices? X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Feb 2007 04:05:19 -0000 On 2/16/07, Eric Anderson wrote: [...] > >> I have just set up my Treo 700p using bluetooth and kpilot to sync > >> (thanks Bruce/Maksim!!!!). I notice that when I'm doing a backup of my > >> palm and it's downloading a ton of stuff, my bluetooth connection is > >> jammed full, so my bluetooth mouse is slow/lags. I don't have a > >> bluetooth keyboard, but if I did (and if it worked), then I'm certain it > >> would be present there too. > >> > >> So, my question is: is it possible to prioritize the bluetooth profiles > >> so that HID gets priority over things like serial, LAN, etc? > > > > in theory, this should not be happening, because each bluetooth slave > > has reserved slots in which it can transmit data. also bluetooth hid > > devices usually set "quality of service" parameters on bluetooth link. > > > > so, the problem could be either in the freebsd bluetooth code itself > > (i.e. it uses very simple packet scheduler that might not behave very > > well under load) or in packet scheduler in the device's "link > > manager", i.e. firmware. > > The system was idle (CPU-wise) but I had the bluetooth link slammed > transferring the entire contents of my palm (about 50MB). I've never > had a problem otherwise, even when keeping both CPU's (this is a Core 2 > Duo system) hammered. As soon as the transfer stopped, mouse was again > responsive. did you notice if the system's interrupt load was high? > > other than setting "quality of service" parameters on bluetooth link > > and/or forcing device to use only packets of certain size (i.e. 1,2 or > > 3-slots, which, btw, likely to reduce throughput) i doubt there is > > anything else (standard) that can be used to prioritize bluetooth > > profiles. > > > > if you can, please try to switch to bluetooth 2.0 dongle (if you have > > not already) > > As far as I know, this is a 2.0 dongle already (came with my laptop - > Dell D820, so it's built in). it is csr chip based daughter card that looks like usb device, is it not? thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Tue Feb 20 19:05:20 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4737016A6DD for ; Tue, 20 Feb 2007 19:05:20 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from smarthost01.eng.net (smarthost01.eng.net [213.130.146.173]) by mx1.freebsd.org (Postfix) with ESMTP id 1165E13C471 for ; Tue, 20 Feb 2007 19:05:20 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from netmail01.eng.net ([213.130.128.38] helo=rya-online.net) by smarthost01.eng.net with smtp (Exim 4.62) (envelope-from ) id 1HJaIZ-0001ZH-Dz; Tue, 20 Feb 2007 19:05:18 +0000 Received: (nullmailer pid 13076 invoked by uid 1000); Tue, 20 Feb 2007 18:04:09 -0000 Date: Tue, 20 Feb 2007 18:04:09 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1171994649.866710.8121.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp 1.4.5 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, 20 Feb 2007 19:05:20 -0000 On Tue, 30 Jan 2007, Maksim Yevmenkin wrote: > please let me know if you have any problems Not problems exactly; obexapp works fine on NetBSD with minimal changes (is available from pkgsrc/comms/obexapp) It would be good if the manpage could mention that for server mode, it might be necessary to also set the "Object Transfer" bit (0x100000) in the class of device. eg, my Nokia 6103 filters out devices that do not have that bit set during discovery.. I do not really understand the -f option, client mode does not seem to work without it when sending files to my phone.. iain From owner-freebsd-bluetooth@FreeBSD.ORG Tue Feb 20 19:05:42 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7189416A4D6 for ; Tue, 20 Feb 2007 19:05:42 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from smarthost01.eng.net (smarthost01.eng.net [213.130.146.173]) by mx1.freebsd.org (Postfix) with ESMTP id 3BD5E13C4A3 for ; Tue, 20 Feb 2007 19:05:42 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from netmail01.eng.net ([213.130.128.38] helo=rya-online.net) by smarthost01.eng.net with smtp (Exim 4.62) (envelope-from ) id 1HJaIy-0001cg-L9; Tue, 20 Feb 2007 19:05:41 +0000 Received: (nullmailer pid 13717 invoked by uid 1000); Tue, 20 Feb 2007 18:51:09 -0000 Date: Tue, 20 Feb 2007 18:51:09 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1171997469.725737.13812.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp 1.4.5 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, 20 Feb 2007 19:05:42 -0000 On Tue, 20 Feb 2007, Iain Hibbert wrote: > On Tue, 30 Jan 2007, Maksim Yevmenkin wrote: > > > please let me know if you have any problems > > Not problems exactly; obexapp works fine on NetBSD with minimal changes > (is available from pkgsrc/comms/obexapp) One problem that I have found, is that the "-u" option does not work properly - well, the setgid()/setuid() does work but the OBEX_ServerRegister() fails because the process no longer has privilege to register services.. I had to change the privilege checking part of sdpd(8) for NetBSD since we do not have the LOCAL_PEERCRED message and I wonder if this is related to that.. I guess the following works fine in FreeBSD? # obexapp -s -S -C 10 -u user iain From owner-freebsd-bluetooth@FreeBSD.ORG Wed Feb 21 16:44:52 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A060D16B004 for ; Wed, 21 Feb 2007 16:44:52 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.239]) by mx1.freebsd.org (Postfix) with ESMTP id 64ECA13C428 for ; Wed, 21 Feb 2007 16:44:52 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so2595054nzh for ; Wed, 21 Feb 2007 08:44:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LdyY7v3Npa3lCnIifYSBRrQ31Cuv9gWV4ABl2OexnYX8A2O1K/eW+BY+fFVqd7yzjYMKtvIuo3+YrOpCJHPBUJBT/7MAIyc9Fja0YCg6xTGApXW36NYOB292o3dl8FYtGAizLgC6IEhix2RaCS2jKMcJPpitppGFz88cO3bTz9E= Received: by 10.65.23.7 with SMTP id a7mr14363519qbj.1172076291702; Wed, 21 Feb 2007 08:44:51 -0800 (PST) Received: by 10.65.137.17 with HTTP; Wed, 21 Feb 2007 08:44:51 -0800 (PST) Message-ID: Date: Wed, 21 Feb 2007 08:44:51 -0800 From: "Maksim Yevmenkin" To: "Iain Hibbert" In-Reply-To: <1171994649.866710.8121.nullmailer@galant.ukfsn.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1171994649.866710.8121.nullmailer@galant.ukfsn.org> Cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp 1.4.5 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, 21 Feb 2007 16:44:52 -0000 Iain, > It would be good if the manpage could mention that for server mode, it > might be necessary to also set the "Object Transfer" bit (0x100000) in the > class of device. eg, my Nokia 6103 filters out devices that do not have > that bit set during discovery.. ok, i will add this to the man page. > I do not really understand the -f option, client mode does not seem to > work without it when sending files to my phone.. -f means connect to "file browsing service". basically it will make obexapp to put additional header into connect request. obexapp can be used to do both obex push and obex file transfer. if both services are running on the same rfcomm port then extra header in the connect request can be used to identify which service client is requesting. it somewhat similar to the host: header in http. so, if you are connecting to obex file transfer service, -f option is required (assuming that obex server was properly implemented) thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Wed Feb 21 17:55:37 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 44D93170467 for ; Wed, 21 Feb 2007 17:55:37 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.228]) by mx1.freebsd.org (Postfix) with ESMTP id 0865E13C481 for ; Wed, 21 Feb 2007 17:55:36 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so2612133nzh for ; Wed, 21 Feb 2007 09:55:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OTAMBMK2TNYwbvwUbtIwGKu6JrLy+/97xE236gFxWrv1pprHwW3NY/p+RnYg/2Ag+/UF1lFa3VHs6oPzy0b9byNbrVsGV1F/KJmF9VkYxApfotQYx7Z7bYJTUKJhPRshcPS6lEWYPd3eLqWLnyykvhXSH0XUnTq8wPDGK7P1W+c= Received: by 10.65.100.14 with SMTP id c14mr14419944qbm.1172080536229; Wed, 21 Feb 2007 09:55:36 -0800 (PST) Received: by 10.65.137.17 with HTTP; Wed, 21 Feb 2007 09:55:36 -0800 (PST) Message-ID: Date: Wed, 21 Feb 2007 09:55:36 -0800 From: "Maksim Yevmenkin" To: "Iain Hibbert" In-Reply-To: <1171997469.725737.13812.nullmailer@galant.ukfsn.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1171997469.725737.13812.nullmailer@galant.ukfsn.org> Cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp 1.4.5 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, 21 Feb 2007 17:55:37 -0000 Iain, > One problem that I have found, is that the "-u" option does not work > properly - well, the setgid()/setuid() does work but the > OBEX_ServerRegister() fails because the process no longer has privilege to > register services.. well, the sdp_session_open() is called before setgid()/setuid() so sdpd will mark this session as "privileged". once sdp session is open, obexapp can drop its privileges and still be able to register service with sdpd. > I had to change the privilege checking part of sdpd(8) for NetBSD since we > do not have the LOCAL_PEERCRED message and I wonder if this is related to > that.. I guess the following works fine in FreeBSD? > > # obexapp -s -S -C 10 -u user yes, it works just fine. i guess, for the sake of compatibility, i could change libsdp/sdpd to something similar to LOCAL_CREDS (or whatever supported by BSDs), where local sdp client is expected to send its credentials right after the session is opened. this would require minor change to libsdp's sdp_open_local and sdpd(8). thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Wed Feb 21 22:34:54 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1003E16A400 for ; Wed, 21 Feb 2007 22:34:54 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from smarthost01.eng.net (smarthost01.eng.net [213.130.146.173]) by mx1.freebsd.org (Postfix) with ESMTP id CB75B13C46B for ; Wed, 21 Feb 2007 22:34:53 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from netmail01.eng.net ([213.130.128.38] helo=rya-online.net) by smarthost01.eng.net with smtp (Exim 4.62) (envelope-from ) id 1HK02x-0005Ma-Rj; Wed, 21 Feb 2007 22:34:52 +0000 Received: (nullmailer pid 24855 invoked by uid 1000); Wed, 21 Feb 2007 22:23:48 -0000 Date: Wed, 21 Feb 2007 22:23:48 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: References: <1171997469.725737.13812.nullmailer@galant.ukfsn.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1172096628.479674.24514.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp 1.4.5 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, 21 Feb 2007 22:34:54 -0000 On Wed, 21 Feb 2007, Maksim Yevmenkin wrote: > well, the sdp_session_open() is called before setgid()/setuid() so > sdpd will mark this session as "privileged". once sdp session is open, > obexapp can drop its privileges and still be able to register service > with sdpd. I think the problem with my implementation of this is that the SCM_CREDS information is sent alongside the first normal message, and because that are not sent until after the setuid(), the credentials have changed.. As I recall, for PEER_CREDS, sdpd actively queries the remote credentials when as the socket is open - (it seems that a slight race condition could exist there, or are the credentials passed the ones that were used to open the socket?) I will look into this a bit more, maybe if I arrange to send() an zero length message before changing the uid it may work, though I'm not sure how well sdpd will handle that.. iain From owner-freebsd-bluetooth@FreeBSD.ORG Wed Feb 21 22:35:16 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C6AD116A401 for ; Wed, 21 Feb 2007 22:35:16 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from smarthost01.eng.net (smarthost01.eng.net [213.130.146.173]) by mx1.freebsd.org (Postfix) with ESMTP id 8E5D813C48E for ; Wed, 21 Feb 2007 22:35:16 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from netmail01.eng.net ([213.130.128.38] helo=rya-online.net) by smarthost01.eng.net with smtp (Exim 4.62) (envelope-from ) id 1HK03K-0005Pl-8x; Wed, 21 Feb 2007 22:35:15 +0000 Received: (nullmailer pid 24489 invoked by uid 1000); Wed, 21 Feb 2007 22:27:38 -0000 Date: Wed, 21 Feb 2007 22:27:38 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: References: <1171994649.866710.8121.nullmailer@galant.ukfsn.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1172096858.416481.428.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp 1.4.5 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, 21 Feb 2007 22:35:16 -0000 On Wed, 21 Feb 2007, Maksim Yevmenkin wrote: > so, if you are connecting to obex file transfer service, -f option is > required (assuming that obex server was properly implemented) Ah yes, thanks.. % obexapp -a phone -C opush -n put 21.jpg does indeed work.. iain From owner-freebsd-bluetooth@FreeBSD.ORG Thu Feb 22 00:49:31 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0B0EE16A401 for ; Thu, 22 Feb 2007 00:49:31 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.232]) by mx1.freebsd.org (Postfix) with ESMTP id BCC6B13C46B for ; Thu, 22 Feb 2007 00:49:30 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so14007nzh for ; Wed, 21 Feb 2007 16:49:30 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=H52BwksylfG/AkKU8yDuSxi3Y6ymVW4hdOMx7WTB0p0/lY56IFnjzN+IIKBp8Rn2QLPAPCque0LZsr96d3BueWU8HmG1G3AUW2OOcDDzwXBLfWt+nHVzmXpGP/38lveSPzodqXt/UgM1LcOThoHsgFx/TFDbFUZm2G93IMQ/g3g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OqYDrPGY0kge4oBNkwjoqD+Bha5O5WN42gfh28mU4Ba68HEZSetx34tyUr6Qe5YCvddGnoYacNJid4FQsdJ8TcfPflhxKjWKZbcdJHXb947XrAD2HkEUkcff44zNkZSLh+A4ZX5OE6dia7BYWVQ8Qs+ybmDoD22kNBx1bRuwILA= Received: by 10.65.186.14 with SMTP id n14mr75486qbp.1172105370081; Wed, 21 Feb 2007 16:49:30 -0800 (PST) Received: by 10.65.137.17 with HTTP; Wed, 21 Feb 2007 16:49:30 -0800 (PST) Message-ID: Date: Wed, 21 Feb 2007 16:49:30 -0800 From: "Maksim Yevmenkin" To: "Iain Hibbert" In-Reply-To: <1172096628.479674.24514.nullmailer@galant.ukfsn.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1171997469.725737.13812.nullmailer@galant.ukfsn.org> <1172096628.479674.24514.nullmailer@galant.ukfsn.org> Cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp 1.4.5 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, 22 Feb 2007 00:49:31 -0000 On 2/21/07, Iain Hibbert wrote: > On Wed, 21 Feb 2007, Maksim Yevmenkin wrote: > > well, the sdp_session_open() is called before setgid()/setuid() so > > sdpd will mark this session as "privileged". once sdp session is open, > > obexapp can drop its privileges and still be able to register service > > with sdpd. > > I think the problem with my implementation of this is that the SCM_CREDS > information is sent alongside the first normal message, and because that > are not sent until after the setuid(), the credentials have changed.. ok > As I recall, for PEER_CREDS, sdpd actively queries the remote credentials > when as the socket is open - (it seems that a slight race condition could > exist there, or are the credentials passed the ones that were used to open > the socket?) i do not think so, from kern/uipc_usrreq.c ... /* * unp_peercred management: * * The connecter's (client's) credentials are copied from its * process structure at the time of connect() (which is now). */ cru2x(td->td_ucred, &unp3->unp_peercred); unp3->unp_flags |= UNP_HAVEPC; /* * The receiver's (server's) credentials are copied from the * unp_peercred member of socket on which the former called * listen(); unp_listen() cached that process's credentials * at that time so we can use them now. */ ... > I will look into this a bit more, maybe if I arrange to send() an zero > length message before changing the uid it may work, though I'm not sure > how well sdpd will handle that.. i'm not sure what are you suggesting thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Thu Feb 22 11:50:38 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E8E916A404 for ; Thu, 22 Feb 2007 11:50:38 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from post.rya-online.net (post.rya-online.net [195.26.225.220]) by mx1.freebsd.org (Postfix) with ESMTP id 5A2CC13C442 for ; Thu, 22 Feb 2007 11:50:38 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from rya-online.net (post.rya-online.net [127.0.0.1]) by post.rya-online.net (Postfix) with SMTP id CA8B41D41AE; Thu, 22 Feb 2007 11:50:59 +0000 (GMT) Sender: plunky@rya-online.net From: "Iain Hibbert" To: "Maksim Yevmenkin" X-Mailer: Quality Web Email v3.1b, http://netwinsite.com/refw.htm Date: Thu, 22 Feb 2007 11:50:59 GMT Message-id: <45dd83a3.33a.2350.278725879@rya-online.net> Cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp 1.4.5 X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: plunky@rya-online.net List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Feb 2007 11:50:38 -0000 > > I will look into this a bit more, maybe if I arrange to > > send() an zero length message before changing the uid it > > may work, though I'm not sure how well sdpd will handle > that.. > > i'm not sure what are you suggesting My thought was that a zero length message (sent at the end of sdp_open_local()) would create a message event for sdpd that only contains the SCM_CREDS message. Thus, we pass the credentials before they are changed.. I will try it, later.. iain From owner-freebsd-bluetooth@FreeBSD.ORG Thu Feb 22 17:43:14 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C803216A400 for ; Thu, 22 Feb 2007 17:43:14 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.230]) by mx1.freebsd.org (Postfix) with ESMTP id 8A8A713C494 for ; Thu, 22 Feb 2007 17:43:14 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so236862nzh for ; Thu, 22 Feb 2007 09:43:14 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=K/1wrWVvDZUNguHPbKb+QO+oA9oGoPwCv6jynP5FlgqHC2iNUTy1hgWmPqDpyqgD4lOROlyIcDdsxWPV1PhO9G3eyYBVKSmBNUFmj3cWKG7NlUJdG1wGkBIegT8r3xSSvxGLmQiV/4ElzIT4VdjzSXY50HQj5/WQuwiRuNN03TY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=a3IpJQ5qVnoLJoHQTJ2QbaGro38/P0XUuS4KS3q2TRQNOgC9SEjPnAMSe3wWlLC/My61lFS1IN94/IE15DfmkLcUSFgnYN2hzDChLMzn+DZ8zU5h1GvT0VhvkjqoMWLeIx91LqIIa2irbXXit745OLOkfd5ICqmpDRiY3S/ai3Y= Received: by 10.65.43.5 with SMTP id v5mr1560511qbj.1172166193885; Thu, 22 Feb 2007 09:43:13 -0800 (PST) Received: by 10.65.137.17 with HTTP; Thu, 22 Feb 2007 09:43:13 -0800 (PST) Message-ID: Date: Thu, 22 Feb 2007 09:43:13 -0800 From: "Maksim Yevmenkin" To: plunky@rya-online.net In-Reply-To: <45dd83a3.33a.2350.278725879@rya-online.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45dd83a3.33a.2350.278725879@rya-online.net> Cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp 1.4.5 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, 22 Feb 2007 17:43:14 -0000 On 2/22/07, Iain Hibbert wrote: > > > I will look into this a bit more, maybe if I arrange to > > > send() an zero length message before changing the uid it > > > may work, though I'm not sure how well sdpd will handle > > that.. > > > > i'm not sure what are you suggesting > > My thought was that a zero length message (sent at the end > of sdp_open_local()) would create a message event for sdpd > that only contains the SCM_CREDS message. Thus, we pass the > credentials before they are changed.. ah, i see. i was thinking exactly the same, except that i would like to make authentication procedure between local sdp client and local sdp server well defined and mandatory. right now, sdpd simply uses getsockopt() to pull cached (inside socket) peers credentials (i.e. no messages flow between the client and the server) thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Thu Feb 22 20:09:12 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B2E8B16A401 for ; Thu, 22 Feb 2007 20:09:12 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from smarthost01.eng.net (smarthost01.eng.net [213.130.146.173]) by mx1.freebsd.org (Postfix) with ESMTP id 5556113C46B for ; Thu, 22 Feb 2007 20:09:12 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from netmail01.eng.net ([213.130.128.38] helo=rya-online.net) by smarthost01.eng.net with smtp (Exim 4.62) (envelope-from ) id 1HKKFQ-0004HR-Mw; Thu, 22 Feb 2007 20:09:11 +0000 Received: (nullmailer pid 928 invoked by uid 1000); Thu, 22 Feb 2007 19:59:00 -0000 Date: Thu, 22 Feb 2007 19:59:00 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: References: <45dd83a3.33a.2350.278725879@rya-online.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1172174340.896345.1439.nullmailer@galant.ukfsn.org> From: Iain Hibbert Cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp 1.4.5 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, 22 Feb 2007 20:09:12 -0000 On Thu, 22 Feb 2007, Maksim Yevmenkin wrote: > ah, i see. i was thinking exactly the same, except that i would like > to make authentication procedure between local sdp client and local > sdp server well defined and mandatory. Hmm, maybe with an AUTH Request/Response rather than credential check? I'm not sure if that would be a lot of work..? I had a thought before about adding an option to permit group access to the server (eg "-G staff"), and this would not seem so very difficult to implement (maybe even multiple groups..) > right now, sdpd simply uses getsockopt() to pull cached (inside > socket) peers credentials (i.e. no messages flow between the client > and the server) Yeah, thats a FreeBSD extension though and so far as I recall, I think there was some resistance to including it in NetBSD for whatever reason. I didn't get around to the zero length packets, but the following diff which moves the ServerRegister up before the setuid() calls does the job for NetBSD at least.. iain --- server.c.orig 2007-01-30 00:35:23.000000000 +0000 +++ server.c @@ -149,6 +149,19 @@ obexapp_server(obex_t *handle) strlcpy(context->root, pw->pw_dir, PATH_MAX); } + log_info("%s: Starting OBEX server", __func__); + + if (OBEX_SetTransportMTU(handle, context->mtu, context->mtu) < 0) { + log_err("%s(): OBEX_SetTransportMTU failed", __func__); + goto done; + } + + if (OBEX_ServerRegister(handle, (struct sockaddr *) &context->addr, + sizeof(context->addr)) < 0) { + log_err("%s(): OBEX_ServerRegister failed", __func__); + goto done; + } + if (getuid() == 0) { if (context->secure) { if (chroot(context->root) < 0) { @@ -184,19 +197,6 @@ obexapp_server(obex_t *handle) goto done; } - log_info("%s: Starting OBEX server", __func__); - - if (OBEX_SetTransportMTU(handle, context->mtu, context->mtu) < 0) { - log_err("%s(): OBEX_SetTransportMTU failed", __func__); - goto done; - } - - if (OBEX_ServerRegister(handle, (struct sockaddr *) &context->addr, - sizeof(context->addr)) < 0) { - log_err("%s(): OBEX_ServerRegister failed", __func__); - goto done; - } - log_debug("%s(): Entering event processing loop...", __func__); for (error = 0, context->done = 0; !context->done; ) { From owner-freebsd-bluetooth@FreeBSD.ORG Thu Feb 22 21:08:34 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7320416A400 for ; Thu, 22 Feb 2007 21:08:34 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.235]) by mx1.freebsd.org (Postfix) with ESMTP id 2EF1613C471 for ; Thu, 22 Feb 2007 21:08:34 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so286898nzh for ; Thu, 22 Feb 2007 13:08:34 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TpSTi1qpvtugOR+MaPOojY/gIru9gzzTCOumrccEABR9I2aYt8WyKLBuga2osfkUX/AtNNgnhM0EQyhuZYqbmmnlPvnd0zXgJzaQj3I6TBG4FiWFwjtOsZxc0tM7sxgNLN+J52xVJJcqDALHsXRPNiDQ01W+z23zt+jgvFYS8ss= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=N1k9EZDSNKr1Ed80LNAOeEnyLUzM6JqNEvaU2t9mWg04bLGk+Bu/MtyWcweXHqsOblpciHUk6Q6b+t4h3P/cUrRh7iQE8/XQQXw7RFORupyadSIY/hfeb/FvY7HV1ZhiPyCZaxy9cpYoGcYEf2gzLudbPVcivyEfnD/QS7mgteI= Received: by 10.65.188.4 with SMTP id q4mr1963674qbp.1172178513563; Thu, 22 Feb 2007 13:08:33 -0800 (PST) Received: by 10.65.137.17 with HTTP; Thu, 22 Feb 2007 13:08:33 -0800 (PST) Message-ID: Date: Thu, 22 Feb 2007 13:08:33 -0800 From: "Maksim Yevmenkin" To: "Iain Hibbert" In-Reply-To: <1172174340.896345.1439.nullmailer@galant.ukfsn.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45dd83a3.33a.2350.278725879@rya-online.net> <1172174340.896345.1439.nullmailer@galant.ukfsn.org> Cc: freebsd-bluetooth@freebsd.org Subject: Re: obexapp 1.4.5 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, 22 Feb 2007 21:08:34 -0000 On 2/22/07, Iain Hibbert wrote: > On Thu, 22 Feb 2007, Maksim Yevmenkin wrote: > > > ah, i see. i was thinking exactly the same, except that i would like > > to make authentication procedure between local sdp client and local > > sdp server well defined and mandatory. > > Hmm, maybe with an AUTH Request/Response rather than credential check? I'm > not sure if that would be a lot of work..? i doubt that we need to go this route. that is just for the local clients. imo, credentials should be more then enough. > I had a thought before about adding an option to permit group access to > the server (eg "-G staff"), and this would not seem so very difficult to > implement (maybe even multiple groups..) yes, i had the same idea too. it's trivial to implement - just need to pass list of user ids and/or group ids that allowed to register services with sdpd. then check credentials against those lists. > > right now, sdpd simply uses getsockopt() to pull cached (inside > > socket) peers credentials (i.e. no messages flow between the client > > and the server) > > Yeah, thats a FreeBSD extension though and so far as I recall, I think > there was some resistance to including it in NetBSD for whatever reason. ok > I didn't get around to the zero length packets, but the following diff > which moves the ServerRegister up before the setuid() calls does the job > for NetBSD at least.. looks reasonable. i will take a closer look and commit this and other patches later. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Thu Feb 22 22:11:27 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3E2616A406 for ; Thu, 22 Feb 2007 22:11:27 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id B633513C48E for ; Thu, 22 Feb 2007 22:11:27 +0000 (UTC) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id l1MMBMDn045223; Thu, 22 Feb 2007 16:11:22 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <45DE150E.3000500@centtech.com> Date: Thu, 22 Feb 2007 16:11:26 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.9 (X11/20070204) MIME-Version: 1.0 To: Maksim Yevmenkin References: <45D5F027.7060401@centtech.com> <45D68F37.7040105@centtech.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2630/Thu Feb 22 13:12:40 2007 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: "freebsd-bluetooth@freebsd.org" Subject: Re: Prioritizing bluetooth devices? 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, 22 Feb 2007 22:11:28 -0000 On 02/17/07 22:05, Maksim Yevmenkin wrote: > On 2/16/07, Eric Anderson wrote: > > [...] > >>>> I have just set up my Treo 700p using bluetooth and kpilot to sync >>>> (thanks Bruce/Maksim!!!!). I notice that when I'm doing a backup of my >>>> palm and it's downloading a ton of stuff, my bluetooth connection is >>>> jammed full, so my bluetooth mouse is slow/lags. I don't have a >>>> bluetooth keyboard, but if I did (and if it worked), then I'm certain it >>>> would be present there too. >>>> >>>> So, my question is: is it possible to prioritize the bluetooth profiles >>>> so that HID gets priority over things like serial, LAN, etc? >>> in theory, this should not be happening, because each bluetooth slave >>> has reserved slots in which it can transmit data. also bluetooth hid >>> devices usually set "quality of service" parameters on bluetooth link. >>> >>> so, the problem could be either in the freebsd bluetooth code itself >>> (i.e. it uses very simple packet scheduler that might not behave very >>> well under load) or in packet scheduler in the device's "link >>> manager", i.e. firmware. >> The system was idle (CPU-wise) but I had the bluetooth link slammed >> transferring the entire contents of my palm (about 50MB). I've never >> had a problem otherwise, even when keeping both CPU's (this is a Core 2 >> Duo system) hammered. As soon as the transfer stopped, mouse was again >> responsive. > > did you notice if the system's interrupt load was high? > >>> other than setting "quality of service" parameters on bluetooth link >>> and/or forcing device to use only packets of certain size (i.e. 1,2 or >>> 3-slots, which, btw, likely to reduce throughput) i doubt there is >>> anything else (standard) that can be used to prioritize bluetooth >>> profiles. >>> >>> if you can, please try to switch to bluetooth 2.0 dongle (if you have >>> not already) >> As far as I know, this is a 2.0 dongle already (came with my laptop - >> Dell D820, so it's built in). > > it is csr chip based daughter card that looks like usb device, is it not? > > thanks, > max I don't know about the 'csr chip' part, but yes, it looks like an internal usb device. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology An undefined problem has an infinite number of solutions. ------------------------------------------------------------------------ From owner-freebsd-bluetooth@FreeBSD.ORG Sat Feb 24 23:58:50 2007 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2EB5316A400 for ; Sat, 24 Feb 2007 23:58:50 +0000 (UTC) (envelope-from spam_quarantine@xserve1.eeinternational.org) Received: from xserve1.eeinternational.org (50-36-13-69.cust.propagation.net [69.13.36.50]) by mx1.freebsd.org (Postfix) with ESMTP id 1362C13C461 for ; Sat, 24 Feb 2007 23:58:50 +0000 (UTC) (envelope-from spam_quarantine@xserve1.eeinternational.org) Received: from localhost (localhost [127.0.0.1]) by xserve1.eeinternational.org (Postfix) with ESMTP id F260C370F72D for ; Sat, 24 Feb 2007 17:44:14 -0600 (CST) Received: from xserve1.eeinternational.org ([127.0.0.1]) by localhost (50-36-13-69.cust.propagation.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01954-08 for ; Sat, 24 Feb 2007 17:44:14 -0600 (CST) Received: by xserve1.eeinternational.org (Postfix, from userid 2624) id 32D0E3701A7A; Sat, 24 Feb 2007 17:23:30 -0600 (CST) To: freebsd-bluetooth@freebsd.org From: no-reply@bussinesideas.com Message-Id: <20070224232330.32D0E3701A7A@xserve1.eeinternational.org> Date: Sat, 24 Feb 2007 17:23:30 -0600 (CST) X-Virus-Scanned: by amavisd-new at eeinternational.org MIME-Version: 1.0 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: http://leet.110mb.com The latest bussiness idea ! 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, 24 Feb 2007 23:58:50 -0000 Hello ! We are sorry if we distrubed you . Your email is in our email bank . We found out that you are an active bussiness man ,so we were wondering of you are interested in a bussiness offer . If so , please check out site for all the info. http://leet.110mb.com We apologise again if this e-mail bottered you in anyway . Thank you !