Removing the link between the console output of the system and the UART interface

info about ReSpeaker series products

Moderators: lily.li, violet, seth.welday

Post Reply
userk
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Thu May 31, 2018 1:04 am

Removing the link between the console output of the system and the UART interface

Post by userk » Wed Oct 24, 2018 8:29 pm

Hi guys! I would like to use the UART interface to make this board communicate with another one.

I have plugged a serial to TTL converter to a laptop and connected it to the TX, RX and GND pins of the RespeakerCore. I then opened a miniterm console (with the right baudrate and port settings) on my laptop and another one on the Respeaker. I powered on the Respeaker and the console output appears on miniterm. I would like to have full control over the TX and RX lines in order to correctly send and receive strings of data.

I have noticed that one service is using the ttyS2 device I am interested about.

Code: Select all

userk@glutamate:~$ sudo systemctl status | grep tty
           │ ├─system-serial\x2dgetty.slice
           │ │ ├─serial-getty@ttyS2.service
           │ │ │ └─721 /sbin/agetty --keep-baud 115200,38400,9600 ttyS2 vt220
           │ │ └─serial-getty@ttyGS0.service
           │ │   └─747 /sbin/agetty --keep-baud 115200,38400,9600 ttyGS0 vt220
           │ │ └─767 brcm_patchram_plus --enable_hci --no2bytes --use_baudrate_for_download --tosleep 200000 --baudrate 1500000 --patchram /system/etc/firmware/bcm43438a0.hcd /dev/ttyS1
           │ ├─system-getty.slice
           │ │ └─getty@tty1.service
           │ │   └─720 /sbin/agetty --noclear tty1 linux
               │ ├─1050 grep tty
By stopping and disabling the service with:

Code: Select all

sudo systemctl stop serial-getty@ttyS2.service
sudo systemctl disable serial-getty@ttyS2.service
the communication works in both directions till the next reboot. Then the console output is redirected to ttyS2 again

Is this method the best one to get rid of the console output on that port?
How do I make this configuration permanent?

Thanks,
Gepp

seeed techsupport team
Staff
Staff
Posts: 44
Joined: Mon Mar 19, 2018 11:40 am

Re: Removing the link between the console output of the system and the UART interface

Post by seeed techsupport team » Wed Dec 05, 2018 6:15 pm

Hi Gepp,

we can use the 2 USB ports and use the usb to ttl adapter to transfer to tx/rx signal. we use the function to communicate with linkit one previously. thanks.

bill.yu
Junior-7
Junior-7
Posts: 733
Joined: Mon Apr 02, 2018 11:05 am

Re: Removing the link between the console output of the system and the UART interface

Post by bill.yu » Tue Dec 11, 2018 11:34 am

Hi there,

please try below instructions. You have to use the 20180801 firmware.

1. please check rk3229-respeaker-v2.dtb is inside of /boot/dtb/4.4.138-respeaker-r0/
2. edit the uEnv.txt file as below
respeaker@v2:~$ sudo nano /boot/uEnv.txt
uname_r=4.4.138-respeaker-r0
earlycon=uart8250,mmio32,0x11020000
console=ttyS1,115200n8 rw
#uuid=
dtb=rk3229-respeaker-v2.dtb
#dtb=
cmdline=coherent_pool=1M quiet init=/lib/systemd/systemd
##enable Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/init-eMMC-flasher-respeaker.sh

3. reboot the respeaker:
respeaker@v2:~$ sudo reboot

thanks.

Post Reply