Qt OSX BLE read DeviceInformation give InvalidService.



  • 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.");
    }
    

  • Lifetime Qt Champion

    Hi and welcome to devnet,

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



  • Yes my mac suport Bluetooth Low Energy.


  • Lifetime Qt Champion

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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.