Bez popisu

wenbo13579 0664b92ea1 1. 加入tester目录 před 2 roky
chipset 4842c5b709 1. 修正AP6212下发reset没event上报的特殊boot处理 před 2 roky
example 0664b92ea1 1. 加入tester目录 před 2 roky
platform 727d954909 fix: RTT SPI PIN před 2 roky
porting 43e4ca60d7 style: RTT_SPI clean debug před 2 roky
scripts dce9ae8fc0 同步主干改动 před 2 roky
src 4842c5b709 1. 修正AP6212下发reset没event上报的特殊boot处理 před 2 roky
.clang-format adfb11e0f0 first commit před 2 roky
.gitignore adfb11e0f0 first commit před 2 roky
LICENSE adfb11e0f0 first commit před 2 roky
Makefile dce9ae8fc0 同步主干改动 před 2 roky
README.md c89900212d 1. 更新readme文档 před 2 roky
SConscript adfb11e0f0 first commit před 2 roky
code_format.py adfb11e0f0 first commit před 2 roky
python_require_env.py adfb11e0f0 first commit před 2 roky

README.md

zephyr_pollling

1、介绍

本项目是基于Zephyr Project进行二次开发的,去除了OS调度部分,只保留了Bluetooth的Host协议栈。项目地址:bobwenstudy/zephyr_polling (github.com)。文档地址:Welcome to Zephyr_polling’s documentation!。该协议栈提供完整的BLE Host 层支持,借助灵活清晰的porting+chipset结构,可实现 RT-Thread 下支持 Host 层搭配串口连接外部 Controller 芯片使用。

1.1 目录结构

zephyr_polling ├── chipset │ ├── artpi_ap6212 │ └── common ├── example │ ├── beacon │ ├── broadcaster │ ├── central │ ├── observer │ ├── peripheral │ ... ├── platform │ └── rtthread │ ... ├── porting │ ├── rtthread_uart │ └── rtthread_artpi │ ... └── src

 ...
名称 说明
chipset 各家厂商在使用之前需要进行一些配置,有些是因为芯片是rom化版本,需要加载patch,有些要配置RF参数,有些要配置蓝牙地址等。
example 各种蓝牙例程,基本是照搬zephyr的来,当然会加入一些新的case。
platform 移植时重点关注的部分,蓝牙协议栈运行需要用到一些平台资源,不同平台有不同实现方式,主要包括log、timer、storage_kv和HCI接口的实现。
porting 程序的主入口,这些会将platform/chipset和协议栈接口进行绑定,并启动example,最后对协议栈进行调度。
src zephyr的蓝牙协议栈部分,具体实现蓝牙协议栈的具体细节。

1.2 许可证

zephyr_polling软件包遵循 Apache-2.0 许可,详见 LICENSE 文件。。

1.3 依赖

  • RT-Thread 3.0+

2、获取zephyr_polling软件包

使用 zephyr_polling package 需要在 RT-Thread 的包管理器中选择它,具体路径如下:

RT-Thread online packages
     IoT - internet of things  --->
         [*] zephyr_polling: Bluetooth BLE Stack.  --->
         	  Version (latest)  --->
              Select ChipSet (pts_dongle)  --->
              Select Example (beacon)  --->
              Select Platform (rtthread_uart: generate uart interface)
              HCI Transport Set  --->

Version : 软件包版本选择;

Select ChipSet (pts_dongle): 配置chipset;

Select Example (beacon) : 配置开启的example;

Select Platform (rtthread_uart: generate uart interface) : 配置平台信息;

然后让 RT-Thread 的包管理器自动更新,或者使用 pkgs --update 命令更新包到 BSP 中。

3、使用zephyr_polling软件包

本项目时通用Host平台,理论上通过部署不同的platform+chipset可以支持所有外挂Controller 。

关于协议栈的详细说明可以参考:Welcome to Zephyr_polling’s documentation!

最新版本特性支持 RT-Thread 搭配 UART 外接蓝牙Controller卡片使用,参考以下文档:

外部蓝牙 Controller 选择及固件可参考 蓝牙控制器固件

4、注意事项

要使用蓝牙功能,必须外界蓝牙Controller。

5、联系方式 & 感谢