You Are Here:

Community: Developer Discussion Boards

#1 Old socket.bt_discover throws error when selecting device - 2005-01-12, 16:33

Join Date: Aug 2004
Posts: 290
simo.salminen
Offline
Regular Contributor
I have device that advertises itself as audio/video-device. It provides RFCOMM service at port 1 (but doesn't advertise this). Now, when I do socket.bt_discover(), and select this device on the device list dialog, the python throws error: error: (2, 'No such file or directory').

When using hardcoded address to connect to it works quite fine.

System: N7610.
Reply With Quote

#2 Old Re: socket.bt_discover throws error when selecting device - 2005-01-17, 10:32

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Quote:
Originally posted by simo.salminen
I have device that advertises itself as audio/video-device. It provides RFCOMM service at port 1 (but doesn't advertise this). Now, when I do socket.bt_discover(), and select this device on the device list dialog, the python throws error: error: (2, 'No such file or directory').

When using hardcoded address to connect to it works quite fine.

System: N7610.
bt_discover will return an address and a dictionary that maps service names to port numbers. This information is determined from what the device advertises, and if the device doesn't advertise anything, bt_discover will raise an exception.

I admit that it would be more pythonic to simply return an empty service map dictionary if the device is found but doesn't advertise any services.
Reply With Quote

#3 Old Re: Re: socket.bt_discover throws error when selecting device - 2005-01-18, 17:59

Join Date: Mar 2003
Posts: 5
koshu
Offline
Registered User
Quote:
Originally posted by jplauril
bt_discover will return an address and a dictionary that maps service names to port numbers. This information is determined from what the device advertises, and if the device doesn't advertise anything, bt_discover will raise an exception.

I admit that it would be more pythonic to simply return an empty service map dictionary if the device is found but doesn't advertise any services.
I have tried with socket.bt_discover() and it seems to find only serial services :-( I haven't succeeded to find any other service (e.g. OBEX would be nice). I know that there is a different query for obex services, but shouldn't bt_discover() find all SDP advertised services !?

Tested this with several different BT - devices that are advertising other services e.g. DUN.
Side note, Extended Systems Blue Manager -Bluetooth Software crashed during service discovery.

- Janne, using 3650 (which is not supported/tested by Nokia)
Reply With Quote

#4 Old Re: Re: Re: socket.bt_discover throws error when selecting device - 2005-01-19, 10:00

Join Date: Dec 2004
Posts: 646
jplauril's Avatar
jplauril
Offline
Forum Nokia Expert
Quote:
Originally posted by koshu
I have tried with socket.bt_discover() and it seems to find only serial services :-( I haven't succeeded to find any other service (e.g. OBEX would be nice). I know that there is a different query for obex services, but shouldn't bt_discover() find all SDP advertised services !?
No. As it says on page 29 of the API reference, bt_discover will only look for RFCOMM class services.
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

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