×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    24

    [announce] LightBlue 0.2.2, working for 3rd edition

    Hi,

    I've released a 0.2.2 version of LightBlue, a cross-platform Bluetooth api for Mac OS X, Linux and Python for Series 60. The new version properly fixes the PyS60 3rd Edition builds which were not working in the last version. There is a self-signed sis and also an unsigned freedevcert version available.

    This release also fixes issues with getting the local device address on 2nd Edition FP1 & FP2 builds.

    The downloads are available at http://lightblue.sourceforge.net and also the sourceforge page at http://sourceforge.net/projects/lightblue

    Feel free to email if there are any issues with the new version.

  2. #2
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: [announce] LightBlue 0.2.2, working for 3rd edition

    Thank you very much Buzz111

    BR
    Cyke64
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  3. #3
    Registered User
    Join Date
    Mar 2005
    Posts
    24

    Re: [announce] LightBlue 0.2.2, working for 3rd edition

    Hey, thanks for checking it works

  4. #4
    Regular Contributor
    Join Date
    Apr 2004
    Posts
    107

    Re: [announce] LightBlue 0.2.2, working for 3rd edition

    Hello,

    I'm using LightBlue for a kind of bluetooth scanner. So I call

    finddevices() continiously. I make sure that it will not be called a second time if the previous scan is still running. But sometimes the finddevices() function does not respond anymore. I would be nice to have a timeout after that the function aborts the BT scan and returns an empty list.

    Now I have to quit my script an turn off BT and start again if the scan hangs.

    I also measured the time for a bluetooth scan it varies from 10 to 60 sec. Maybe the timeout could be an optional argument.

  5. #5
    Registered User
    Join Date
    Mar 2005
    Posts
    24

    Re: [announce] LightBlue 0.2.2, working for 3rd edition

    Quote Originally Posted by carknue View Post
    Hello,
    I'm using LightBlue for a kind of bluetooth scanner. So I call

    finddevices() continiously. I make sure that it will not be called a second time if the previous scan is still running. But sometimes the finddevices() function does not respond anymore. I would be nice to have a timeout after that the function aborts the BT scan and returns an empty list.
    How are you using finddevices() in your code? Do you have some code that I can use to reproduce this bug?

    The 'length' argument is meant to provide a timeout value, but there were some problems getting it working on PyS60. I'll take another look at it.

  6. #6
    Regular Contributor
    Join Date
    Sep 2005
    Location
    Finland, Helsinki
    Posts
    323

    Re: [announce] LightBlue 0.2.2, working for 3rd edition

    Quote Originally Posted by carknue View Post
    I also measured the time for a bluetooth scan it varies from 10 to 60 sec. Maybe the timeout could be an optional argument.
    In my measurings (<200 times) scan duration varies from 12 to 290 seconds. Average is 44 secs and median 26 secs. In "noisy" places is seems to be normal to have scans which take over 60 seconds.

    Phone model is Nokia E70.

  7. #7
    Regular Contributor
    Join Date
    Apr 2004
    Posts
    107

    Re: [announce] LightBlue 0.2.2, working for 3rd edition

    This is my code. loop is called every second.

    Code:
    def bt_mainthread():
    	global bt_busy
    	thread.start_new_thread(bt_scan,())
    	time.sleep(1)
    	while bt_busy and (bt_scan_time < 120):
    		time.sleep(1)
    	if bt_scan_time > 119:
    		blues.off()
    		time.sleep(5)
    		blues.on()
    		time.sleep(5)
    		bt_busy = False
    		
    def bt_scan():
    	global btscan, btquery_list, bt_busy, bt_scan_time
    	bt_busy = True
    	bt_scan_time = 0
    	try:
    		btscan = lightblue.finddevices()
    	except:
    		btscan = []
    	btquery_list = []
    	for i in range(len(btscan)):
    		btquery_list.append(query_bt(btscan[i]))
    	bt_busy = False
    
    def loop():
       global bt_busy, bt_scan_time
       if config['BT_SCAN'] > 0 and not bt_busy:
    	bti += 1
    	if (bti > config['BT_SCAN']*1) and not bt_busy:
    	   bti = 0
    	   thread.start_new_thread(bt_mainthread,())
    
    			
       if bt_busy:
    	bt_block += 1
    	bt_scan_time += 1

  8. #8
    Regular Contributor
    Join Date
    Apr 2004
    Posts
    107

    Re: [announce] LightBlue 0.2.2, working for 3rd edition

    Code:
    btscan = lightblue.finddevices()
    the finddevices() command sometimes gives no answer on e90 or n95. I waited 500 sec but nothing. The thread hangs at this call forever. How to terminate the finddevices() function?

    In Pynetmony I switch off BT after 120 seconds and start then a new search, but the old thread is still in memory.

    PyNetMony

  9. #9
    Regular Contributor
    Join Date
    Apr 2004
    Posts
    107

    Re: [announce] LightBlue 0.2.2, working for 3rd edition

    Would it be possible to get the signalstrength in dBm of the found BT devices? And would it be possible to get the TX Power class of the devices (10m or 100m range)?

  10. #10
    Registered User
    Join Date
    Sep 2007
    Posts
    2

    Re: [announce] LightBlue 0.2.2, working for 3rd edition

    I installed lightblue into my 5700 phone without any problem (both ss and dev certificate), but when I run 'import lightblue' under pys60 shell, it raised 'ImportError:No module named lightblue', is there anything wrong? how can I solve this problem?

    Thank you.

  11. #11
    Registered User
    Join Date
    Sep 2007
    Posts
    2

    Re: [announce] LightBlue 0.2.2, working for 3rd edition

    I got it, sorry.
    lightblue-0.3.2-s60-3rdEd_freedevcert.sis + online sign with 13 caps

Similar Threads

  1. [announce] Image Converter for 1st edition
    By cyke64 in forum Symbian
    Replies: 2
    Last Post: 2006-12-27, 14:51
  2. SDK S60 3rd edition, not working with Visual Studio
    By shahzadamin in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2006-06-16, 10:12
  3. While working with the series60 2nd Edition giving problem
    By sri_nainala in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2005-03-02, 18:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •