Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Jul 2006 09:16:46 -0700
From:      maksim yevmenkin <maksim.yevmenkin@savvis.net>
To:        Eric Anderson <anderson@centtech.com>
Cc:        "freebsd-bluetooth@freebsd.org" <freebsd-bluetooth@freebsd.org>
Subject:   Re: Serial Port Profile
Message-ID:  <44B914EE.9030900@savvis.net>
In-Reply-To: <1152964774.758.20.camel@RabbitsDen>
References:  <44B86410.3030108@centtech.com> <1152964774.758.20.camel@RabbitsDen>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44B914EE.9030900>