如何设置设备/dev/rfcomm0的权限?

发布于 2024-07-19 05:51:21 字数 121 浏览 6 评论 0原文

我正在尝试运行 kannel bearer box,但出现错误,例如无法写入/读取设备。 我认为 kannel 没有权限读取/写入蓝牙设备 /dev/rfcomm0

感谢您的阅读。 任何帮助,将不胜感激。

I am trying to run kannel bearer box but i got error something like could not write/read device. I think kannel doest have permission to read/write bluetooth device /dev/rfcomm0

Thanks for reading. Any help would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

短暂陪伴 2024-07-26 05:51:21

使用root帐户做

chmod a+rw /dev/rfcomm0

with root account do

chmod a+rw /dev/rfcomm0
薔薇婲 2024-07-26 05:51:21

如果您知道哪个程序生成错误消息,请使用 strace 运行该程序并查看哪个系统调用产生错误。 如果它是open,那么 Francis 推荐的chmod 解决方案应该可以解决问题。 如果是readwrite,那么你应该进一步调查:内核或应用程序代码是否存在问题。

If you know which program is generating the error message, run the program with strace and see which system call yields the error. If it's open, then the chmod solution recommended by Francis should do the trick. If it's read or write, then you should investigate further: is there a problem in the kernel or the appication code.

萌吟 2024-07-26 05:51:21

可以通过使用 ls -h 检查设备文件组并使用以下命令将当前用户添加到该组来添加访问蓝牙设备的权限:

sudo usermod -a -G <rfcomm0 group> $USER

Permission to access the bluetooth device can be added by checking the device file group using ls -h and adding current user to that group with following command:

sudo usermod -a -G <rfcomm0 group> $USER
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文