Cant select hci yet?

Help
2008-09-29
2013-04-25
  • Alejandro Leyva

    Alejandro Leyva - 2008-09-29

    Hi. I've seen through the posts that the API does not support selecting hci adapter, but i can see that those posts are from a year ago, is there any change in this? If i have three hci devices which device will lightblue select? The other two will remain unused?

    Thanks in advance.

     
    • blam

      blam - 2008-09-30

      No, multiple adapter support is not implemented yet and probably won't be anytime soon.  If you have three hci devices it will probably use hci0.

      If you are using server sockets, you can try using pybluez to bind to a particular adapter.

       
    • Alejandro Leyva

      Alejandro Leyva - 2008-10-01

      Could I bind with pybluez to a particular adapter and then use  lightblue.obex.sendfile()? How could i do that?

      Thanks in advance.

       
      • blam

        blam - 2008-10-07

        No, I think pybluez only allows you to bind to a local adapter for server sockets not client sockets.

        One way of doing what you want is to use Python extensions. If you look at the lightblue source code for OBEXClient (which is used by sendfile()), you'll see it uses another internal OBEXClient class that takes a file descriptor for the client socket. You can create a Python extension that creates a Bluetooth socket that binds to the desired adapter (defined using the sockaddr struct) and then pass that socket's file descriptor to the internal OBEXClient class.

         

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