7 Star 3 Fork 2

src-openEuler/raspberrypi-bluetooth

【20.03-LTS-SP2】【arm/x86】bthelper@.service、hciuart.service 服务启动失败

Accepted
Bug
Opened this issue  
2021-06-07 19:38

【环境信息】
系统: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.服务启动失败
输入图片说明
输入图片说明

Comments (9)

zjl_long created缺陷 4 years ago
zjl_long set assignee to small_leek 4 years ago
zjl_long set milestone to openEuler 20.03-LTS-SP2-round-3 4 years ago
zjl_long set start time to 2021-06-07 4 years ago
zjl_long set deadline to 2021-06-08 4 years ago
zjl_long set priority to Main 4 years ago
zjl_long set related repository to src-openEuler/raspberrypi-bluetooth 4 years ago
Expand operation logs

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.

openeuler-ci-bot added
 
sig/sig-RaspberryPi
label
4 years ago
5420022 jianminw 1736235438 Jianmin member 4 years ago

@zjl_long Hi,金龙。谢谢反馈。

这两个服务是在树莓派上使用的,针对蓝牙设备的操作。在树莓派上使用方法如下。

bthelper@:这个服务是一个模版服务,命令使用方法需要带参数启动,如 systemctl start bthelper@hci0@up

hciuart:这个服务启动依赖于设备本身有蓝牙设备,在树莓派上验证是可以正常启动的。

5420022 jianminw 1736235438 Jianmin member 4 years ago

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.
5420022 jianminw 1736235438 Jianmin member 4 years ago

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.
7723297 wzqhwx 1617329244 wzq-hwx
Reply Jianmin member
4 years ago

hi,王老师,我正好也测试了一下,restart hciuart.service 时也会出现一些问题

“bthelper@:这个服务是一个模版服务,命令使用方法需要带参数启动,如 systemctl start bthelper@hci0@up”,这里@后面的参数是什么意义呢,我在树莓派上运行systemctl start bthelper@hci0@up也会报错。
输入图片说明
测试文档

5420022 jianminw 1736235438 Jianmin member 4 years ago

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 的命令类似。

5420022 jianminw 1736235438 Jianmin member 4 years ago

重启 hciuart 后对应设备无法访问的问题可以参考:https://github.com/raspberrypi/linux/issues/2832

@wzqhwx 暂时目前如果针对 hciuart 服务执行了 restart 操作,需要通过执行 reboot 后恢复蓝牙相关模块的正常使用。

5420022 jianminw 1736235438 Jianmin member 4 years ago

@zjl_long 经验证,bthelper 和 hciuart 这两个服务在树莓派上可以正常启动,其中 hciuart 是默认启动的。对于 hciuart 服务因涉及到 GPIO 状态的变更,因此如果对服务进行 restart,需要通过 reboot 恢复,目前不需要进一步处理。

这个问题是否可以关闭了?

验证通过

zjl_long changed issue state from 待办的 to 已验收 4 years ago

Sign in to comment

Status
Assignees
Projects
Pull Requests
Successfully merging a pull request will close this issue.
Duration (hours)
Planed to start   -   Planed to end
-
Top level
Priority
Milestones
Branches
参与者(4)
5329419 openeuler ci bot 1632792936 5420022 jianminw 1736235438 7723297 wzqhwx 1617329244 zjl_long-zjl_long
1
https://gitee.com/src-openeuler/raspberrypi-bluetooth.git
git@gitee.com:src-openeuler/raspberrypi-bluetooth.git
src-openeuler
raspberrypi-bluetooth
raspberrypi-bluetooth

Search