freeman32 Posted July 19, 2019 Posted July 19, 2019 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
martinayotte Posted July 19, 2019 Posted July 19, 2019 8 minutes ago, freeman32 said: I am under armbian 5.90 Mainline or Legacy ? With Mainline, you simply need to add DT overlay in /boot/armbianEnv.txt by adding the line "overlays=uart3", save and then reboot...
martinayotte Posted July 19, 2019 Posted July 19, 2019 1 minute ago, freeman32 said: I do not know how to find out? You mean "how to find out kernel version" ? Use "uname -a" ...
freeman32 Posted July 19, 2019 Author Posted July 19, 2019 Linux bananapim2plus 4.19.57-sunxi #5.90 SMP Fri Jul 5 17:58:43 CEST 2019 armv7l GNU/Linux
martinayotte Posted July 19, 2019 Posted July 19, 2019 1 minute ago, freeman32 said: bananapim2plus 4.19.57-sunxi Good ! So the DT overlay recipe I've explained above is the way to go ...
martinayotte Posted July 19, 2019 Posted July 19, 2019 2 minutes ago, freeman32 said: ok, on what /dev/tty is uart 3 connected? Should be on /dev/ttyS3, but you can verify once booted with "dmesg | grep tty" ...
freeman32 Posted July 19, 2019 Author Posted July 19, 2019 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.
martinayotte Posted July 19, 2019 Posted July 19, 2019 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 ...
freeman32 Posted July 19, 2019 Author Posted July 19, 2019 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
martinayotte Posted July 19, 2019 Posted July 19, 2019 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"
freeman32 Posted July 19, 2019 Author Posted July 19, 2019 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
martinayotte Posted July 19, 2019 Posted July 19, 2019 2 minutes ago, freeman32 said: and i have this : But this small PiTInfo board is only an optocoupler interface to UART3. What hardware do you have on the optocoupler side named "teleinfo" ? It is this hardware that should provide serial output, maybe this "teleinfo" is not working ...
freeman32 Posted July 19, 2019 Author Posted July 19, 2019 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
martinayotte Posted July 19, 2019 Posted July 19, 2019 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 !
freeman32 Posted July 19, 2019 Author Posted July 19, 2019 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
martinayotte Posted July 19, 2019 Posted July 19, 2019 12 minutes ago, freeman32 said: nothing happens I have the same thing as before Do you have any keystroke echoed while typing something ? If not, maybe uart3 is defective.
martinayotte Posted July 19, 2019 Posted July 19, 2019 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 ...
freeman32 Posted July 19, 2019 Author Posted July 19, 2019 i'm sorry i'm a noob and i'm french i don't understand what i have to doo ?
freeman32 Posted July 19, 2019 Author Posted July 19, 2019 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
martinayotte Posted July 19, 2019 Posted July 19, 2019 1 hour ago, freeman32 said: FATAL: failed to add device /dev/ttyS2: Filedes is not a tty Make sure you have only "overlays=uart3" in /boot/armbianEnv.txt and reboot. The UART3 should be there as /dev/ttyS2.
freeman32 Posted July 19, 2019 Author Posted July 19, 2019 Yes i have only uart3 and thé result is the previous post
martinayotte Posted July 19, 2019 Posted July 19, 2019 1 hour ago, freeman32 said: Yes i have only uart3 and thé result is the previous post It doesn't make sense ... Redo "dmesg | grep tty" and try all seen tty one by one with loopback wire.
freeman32 Posted July 20, 2019 Author Posted July 20, 2019 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 !!!!
martinayotte Posted July 20, 2019 Posted July 20, 2019 6 hours ago, freeman32 said: F***ing bananas !!!! Why with mine it worked on first trial ?
freeman32 Posted July 20, 2019 Author Posted July 20, 2019 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
freeman32 Posted July 20, 2019 Author Posted July 20, 2019 I found this can this help? https://bananapi.gitbooks.io/bpi-m2-/en/bpi-m2+uart.html
freeman32 Posted July 21, 2019 Author Posted July 21, 2019 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
freeman32 Posted July 21, 2019 Author Posted July 21, 2019 do you think this can come from a right problem on port uart3 ?
Recommended Posts