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. gpio error
Qt 6.11 is out! See what's new in the release blog

gpio error

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
16 Posts 4 Posters 3.7k Views 2 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.
  • T tinashe

    @SGaist
    thank you for the reply
    Sorry its Emteria.os
    i was told to
    the gpios are accessable
    Make sure those files are accessible from your application. Check Linux file permissions. and how do i check for these permissions?

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

    @tinashe said in gpio error:

    and how do i check for these permissions?

    ls -lh /sys/class/gpio/unexport
    

    You should read about UNIX/Linux basics.
    To get access for the group your user is in:

    chmod g+rw /sys/class/gpio/unexport
    

    For user

    chmod u+rw /sys/class/gpio/unexport
    

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

    T 2 Replies Last reply
    0
    • jsulmJ jsulm

      @tinashe said in gpio error:

      and how do i check for these permissions?

      ls -lh /sys/class/gpio/unexport
      

      You should read about UNIX/Linux basics.
      To get access for the group your user is in:

      chmod g+rw /sys/class/gpio/unexport
      

      For user

      chmod u+rw /sys/class/gpio/unexport
      
      T Offline
      T Offline
      tinashe
      wrote on last edited by
      #8

      @jsulm
      thank you very much
      how do i run this in my main file or c++ file because i have seen these commands run in cmd terminal.

      jsulmJ T 2 Replies Last reply
      0
      • T tinashe

        @jsulm
        thank you very much
        how do i run this in my main file or c++ file because i have seen these commands run in cmd terminal.

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

        @tinashe said in gpio error:

        how do i run this in my main file or c++ file because i have seen these commands run in cmd terminal

        Why do you want to do it in your app? Just do it once in a terminal...
        The commands I provided to set access rights need root access (via sudo for example):

        sudo chmod g+rw /sys/class/gpio/unexport
        

        So, your app will not be able to do this.
        But you should really check how access rights are handled in Emteria.os

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

        T 1 Reply Last reply
        0
        • jsulmJ jsulm

          @tinashe said in gpio error:

          and how do i check for these permissions?

          ls -lh /sys/class/gpio/unexport
          

          You should read about UNIX/Linux basics.
          To get access for the group your user is in:

          chmod g+rw /sys/class/gpio/unexport
          

          For user

          chmod u+rw /sys/class/gpio/unexport
          
          T Offline
          T Offline
          tinashe
          wrote on last edited by
          #10

          @jsulm said in gpio error:

          For user
          unfortunately i can not do it on the terminal.
          or can i do this in the cmd.txt found in boot folder?

          1 Reply Last reply
          0
          • jsulmJ jsulm

            @tinashe said in gpio error:

            how do i run this in my main file or c++ file because i have seen these commands run in cmd terminal

            Why do you want to do it in your app? Just do it once in a terminal...
            The commands I provided to set access rights need root access (via sudo for example):

            sudo chmod g+rw /sys/class/gpio/unexport
            

            So, your app will not be able to do this.
            But you should really check how access rights are handled in Emteria.os

            T Offline
            T Offline
            tinashe
            wrote on last edited by
            #11

            @jsulm
            unfortunately the ssh server is locked for demo which am using currently

            jsulmJ 1 Reply Last reply
            0
            • T tinashe

              @jsulm
              unfortunately the ssh server is locked for demo which am using currently

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

              @tinashe See "man 2 chmod".
              But most probably your user will need to start the app as root (sudo for example).

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

              T 1 Reply Last reply
              0
              • T tinashe

                @jsulm
                thank you very much
                how do i run this in my main file or c++ file because i have seen these commands run in cmd terminal.

                T Offline
                T Offline
                tinashe
                wrote on last edited by
                #13

                @tinashe

                i was told to do permission seeting in /data/init.d

                1 Reply Last reply
                0
                • jsulmJ jsulm

                  @tinashe See "man 2 chmod".
                  But most probably your user will need to start the app as root (sudo for example).

                  T Offline
                  T Offline
                  tinashe
                  wrote on last edited by
                  #14

                  @jsulm
                  chmod g+rw /sys/class/gpio/unexport
                  cd /etc/udev/rules.d/
                  touch local.rules
                  ACTION=="add", KERNEL=="gpio", MODE="0666"
                  and did notwork

                  jsulmJ 1 Reply Last reply
                  0
                  • T tinashe

                    @jsulm
                    chmod g+rw /sys/class/gpio/unexport
                    cd /etc/udev/rules.d/
                    touch local.rules
                    ACTION=="add", KERNEL=="gpio", MODE="0666"
                    and did notwork

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

                    @tinashe This does not have anything to do with Qt now, please find out how to do this with Linux.

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

                    T 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @tinashe This does not have anything to do with Qt now, please find out how to do this with Linux.

                      T Offline
                      T Offline
                      tinashe
                      wrote on last edited by
                      #16

                      @jsulm
                      thank you very much will do that

                      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