From owner-freebsd-bluetooth@FreeBSD.ORG Tue Aug 21 10:57:21 2007 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D031016A420 for ; Tue, 21 Aug 2007 10:57:21 +0000 (UTC) (envelope-from wundram@beenic.net) Received: from mail.beenic.net (mail.beenic.net [83.246.72.40]) by mx1.freebsd.org (Postfix) with ESMTP id 95C0E13C459 for ; Tue, 21 Aug 2007 10:57:21 +0000 (UTC) (envelope-from wundram@beenic.net) Received: from [192.168.1.37] (a89-182-6-212.net-htp.de [89.182.6.212]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.beenic.net (Postfix) with ESMTP id E7588A44529 for ; Tue, 21 Aug 2007 12:25:10 +0200 (CEST) From: "Heiko Wundram (Beenic)" Organization: Beenic Networks GmbH To: "freebsd-bluetooth@freebsd.org" Date: Tue, 21 Aug 2007 12:28:01 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708211228.02044.wundram@beenic.net> Subject: Binding RFCOMM sockets X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 10:57:21 -0000 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