Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
2,093 Views

serial port access

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?

0 Kudos
21 Replies
Highlighted
Community Manager
50 Views

Hi anemos,

 

 

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

 

 

Regards,

 

Jesus
0 Kudos
Highlighted
Beginner
50 Views

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

Thanks

0 Kudos
Highlighted
Community Manager
50 Views

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
0 Kudos
Highlighted
Beginner
50 Views

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?

0 Kudos
Highlighted
Community Manager
50 Views

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
0 Kudos
Highlighted
Beginner
50 Views

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

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

0 Kudos
Highlighted
Community Manager
50 Views

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
0 Kudos
Highlighted
Community Manager
50 Views

Hello Ash,

 

 

Do you still require assistance with this issue?

 

 

Regards,

 

Octavian
0 Kudos
Highlighted
Beginner
50 Views

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

0 Kudos
Highlighted
Community Manager
50 Views

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
0 Kudos
Highlighted
Beginner
50 Views

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

0 Kudos
Highlighted
Beginner
50 Views

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

0 Kudos
Highlighted
Community Manager
50 Views

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
0 Kudos
Highlighted
Beginner
50 Views

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

0 Kudos
Highlighted
Community Manager
50 Views

Hello Ash,

 

 

You can attach the picture to your post on this thread.

 

 

Regards,

 

Octavian
0 Kudos
Highlighted
Beginner
50 Views

no, not a picture image, but an image of the software on our boards. I would prefer to keep the access to our image in private. My email is mailto:anshuo@radiirobotics.com anshuo@radiirobotics.com, you can shoot me a message.

Ash

0 Kudos
Highlighted
Beginner
50 Views

Hello Octavian

We seemed to have found the problem. we didn't realize that the UART baud rate was being configured by the mavlink router! I believe it's ok now. So everytime we set it, the mavlink router sets it back. Sorry about the silly issue!

Also, I think I also discovered that the UART can have two baudrates at the same time, is that so? I didn't use it this time but it could be useful in the future.

Ash

0 Kudos
Highlighted
Community Manager
50 Views

Hello Ash,

 

 

I'm glad to hear you found the problem.

 

 

In regards to the UART having two baudrates at the same time, I will have to investigate further into that.

 

 

Regards,

 

Octavian
0 Kudos
Highlighted
Community Manager
50 Views

Hello Ash,

 

 

Thank you for your patience.

 

 

It seems that the only recommended baud rate for Aero is 460800 .

 

I haven't found any evidence that it would support another baud rate.

 

 

Regards,

 

Octavian
0 Kudos