英特尔爱迪生 UART1 无法导出 gpio 214

Intel Edison UART1 cannot export gpio 214

背景: 我正在使用 "base block" 为爱迪生上的 UART2 控制台供电和访问。 我有一个带有草图的 arduino 块,用于将数据打印到串行。 https://www.sparkfun.com/products/13036

串行数据是从arduino传输的,我打算使用节点脚本来读取该数据并执行与网络相关的功能。 Intel Edison and NodeJS serial port communication: I am receiving strange characters

我试图按照爱迪生串行指令进行操作: https://communities.intel.com/message/265411#265411

但是在第 2 行的 GPIO 配置中它已经失败了。

root@edison:~# echo -n "214" > /sys/class/gpio/export sh: write error: No such device

有趣的是,如果我 运行 来自 "Intel Edison and NodeJS..." 问题的 "uart.js" 我确实获得了数据,但这不是预期的:

<Buffer 84 e9 f3 f4 e1 ee c3 e5 7a 20 72 75 75 0d 0a 8d c5 f3 f3 c1 c7 e5 20 f3 e5 ee f4 7a 60 70 0d 0a c2 c5 e1 ed 40 e2 f2 cf eb e5 ce 7a 60 30 0d 0a> <Buffer 84 c9 f3 f4 e1> <Buffer ce e3 e5 7a 60 72 75 75 0d 0a 8d e5 f3 f3 e1 e7 c5 60 f3 c5 ce f4 3a 40 70 0d 0a 82 e5 c1 ed 60 e2 f2 ef eb c5 ee 7a 40 70 0d 0a>

最后使用 mraa.getPinCount(); 我总是得到 56。 (在网上搜索时发现)

感谢您的帮助!

看来 115200 是 Edison 串行到 Arduino 块的不可用波特率! 我将波特率设置为9600并成功获得了预期的数据。

此外,Arduino 模块的 gpio 引脚为 130 和 131。(130==rx,131==tx) echo -n 130 > /sys/class/gpio/export //may not need, may already be exported echo -n 131 > /sys/class/gpio/export //may not need, may already be exported echo mode1 > /sys/kernel/debug/gpio_debug/gpio130/current_pinmux // potentially unneeded as well. echo mode1 > /sys/kernel/debug/gpio_debug/gpio131/current_pinmux // potentially unneeded as well. echo in > /sys/class/gpio/gpio130/direction echo out > /sys/class/gpio/gpio131/direction .. cat /dev/ttyMFD1