未找到树莓派串口,.NET

时间:2021-05-17 20:27:18

标签: raspberry-pi arduino-uno .net-5 raspberry-pi4 hc-05

我在 Raspberry Pi 上有一个用 .Net 5.0 编写的 Web 应用程序。此外,我通过蓝牙模块 (HC-05) 与带有 Raspberry Pi 的 Arduino 通信。当我尝试在 Web 应用程序中显示来自 Arduino 的数据时,出现以下错误:

**The following serial ports were found:
/dev/ttyAMA0
/dev/ttyS0
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
      An unhandled exception has occurred while executing the request.
      System.UnauthorizedAccessException: Access to the port '/dev/rfcomm0' is denied.**

当与 Arduino 建立蓝牙连接时,通过 /dev/rfcomm0 端口提供通信。但是,端口/dev/rfcomm 没有出现在 .Net 的 Raspberry Pi 上,因此我收到错误消息。有人可以帮忙吗?

0 个答案:

没有答案