Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Dec 2008 14:09:22 +0100 (CET)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-bluetooth@FreeBSD.ORG, plunky@rya-online.net
Subject:   Re: libbluetooth2 and Net::Bluetooth
Message-ID:  <200812161309.mBGD9Mni019996@lurza.secnetix.de>
In-Reply-To: <1228741128.874448.728.nullmailer@galant.ukfsn.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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."



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