2

I've done almost any tutorail I found in the internet, but I cant get successful communication with uart in RPI3 Ubuntu Mate.

I've added enable_uart=1 and dtoverlay=pi3-disable-bt and core_freq=250 at the end of /boot/config.txt.

I've deleted console=serial0,115200 from file /boot/cmdline.txt.

I've run this command: sudo systemctl disable hciuart

Here are some command and results after reboot:

command: ls -lh /dev/serial[0,1]
result:
lrwxrwxrwx 1 root root 7 February 11  2016 /dev/serial0 -> ttyAMA0
lrwxrwxrwx 1 root root 5 February 11  2016 /dev/serial1 -> ttyS0

command: dmesg | grep tty
result:
[    0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[    0.000311] console [tty1] enabled
[    0.746869] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2

command: systemctl status hciuart
result:
● hciuart.service - Configure Bluetooth Modems connected by UART
  Loaded: loaded (/lib/systemd/system/hciuart.service; disabled; vendor preset: enabled)
  Active: inactive (dead)

command: uname -a
Linux mohamd-desktop 4.9.70-v7+ #1068 SMP Mon Dec 18 22:12:55 GMT 2017 armv7l armv7l armv7l GNU/Linux

command: lsb_release -a
result:
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial

I've shorten TX and RX ports on RPI3.

I'm using minicom to test uart:

command: minicom -D /dev/serial0
or
command: minicom -b 115200 -o -D /dev/serial0

minicom console appears but when I write "abc" then enter, I get "M" character, or the cursor goes to first of the line without changes. I think minicom should read another "abc".

Where did I wrong?

I'm connected to pi-3 through ssh with my laptop.

  • 1
    I always use /dev/ttyAMA0 not /dev/serial0 – Oldfart Dec 23 '17 at 13:12
  • I tried both of them, same results. when I type "abc" in minicom and press enter, the cursor goes to the first of line.. – user1422847 Dec 23 '17 at 13:18
  • Did you make a loopback? Tx <-> RX Sorry you said you did! Have a scope to look at the signals. Also what did you remove from the cmdline you have to remove all of "console=serial0,115200 console=tty1" You mention only part of that. – Oldfart Dec 23 '17 at 13:23
  • After removing "console=tty1" and reboot, now I hava "console [tty0] enabled" instead of "console [tty1] enabled". I don't know what does it mean? but the problem is on! Any other idea? Thanks. – user1422847 Dec 23 '17 at 14:15
  • You do not need to remove console=tty1, it has nothing to do with the UART. It sounds a little to me like you have echo disabled and the line terminator set to \r in minicom -- which would produce exactly the result you describe but it is unlikely to have gotten that way by accident. Do check the echo setting though and turn it on if it is not. – goldilocks Dec 23 '17 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.