Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AAlex49
Novice
1,073 Views

Connecting to the Joule over UART through GPIO

Hi I am trying to connect the the Joule 570x over UART to the Pxihawk flight controller similar to the tutorial found here: http://ardupilot.org/dev/docs/raspberry-pi-via-mavlink.html Communicating with Raspberry Pi via MAVLink — Dev documentation

by connecting the ground Telem2 port to pin 39 (J12) on the joule

 

Then we connected Rx from Telem2 to pin 22 (J12) UART_1_TXD on the joule

 

Then we connected Tx from Telem2 to pin 24 (J12) UART_1_TRD on the joule

We did not connect the +5V from the Pxihawk to the +5V rail of the Joule because we are powering the Pxihawk from USB.

Once it is all connected dmesg | grep tty only returns the standard tty0. We also tried rebooting the joule but still no connection was available. Any ideas on how to connect to a device over UART?

6 Replies
idata
Community Manager
73 Views

Hello Zatez,

 

 

Thanks for reaching out!

 

 

I believe there is no mistake in what you are doing. I believe the answer to what is happening can be found on mraa's note on Joule's UART (which can be found in: https://github.com/intel-iot-devkit/mraa/blob/master/docs/grossetete.md%29: https://github.com/intel-iot-devkit/mraa/blob/master/docs/grossetete.md):

 

 

"…Some pins are labelled as UARTs but are not configured in BIOS as UART so only available UART is on the FTDI header. Disable the getty on ttyS2 and use mraa's uart raw mode to initialise on ttyS2. The Jumper J8 can be used to switch between using the FTDI 6 pin header and the micro USB output…"

 

 

So, in order to use UART on Joule's current BIOS, the only option is to use the method mentioned above.

 

 

I hope this helps.

 

-Peter.
AAlex49
Novice
73 Views

Does this also apply if I am using xUbuntu 16.04, because that is the current OS that is installed on the Joule.

idata
Community Manager
73 Views

I believe so, as the issue is related to Joule's BIOS (according to the quote above) and it is independent of the OS.

I hope this helps.

 

-Peter.
AAlex49
Novice
73 Views

I am not sure what it means by "Disable the getty on ttyS2 and use mraa's uart raw mode to initialize on ttyS2." Is there any more explicit instructions you can give me, so that I can get a UART connection working properly. And if I do the method mentioned above will it only enable the FTDI header, and disable the micro USB output. Or will it also enable the UART GPIO pins on J12 and J13?

idata
Community Manager
73 Views

The term getty is short for "get tty", it refers to a Unix program running on a host computer that manages physical or virtual terminals (TTYs). You can find a more detailed explanation about getty in https://en.wikipedia.org/wiki/Getty_(Unix) its Wikipedia entry.

 

 

"...Disable the getty on ttyS2 and use mraa's uart raw mode to initialize on ttyS2..."

 

 

So, what the quote above means is that you have to disable the console output in the micro USB port and then use mraa's raw mode method to use the micro USB port as the UART port. If you'd like to learn more about mraa's UART capabilities, I'd suggest you to read the API's documentation (http://iotdk.intel.com/docs/master/mraa/uart_8h.html%23a7a1f634571a8851a3c89ff1c1599a5f6 http://iotdk.intel.com/docs/master/mraa/uart_8h.html# a7a1f634571a8851a3c89ff1c1599a5f6)

 

 

This means that right now, the only available UART port is on the micro USB port (what you are referring as the FTDI header). Due to the same reason, it is not possible to use the UART GPIO pins on J12 and J13.

 

 

Let me know if you need anything else.

 

-Peter.
idata
Community Manager
73 Views

Hello Zatez,

 

 

Do you have any updates about this?

 

 

-Peter.
Reply