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. Multi serial port application
QtWS25 Last Chance

Multi serial port application

Scheduled Pinned Locked Moved Unsolved General and Desktop
49 Posts 5 Posters 14.0k 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.
  • V veera
    11 Dec 2017, 11:08

    in my desktop using two serial ports using right now may be in built its four i guess.....

    J Online
    J Online
    jsulm
    Lifetime Qt Champion
    wrote on 11 Dec 2017, 11:15 last edited by
    #37

    @veera Make sure your user is member of dialout group

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

    1 Reply Last reply
    1
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 11 Dec 2017, 11:19 last edited by
      #38

      Also if you are having ONLY 2 serial ports why are you then
      trying the /dev/ttyS4 port ???
      i would giess on
      /dev/ttyS0
      or
      /dev/ttyS1

      1 Reply Last reply
      0
      • V Offline
        V Offline
        veera
        wrote on 11 Dec 2017, 11:22 last edited by
        #39

        i have verified with minicom slot machine cable is connected with ttyS4 so i am trying with this port

        1 Reply Last reply
        0
        • V Offline
          V Offline
          veera
          wrote on 11 Dec 2017, 11:23 last edited by
          #40

          i have tried ttyS0 and ttyS1 also it is not able to open the serial port....

          M 1 Reply Last reply 11 Dec 2017, 11:34
          0
          • V veera
            11 Dec 2017, 11:23

            i have tried ttyS0 and ttyS1 also it is not able to open the serial port....

            M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 11 Dec 2017, 11:34 last edited by mrjj 12 Nov 2017, 11:43
            #41

            @veera

            ok. not sure what could be wrong with your linux if you have added
            yourself (your username) to dial out group and you are sure that the port exists.

            What linux are you using ?

            1 Reply Last reply
            0
            • V Offline
              V Offline
              veera
              wrote on 11 Dec 2017, 11:57 last edited by
              #42

              ubuntu 16.04 LTS ,i opened serial port now if i choose the run in terminal its opening please help how to set sudo password in qt instead of choosing run in terminal directly need to open

              A 1 Reply Last reply 11 Dec 2017, 12:00
              0
              • V veera
                11 Dec 2017, 11:57

                ubuntu 16.04 LTS ,i opened serial port now if i choose the run in terminal its opening please help how to set sudo password in qt instead of choosing run in terminal directly need to open

                A Offline
                A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on 11 Dec 2017, 12:00 last edited by
                #43

                @veera said in multi serial port application:

                ubuntu 16.04 LTS ,i opened serial port now if i choose the run in terminal its opening please help how to set sudo password in qt instead of choosing run in terminal directly need to open

                If you need the sudo password than setting yourself into dialout group did not work!

                Have your rebooted your PC after you put yourself into dialout?

                Hint: call error() when opening the serial port fails to get more information about the error.

                Qt has to stay free or it will die.

                J 1 Reply Last reply 11 Dec 2017, 14:00
                2
                • A aha_1980
                  11 Dec 2017, 12:00

                  @veera said in multi serial port application:

                  ubuntu 16.04 LTS ,i opened serial port now if i choose the run in terminal its opening please help how to set sudo password in qt instead of choosing run in terminal directly need to open

                  If you need the sudo password than setting yourself into dialout group did not work!

                  Have your rebooted your PC after you put yourself into dialout?

                  Hint: call error() when opening the serial port fails to get more information about the error.

                  J Online
                  J Online
                  jsulm
                  Lifetime Qt Champion
                  wrote on 11 Dec 2017, 14:00 last edited by
                  #44

                  @aha_1980 @veera Reboot is not needed: just log off and on again after adding yourself to the group.

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

                  A 1 Reply Last reply 11 Dec 2017, 15:54
                  1
                  • V Offline
                    V Offline
                    veera
                    wrote on 11 Dec 2017, 15:21 last edited by
                    #45

                    yes i have rebooted system now opened successfully ......Thank you so much

                    1 Reply Last reply
                    0
                    • V Offline
                      V Offline
                      veera
                      wrote on 11 Dec 2017, 15:23 last edited by
                      #46

                      how to write and read the hexbytes such as unsigned char ch1[] = {0X01,0X04,0X0F} etc from serial port......

                      M 1 Reply Last reply 11 Dec 2017, 15:51
                      0
                      • V veera
                        11 Dec 2017, 15:23

                        how to write and read the hexbytes such as unsigned char ch1[] = {0X01,0X04,0X0F} etc from serial port......

                        M Offline
                        M Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on 11 Dec 2017, 15:51 last edited by
                        #47

                        @veera
                        Hi
                        Hex is a notation and not a format.
                        The bytes are still just bytes.
                        QByteArray has
                        QByteArray::fromHex
                        http://doc.qt.io/qt-5/qbytearray.html#fromHex
                        and
                        http://doc.qt.io/qt-5/qbytearray.html#toHex

                        1 Reply Last reply
                        3
                        • J jsulm
                          11 Dec 2017, 14:00

                          @aha_1980 @veera Reboot is not needed: just log off and on again after adding yourself to the group.

                          A Offline
                          A Offline
                          aha_1980
                          Lifetime Qt Champion
                          wrote on 11 Dec 2017, 15:54 last edited by
                          #48

                          @jsulm I know :) But it does not hurt either and before explaining what logging out an in again means...

                          Qt has to stay free or it will die.

                          1 Reply Last reply
                          2
                          • V Offline
                            V Offline
                            veera
                            wrote on 12 Dec 2017, 05:07 last edited by
                            #49

                            @mrjj ,
                            Okay thanks i will try it now....

                            1 Reply Last reply
                            0

                            46/49

                            11 Dec 2017, 15:23

                            • Login

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