首页 > 解决方案 > Raspberry Pi 串口未找到,.NET

问题描述

我有一个用 .Net 5.0 编写的 Raspberry Pi 上的 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 上,因此出现错误。有没有人可以帮忙?

标签: raspberry-piarduino-uno.net-5raspberry-pi4hc-05

解决方案


推荐阅读