Urgent - Problem: NanoPi NEO Air-LTS - UART1 ttyS1

Good Morning,

I have a problem to set up the UART1 ttyS1 on NanoPi NEO Air-LTS
I want to use the tiny Neo Air Module with both serial ports for an Dula (W)M-Bus Module from Solvimus

Is there a correct layout for the PINs and the way to config the Overlay and somthing else to get it work
I try since days to config and do loop-tests on UART1 ttyS1 and it‘s not working

I do a loopback an the serial port UART1 ttyS1 and UART2 ttyS2, UART2 ttyS2 is working, UART1 ttyS1 is not working. I think there is another service bound to the UART1 ttyS1.

Please find down all information about the config:

Welcome to Ubuntu 16.04.7 LTS 4.14.111
System load: 0.04 Up time: 22 min Local users: 2
Memory usage: 12 % of 491Mb IP: 192.168.160.150
CPU temp: 31°C
Usage of /: 73% of 6.1G

root@NanoPi-NEO-Air:~# sudo stty -F /dev/ttyS1 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ; quit = ; erase = ; kill = ; eof = ; eol = ; eol2 = ; swtch = ;
start = ; stop = ; susp = ; rprnt = ; werase = ; lnext = ; discard = ;
min = 0; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke -flusho -extproc

root@NanoPi-NEO-Air:~# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:U6_16550A mmio:0x01C28000 irq:44 tx:11093 rx:0 RTS|DTR
1: uart:U6_16550A mmio:0x01C28400 irq:45 tx:46 rx:0 RTS|CTS|DTR
2: uart:U6_16550A mmio:0x01C28800 irq:46 tx:40 rx:0 CTS
3: uart:U6_16550A mmio:0x01C28C00 irq:47 tx:35934 rx:2669 RTS|CTS|DTR
4: uart:unknown port:00000000 irq:0
5: uart:unknown port:00000000 irq:0
6: uart:unknown port:00000000 irq:0
7: uart:unknown port:00000000 irq:0

dmesg | grep tty
[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait fsck.repair=yes panic=10 fbcon=map:0 data=/dev/mmcblk0p3 snd-soc-core.pmdown_time=3600000
[ 0.610745] console [ttyS0] disabled
[ 0.630936] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 44, base_baud = 1500000) is a U6_16550A
[ 1.405085] console [ttyS0] enabled
[ 1.431339] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 45, base_baud = 1500000) is a U6_16550A
[ 1.462946] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 46, base_baud = 1500000) is a U6_16550A
[ 1.492523] 1c28c00.serial: ttyS3 at MMIO 0x1c28c00 (irq = 47, base_baud = 1500000) is a U6_16550A

uEnv.txt
#################################################################

General options

#################################################################
ramdisk=rootfs.cpio.gz
kernel=zImage
fix_addr 0x44500000
kernel_addr=0x46000000
ramdisk_addr=0x47000000
dtb_addr=0x48000000

debug_port=ttyS0,115200
fsck.repair=yes

0 = /dev/fb0, First framebuffer

1 = /dev/fb1, Second framebuffer

README: linux/Documentation/fb/fbcon.txt

fbcon=map:0

#################################################################

Overlay options

README: /overlays/README.txt

#################################################################

#uart0/enable=no
uart1/enable=yes
#uart2/enable=no
#uart3/enable=no

#i2c0/enable=no
#i2c1/enable=no
#i2c2/enable=no

#spi0/enable=no

#pwm0/enable=no

#ir/enable=no

#tft28/enable=no
#tft28/speed=50000000
#tft28/rotate=90
#tft28/fps=33
#tft28/debug=0x0

#tft13/enable=no
#tft13/speed=50000000
#tft13/rotate=0
#tft13/fps=0x0
#tft13/debug=0x0

Hi Dear,
We checked that the serial port 1 ttyS1 of the Air is not occupied, what method did the customer use to test and find that the serial port is not working?

Thanks!

I do a loopback an the serial port UART1 ttyS1 and UART2 ttyS2, UART2 ttyS2 is working, UART1 ttyS1 is not working. I think there is another service bound to the UART1 ttyS1.

I tested this with a python script

#!/usr/bin/env python

-- coding: utf-8 --

import serial
test_string = “Test serial port …”.encode(‘utf-8’)
port_list = [“/dev/ttyS1”,“/dev/ttyS2”]
for port in port_list:
print (“”)
try:
serialPort = serial.Serial(port, 9600, timeout = 2)
print (“Serial port”, port, " ready for test :")
bytes_sent = serialPort.write(test_string)
print (“Sended”, bytes_sent, “byte”)
loopback = serialPort.read(bytes_sent)
if loopback == test_string:
print (“Received “,len(loopback), “bytes. Port”, port,“is OK ! \n”)
else:
print (“Received incorrect data:”, loopback, “on serial part”, port, “loopback \n”)
serialPort.close()
except IOError:
print (“Error on”, port,”\n”)

ttyS2 is working “Received”
ttyS1 is not working “Error”

I think, there is any service bound to the ttyS1, but I can’t find them
Any services are stopped


Pic2
Pic3
Pic4
Pic5
Pic6