Interfacing

Wiringpi for bananapi uart test

17 9570
Reply 8# vk4tux


    ttyS0 is set the dubug uart for bananaPi,the phys is that j12 on the gpio port ,if you want to use use con3 uart on the gpio ,you need use ttys1.
this port is not expor to user space in the image of release image .you must modify the script.bin .
if you got get /dev/ttys1 the the devlce file ,you can use the uart.

uart_para3]
uart_used = 1
uart_port = 3
uart_type = 4
uart_tx = portH00<4><1><default><default>
uart_rx = portH01<4><1><default><default>
uart_rts = portH02<4><1><default><default>
uart_cts = portH03<4><1><default><default>
you got the right config.
you can use the /dev/ttys1

can you open the /dev/ttyS1  file ?

you use which uart?
for the bananaPi ,con3 head 6,8,10 config for the uart3,and the J12 for the uart0
if your can not sure wihch uart for the ttys0,ttys1,you can do this:
cd /sys/bus/platform/devices
you can see
sunxi-uart.0,sunxi-uart.3 if you set uart_para3 used=1;
if uart_para2 used=1,sunxi-uart.2
and then
if you want to uart_para3
cd uart_para3/tty
you can see
uart device file
in my pi ,is the ttyS1
so,if you want  to use the con3 pin 6,8,10
config uart_para3 used=1
cd /sys/bus/platform/devices/sunxi-uart.3/tty
see the ttysX for you.

you use which uart?
for the bananaPi ,con3 head 6,8,10 config for the uart3,and the J12 for the uart0
if your can not sure wihch uart for the ttys0,ttys1,you can do this:
cd /sys/bus/platform/devices
you can see
sunxi-uart.0,sunxi-uart.3 if you set uart_para3 used=1;
if uart_para2 used=1,sunxi-uart.2
and then
if you want to uart_para3
cd uart_para3/tty
you can see
uart device file
in my pi ,is the ttyS1
so,if you want  to use the con3 pin 6,8,10
config uart_para3 used=1
cd /sys/bus/platform/devices/sunxi-uart.3/tty
see the ttysX for you.

k7ve  
For VK4TUX -- DV3000  
As far as I can tell, communication should be on physical pins 8/10  (PH0/PH1)  
Using RPi.GPIO if I toggle hardware reset (Pin 7 in RPi.GPIO) I get indication of activity on /dev/ttyS2, though no communication.

I will try observing pins with Logic Analyzer over weekend.

k7ve  
Reply 1# julie20082004


   Can you run test at 230400 baud?

gpio_pin_9 and gpio_pin_10 did not represented CON3-09 CON3-10.  The gpio_pin_X is definite to match the BCM3935 GPIO numbering.

You have to log in before you can reply Login | Sign Up

Points Rules