Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Simple Terminal runtime error when opening port

    General and Desktop
    qserialport
    3
    12
    2654
    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.
    • MarkusL
      MarkusL last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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

        MarkusL 1 Reply Last reply Reply Quote 0
        • MarkusL
          MarkusL @SGaist last edited by

          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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • MarkusL
              MarkusL last edited by MarkusL

              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 Reply Quote 0
              • K
                kuzulis Qt Champions 2020 last edited by

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

                MarkusL 1 Reply Last reply Reply Quote 0
                • MarkusL
                  MarkusL @kuzulis last edited by

                  @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 Reply Quote 0
                  • K
                    kuzulis Qt Champions 2020 last edited by 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.

                    MarkusL 1 Reply Last reply Reply Quote 0
                    • SGaist
                      SGaist Lifetime Qt Champion last edited by

                      @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 Reply Quote 0
                      • K
                        kuzulis Qt Champions 2020 last edited by kuzulis

                        @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 Reply Quote 0
                        • MarkusL
                          MarkusL @kuzulis last edited by

                          @kuzulis Thanks, that solved the problem.

                          1 Reply Last reply Reply Quote 0
                          • SGaist
                            SGaist Lifetime Qt Champion last edited by

                            @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 Reply Quote 0
                            • First post
                              Last post