Jump to content

Recommended Posts

Posted

I'm using banana pi M1 plus and armbian legacy kernel. I wanted to use uart0(ttyS0), uart2(ttyS1) and uart3(ttyS2), so I tested those three uarts with an echo server in banana pi and a program sending a data in a PC.

 

When I tested uart2 and uart3, I was able to get the data that I had sent without any problem. For the uart0, however, there was some error messages. I was also able to get the data, but I want to deal with the error message so that I can prevent any future problem. It seems that the error is caused because the ttyS0 is sending some console messages. 

 

I've found some articles about getting rid of console output from ttyS0. Most of them said to modify etc/innitab, which does not exist in armbian image.

 

When I entered

 

ps -ef | grep agetty

 

I could be able to get this output

 

root       561     1  0 09:20 ttyS0    00:00:00 /sbin/agetty -L 115200 ttyS0 screen.linux
 

So, i guess the board is sending messages from ttyS0 with the baud rate of 115200

 

Can anybody help me to disable this output?

 

Thanks in advance.

 

Posted

As far as I know, you can disable the boot console output in the /boot/boot.cmd file. There is a line like

setenv bootargs console=ttyS0,115200 ...

Try to remove the console= entry. Afterwards you have to compile the boot.cmd file, for an example see here:

 

http://forum.armbian.com/index.php/topic/139-change-resolution-rotation-bootcmd/

 

I don't know if there is a way to disable console output after booting has finished.

 

 

 

Hope that helps :-)

Posted

I'm using banana pi M1 plus and armbian legacy kernel. I wanted to use uart0(ttyS0), uart2(ttyS1) and uart3(ttyS2), so I tested those three uarts with an echo server in banana pi and a program sending a data in a PC.

 

Hi

Could you tell us more about the application you have in mind ?

I wonder why there are so many UART in that chip.

I once tried, on other devices, to use the UART of a working one to debug another

and was blocked by the same problem of disabling the boot console use.

Regards.

Posted

As far as I know, you can disable the boot console output in the /boot/boot.cmd file. There is a line like

setenv bootargs console=ttyS0,115200 ...
Try to remove the console= entry. Afterwards you have to compile the boot.cmd file, for an example see here:

 

http://forum.armbian.com/index.php/topic/139-change-resolution-rotation-bootcmd/

 

I don't know if there is a way to disable console output after booting has finished.

 

 

 

Hope that helps :-)

 

 

I could not find this line

setenv bootargs console=ttyS0,115200 ...

in /boot/boot.cmd file.

However, I could be able to turn off the serial console by masking serial-getty

cd /etc/systemd/system

systemctl mask serial-getty@ttyS0.service

sync
reboot
Posted

Hi

Could you tell us more about the application you have in mind ?

I wonder why there are so many UART in that chip.

I once tried, on other devices, to use the UART of a working one to debug another

and was blocked by the same problem of disabling the boot console use.

Regards.

 

Application in mind? I'm building an application with c sharp and trying to run it in banana pi with mono.

I was able to disable the serial console with this.

cd /etc/systemd/system

systemctl mask serial-getty@ttyS0.service

sync
reboot

Posted
I could not find this line

 

Strange. Which kernel are you using? Legacy (3.x) or mainline (4.x)?

 

systemctl mask serial-getty@ttyS0.service

 

This is interesting. Does this also suppress all the early kernel boot messages output on uart, or is the uart released after boot has finished?

Posted

Hi

Totally disabling the use of the serial port during boot don't seems to be a good idea.

A command to free the port manually later is what I'm looking for.

This will allow to use it with minicom or putty to debug/drive an other device

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines