4 Star 11 Fork 4

Walkline / ESP32 BLE UART

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

ESP32 BLE - UART

项目介绍

MicroPython for ESP32 开发板低功耗蓝牙(BLE)研究学习项目的分支项目,使用ESP32开发板通过UART与其它设备交换数据

如何使用呢?

  • 下载并烧录自定义的固件到开发板

  • 如果你用的是官方最新固件的话可以参考不想烧录自定义固件?部分

  • 把项目目录下的main.pyble文件夹上传到开发板,并运行main.py文件

  • 使用安卓手机下载安装 nRF Connect

  • nRF Connect中搜索并连接默认名称为mpy-uart的设备

  • 然后按如下顺序操作:

    1. 按一下开发板上的BOOT按键,板载 Led 点亮的同时手机上的TX Characteristic会收到数据on,再次按下按键收到off

    2. 手机上点RX Characteristic右侧的上箭头,在弹出的数据发送窗口中发送on,可以点亮开发板的板载 Led

REPL中的完整输出内容如下:

activating ble...
I (12270) BTDM_INIT: BT controller compile version [5aed448]
I (24880) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (24990) phy: phy_version: 4102, 2fa7a43, Jul 15 2019, 13:06:06, 0, 0
GAP procedure initiated: stop advertising.
ble activated
GAP procedure initiated: advertise; disc_mode=2 adv_channel_map=7 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=800 adv_itvl_max=800
advertising...
>>> [79:75:C6:5B:08:1F] connected, handle: 0
GATT procedure initiated: notify; att_handle=3
GATT procedure initiated: notify; att_handle=3
rx received: b'on'
GATT procedure initiated: notify; att_handle=3
[79:75:C6:5B:08:1F] disconnected, handle: 0
GAP procedure initiated: advertise; disc_mode=2 adv_channel_map=7 own_addr_type=0 adv_filter_policy=0 adv_itvl_min=800 adv_itvl_max=800
advertising...

下载烧录自定义固件

访问 自定义固件下载项目 下载最新的自定义固件,并参考 附录1:如何刷写固件 烧录固件到开发板

不想烧录自定义固件?

当然没问题,不过要确认你现在的固件是支持ble,然后

保存到项目目录ble文件夹下,一起上传到开发板即可

视频演示

合作交流

  • 联系邮箱:walkline@163.com
  • QQ 交流群:
    • 走线物联:163271910
    • 扇贝物联:31324057

走线物联扇贝物联

MIT License Copyright (c) 2020 Walkline Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

MicroPython for ESP32 开发板低功耗蓝牙(BLE)研究学习分支项目,使用 UART 与其它设备交换数据 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/walkline/esp32-ble-uart.git
git@gitee.com:walkline/esp32-ble-uart.git
walkline
esp32-ble-uart
ESP32 BLE UART
master

搜索帮助