#27 Scanning for BT devices does not always work

v1.2
closed
Backend (20)
3
2008-02-28
2008-01-31
No

Scanning leads to this error:

Traceback (most recent call last):
File "proximity.py", line 466, in cb_btnScan_clicked
macs = self.proxi.get_device_list()
File "proximity.py", line 735, in get_device_list
nearby_devices = bluetooth.discover_devices()
File "/usr/lib/python2.5/site-packages/bluetooth.py", line 277, in discover_devices
raise BluetoothError("error communicating with local "
bluetooth.BluetoothError: error communicating with local bluetooth adapter

if the already entered BT address is unreachable and not empty. It seems that the BT adapter is kind of in use trying to connect to that device and we are not to disturb it during that period. (Either that or there is actually a good function hidden somewhere that allows us to do exactly that.)

Discussion

  • Lars Friedrichs

    Lars Friedrichs - 2008-02-27
    • assigned_to: nobody --> highno
     
  • Lars Friedrichs

    Lars Friedrichs - 2008-02-27

    Logged In: YES
    user_id=114903
    Originator: YES

    Ok, I am now working on this bug. It seems that the error rises because if the mac is wrong or unreachable there is still a connect process running that must first hit its timeout before the device is clear to scan. I'll try to avoid that situation - look forward to version 1.2.5 - it will come without this 'feature'.

    Bye and thanks,
    Lars

     
  • Lars Friedrichs

    Lars Friedrichs - 2008-02-28
    • status: open --> closed
     
  • Lars Friedrichs

    Lars Friedrichs - 2008-02-28

    Logged In: YES
    user_id=114903
    Originator: YES

    Ok, could not make it work the way I wanted to because of long connection timeouts... Anyway the error is caught and presented to the user in an adequate form. So this is fixed.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks