Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2007 12:28:01 +0200
From:      "Heiko Wundram (Beenic)" <wundram@beenic.net>
To:        "freebsd-bluetooth@freebsd.org" <freebsd-bluetooth@freebsd.org>
Subject:   Binding RFCOMM sockets
Message-ID:  <200708211228.02044.wundram@beenic.net>

next in thread | raw e-mail | index | archive | help
Hey all!

I'm currently trying to implement a server over the RFCOMM layer, and at least 
my imagination told me that connecting to channel 0 should select "any" free 
RFCOMM channel (at least that's what I gathered from the BlueZ documentation, 
which of course has nothing to do with the FreeBSD bluetooth stack, but 
anyway ;-)).

Anyway, binding to the 0 channel succeeds (with getsockname getting back the 0 
channel afterwards even though the socket is [supposedly] bound), but calling 
listen() then gives me a EDESTADDRREQ, which I can't really sort into the 
problem, as it isn't documented in man 2 listen either.

I've not tried to bind to a specific channel (yet), but anyway, just wanted to 
ask you guys whether there is any proper "protocol" for binding to a wildcard 
(free) RFCOMM channel using the standard socket API (and no, I don't actually 
want to test each channel whether it's free, which was necessary with an 
older version of BlueZ, at least according to their API documentation).

By the way, the system is a 6.2-STABLE.

Thanks for any hint!

-- 
Heiko Wundram
Product & Application Development



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