I'm in the middle of a personal project which involves connecting to a
wiimote and reading the raw acceleration values. I'm able to use inquiry
scripts to find the wiimote and obtain its address, but when I try to open
a socket, whether I'm using L2CAP or RFCOMM, I recieve an error. I am not a
programmer in any sense of the word, so much of this is giberish to me.
Here are the errors I'm recieving and the commands that produce them:
Using L2CAP:
>>> import bluetooth as BT
>>> sock=BT.BluetoothSocket(L2CAP)
Traceback (most recent call last):
File "<pyshell#12>", line 1, in <module>
sock=BT.BluetoothSocket(L2CAP)
File "C:\Python26\Lib\site-packages\bluetooth\msbt.py", line 19, in __init__
raise ValueError ("invalid protocol")
ValueError: invalid protocol
>>>
And here is the RFCOMM:
>>> import bluetooth as BT
>>> sock=BT.BluetoothSocket(RFCOMM)
>>> sock.connect(("00:19:1D:50:6C:FD", 0x13))
Traceback (most recent call last):
File "<pyshell#21>", line 1, in <module>
sock.connect(("00:19:1D:50:6C:FD", 0x13))
File "C:\Python26\Lib\site-packages\bluetooth\msbt.py", line 53, in connect
bt.connect (self._sockfd, addr, port)
IOError: A socket operation was attempted to an unreachable network.
>>>
Once I'm able to get the accel data from the wiimote, I'm pretty sure I'll
be able to handle the rest. I only need to mathematically interpret the
data and output it to some gauges using the wxpython widget for speedometer
type gauges. The program will eventually be implemented in a car computer
for race data acquisition. Any help at all you could offer would be greatly
appreciated, as I'm totally lost. I'm using python 2.6.1 on Windows XP
professional edition SP3. Thanks a lot and have a good one.
Original issue reported on code.google.com by SenorCol...@gmail.com on 3 Mar 2009 at 11:02
Original issue reported on code.google.com by
SenorCol...@gmail.com
on 3 Mar 2009 at 11:02