×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Aug 2004
    Posts
    295

    socket.bt_discover throws error when selecting device

    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.

  2. #2
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643

    Re: socket.bt_discover throws error when selecting device

    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.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    5

    Re: Re: socket.bt_discover throws error when selecting device

    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)

  4. #4
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643

    Re: Re: Re: socket.bt_discover throws error when selecting device

    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.

Posting Permissions

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