You Are Here:

Community: Developer Discussion Boards

#1 Old [announce] LightBlue 0.2.2, working for 3rd edition - 2007-08-21, 14:56

Join Date: Mar 2005
Posts: 24
buzz111
Offline
Registered User
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.
Reply With Quote

#2 Old Re: [announce] LightBlue 0.2.2, working for 3rd edition - 2007-08-21, 19:55

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Thank you very much Buzz111

BR
Cyke64


pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote

#3 Old Re: [announce] LightBlue 0.2.2, working for 3rd edition - 2007-08-22, 02:03

Join Date: Mar 2005
Posts: 24
buzz111
Offline
Registered User
Hey, thanks for checking it works
Reply With Quote

#4 Old Re: [announce] LightBlue 0.2.2, working for 3rd edition - 2007-11-27, 21:02

Join Date: Apr 2004
Posts: 107
Send a message via ICQ to carknue
carknue
Offline
Regular Contributor
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.
Reply With Quote

#5 Old Re: [announce] LightBlue 0.2.2, working for 3rd edition - 2007-11-29, 09:09

Join Date: Mar 2005
Posts: 24
buzz111
Offline
Registered User
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.
Reply With Quote

#6 Old Re: [announce] LightBlue 0.2.2, working for 3rd edition - 2007-11-29, 11:23

Join Date: Sep 2005
Posts: 314
Location: Finland, Helsinki
aaaaapo
Offline
Regular Contributor
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.
Reply With Quote

#7 Old Re: [announce] LightBlue 0.2.2, working for 3rd edition - 2007-11-29, 22:37

Join Date: Apr 2004
Posts: 107
Send a message via ICQ to carknue
carknue
Offline
Regular Contributor
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
Reply With Quote

#8 Old Re: [announce] LightBlue 0.2.2, working for 3rd edition - 2007-12-08, 12:10

Join Date: Apr 2004
Posts: 107
Send a message via ICQ to carknue
carknue
Offline
Regular Contributor
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
Reply With Quote

#9 Old Re: [announce] LightBlue 0.2.2, working for 3rd edition - 2008-01-06, 16:35

Join Date: Apr 2004
Posts: 107
Send a message via ICQ to carknue
carknue
Offline
Regular Contributor
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)?
Reply With Quote

#10 Old Re: [announce] LightBlue 0.2.2, working for 3rd edition - 2008-05-01, 01:34

Join Date: Sep 2007
Posts: 2
wujunbao
Offline
Registered User
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.
Reply With Quote

#11 Old Re: [announce] LightBlue 0.2.2, working for 3rd edition - 2008-05-02, 16:21

Join Date: Sep 2007
Posts: 2
wujunbao
Offline
Registered User
I got it, sorry.
lightblue-0.3.2-s60-3rdEd_freedevcert.sis + online sign with 13 caps
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
[announce] Image Converter for 1st edition cyke64 Python 2 2006-12-27 15:51
SDK S60 3rd edition, not working with Visual Studio shahzadamin Symbian Tools & SDKs 5 2006-06-16 11:12
新手求助:VC++6.0&SDK的安装问题 yinhh001 Symbian 7 2006-04-20 12:07
新手提问 jrliu0757 Symbian 7 2005-06-13 14:39
While working with the series60 2nd Edition giving problem sri_nainala Symbian Networking & Messaging 1 2005-03-02 19:03

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia