Results 1 to 17 of 17

Thread: QSerialPortInfo - Bluetooth SPP devices

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2
    Thanked 43 Times in 42 Posts

    Default Re: QSerialPortInfo - Bluetooth SPP devices

    UPD: Seems, this relationship can be done only for "Outgoing" serial ports..

  2. #2
    Join Date
    Jan 2016
    Posts
    17
    Qt products
    Qt5
    Platforms
    MacOS X Windows
    Thanks
    2

    Default Re: QSerialPortInfo - Bluetooth SPP devices

    Hi,

    Do you have any hints as to how to discover this relationship?

    Thanks

  3. #3
    Join Date
    Jan 2009
    Location
    Russia
    Posts
    309
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2
    Thanked 43 Times in 42 Posts

    Default Re: QSerialPortInfo - Bluetooth SPP devices

    Ohhh.. it is not simple:

    1) We need enumerate all BT devices, using SetupApi.

    2) We need store each "FriendlyName" of BT device, and need to parse its BT address and store it too..

    3) We need enumerate all serial ports, using SetupApi

    4) We need parse each "Device Instance Identifier" of each serial port for matching to the same BT address.. Things is that the outgoing BT serial ports contains a BT address inside of own "Device Instance Identifier" string. So, we need to parse this BT address from the string and to compare with each of the BT address of previously saved BT device... When the addresses were equal, then we take the "FriendlyName" from the stored BT device. This "FriendlyName" will be a name of assigned BT device to the serial port. But! This does not work with the "Incoming" serial ports, because its "Device Instance Identifier" string does not contain a BT address!

    PS: Maybe, can be used the winAPI for bluetooth devices, instead of the Registry parsing... But, I am not sure that is is a good idea, because this API is blocking and for other reasons...

    PS2: Also, maybe, you can use the WMI, but this question is out of scope.

  4. #4
    Join Date
    Jan 2016
    Posts
    17
    Qt products
    Qt5
    Platforms
    MacOS X Windows
    Thanks
    2

    Default Re: QSerialPortInfo - Bluetooth SPP devices

    Thanks for taking the time to look at this. I think I am going to park the issue.

    Thanks.

Similar Threads

  1. Qt5.5 QSerialPortInfo::AvailablePorts returns empty list
    By pilatomic in forum Qt Programming
    Replies: 1
    Last Post: 3rd August 2015, 21:20
  2. trouble with the QSerialPortInfo::availablePorts()
    By xiongxiongchuan in forum Qt Programming
    Replies: 1
    Last Post: 22nd June 2014, 09:42
  3. Replies: 3
    Last Post: 7th October 2013, 14:58
  4. QSerialPortInfo Broken
    By RolandHughes in forum Qt Programming
    Replies: 0
    Last Post: 21st June 2013, 15:23
  5. Bluetooth app?
    By danoh in forum Newbie
    Replies: 2
    Last Post: 30th August 2009, 22:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.