Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved run as root on target device (cross compile raspberry)

    Mobile and Embedded
    2
    4
    329
    Loading More Posts
    • 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.
    • T
      themts last edited by

      Hey guys,

      I'm currently writing my first application for a raspberry PI. As my app uses libpigpio I need to run the app as root.
      How can I setup qt-creator to run as root on my target machine (rasp) ?

      cu
      mts

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @themts last edited by

        @themts Are you sure the only option is to run as root? Can't you add your user to the correct group which has access to gpio?
        See https://raspberrypi.stackexchange.com/questions/40105/access-gpio-pins-without-root-no-access-to-dev-mem-try-running-as-root/40106
        It looks like there is gpio user group - add you user to that group.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 3
        • T
          themts last edited by

          I'm using this lib:
          https://github.com/joan2937/pigpio
          I think there is no such possibility.

          I could use pigpiod_if2 as this talks to a deamon which is running as root but I don't know what performance problems I will get.

          As I want to communicate via wiegand to an RFID-reader I need some good timings (on a non realtime-os ...).

          jsulm 1 Reply Last reply Reply Quote 0
          • jsulm
            jsulm Lifetime Qt Champion @themts last edited by

            @themts said in run as root on target device (cross compile raspberry):

            I'm using this lib

            I know. But this lib simply access the device file for the gpio. That's why I suggested to change the access rights for it or add your user to the group set on the device file. Did you check the link I provided?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 2
            • First post
              Last post