diff --git a/LICENCE.pi-bluetooth b/LICENCE.pi-bluetooth new file mode 100644 index 0000000..316c2c6 --- /dev/null +++ b/LICENCE.pi-bluetooth @@ -0,0 +1,32 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: pi-bluetooth +Source: https://github.com/RPi-Distro/pi-bluetooth + +Files: * +Copyright: 2016 Raspberry Pi (Trading) Ltd. +License: BSD-3-Clause + +License: BSD-3-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.en.md b/README.en.md index 03cd9b0..acf0085 100644 --- a/README.en.md +++ b/README.en.md @@ -1,22 +1,32 @@ # raspberrypi-bluetooth #### Description -Load firmware of bluetooth on boot for Raspberry Pi +The bluetooth service for RaspberryPi, which loads BCM43430A1 firmware on boot. These files are from the repositories in RaspberryPi community. + +- https://github.com/RPi-Distro/pi-bluetooth #### Software Architecture -Software architecture description + +AArch64 #### Installation -1. xxxx -2. xxxx -3. xxxx +`dnf install raspberrypi-bluetooth` #### Instructions -1. xxxx -2. xxxx -3. xxxx +After installing raspberrypi-bluetooth, + +1. Start the bluetooth service (i.e., hciuart service) to load related firmware: `systemctl start hciuart`. + +2. Check the service's status using the status command: `systemctl status hciuart`. + +3. If this service isn’t running, you can use the restart command: `systemctl restart hciuart` to restart the service. + +4. To view the name and basic information of the bluetooth device, you can use the command: `hciconfig`. + +5. Set the service to start on boot: `systemctl enable hciuart`. + #### Contribution @@ -24,13 +34,3 @@ Software architecture description 2. Create Feat_xxx branch 3. Commit your code 4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index d149d40..2dc33d1 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,32 @@ # raspberrypi-bluetooth #### 介绍 -Load firmware of bluetooth on boot for Raspberry Pi + +Raspberry Pi 的蓝牙相关服务组件,用于树莓派开机时加载 BCM43430A1 固件。文件来自于 Raspberry Pi 社区的上游仓库: + +- https://github.com/RPi-Distro/pi-bluetooth #### 软件架构 -软件架构说明 +AArch64 #### 安装教程 -1. xxxx -2. xxxx -3. xxxx +`dnf install raspberrypi-bluetooth` #### 使用说明 -1. xxxx -2. xxxx -3. xxxx +安装 raspberrypi-bluetooth 后, + +1. 启动蓝牙服务(hciuart 服务)用于加载相关固件:`systemctl status hciuart`。 + +2. 查看该服务的运行状态:`systemctl status hciuart`。 + +3. 如果该服务启动失败,重启该服务:`systemctl restart hciuart`。 + +4. 查看蓝牙设备的名称和基本信息:`hciconfig`。 + +5. 设置该服务开机启动:`systemctl enable hciuart`。 #### 参与贡献 @@ -25,13 +34,3 @@ Load firmware of bluetooth on boot for Raspberry Pi 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/raspberrypi-bluetooth-20200729.tar.gz b/raspberrypi-bluetooth-20200729.tar.gz new file mode 100644 index 0000000..11f025b Binary files /dev/null and b/raspberrypi-bluetooth-20200729.tar.gz differ diff --git a/raspberrypi-bluetooth.spec b/raspberrypi-bluetooth.spec new file mode 100644 index 0000000..47df891 --- /dev/null +++ b/raspberrypi-bluetooth.spec @@ -0,0 +1,50 @@ +%global _bin_path /usr/bin +%global _rules_path /lib/udev/rules.d +%global _systemd_path /lib/systemd/system +%global _license_path /usr/share/licenses/raspi +%global debug_package %{nil} + +Name: raspberrypi-bluetooth +Version: 20200729 +Release: 1 +Summary: bluetooth files used for RaspberryPi +License: BSD-3-Clause +ExclusiveArch: aarch64 + +Provides: raspberrypi-bluetooth = %{version}-%{release} + +Source0: %{name}-%{version}.tar.gz +Source1: LICENCE.pi-bluetooth + +%prep +%setup -q -c + +%description +This package contains executable files of bluetooth required by some RaspberryPi devices. + +%install +mkdir -p %{buildroot}%{_bin_path} +mkdir -p %{buildroot}%{_rules_path} +mkdir -p %{buildroot}%{_systemd_path} +mkdir -p %{buildroot}%{_license_path} +install -p -m 644 %{_sourcedir}/LICENCE.* %{buildroot}%{_license_path}/ +cd %{name}-%{version} +install -p -m 755 usr/bin/* %{buildroot}%{_bin_path}/ +install -p -m 644 lib/udev/rules.d/90-pi-bluetooth.rules %{buildroot}%{_rules_path}/ +install -p -m 644 debian/pi-bluetooth.bthelper\@.service %{buildroot}%{_systemd_path}/bthelper\@.service +install -p -m 644 debian/pi-bluetooth.hciuart.service %{buildroot}%{_systemd_path}/hciuart.service + +cd - + +%files +%dir %{_rules_path} +%dir %{_systemd_path} +%dir %{_license_path} +%{_license_path} +%{_bin_path}/* +%{_rules_path}/* +%{_systemd_path}/* + +%changelog +* Wed Jul 29 2020 Yafen Fang - 20200729-1 +- Add rules file, bthelper and hciuart from pi-bluetooth.