Binding RFCOMM sockets
Heiko Wundram (Beenic)
wundram at beenic.net
Tue Aug 21 03:57:21 PDT 2007
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
More information about the freebsd-bluetooth
mailing list