【环境信息】
系统:aarch64,x86虚拟机
内存:4g
cpu:4核
OS版本:20.03-LTS-SP2
EPOL-yum源:http://121.36.84.172/dailybuild/openEuler-20.03-LTS-SP2/openeuler-2021-06-02-11-07-26/EPOL/main/$basearch/
【问题复现步骤】
1.安装源码包: yum install -y raspberrypi-bluetooth
2.启动服务: systemctl start bthelper@.service
3.启动服务: systemctl start hciuart.service
【预期结果】
2、3.服务启动成功
【实际结果】
2、3.服务启动失败
Hey zjl_long, Welcome to openEuler Community.
All of the projects in openEuler Community are maintained by @openeuler-ci-bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md to find the details.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
bthelper@ 服务在树莓派上正常启动命令和 log 参考:
[root@openEuler system]# systemctl start bthelper@hci0@up
[root@openEuler system]# systemctl status bthelper@hci0@up
● bthelper@hci0@up.service - Raspberry Pi bluetooth helper
Loaded: loaded (/usr/lib/systemd/system/bthelper@.service; static; vendor preset: disabled)
Active: active (exited) since Tue 2021-06-08 12:23:08 CST; 4s ago
Process: 767 ExecStart=/usr/bin/bthelper hci0@up (code=exited, status=0/SUCCESS)
Main PID: 767 (code=exited, status=0/SUCCESS)
Jun 08 12:23:08 openEuler systemd[1]: Starting Raspberry Pi bluetooth helper...
Jun 08 12:23:08 openEuler bthelper[767]: Raspberry Pi BDADDR already set
Jun 08 12:23:08 openEuler bthelper[774]: Changing power off succeeded
Jun 08 12:23:08 openEuler bthelper[776]: Changing power on succeeded
Jun 08 12:23:08 openEuler systemd[1]: Started Raspberry Pi bluetooth helper.
hciuart 服务在树莓派上正常启动命令和 log 参考:
[root@openEuler ~]# systemctl start hciuart.service
[root@openEuler ~]# systemctl status hciuart.service
● hciuart.service - Configure Bluetooth Modems connected by UART
Loaded: loaded (/usr/lib/systemd/system/hciuart.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2021-06-08 12:30:08 CST; 41s ago
Process: 287 ExecStart=/usr/bin/btuart (code=exited, status=0/SUCCESS)
Main PID: 332 (hciattach)
Tasks: 1
Memory: 1.2M
CGroup: /system.slice/hciuart.service
└─332 /usr/bin/hciattach /dev/serial1 bcm43xx 3000000 flow -
Jun 08 12:30:07 openEuler systemd[1]: Starting Configure Bluetooth Modems connected by UART...
Jun 08 12:30:07 openEuler btuart[287]: /usr/bin/btuart: line 19: warning: command substitution: ignored null byte in input
Jun 08 12:30:07 openEuler btuart[287]: /usr/bin/btuart: line 20: warning: command substitution: ignored null byte in input
Jun 08 12:30:08 openEuler btuart[308]: bcm43xx_init
Jun 08 12:30:08 openEuler btuart[308]: Set Controller UART speed to 3000000 bit/s
Jun 08 12:30:08 openEuler btuart[308]: Flash firmware /etc/firmware/BCM4345C5.hcd
Jun 08 12:30:08 openEuler btuart[308]: Set Controller UART speed to 3000000 bit/s
Jun 08 12:30:08 openEuler btuart[308]: Device setup complete
Jun 08 12:30:08 openEuler systemd[1]: Started Configure Bluetooth Modems connected by UART.
hi,王老师,我正好也测试了一下,restart hciuart.service 时也会出现一些问题
“bthelper@:这个服务是一个模版服务,命令使用方法需要带参数启动,如 systemctl start bthelper@hci0@up”,这里@后面的参数是什么意义呢,我在树莓派上运行
systemctl start bthelper@hci0@up
也会报错。
测试文档
@wzqhwx 重启这个服务确实会遇到这个问题,这个应该跟硬件状态有关系,我看看。 service 文件名称以 @ 结尾的是 template,参考文档 Service Templates 中的说明,这类服务调用的时候后面加上 @param@param 的方式加参数启动。就跟 bthelper hci0 up 的命令类似。
重启 hciuart 后对应设备无法访问的问题可以参考:https://github.com/raspberrypi/linux/issues/2832
@wzqhwx 暂时目前如果针对 hciuart 服务执行了 restart 操作,需要通过执行 reboot 后恢复蓝牙相关模块的正常使用。
验证通过
Sign in to comment