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. Simple Terminal runtime error when opening port
QtWS25 Last Chance

Simple Terminal runtime error when opening port

Scheduled Pinned Locked Moved General and Desktop
qserialport
12 Posts 3 Posters 3.2k 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.
  • MarkusLM Offline
    MarkusLM Offline
    MarkusL
    wrote on last edited by
    #1

    Hello all,

    I am using Creator 3.3.2 (Qt 5.4.1) on OS X 10.8.5 and having trouble running "Simple Terminal".
    When I am trying to open any port I get the error msg: "No such file or directory".

    Has anyone seen this before?

    Thanks
    M.

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

      Hi and welcome to devnet,

      Can you print what port you have ? And which one is it trying to open ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      MarkusLM 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Can you print what port you have ? And which one is it trying to open ?

        MarkusLM Offline
        MarkusLM Offline
        MarkusL
        wrote on last edited by
        #3

        Currently I have the following serial devices:
        Bluetooth-Modem
        Bluetooth-PDA-Sync
        Bluetooth-Serial-1
        Bluetooth-Serial-2
        usbmodem1411
        I tried all of them with the same result.

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

          How are you setting up your serial port ?

          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
          • MarkusLM Offline
            MarkusLM Offline
            MarkusL
            wrote on last edited by MarkusL
            #5

            Not sure I understand the question. Do you want me to copy the code from the Qt examples?

            Update: I tried the same code on a friends mac running OS X 10.9.5 with Creator 3.1.2 (Qt 5.3.1) and there is no problem

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kuzulis
              Qt Champions 2020
              wrote on last edited by
              #6

              Can you please run another example (e.g. the console enumerator), and paste here an output (for a device names and their locations)?

              MarkusLM 1 Reply Last reply
              0
              • K kuzulis

                Can you please run another example (e.g. the console enumerator), and paste here an output (for a device names and their locations)?

                MarkusLM Offline
                MarkusLM Offline
                MarkusL
                wrote on last edited by
                #7

                @kuzulis here is the printout:
                "Port: Bluetooth-Serial-1
                Location: /dev/cu.Bluetooth-Serial-1
                Description: incoming port - Bluetooth-Serial-1
                Manufacturer:
                Serial number:
                Vendor Identifier:
                Product Identifier:
                Busy: No
                "
                "Port: Bluetooth-Serial-2
                Location: /dev/cu.Bluetooth-Serial-2
                Description: incoming port - Bluetooth-Serial-2
                Manufacturer:
                Serial number:
                Vendor Identifier:
                Product Identifier:
                Busy: No
                "
                "Port: Bluetooth-Modem
                Location: /dev/cu.Bluetooth-Modem
                Description: Bluetooth-Modem
                Manufacturer:
                Serial number:
                Vendor Identifier:
                Product Identifier:
                Busy: No
                "
                "Port: Bluetooth-PDA-Sync
                Location: /dev/cu.Bluetooth-PDA-Sync
                Description: incoming port - Bluetooth-PDA-Sync
                Manufacturer:
                Serial number:
                Vendor Identifier:
                Product Identifier:
                Busy: No

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kuzulis
                  Qt Champions 2020
                  wrote on last edited by kuzulis
                  #8

                  Thanks, now all is clear, it is a bug in library. Recently (in Qt5.4.1) was "improved" a code for conversion from the port location to the port name and back. Was implied that on OSX the QSerialPortInfo will be returns the port name in "cu.blabla" form, but it is returns in "blabla" form. Thus the back conversion to the port location is wrong (result is "/dev/blabla" instead of "/dev/cu.blabla"). And as result - opening is failed, because this device does not exists.

                  So, as workaround, need to manually pass to SimpleTerminal the port name as a custom, in "cu.blabla" form.

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

                    @kuzulis where's that "improvement" ?

                    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
                    • K Offline
                      K Offline
                      kuzulis
                      Qt Champions 2020
                      wrote on last edited by kuzulis
                      #10

                      @SGaist,

                      sorry?

                      in here: ab51ad6a5f4e533c31bd8e5b6f16a3bcd09a3ee6

                      Simply forgot to make changes and in QSerialPortInfo for MacOSX. :)

                      Watch for a patch: https://codereview.qt-project.org/#/c/108571/

                      1 Reply Last reply
                      0
                      • K kuzulis

                        Thanks, now all is clear, it is a bug in library. Recently (in Qt5.4.1) was "improved" a code for conversion from the port location to the port name and back. Was implied that on OSX the QSerialPortInfo will be returns the port name in "cu.blabla" form, but it is returns in "blabla" form. Thus the back conversion to the port location is wrong (result is "/dev/blabla" instead of "/dev/cu.blabla"). And as result - opening is failed, because this device does not exists.

                        So, as workaround, need to manually pass to SimpleTerminal the port name as a custom, in "cu.blabla" form.

                        MarkusLM Offline
                        MarkusLM Offline
                        MarkusL
                        wrote on last edited by
                        #11

                        @kuzulis Thanks, that solved the problem.

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

                          @kuzulis I wanted to see what happened that triggered the "improvement" :)
                          Thanks for the pointer

                          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