Bluetooth and Python
From MoDe
Python Bluetooth Support
After reading the Bluetooth book (http://people.csail.mit.edu/rudolph/Teaching/Articles/BTBook.pdf) last week, you should all have a pretty good idea already about Bluetooth and socket programming in Python (right? right??). First off, if you're having trouble with your bluetooth radio - i.e., you get a connection time out, look at this page for a possible solution.
Once your radio is working, go ahead and download the python-bluez ipkg from the 6.883 feed. For Familiar v.0.8.2, add the following line to your /etc/ipkg.conf:
src/gz 6.883 http://web.mit.edu/6.883/feed
For Familiar v.0.8.3, create a .conf file in /etc/ipkg with the above line. Then execute an ipkg update. This will install the python bluetooth wrappers created by Albert (the same guy co-authoring the bluetooth book you read). If you're interested in the checking out status of the project and various documentation, go to http://org.csail.mit.edu/pybluez.
After installing the package, download this file (http://web.mit.edu/6.883/files/pybluez-examples.tar.gz) which contains a bunch of examples of using pybluez. All of them should work, but remember that they rely on the BlueZ stack for Linux, so for client-server examples, you'll need another Linux box with bluetooth. These examples should look familiar, as they are essentially the same ones found in the bluetooth book (http://people.csail.mit.edu/rudolph/Teaching/Articles/BTBook.pdf).
Get familiar with how python bluetooth works, as you'll probably use it extensively throughout the course and possibly in your final projects.
--Ning Song (mailto:nsong@csail.mit.edu)
Last Edit: 2/24/06
