From owner-freebsd-bluetooth@FreeBSD.ORG Sat Jul 15 16:16: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 A956016A4DD for ; Sat, 15 Jul 2006 16:16:52 +0000 (UTC) (envelope-from maksim.yevmenkin@savvis.net) Received: from mta13.adelphia.net (mta13.mail.adelphia.net [68.168.78.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C5C543D45 for ; Sat, 15 Jul 2006 16:16:49 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [192.168.1.236] (really [70.32.199.60]) by mta13.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060715161649.KDQV10992.mta13.adelphia.net@[192.168.1.236]>; Sat, 15 Jul 2006 12:16:49 -0400 Message-ID: <44B914EE.9030900@savvis.net> Date: Sat, 15 Jul 2006 09:16:46 -0700 From: maksim yevmenkin User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: Eric Anderson References: <44B86410.3030108@centtech.com> <1152964774.758.20.camel@RabbitsDen> In-Reply-To: <1152964774.758.20.camel@RabbitsDen> Content-Type: text/plain; charset=ISO-8859-5; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-bluetooth@freebsd.org" Subject: Re: Serial Port Profile 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, 15 Jul 2006 16:16:52 -0000 Alexandre "Sunny" Kovalenko wrote: > On Fri, 2006-07-14 at 22:42 -0500, Eric Anderson wrote: >> I have the need to set up an RFCOMM serial port profile over bluetooth. >> I see the rfcomm_sppd tool, but that connects to another remote >> bluetooth device's serial port profile. What I need, is to offer a >> serial port profile to bluetooth clients, and have a /dev/tty* entry to >> talk with. >> >> Is it implemented already? If it is, please point me in the right >> direction (man pages?) If it isn't how much work is it, and would it be >> complicated for a novice to do? no, offering serial port service is not implemented yet. no, it is not much work to implement it. you can use rfcomm_pppd (server mode) as an example of how to offer a services. you will need to register serial port service with sdpd(8) after you open rfcomm socket (you will be advertising rfcomm channel with sdpd(8)). >>From what limited knowledge I have, your quickest path seems to be to > hack /usr/src/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c somewhere > inside > > 384:exec_ppp(int s, char *unit, char *label) > > to start whatever is that you want talking to your clients instead of > 'pppd'. actually, there is no need to execute any external program. there are two options: 1) use pty(4) 2) use nmdm(4) thanks, max