NanoPi UART

Xavier
Hi I'm trying to use the NanoPi UART. 

After a bit of searching and reading I understood that I should be using
the UART 1 and 2 leaving the 0 for debug.

So I tested wiring TXD2 with RXD2 and then I tried to send something using
the python library pyserial and the minicom with no luck using the
/dev/ttySAC1, /dev/ttySAC1 and /dev/ttySAC3.

Anybody knows how to make it work?

Thanks

Testing code:
python:
import serial
ser = serial.Serial("/dev/ttySAC2")
ser.write("UART the Font")
read = ser.read()
print read
ser.close()

minicom:
minicom -b 9600 -o -D /dev/ttySAC2

davef
Have you tried a RS232 loop-back test?  Just to make sure your host is set
up correctly?

davef
Sorry, re-reading it sounds like you have.  Where have you set up the
serial port parameters on the target?

I see in here http://elinux.org/Serial_port_programming there is a line:

port = serial.Serial("/dev/ttyAMA0", baudrate=115200, timeout=3.0)

Mahmood
Hi every one....  
I'm newbie in nanopi 2 fire... I want to config pins and enable UART
ability....  But i don't know how i can do this...  I used qextserialport
library in QT and it recognized usb2serial module perfectly but it couldn't
find any built-in UART in Nanopi2 board.... In addition, i can't find any
library like WIRINGPI to config and implement UART pins

Please help me to fix it....  Tnx

davef
Are you running Debian Jessie?

The UART port will have a /dev/tty node associated with it.  Maybe,
/dev/ttySAC0

I think the process is just telling qextserialport which /dev node to look
at.

Or are you trying to set up a UART on GPIO, ie not the built-in UART port?

Mahmood
tnx 'davef' for ur quick response.
I Purchased a Nanopi 2 Fire and install Jessie on a SD card.actually i'm
trying to set up UART on GPIO pins... i want to create a app by QT (C/C++)
and send serial data to GPIO .... after that, i want to use a RS232 module
to send the received data from GPIO to PC... i have done it by USB-SERIAL
module but not GPIO.... How can i config or set up UART on GPIO?
i'm unable to find any useful link or source code to set up UART on GPIO...
tnx so much.

Mahmood
in the Python the code works perfectly but in the c++ i can't any suitable
library! The Matrix Library hasn't got any example about UART setting
up....

davef
Do you want a UART on GPIO so that you can still use the build-in UART for
debugging?

Have you searched <termios>?

Mahmood
Tnx davef...  I was finally able to set up gpio using Qt...despite the
Qextserialport library, qtserialport in qt4 works perfectly.... 
Tnx again bro