0

I need to use ttyS0 as serial communication in python script on my coral mini board, I disabled system service:

sudo systemctl stop systemd-logind
sudo systemctl stop serial-getty@ttyS0.service

But seems there still have output from Serial console in ttyS0 like:

IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
spidev spi0.0: SPI transfer timed out

I would like to know how to make the ttyS0 clean as no any other process using it, if its possible, better to do it in runtime. Thanks!

sawdust
  • 16,103
  • 3
  • 40
  • 50
xxS
  • 1
  • You would need to assign the console to another serial port using the kernel command line; see https://stackoverflow.com/questions/68438678/how-u-boot-boots-without-console-parameter-in-bootargs-and-still-get-kernel-logs. Or try changing the loglevel; see https://stackoverflow.com/questions/16390004/change-default-console-loglevel-during-boot-up – sawdust Oct 17 '22 at 00:25
  • Hi @sawdust, how to add or change the kernal command line? – xxS Oct 17 '22 at 17:22
  • "*how to add or change the kernal command line?*" -- That's briefly mentioned in both answers: it depends on the boot program that your board uses. E.G. for U-Boot, it's the **bootargs** environment variable that has the text string for the kernel command line and needs to be modified. But for some kernels, the kernel command line is hardcoded, and cannot be changed without a reconfiguration & build. – sawdust Oct 17 '22 at 19:04
  • You need get rid of the `console=ttyS0`-like parameter from the kernel command line. – 0andriy Oct 27 '22 at 13:39

0 Answers0