Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

UART 3 configuration on BPI M2+

Featured Replies

hello I have a module of teleinformation on my GPIO port which must work on the UART 3 but I do not know at all how to configure it and it does not work, could you help me? I am under armbian 5.90.

here is the link to my telinformation module:

PiTinfo

 

thank you in advance for your help

  • Author

root@bananapim2plus:/boot# dmesg | grep tty
[    0.000000] Kernel command line: root=UUID=207230f7-58a4-4c41-bdd6-8caa2cdad12c rootwait rootfstype=ext4 console=tty1 console=ttyS0,115200 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 loglevel=1 ubootpart= ubootsource=mmc usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u   sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 cgroup_enable=memory swapaccount=1
[    0.000188] console [tty1] enabled
[    1.823112] console [ttyS0] disabled
[    1.843262] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 41, base_baud = 1500000) is a U6_16550A
[    1.843316] console [ttyS0] enabled
[    1.864182] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 42, base_baud = 1500000) is a U6_16550A
[    1.887035] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 43, base_baud = 1500000) is a U6_16550A
[    1.909859] 1c28c00.serial: ttyS3 at MMIO 0x1c28c00 (irq = 44, base_baud = 1500000) is a U6_16550A
[    5.233907] systemd[1]: Created slice system-getty.slice.

4 minutes ago, freeman32 said:

[    1.843262] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 41, base_baud = 1500000) is a U6_16550A
[    1.843316] console [ttyS0] enabled
[    1.864182] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 42, base_baud = 1500000) is a U6_16550A
[    1.887035] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 43, base_baud = 1500000) is a U6_16550A
[    1.909859] 1c28c00.serial: ttyS3 at MMIO 0x1c28c00 (irq = 44, base_baud = 1500000) is a U6_16550A

Oh ! A bit strange : it seems that all uarts are enabled ...

Did you added DT overlays for all of them, ie "overlays=uart1 uart2 uart3" ?

If not, maybe they were already enabled in the Main DT ...

  • Author

maybe by test with armbian-config, but I failed to market my module.  I must also apply this configuration but I do not know how to do it :  -b 1200 -d 7 -p e -f n

6 minutes ago, freeman32 said:

maybe by test with armbian-config, but I failed to market my module.

So, what do you see on the "overlays=" line in /boot/armbianEnv.txt ?

Keep only "uart3" there, and maybe remove the others ...

7 minutes ago, freeman32 said:

I must also apply this configuration but I do not know how to do it :  -b 1200 -d 7 -p e -f n

This is arguments for picocom, so : "picocom -b 1200 -d 7 -p e -f n /dev/ttyS3"

  • Author

yes but i have not result, I should have something like this : 

root@pi01(ro):~# picocom -b 1200 -d 7 -p e -f n /dev/ttyAMA0
picocom v1.7
 
port is        : /dev/ttyAMA0
flowcontrol    : none
baudrate is    : 1200
parity is      : even
databits are   : 7
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv
imap is        :
omap is        :
emap is        : crcrlf,delbs,
 
Terminal ready
] _
HCHP 000000000 S
PTEC HC.. S
IINST 001 X
IMAX 001 @
PAPP 00170 )
HHPHC 3 ^
MOTDETAT 000000 B
ADCO 031428067147 B
OPTARIF HC.. <
ISOUSC 15 <
HCHC 000453337 _
HCHP 000000000 S
PTEC HC.. S
IINST 001 X
IMAX 001 @
PAPP 00170 )
HHPHC 3 ^
MOTDETAT 000000 B
ADCO 031428067147 B
OPTARIF HC.. <
ISOUSC 15 <
HCHC 000453337 _
HCHP 000000000 S
PTEC HC.. S
IINST 001 X
IMAX 001 @
PAPP 00170 )
HHPHC 3 ^
MOTDETAT 000000 B
ADCO 031428067147 B
OPTARIF HC.. <
ISOUSC 15 <
HCHC 000453337 _
HCHP 000000000 S
PTEC HC.

and i have this :

 

/home/guillaume# picocom -b 1200 -d 7 -p e -f n /dev/ttyS3
picocom v1.7

port is        : /dev/ttyS3
flowcontrol    : none
baudrate is    : 1200
parity is      : even
databits are   : 7
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv
imap is        :
omap is        :
emap is        : crcrlf,delbs,

Terminal ready

 

  • Author

 

it's my electric meter, the teleinfo works correctly with another device but is not updated any more, so I have to make it work to have some more informations

1 minute ago, freeman32 said:

it's my electric meter, the teleinfo works correctly with another device

In this case, maybe this PiTInfo board is defective ...

To make sure the UART3 itself is working fine, remove that PiTInfo board and simply put a loopback wire between TX/RX pins.

Then, with the same "picocom" command, you should be able to type some keystrokes and seeing been echoed to the screen.

That will prove that UART3 is working fine !

  • Author

with a wire between tx and rx and with this command :

picocom -b 1200 -d 7 -p e -f n /dev/ttyS3

nothing happens I have the same thing as before

38 minutes ago, freeman32 said:

nothing happens I have the same thing as before

Oh ! I've bring out my own BPi-M2-Plus out of the dust of one of my drawers ...

I've gave it a try and figured out something funny : although the schematic says that pin 8 and pin 10 are on UART3, it is actual wrong, doing the loopback wire test, it is on UART2 !

So, schematic is wrong !!!

EDIT : Sorry, it is on UART3, but when DT overlay is loaded it goes into /dev/ttyS2 ...

  • Author

root@bananapim2plus:/home/guillaume# picocom -b 1200 -d 7 -p e -f n /dev/ttyS2
picocom v1.7

port is        : /dev/ttyS2
flowcontrol    : none
baudrate is    : 1200
parity is      : even
databits are   : 7
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv
imap is        :
omap is        :
emap is        : crcrlf,delbs,


FATAL: failed to add device /dev/ttyS2: Filedes is not a tty
 

  • Author

i do the test for my 2 bpi m2+, on the first and after a fresh install, dmesg | grep tty tel me this :

 

dmesg | grep tty
[    0.000000] Kernel command line: root=UUID=bf12efb6-ded4-4f1b-8ad6-ddcfb1225f43 rootwait rootfstype=ext4 console=ttyS0,115200 console=tty1 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 loglevel=1 ubootpart= ubootsource=mmc usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u   sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 cgroup_enable=memory swapaccount=1
[    0.000186] console [tty1] enabled
[    1.908371] console [ttyS0] disabled
[    1.928521] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 41, base_baud = 1500000) is a U6_16550A
[    1.928573] console [ttyS0] enabled
[    1.949516] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 42, base_baud = 1500000) is a U6_16550A
[    1.972389] 1c28c00.serial: ttyS3 at MMIO 0x1c28c00 (irq = 43, base_baud = 1500000) is a U6_16550A

I this : picocom -b 1200 -d 7 -p e -f n /dev/ttyS2 for ttyS0, ttyS1 and ttyS3 same result as before.

 

on my second bpi m2+, with a fresh install too, the command : dmesg | grep tty do not give me anything. 

F***ing bananas !!!!

  • Author

i don't know, witch version of armbian are you ? on buster ? I just doo the test with a RPI 3 a friend gave me for test and its working perfectly. I'll try with armbian on stretch 

  • Author
dmesg | grep tty
[    0.000000] Kernel command line: root=UUID=8ee8e552-6ee4-44c5-9908-aae87b53a4 b2 rootwait rootfstype=ext4 console=ttyS0,115200 console=tty1 hdmi.audio=EDID:0                                                                                                  disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 loglevel=1 
ubootpart= ubootsource=mmc usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u   
sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16 cgroup_enable=memory swapaccount=1                                                                                                                                                             
[    0.000185] console [tty1] enabled
[    1.819193] console [ttyS0] disabled
[    1.839341] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 41, base_baud = 15                                                                                                                                                             00000) is a U6_16550A
[    1.839393] console [ttyS0] enabled
[    1.860298] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 42, base_baud = 15                                                                                                                                                             00000) is a U6_16550A
[    1.883154] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 43, base_baud = 15                                                                                                                                                             00000) is a U6_16550A
[    1.905992] 1c28c00.serial: ttyS3 at MMIO 0x1c28c00 (irq = 44, base_baud = 15                                                                                                                                                             00000) is a U6_16550A

in this dmesg, I have : console=ttyS0,115200 console=tty1

should not this be removed? If so, how do you please

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.