Code Monkey home page Code Monkey logo

ble-uart's Introduction

蓝牙串口透传 NORDIC KEIL

ble-uart 是基于nordic蓝牙芯片,keil开发环境的低功耗蓝牙串口源码,希望帮助蓝牙爱好者!

基本功能

  • 蓝牙串口
  • AT指令
  • 低功耗模式(广播模式下功耗0.1-0.2mA)

1 串口管脚定义

文件:pca10001.h

      #define RX_PIN_NUMBER  12
      #define TX_PIN_NUMBER  11
      #define CTS_PIN_NUMBER 10
      #define RTS_PIN_NUMBER 8
      #define HWFC           false

2 控制管脚定义

文件:user_ble_control.h

      #define DISCONNECT_BLE_SWITCH 13
      #define WAKEUP_BLE_SWITCH     23
      #define BLE_STATUS            29
  • DISCONNECT_BLE_SWITCH[in] 下降沿有效,断开当前已建立的蓝牙连接,广播并重新等待被连接
  • WAKEUP_BLE_SWITCH: [in]下降沿唤醒system off 中的蓝牙芯片,低电平串口正常工作,高电平串口电源关闭
  • BLE_STATUS:[out] 高电平表示蓝牙已连接,低电平表示蓝牙等待被连接

3 AT指令

AT+ADVENsystem offsystem on 模式指令

  • AT+ADVEN0:决定蓝牙是否进入system off,蓝牙进入system off步骤,a 发送AT+ADVEN0 , b WAKEUP_BLE_SWITCH 输入高电平
  • AT+ADVEN1:关闭system off模式

ble-uart's People

Contributors

zoujq avatar

Watchers

 avatar  avatar

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.