enedrio / pybluez

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

error accessing bluetooth device(android 2.3.3 with pybluez 0.19 to an Bluetooth enabled RFID reader #50

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. created a python file in android to search the Bluetooth device around and 
connect to a RFID Bluetooth device.
2. The program goes to the discovery mode and gives error 
("bluetooth.btcommon.BluetoothError: error accessing bluetooth device")
3. using basic android phone with android 2.3.3.

What is the expected output? What do you see instead?
Expected output is to search the Bluetooth around and list the device and 
connect to the particular RFID Reader.

What version of the product are you using? On what operating system?
I am Using Android 2.3.3 with PyBluez-0.19-py2.6-linux-armv

Please provide any additional information below.
error come at the near_by device discovery function is executed

// 

File "/mnt/sdcard/sl4a/scripts/cellbot.py", line 51, in scan_bluetooth          
                            self.discovered_devices = 
bluetooth.discover_devices(lookup_names=True)                                 
File 
"/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6/lib-dynlo
ad/bluetooth/bluez.py", line 17, in discover_devices                        
sock = _gethcisock ()                              File 
"/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6/lib-dynlo
ad/bluetooth/bluez.py", line 276, in _gethcisock                            
raise BluetoothError ("error accessing bluetooth device")                       
                      bluetooth.btcommon.BluetoothError: error accessing 
bluetooth device

//

Original issue reported on code.google.com by prasa...@coresonant.com on 8 Nov 2011 at 6:32

GoogleCodeExporter commented 8 years ago
I have the same problem ! anyone has solved this? 

Original comment by elettron...@gmail.com on 25 Apr 2012 at 1:37

GoogleCodeExporter commented 8 years ago
my problem is on an android 2.3.6    with a samsung galaxy ace

Original comment by elettron...@gmail.com on 25 Apr 2012 at 1:39

GoogleCodeExporter commented 8 years ago
up! anyone of you solved that one? Could be related to an old issue #25 
(http://code.google.com/p/pybluez/issues/detail?id=25)

I tried using shell sdptool browse local which fails with "Failed to connect to 
SDP server on 00:00:00:FF:FF:FF: Connection refused", and from Python "sock = 
bluetooth.BluetoothSocket(proto=bluetooth.RFCOMM)" which fails with 
"bluetooth.btcommon.BluetoothError: (113, 'No route to host')".

Running the same commands from my Linux box works and I find the device. 
Running them from my phone (Galaxy S2, Android 2.3.4, rooted and very close to 
stock but compiled myself, with py4la and python for android and pybluez 0.19)

Original comment by cyril.ho...@gmail.com on 5 Jul 2012 at 8:57