1 2 Previous Next 19 Replies Latest reply on Apr 19, 2018 1:18 AM by Intel Corporation

    serial port access

    anemos

      Hello,

       

      when booting linux with the intel aero. Three uart ports are detected ttyS0,1 and 2

      how can we access them? through which port?

       

      I now that the hsuart is ttyS1, what about the 2 others?

        • 1. Re: serial port access
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi anemos,

          I am still looking into the ttyS0 and ttyS2, let me reach out to my peers for additional information.

          Regards,
          Jesus

          • 2. Re: serial port access
            anemos

            Hello Jesus, have you got the chance to get more information?

             

            Thanks

            • 3. Re: serial port access
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              Hi anemos,

              I apologize for the delay. In order to use additional serial ports, you would need to create your own FPGA firmware to convert UART to SPI data and send over SPI to the compute board. Take a look at the following link for additional information on configuring the FPGA:
              https://github.com/intel-aero/meta-intel-aero/wiki/95-(References)-FPGA#fpga-sample-configuration

              There are also some Sample FPGA configurations available here:
              https://github.com/intel-aero/intel-aero-fpga/tree/master/aero_sample

              Hope this helps!

              Regards,
              Jesus

              • 4. Re: serial port access
                anemos

                Hello Jesus, not very pratical. I thought there was a kernel module that translates Uart device file into FPGA SPI order.

                 

                What ar those ttyS0 et ttyS2 then?

                • 5. Re: serial port access
                  Intel Corporation
                  This message was posted on behalf of Intel Corporation

                  Hi anemos,

                  The Atom processor has three UARTs but only ttyS1 is exposed. On the Aero RTF Drone, ttyS1 is used to communicate to the flight controller. On the Aero Compute board, ttyS1 is exposed on the power + HSUART cable. ttyS0 and ttyS2 are reserved and cannot be used.

                  Regards,
                  Jesus

                  1 of 1 people found this helpful
                  • 6. Re: serial port access
                    AshL

                    Hello Jesus

                     

                    I'm trying to access the aero serial port ttyS1 through python. I'm using the Aero Compute Board by it self with no flight controllers attached.

                     

                    I was experimenting with a very simple code to open up the port and pass a number 2.

                     

                    import serial

                    com=serial.Serial('/dev/ttyS1', baudrate=96000)

                    com.open

                    com.write('2')

                    com.close()

                     

                    I first ran the command to stop the mavlink bridge.

                     

                    sudo /etc/init.d/mavlink-routerd.sh stop

                     

                    However when I run my simple code, I get the "Could not configure port" error. The returned message is pasted below:

                     

                    Traceback (most recent call last):

                      File "testserial.py", line 2, in <module>

                        com=serial.Serial('/dev/ttyS1', baudrate=96000)

                      File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 180, in __init__

                        self.open()

                      File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 298, in open

                        self._reconfigure_port(force_update=True)

                      File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 330, in _reconfigure_port

                        raise SerialException("Could not configure port: %s" % msg)

                    serial.serialutil.SerialException: Could not configure port: (5, 'Input/output error')

                     

                    When I give it "cat /dev/ttyS1" command it returned

                     

                    cat: /dev/ttyS1: Input/output error

                     

                    Why do I not have access to the port?

                    Thanks for your help!

                     

                    Ash

                    • 7. Re: serial port access
                      Intel Corporation
                      This message was posted on behalf of Intel Corporation

                      Hello Ash,

                      Thank you for your reply.

                      Can you please tell us what connector and cables you are using?
                      We have tested this in the lab with PuTTY and an FTDI cable, finding that we did not encounter this error.
                      Please run the command aero-get-version.py and provide us the output, and also check if you are able to see the /dev/ttyS1 with the following command:

                      ls /dev/ttyS*

                      Regards,
                      Octavian
                      • 8. Re: serial port access
                        Intel Corporation
                        This message was posted on behalf of Intel Corporation

                        Hello Ash,

                        Do you still require assistance with this issue?

                        Regards,
                        Octavian

                        • 9. Re: serial port access
                          AshL

                          Hello Octavian,

                          I must have missed the email notification of your reply. Pardon the delay.

                          The trouble with this board came from the fact that the port somehow was named S4 on that boot. I can't find a pattern to why it was S4 on some occasions and S1 on others. Not sure if anyone has reported such an issue?

                           

                          Ash

                          • 10. Re: serial port access
                            Intel Corporation
                            This message was posted on behalf of Intel Corporation

                            Hello Philippe,

                            Where have you seen S4 and S1 ? Have you seen them in the same folder and/or on the same system?

                            Regards,
                            Octavian

                            • 11. Re: serial port access
                              AshL

                              Hello Octavian

                              When the S4 is there, the ports are named S0, S4 and S5 instead of S1 and S2. So S1 and S2 do not appear when S4 and S5 are there.

                               

                              Ash

                              • 12. Re: serial port access
                                AshL

                                Octavian

                                Here's something else that's very bizarre: on the very same board we are having trouble with, we noted that the Baud Rate changes by itself.

                                We manually set the baud rate to 9600. After running the stty -F command a few times, the baud rate jumps back to 460800 by itself. No other commands were given. Have you seen this type of behavior?

                                 

                                trixie@radiirobotics:~$ stty -F /dev/ttyS1

                                speed 9600 baud; line = 0;

                                min = 0; time = 0;

                                -brkint -icrnl

                                -opost -onlcr

                                -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

                                trixie@radiirobotics:~$ stty -F /dev/ttyS1

                                speed 9600 baud; line = 0;

                                min = 0; time = 0;

                                -brkint -icrnl

                                -opost -onlcr

                                -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

                                trixie@radiirobotics:~$ stty -F /dev/ttyS1

                                speed 460800 baud; line = 0;

                                min = 0; time = 0;

                                -brkint -icrnl

                                -opost -onlcr

                                -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

                                • 13. Re: serial port access
                                  Intel Corporation
                                  This message was posted on behalf of Intel Corporation

                                  Hello Ash,

                                  Can you clarify if you are able to get it functioning with S4 and S5 and if that's the only difference? Or is there a functional issue when using those instead of S1?
                                  Also we will have to investigate further the baud rate issue.

                                  Regards,
                                  Octavian

                                  • 14. Re: serial port access
                                    AshL

                                    Hello octavian

                                    Thanks for your continued assistance on this matter.

                                    Perhaps sending you an image of our aero board software would help you diagnose the problem? If you can provide an email, I will send you a google drive link.

                                    The changing of the name from S1 to S4 hasn't happened again so far. We will keep an eye on it and see what we can find out.

                                     

                                    Ash

                                    1 2 Previous Next