9 Replies Latest reply on May 27, 2015 7:41 AM by abcde

    Need a second UART

    massca

      Hi,

      I'm using the Edison Arduino board. I used the first UART on Serial1 to connect an external module. I need a second UART port to connect a second expansion board.

       

      I read this post about "how to activate uart2": https://communities.intel.com/message/272136#272136

       

      I need a way to adapt the micro USB on UART2 port to a TTL output like what I have on pin 0, 1 of UART1. Could you please help me?

       

      Thanks

      -massimo

        • 1. Re: Need a second UART
          CMata_Intel

          Hi massca

           

          Did you try with the suggestions in that thread? What was the outcome?

          There is also another thread that you could check. Additional UART port (SoftwareSerial)?

          Do you only need two pins(Rx and Tx)? Or do you more pins for flow control or ...?

           

           

          Regards;

          CMata

          • 2. Re: Need a second UART
            massca

            Hi CMata_Intel,

            I need only two pins(Rx and Tx) and an HW adapter (to buy/make) that expose this 2 pins from the micro USB connector. I cannot test it until I find this HW.

             

            Thanks

            -massimo

            • 3. Re: Need a second UART
              intel_jassowski

              Massimo,

              There are any number of USB to UART adapters out there.  If you don't need hardware flow control, any will work.  Just google "USB to UART adapter".

              Here's one from Adafruit: http://www.adafruit.com/product/954

              and here's one from Pololu: Pololu - CP2104 USB-to-Serial Adapter Carrier

              • 4. Re: Need a second UART
                massca

                Hi @intel_jassowski,

                thank you for your answer. I already thought to use an adapter like this, I'm glad that you confirm my idea.

                I can see that these USB to UART adapter requires an USB to serial driver to work, like the FTDI driver that I need to install on my Win PC to connect to the Edison.

                 

                Do you know if there is a driver already loaded in the Edison to support USB to serial? What kind of chips support this driver? I suppose it could be a FTDI one.

                I'd like to choose a compatible adapter.

                 

                Thanks

                -massimo

                • 5. Re: Need a second UART
                  intel_jassowski

                  Massimo,

                  There is no driver required on the Edison to communicate with the UART side of a USB to UART adapter.  Simply connect the RX/TX and Gnd from the Edison to the UART port on the adapter, and plug the USB port into your PC.  The Windows drivers required for the adapter are for the USB serial communication...  You will need to ensure that the baud rate on the Edison (set using Serial1.begin(xxxxx)) matches the baud rate set on the PC terminal emulator, otherwise you'll get gibberish.

                  However, if you wanted to use the adapter in the other direction (using the USB host on Edison), it does require the correct usbserial kernel modules to be installed.  Of course, for communication to a PC, that's not how you'd hook thing up, given that most PC's don't have a UART port (any longer, at least).  I just mention this to explain why you don't need a driver on the Edison: you aren't connecting to the USB port side of the adapter, and the UART serial protocol is already handled by the Edison.

                  • 6. Re: Need a second UART
                    massca

                    Hi intel_jassowski,

                    thank you again for your very detailed answer. It was very useful for me to better understand how this thing works. This forum is a great value added to the Edison.

                     

                    I would like to know if it possible to use the big type “A” USB port nearest the Arduino power connector as serial UART. In this way I could have the UART2 free for debugging.

                     

                    Thanks

                    -massimo

                    • 7. Re: Need a second UART
                      intel_jassowski

                      Happy to help.

                      As for using the USB Host port for Serial: Yes, I believe so.  It is treated as a Virtual Port.  See the Using Serialx on Edison thread for a discussion on all the details on the various serial ports and how they can be accessed in the Arduino IDE and linux.

                      • 8. Re: Need a second UART
                        massca

                        Thank you very much,

                        I'll try this.

                        • 9. Re: Need a second UART
                          abcde

                          Hi intel_jassowski,

                          you said "it does require the correct usbserial kernel modules to be installed,if I want to use the USB Host model in Edison". Would you mind giving me more details about how to install  the correst usbserial kernel? I have installed USB-UART driver,named kernel-module-ftdi-sio_3.10.17+git0+6ad20f049a_c03195ed6e-r0_edison.ipk,but it doesn't work.and  I can't find "ttyUSBx " or "ttyACMx"in the /dev .

                           

                          What should I do?