By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,334 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,334 IT Pros & Developers. It's quick & easy.

Bluetooth

P: n/a
Hi

I'm making a server-side solution in Python and need to be able to
communicate through bluetooth. Is there any bluetooth-packages out there for
python?

regards tores
Sep 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Tor Erik Sønvisen wrote:
I'm making a server-side solution in Python and need to be able to
communicate through bluetooth. Is there any bluetooth-packages out there for
python?


At the lowest level, you should be able to create sockets for Bluetooth
communications (see the socket module's documentation and the source
code in Modules/socketmodule.c); for example:

from socket import *
s = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)

On Linux, upon binding a device file to the Bluetooth device, you can
use things like pySerial to manage the communications; this works with
software like t616hack:

http://www.nelson.monkey.org/~nelson/weblog/tech/phone/
http://pyserial.sourceforge.net/

Various other tools exist which understand Bluetooth communications,
notably the OpenOBEX tools:

http://triq.net/obex/

I prefer to work with tools at the higher levels (obexftp to access
files, pySerial/t616hack to access messages), but provided your Python
distribution is set up correctly, you should be able to work at the
lowest levels too.

Paul

Sep 23 '05 #2

P: n/a
Okei....

I've been doing some research since my first post and now I'm really
confused. I'm programming in xp, and found some c++ code out of this world
that supposidly should list all available services to a given bluetooth
device. This code however where only working with certain bluetooth-devices
supported by the Microsoft Bluetooth Stack. If someone out there has any
advice/ experience on bluetooth-programming on laptops (preferably in
windows) I would appreciate it. Maybe there is some easy-to-grasp tutorials
out there using the windows API for bluetooth-programing???

regards tores

"Paul Boddie" <pa**@boddie.org.uk> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Tor Erik Sønvisen wrote:
I'm making a server-side solution in Python and need to be able to
communicate through bluetooth. Is there any bluetooth-packages out there
for
python?


At the lowest level, you should be able to create sockets for Bluetooth
communications (see the socket module's documentation and the source
code in Modules/socketmodule.c); for example:

from socket import *
s = socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)

On Linux, upon binding a device file to the Bluetooth device, you can
use things like pySerial to manage the communications; this works with
software like t616hack:

http://www.nelson.monkey.org/~nelson/weblog/tech/phone/
http://pyserial.sourceforge.net/

Various other tools exist which understand Bluetooth communications,
notably the OpenOBEX tools:

http://triq.net/obex/

I prefer to work with tools at the higher levels (obexftp to access
files, pySerial/t616hack to access messages), but provided your Python
distribution is set up correctly, you should be able to work at the
lowest levels too.

Paul
Sep 24 '05 #3

P: n/a
Tor Erik Sønvisen wrote:

I've been doing some research since my first post and now I'm really
confused. I'm programming in xp, and found some c++ code out of this world
that supposidly should list all available services to a given bluetooth
device. This code however where only working with certain bluetooth-devices
supported by the Microsoft Bluetooth Stack.


I was going to mention pybluez (http://www.python.org/pypi/pybluez) but
it only supports GNU/Linux. However, it is related to the software
(bluez) which manages connected devices and their services. There might
be something similar available for Windows, even if it means going
through a COM-based API.

Paul

Sep 24 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.