Serial Port Profile
maksim yevmenkin
maksim.yevmenkin at savvis.net
Sat Jul 15 16:16:52 UTC 2006
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
More information about the freebsd-bluetooth
mailing list