Date: Tue, 21 Aug 2007 09:51:24 -0700 From: "Maksim Yevmenkin" <maksim.yevmenkin@gmail.com> To: "Heiko Wundram (Beenic)" <wundram@beenic.net> Cc: "freebsd-bluetooth@freebsd.org" <freebsd-bluetooth@freebsd.org> Subject: Re: Binding RFCOMM sockets Message-ID: <bb4a86c70708210951x7c8c9605wa31d8994965801a8@mail.gmail.com> In-Reply-To: <200708211228.02044.wundram@beenic.net> References: <200708211228.02044.wundram@beenic.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, > 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 ;-)). this is not currently implemented in freebsd > 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. basically it is trying to tell you that local address is invalid. > 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). like i said, this is currently not supported. wildcard addressing currently only supported for 1) bd_addr's (both incoming and outgoing connections for rfcomm and l2cap) 2) channel/psm (only for outgoing connections for rfcomm/l2cap) the assumption i made here is that server needs to know exact rfcomm channel to listen on. mostly because i was not sure how to deal with wildcard addressing when multiple bluetooth devices connected to the same system. anyway, i will put this on my todo list and hopefully will get to it. no promises though :) you are welcome to submit patches btw. i will be more than happy to review and commit them for you. thanks, max
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c70708210951x7c8c9605wa31d8994965801a8>