如何设置设备/dev/rfcomm0的权限?
我正在尝试运行 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用root帐户做
with root account do
如果您知道哪个程序生成错误消息,请使用
strace
运行该程序并查看哪个系统调用产生错误。 如果它是open
,那么 Francis 推荐的chmod
解决方案应该可以解决问题。 如果是read
或write
,那么你应该进一步调查:内核或应用程序代码是否存在问题。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'sopen
, then thechmod
solution recommended by Francis should do the trick. If it'sread
orwrite
, then you should investigate further: is there a problem in the kernel or the appication code.可以通过使用 ls -h 检查设备文件组并使用以下命令将当前用户添加到该组来添加访问蓝牙设备的权限:
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: