Beaglebone在串行连接期间出现黑色奇怪行为

时间:2015-05-16 10:24:23

标签: serial-port environment-variables beagleboneblack

我在我的BBB上安装了ubuntuarm,最近我写了一个非常简单的程序来测试串口连接。 该程序非常简单,因为它将所有数据(我从PC发送到电路板)与电路板相连。

SERIALclass Serial( device, B115200 );

std::string mes = "Sending data through the serial port!";

Serial.writeSerial( mes.c_str() );

while( true ) {

        usleep( 500000 );

        mes = Serial.readSerial();
        Serial.writeSerial( mes.c_str() );
}

配置的端口是/ dev / ttyO0上的UART,电线正确连接到电路板。

运行程序我得到了我希望看到的字符串,然后是登录掩码,这是不需要的。按照我在电脑上看到的内容:

Sending data through the serial port!
Password:                                 // <= where is it coming from?!?

在我看来,/ dev / ttyO0被配置为登录端口。 我的uEnv.txt如下:

#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=3.14.41-ti-r63
#dtb=
cmdline=coherent_pool=1M quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M quiet video=HDMI-A-1:1024x768@60e

##Example
#cape_disable=capemgr.disable_partno=
optargs=quiet drm.debug=7 cape_enable=capemgr.enable_partno=BB-UART0

##enable BBB: eMMC Flasher:
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

uuid=f5ecbb93-1741-4d46-9c02-8a52110ad7bd

如何摆脱这个问题?

我想使用端口发送和接收数据,而不是其他任何东西。 此致

1 个答案:

答案 0 :(得分:0)

UART0是控制台,我不认为它可以被禁用。您需要在其他UART之一上发送数据。

他们首先需要通过设备树覆盖启用。

(老问题,但可能会帮助其他人)

相关问题