From owner-freebsd-bluetooth@FreeBSD.ORG Tue Dec 16 13:09:25 2008 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 5EBD9106567A for ; Tue, 16 Dec 2008 13:09:25 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id BD12E8FC1A for ; Tue, 16 Dec 2008 13:09:24 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id mBGD9Mqb019997; Tue, 16 Dec 2008 14:09:23 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id mBGD9Mni019996; Tue, 16 Dec 2008 14:09:22 +0100 (CET) (envelope-from olli) Date: Tue, 16 Dec 2008 14:09:22 +0100 (CET) Message-Id: <200812161309.mBGD9Mni019996@lurza.secnetix.de> From: Oliver Fromme To: freebsd-bluetooth@FreeBSD.ORG, plunky@rya-online.net In-Reply-To: <1228741128.874448.728.nullmailer@galant.ukfsn.org> X-Newsgroups: list.freebsd-bluetooth User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Tue, 16 Dec 2008 14:09:23 +0100 (CET) Cc: Subject: Re: libbluetooth2 and Net::Bluetooth X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-bluetooth@FreeBSD.ORG, plunky@rya-online.net List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2008 13:09:25 -0000 Iain Hibbert wrote: > On Mon, 8 Dec 2008, Oliver Fromme wrote: > > > Second, I would like to use this software (perl script): > > > > http://lukas.internet-freaks.net/nxtmanager.php > > > > As far as I can tell, the software requires libbluetooth2 > > and the CPAN module Net::Bluetooth. I searched the ports, > > but they're not there. I assume those don't work with > > FreeBSD, right? Any idea whether porting them would be > > feasible? > > The problem with this libbluetooth2 is that it forms the interface to the > linux kernel for the BlueZ system and as such, large parts of it are not > relevant to any other operating system. I see. > The way that this Lego Mindstorms NXT module speaks through bluetooth is > using RFCOMM with the SerialPortProfile, so of course it is possible to > talk to that from FreeBSD using an RFCOMM socket directly, or by using > rfcomm_sppd(1) to open a pty with a connection to the NXT and using stdio. > > I don't know what this perl script needs to use the libbluetooth2 for, > probably the module just lumps all bluetooth together. If you know how to > make bindings then perhaps you can make a RFCOMM sockets module that will > fulfil the requirements? Thanks for pointing me in the right direction. I decided to stop being a Bluetooth newbie and start programming the darn thing myself. :-) So I downloaded the NXT developers kit and started to make myself familiar with the API and protocols. My programming language of choice is Python, so I decided not to waste any more time with the existing (and rather unreadable) Perl code, and instead start from scratch. Python supports Bluetooth sockets natively on FreeBSD, without having to install any additional modules. In fact I found out that it's ridiculuously simple to open and access a Bluetooth RFCOMM socket from Python and talk to devices. I'll probably release my code under BSD license and submit it to the Ports collection as soon as it's ready. Thanks again for helping me to start off with this! Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "What is this talk of 'release'? We do not make software 'releases'. Our software 'escapes', leaving a bloody trail of designers and quality assurance people in its wake."