前言
初步接触STM32WB55 Nucleo 这块板子的时候,大概是二十天前。网上能找到资料实在是太少了,百度/CSDN一搜全部都是测评啊、入门啊、怎么创工程啊等等,除了官方的例程,其他的一些例程什么的根本找不到。入门的门槛稍微高了点。
一些例程都少更别说Zigbee的相关问题的解决了,我靠着官方的英文文档一点一点啃出来。在这里还要感谢泉州天津大学集成电路及人工智能研究院的吕老师和天大林子同学的帮助。
一、Zigbee是什么?
ZigBee,与蓝牙相类似,是一种新兴的低速短距离无线通信技术,底层是采用IEEE 802.15.4标准规范的媒体访问层与物理层。具有有低速、低耗电、低成本、支持大量网上节点、支持多种网上拓扑、低复杂度、快速、可靠、安全。
二、 所需材料
As it is a centralized network, to run this application, you need to have one device acting as coordinator and one device acting as router.
One board must be flashed with the binary generated by this application (Zigbee/Zigbee_SE_Msg_Server_Router)
The other boards must be flashed with the binary generated by the application named Zigbee/Zigbee_SE_Msg_Client_Coord
要实现信息的收发,需要用到两块STM32WB55评估板,一块充当(Coord)协调器,另一块充当(Router)路由器。
三、使用步骤
Router端
1.初始化信息
代码如下:
static void APP_ZIGBEE_InitMsg(void)
{
/* Be careful - Message MAX length is 59 chars */
my_first_message.message_id=0x00;
my_first_message.start_time=0x00000100;
/* Display message for 5 mn */
my_first_message.duration=0x0005;
/* High priority message */
my_first_message.message_control=