当前位置:网站首页>【开发教程10】疯壳·开源蓝牙心率防水运动手环-蓝牙 BLE 收发
【开发教程10】疯壳·开源蓝牙心率防水运动手环-蓝牙 BLE 收发
2022-07-28 22:34:00 【efans_Mike】
开源蓝牙心率防水运动手环
——疯壳·智能穿戴开发系列
蓝牙 BLE 收发
1相关简介
DA14580 内部集成了射频模块,同时官方也提供了一套 SDK,里面包含了蓝牙协议栈部分。本节蓝牙收发就是通过修改官方提供的 SDK,完成蓝牙收发功能。关于蓝牙的基本知识,大家可以参考前面的蓝牙基础。
2硬件设计
DA14580 内部集成了射频模块,这里只需要从 PF10p 脚接一根天线。
图 1
3软件设计
打开 SDK,从路径:
SDK5.0.4\DA1458x_SDK\5.0.4\project\target_apps\ble_examples\ble_app_profi le\Keil_5 中打开 ble_app_profile 工程文件。
首先修改 user_cust1_def.h 文件,该文件对服务的参数进行了声明,我们这里需要修改服务和特征值的 UUID 等参数,并将多余的特征值删除。
图 2
再修改 user_cust1_def.c 文件,该文件对文件和特征值的属性进行了定义,这里需要对要使用的服务和特征值进行修改,并删除多余的特征值定义。
图 3
代码1
最后要修改的是cust1_task.c 文件,该文件定义了 cust1 服务的一些任务函数, 需要将原来定义为 128 位的修改为 16 位。另外,由于前面删除了多余的特征值服务,这里还需要修改接受函数。
图 4
相关代码可以查看我们的实验例程。
4实验现象
首先打开 SmartSnippets。
图 5
设置好 SmartSnippets 之后,点击上图中的 Open。
图 6
(1)点击 Connect,连接我们的单片机。
(2)点击 Erase,擦除 Flash。
(3)点击 Browse,找到我们工程的.hex 文件。
(4)点击 Burn,完成代码下载。
代码下载完成之后,运行代码,然后打开手机上的 Wolverine BLE。
(1)点击 Connect。
图 7
(2)选择我们的蓝牙设备 DIALOG-PRFL。
图 8
(3)在输入框输入 BLE,然后点击 Send。
图 9
完成以上 3 步,手机能收到我们所发送的字符。
图 10
更多完整学习资料和对应开源套件,请登陆官网:“疯壳”
如需定制开发,请通过官网“疯壳”网页底部的“联系我们”进行联系
边栏推荐
- MySQL的存储过程
- Cmake basic learning
- Idea2021.2 installation and configuration (continuous update)
- Opencv macro definition
- Laravel8 middleware realizes simple permission control
- 递归/回溯刷题(下)
- @Detailed explanation of the use of transactional annotation
- Detailed explanation of 9 common reasons for MySQL index failure
- @Detailed explanation of the use of transactional annotation
- Visual full link log tracking
猜你喜欢

PTA (daily question) 7-72 calculate the cumulative sum

Detailed explanation of 9 common reasons for MySQL index failure
![[small bug diary] Navicat failed to connect to MySQL | MySQL service disappeared | mysqld installation failed (this application cannot run on your computer)](/img/ac/f63e370df72ace484a618cf946d4b7.png)
[small bug diary] Navicat failed to connect to MySQL | MySQL service disappeared | mysqld installation failed (this application cannot run on your computer)

Table custom style row class name in elemenui

flyway的快速入门教程

Solution: direct local.Aar file dependencies are not supported when building an aar

PHP语言基础知识(超详细)

Html+css+php+mysql realize registration + login + change password (with complete code)

MQ 消息丢失、重复、积压问题,如何解决?

vulnhub:BTRSys2
随机推荐
Cause analysis of 12 MySQL slow queries
2022 network security learning route is very detailed, recommended Learning
vulnhub:SolidState
@PostConstruct注解详解
Es6操作教程
What does WGet mean
Attack and defense world web master advanced area web_ php_ include
Real time data warehouse: meituan's implementation of real-time data warehouse construction based on Flink
ES6 operation tutorial
@Transactional 注解使用详解
MySql中的like和in走不走索引
动态规划问题(二)
PTA (daily question) 7-74 yesterday
聊聊异步编程的 7 种实现方式
Use hutool tool class to operate excel with more empty Sheet1
Advanced area of attack and defense world web masters unserialize3
[microservice] Nacos cluster building and loading file configuration
Dynamic programming problem (VIII)
动态规划问题(三)
Erc20 Standard Code