Deprecation notice: bluez, gnutls, qtconnectivity, qtsysteminfo, repomd-pattern-builder

Same result as adekker

Only the following get displayed on my Sony Xperia 10 II;

    property DeviceInfo deviceInfo: DeviceInfo {}

Column {
    Label {
        text: "IMEI: " + deviceInfo.baseModel
    }
    Label {
        text: "IMEI: " + deviceInfo.designation
    }
    Label {
        text: "IMEI: " + deviceInfo.manufacturer
    }
    Label {
        text: "IMEI: " + deviceInfo.model
    }
    Label {
        text: "IMEI: " + deviceInfo.prettyName
    }
}
1 Like

Thanks @Edz and @adekker, for checking all of this. Youā€™re absolutely right the changes to introduce imeiNumbers were added in version 0.7.0 of the nemo-qml-plugin-systemsettings library, which is ahead of the Vanha Rauma branch (Vanha Rauma is on version 0.5.90).

So I apologise for my earlier incorrect advice which missed this fact. My best suggestion right now is to look at the way itā€™s done there in the newer DeviceInfo code using QOfonoModem from qofono-qt5. Some of the properties are also available from the ssu-sysinfo library as an alternative.

2 Likes

Does the new bluez release support high resolution audio codecs and/ or multiple audio devices, e.g. playing audio to two Bluetooth speakers at the same time?

Not complete, but almost. . . @adekker @flypig

import QtQuick 2.6
import Sailfish.Silica 1.0
import org.nemomobile.systemsettings 1.0

Page {
    id: page

    allowedOrientations: Orientation.All

    property AboutSettings aboutSettings: AboutSettings {}
    property BatteryStatus batteryInfo: BatteryStatus {}
    property BatteryStatus batteryState: BatteryStatus {}
    property DeveloperModeSettings wlanIpAddress: DeveloperModeSettings {}
    property DeveloperModeSettings usbIpAddress: DeveloperModeSettings {}
    property DeveloperModeSettings workStatus: DeveloperModeSettings {}
    property DeviceInfo deviceInfo: DeviceInfo {}
    property DeviceInfo feature: DeviceInfo {}
    property DeviceInfo hasFeature: DeviceInfo {}
    property DeviceInfo wlanMacAddress: DeviceInfo {}
    property DeviceInfo deviceOwner: DeviceInfo {}
    property DeviceInfo hasHardwareKey: DeviceInfo {}
    property DisplaySettings displaySettings: DisplaySettings {}
    property LocationSettings locationEnabled: LocationSettings {}
    property NfcSettings nfcSettings: NfcSettings {}
    property USBSettings usbSettings: USBSettings {}
    property UserInfo userInfo: UserInfo {}
    property UserInfo setName: UserInfo {}
    property UserInfo userName: UserInfo {}    


    SilicaFlickable { anchors.fill: parent; contentHeight: column.height + Theme.paddingLarge
        Column { id: column; width: parent.width
            PageHeader { title: "About" }

            // OS
            SectionHeader { text: "OS" }
            DetailItem { label: "operatingSystem: ";     value: aboutSettings.baseOperatingSystemName }
            DetailItem { label: "adaptationVersion: ";  value: aboutSettings.adaptationVersion }
            DetailItem { label: "localisedOsName: ";    value: aboutSettings.localizedOperatingSystemName }
            DetailItem { label: "osVersion: ";          value: aboutSettings.softwareVersion }

            // DEVICE
            SectionHeader { text: "Device" }
            DetailItem { label: "model: ";              value: deviceInfo.model }
            DetailItem { label: "baseModel: ";          value: deviceInfo.baseModel }
            DetailItem { label: "designation: ";        value: deviceInfo.designation }
            DetailItem { label: "manufacturer: ";       value: deviceInfo.manufacturer }
            DetailItem { label: "prettyName: ";         value: deviceInfo.prettyName }

            // IMEI
            SectionHeader { text: "IMEI" }
            DetailItem { label: "imeiNumber: ";        value: aboutSettings.imei }

            // DISPLAY
            SectionHeader { text: "Display" }
            DetailItem { label: "adaptDimEnabled: ";    value: displaySettings.adaptiveDimmingEnabled }
            DetailItem { label: "ambLightSenseEnbld: "; value: displaySettings.ambientLightSensorEnabled }
            DetailItem { label: "autoBrightEnbld: ";    value: displaySettings.autoBrightnessEnabled }
            DetailItem { label: "blankTimeout: ";       value: displaySettings.blankTimeout }
            DetailItem { label: "brightness: ";         value: displaySettings.brightness }
            DetailItem { label: "dimTimeout: ";         value: displaySettings.dimTimeout }
            DetailItem { label: "flipGestureEnbld: ";   value: displaySettings.flipoverGestureEnabled }
            DetailItem { label: "inhibitMode: ";        value: displaySettings.inhibitMode }
            DetailItem { label: "lpmEnabled: ";         value: displaySettings.lowPowerModeEnabled }
            DetailItem { label: "lidSensorEnbld: ";     value: displaySettings.lidSensorEnabled }
            DetailItem { label: "pwrSaveEnbld: ";       value: displaySettings.powerSaveModeEnabled }
            DetailItem { label: "pwrSaveForced: ";      value: displaySettings.powerSaveModeForced }

            // USER
            SectionHeader { text: "User" }
            DetailItem { label: "username: ";           value: userInfo.username }
            DetailItem { label: "displayName: ";        value: userInfo.displayName }
            DetailItem { label: "alone: ";              value: userInfo.alone }
            DetailItem { label: "current: ";            value: userInfo.current }
            DetailItem { label: "type: ";               value: userInfo.type }

            // BATTERY
            SectionHeader { text: "Battery" }
            DetailItem { label: "chargePercentage: ";   value: batteryInfo.chargePercentage }
            DetailItem { label: "chargerStatus: ";      value: batteryInfo.chargerStatus }

            // NFC
            SectionHeader { text: "NFC" }
            DetailItem { label: "nfcSettingsAvailable: "; value: nfcSettings.available }
            DetailItem { label: "nfcSettingsEnabled: ";   value: nfcSettings.enabled }
            DetailItem { label: "nfcSettingsValid: ";     value: nfcSettings.valid }

            // LOCATION
            SectionHeader { text: "Location" }
            DetailItem { label: "locationEnabled: ";      value: locationEnabled.locationEnabled }
            DetailItem { label: "locationMode: ";         value: locationEnabled.locationMode }
            DetailItem { label: "locationProviders: ";    value: locationEnabled.locationProviders }

            // USB
            SectionHeader { text: "USB" }
            DetailItem { label: "available: ";            value: usbSettings.available }
            DetailItem { label: "usbIpAddress: ";         value: usbIpAddress.usbIpAddress }
            DetailItem { label: "currentMode: ";          value: usbSettings.currentMode }

            // WLAN
            SectionHeader { text: "WLAN" }
            DetailItem { label: "wlanIPaddress: ";        value: wlanIpAddress.wlanIpAddress }
        }
  }

High res codecs are just new profiles and donā€™t need bluez changes afaik. 2 speakers at a time needs a bluetooth 5.x capable device and support in the audio server. I think both need a newer pulseaudio or pipewire, but bluez.

My Bluetooth and OBD quest continues: Today I figured out how the bluez API works to connect to my OBD adapter as well as what protocol it speaks and how to open a socket to it. It seems like it isnā€™t actually using BLE characteristics, but instead just a profile, that I need to implement myself. In this case it uses the Serial Port Protocol, which just implements a Serial Port over Bluetooth.

To be able to connect to that you need to inherit the BluezQt::Profile class (if you are using kf5bluezqt) and register that profile with the agent using the manager. Of course UUID and ports have to match. Then your profileā€™s newConnection() function is called every time a BT device is connected to, which supports that profile. To this function a file descriptor is passed, which you can convert to a QLocalSocket, which basically provides the same functionality as the QtConnectivity QBluetooth socket.

With this I managed to connect to the dongle using my laptop and should be able to port OBDFish to it (once I have the SDK properly setup on my laptop since I am not at home). This means I donā€™t really need a kf5bluezqt update, although I do intend to PR one if I have the time after the meeting.

I made a minimal desktop example, which you can find here: https://github.com/deepbluev7/nicobd/tree/profile-example

Maybe someone will find that useful, the docs for the Bluez API donā€™t really help that much tbh, if you have no idea, what you should be doing. :smiley:

3 Likes