Code Monkey home page Code Monkey logo

blelite's Introduction

BLELite

基于CH573或CH571的蓝牙简单通信模块
模块自身设定为蓝牙从设备,默认名字为BLELite,只有一个Service,内含一个Characteristic,两者uuid均为0xFFFF
主机通过notify和write这个Characteristic,透传芯片上的串口。
同时监听附近的蓝牙广播,如果收到厂商id为0xBABE的广播,把其内容也透传到串口。

原理图

CH571K只需一个电容,一个32M晶振以及pcb天线即可工作。

PIN

使用串口(115200)通讯

PIN CH571K或CH573F
TXD PA14
RXD PA15

通讯协议

通过串口(UART)进行通讯,波特率115200
实际数据包最后附带一个异或校验字节(BCC)
模块输出数据也将以此规则输出。
发送时,两个数据包之间间隔至少1ms

例如发送AT+RUOK检查模块是否正常运行,模块返回AT+OK
串口实际通讯为
发送 41 54 2b 52 55 4f 4b 3d
接收 41 54 2B 4F 4B 3A

AT指令

如果发送其他数据均会透传到notify

功能 发送 回复
检查是否正常运行 AT+RUOK AT+OK
修改蓝牙名字 AT+SNAME AT+OK 把蓝牙名字设置为abc:AT+SNAMEabc
设置蓝牙广播 AT+SADV AT+OK

TODO

完善原理图电路 自动构建
在线定制固件

blelite's People

Contributors

liux-pro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

giganticlab

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.