Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt OSX BLE read DeviceInformation give InvalidService.

Qt OSX BLE read DeviceInformation give InvalidService.

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 1.2k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    WimTildesign
    wrote on last edited by
    #1

    Does someone no way I get a error on DeviceInformation discoverDetails. The signal stateChanged returns InvalidService.

    The example app lowenergyscanner give "Disconnect from device" if you try to read DeviceInformation. With het LightBlue app from the App store work it fine.

    Is is my code

    if(foundDeviceService)
        m_serviceInfo = m_control->createServiceObject(     
    QBluetoothUuid(QBluetoothUuid::DeviceInformation), this);
    
    if(m_serviceInfo)
    {
        connect(m_serviceInfo, SIGNAL(stateChanged(QLowEnergyService::ServiceState)),
                this, SLOT(serviceStateDeviceInfoChanged(QLowEnergyService::ServiceState)));
        connect(m_serviceInfo, SIGNAL(characteristicRead(QLowEnergyCharacteristic,QByteArray)),
                this, SLOT(characteristicReadValue(QLowEnergyCharacteristic,QByteArray)));
    
        connect(m_serviceInfo, SIGNAL(error(QLowEnergyService::ServiceError)),
                this, SLOT(descriptorError(QLowEnergyService::ServiceError)));
    
        connect(m_serviceInfo, SIGNAL(descriptorWritten(QLowEnergyDescriptor,QByteArray)),
                this, SLOT(confirmedDescriptorWrite(QLowEnergyDescriptor,QByteArray)));
        m_serviceInfo->discoverDetails();
    }
    else {
        setMessage("DeviceInformation not found.");
    }
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Might be a silly question but did you check that your Mac machine has support for Bluetooth Low Energy ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • W Offline
        W Offline
        WimTildesign
        wrote on last edited by
        #3

        Yes my mac suport Bluetooth Low Energy.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What version of Qt ?
          What version of macOS ?
          What model of Mac computer ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • W Offline
            W Offline
            WimTildesign
            wrote on last edited by
            #5

            A bit late, but I still have the problem.

            Qt Version: Qt 5.10.0
            macOS: 10.13.2
            MacBook Pro (Retina, 13-inch, Late 2013)

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved