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. [LINUX] QtSensors
Qt 6.11 is out! See what's new in the release blog

[LINUX] QtSensors

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.6k Views 1 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.
  • A.BiasciA Offline
    A.BiasciA Offline
    A.Biasci
    wrote on last edited by
    #1

    Hi all,
    I'm trying to understand the QtSensor framework under Linux.

    It's not clear, for me, what kind of sensors are supported by Linux and what kind of API the kernel drivers have to export to user space to be compliant with Qt framework.
    What I understand is that:

    • some sensors need iio:device interface
    • some sensors need Ddbus services

    I don't understand what is needed to develop to add a new sensor to QtSensor framework ( with sensorfw plugin or linux framework plugin ). I don't what to add a new "sensor type" but I would like to integrate, for example, a LightSensor driver into QtSensor framework and use the QtLightSensor class to retrieve data from low-level kernel driver.

    Can you help me to identify the steps needed to add the compatibility of a sensor ?

    Regards,
    Alessandro Biasci.

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

      Hi and welcome to devnet,

      Guessing from a quick look at the LinuxSysAccelerometer:

      1. Create a new QSensorBackend
      2. Register it LinuxSensorPlugin::registerSensors method

      AFAIK, there's no predefined API needed. You can implement your backend to talk with whatever data source you have at hand (provided that your user has the rights to access these data)

      Or do you mean, create your own plugin and get the QtSensors module to use it ?

      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
      • A.BiasciA Offline
        A.BiasciA Offline
        A.Biasci
        wrote on last edited by
        #3

        Hi,
        thanks for your answer. Let me see if I understand what you means. Suppose that I need to add a new that uses iio:device. So, I will add the new sensor to iio:device project, implementing the new sensor's class. Than I will register the new sensor in sensorManager. At the end, I will implement the low-level interface between Qt iio:device sensor and the real-hardware inside iio:sensor:proxy daemon.

        It's right ?

        Best regards,
        Alessandro Biasci.

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

          I haven't used the iio subsystem but for the rest it looks good.

          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

          • Login

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