该教程演示如何通过两块开发板实现SLE数据传输测试,A开发板通过串口接收数据,然后通过SLE传输给B开发板,B开发板通过串口将接收到的数据打印出来;同样,B开发板通过串口接收数据,然后通过SLE传输给A开发板,A开发板通过串口将接收到的数据打印出来。在测试中需要一块开发板做为Server端,另外一块开发板做为Client端,两块开发板配对后就可以互发消息了。
在Windows下编译操作
点击左侧的“KConfig”,打开配置界面.
选择Enable SLE UART Server sample
Application --->
[*] Enable Sample.
[ ] Enable the Sample of peripheral.
[*] Enable the Sample of products.
[ ] Enable all the sample of product, it's just for build.
[ ] Support BLE UART sample.
[*] Support SLE UART sample.
SLE UART Sample Configuration --->
Select sle uart type (Enable SLE UART Server sample.) --->
(X) Enable SLE UART Server sample.
( ) Enable SLE UART Client sample.
选择协议
Protocol --->
Select sle ble support --->
( ) Select sle ble central default.
(X) Select sle ble peripheral.
( ) Select sle peripheral.
( ) Select sle central.
( ) Select ble peripheral.
按下"Save"键保存配置。
编译烧录固件
参考环境搭建教程编译烧录代码
在Ubuntu下编译操作
在MobaXterm中输入:
选择Enable SLE UART Server sample
Application --->
[*] Enable Sample.
[ ] Enable the Sample of peripheral.
[*] Enable the Sample of products.
[ ] Enable all the sample of product, it's just for build.
[ ] Support BLE UART sample.
[*] Support SLE UART sample.
SLE UART Sample Configuration --->
Select sle uart type (Enable SLE UART Server sample.) --->
(X) Enable SLE UART Server sample.
( ) Enable SLE UART Client sample.
选择协议
Protocol --->
Select sle ble support --->
( ) Select sle ble central default.
(X) Select sle ble peripheral.
( ) Select sle peripheral.
( ) Select sle central.
( ) Select ble peripheral.
按下"ESC"键退出并保存配置。
编译烧录固件
参考环境搭建教程编译烧录代码
在Windows下编译操作
点击左侧的“KConfig”,打开配置界面.
选择Enable SLE UART Client sample
Application --->
[*] Enable Sample.
[ ] Enable the Sample of peripheral.
[*] Enable the Sample of products.
[ ] Enable all the sample of product, it's just for build.
[ ] Support BLE UART sample.
[*] Support SLE UART sample.
SLE UART Sample Configuration --->
Select sle uart type (Enable SLE UART Server sample.) --->
( ) Enable SLE UART Server sample.
(X) Enable SLE UART Client sample.
选择协议
Protocol --->
Select sle ble support --->
(X) Select sle ble central default.
( ) Select sle ble peripheral.
( ) Select sle peripheral.
( ) Select sle central.
( ) Select ble peripheral.
按下"Save"键保存配置。
编译烧录固件
参考环境搭建教程编译烧录代码
在Ubuntu下编译操作
在MobaXterm中输入:
选择Enable SLE UART Client sample
Application --->
[*] Enable Sample.
[ ] Enable the Sample of peripheral.
[*] Enable the Sample of products.
[ ] Enable all the sample of product, it's just for build.
[ ] Support BLE UART sample.
[*] Support SLE UART sample.
SLE UART Sample Configuration --->
Select sle uart type (Enable SLE UART Server sample.) --->
( ) Enable SLE UART Server sample.
(X) Enable SLE UART Client sample.
选择协议
Protocol --->
Select sle ble support --->
(X) Select sle ble central default.
( ) Select sle ble peripheral.
( ) Select sle peripheral.
( ) Select sle central.
( ) Select ble peripheral.
按下"ESC"键退出并保存配置。
编译烧录固件
参考环境搭建教程编译烧录代码
烧录固件后先启动server设备,再启动client设备,在串口工具的输入框中输入数据并发送,测试server和client设备之间的数据收发,如下图所示。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。