ShaoyuLee / pybluez

Automatically exported from code.google.com/p/pybluez
GNU General Public License v2.0
0 stars 0 forks source link

Python-Bluez does connect and send methods fail in Ubuntu 10.04 (Lucid) #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Running Ubuntu 10.04LTS, beta (release candidate),  bluetooth connect,
send methods fail. 

2. Using the pybluez package provided test scripts in
/usr/share/doc/python-bluez/examples/simple: Run l2capclient.py on one
machine, l2capserver.py on another and wait for connect method to fail to
return and throw an error.  

3. Using the test scripts from
/usr/share/doc/python-bluez/examples/advanced : l2-unreliable-client.py and
l2-unreliable-server.py on different machines, and the scipts appear to
work correctly.

What is the expected output? What do you see instead?
I was expecting to see connect method return successfully for a valid socket.

What version of the product are you using? On what operating system?
uname -a:
Linux 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686
GNU/Linux

apt-show-versions python-bluez:
python-bluez/lucid uptodate 0.18-1

Please provide any additional information below.

One set of scripts uses the connect and send methods, the others do not.

Interestingly, I am using pybluez (import bluetooth) calls in some other
scripts where I found the problem. Something changed in release candidate
of Ubuntu 10.04, which caused the failure. These scripts and the test
script used to work until the first or second week of April. (The included
test scripts are a useful vehicle for demonstrating the problem) 

I have posted a Ubuntu bug report for this issue on launchpad 
https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/569650

Thanks

Original issue reported on code.google.com by kelle...@gmail.com on 30 Apr 2010 at 9:54

GoogleCodeExporter commented 8 years ago
The problem seems confined to the RFCOMM protocol. I was able to switch my 
scripts to
L2CAP (low data rate streaming application) and increasing the timeout in the
select() method to workaround the problem.  

Step #2 above is in error - l2capclient.py may or may not work, but the RFCOMM 
based
test script was reliably failing. 

Original comment by kelle...@gmail.com on 1 May 2010 at 3:45

GoogleCodeExporter commented 8 years ago
Tested here with Ubuntu 10.04 (packaged PyBluez 0.18) and both simple examples 
(l2cap and rfcomm) worked 
perfectly. 

Could be some interaction with specific kernel version X specific dongle. Can 
you tell more about your 
installation/hardware?

Original comment by elvis.pf...@gmail.com on 31 May 2010 at 4:40

GoogleCodeExporter commented 8 years ago
Saw in Launchpad bug report that you are using a 64-bit kernel. I have tested 
in 32-bit kernel. The bug may 
well be related to this.

Original comment by elvis.pf...@gmail.com on 31 May 2010 at 4:53

GoogleCodeExporter commented 8 years ago
Tested with one side 64-bit, other side 32-bit. Worked with 64-bit in either 
role (client or server). So, it is 
WORKSFORME right now.

Original comment by elvis.pf...@gmail.com on 31 May 2010 at 6:34

GoogleCodeExporter commented 8 years ago
Thanks for validating this.  My system suffered a hard disk crash and after 
getting a
new disk and reinstalling Ubuntu 10.04, the scripts ran fine with both RFCOMM 
and
L2CAP.  It appears that the failing disk had corrupted interface somehow. 

Please close this report. Problem has been shown to an isolated issue and 
resolved
with new OS install. 

Thanks,
Dave

Original comment by dmk_el...@yahoo.com on 1 Jun 2010 at 5:57

GoogleCodeExporter commented 8 years ago

Original comment by elvis.pf...@gmail.com on 5 Jul 2010 at 1:09