Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. run as root on target device (cross compile raspberry)
QtWS25 Last Chance

run as root on target device (cross compile raspberry)

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 610 Views
  • 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 Offline
    T Offline
    themts
    wrote on last edited by
    #1

    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

    jsulmJ 1 Reply Last reply
    0
    • T themts

      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

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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
      3
      • T Offline
        T Offline
        themts
        wrote on last edited by
        #3

        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 ...).

        jsulmJ 1 Reply Last reply
        0
        • T themts

          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 ...).

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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
          2

          • Login

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