BlueZ

BlueZ-Official Linux Bluetooth protocol stack Android...

NimBLE- an open-source Bluetooth 5.1 stack

Overview Apache NimBLE is an open-source Bluetooth 5.1 stack (both Host & Controller) that...

Mathworks Matlab Bluetooth Toolbox

MathWorks Bluetooth® Toolbox provides standard-based tools to design, simulate, and verify Bluetooth communications systems. It supports test waveform generation, golden reference verification, and Bluetooth network modeling. With...

Professional radio noise reduction live microphone Rafavi_Mic_001

Professional radio noise reduction live microphone

rafavi F10 ENC bluetooth headset

rafavi F10 ENC bluetooth headset

Contests

open source

OpenXC

OpenXC™ is a combination of open source hardware and software that lets you extend your vehicle...

openpilot

Automotive Grade Linux(AGL)

Load More open source - Automotive

Feature Projects

 
1.Pinpoint location system (Bluetooth,UWB)
2.Website construction, brand promotion, marketing and advertising, operation planning and enterprise management;
3. Chips and components distribution.
4.Technical study and development.
5.Commercial General Liability Insurance.

Chips and MCUs

Rafavi Automotive safety MCUs - RA9 series

Rafavi Automotive safety MCUs - RA8 series

How a Kalman filter works

Load More Made in China

Professional radio noise reduction live microphone Rafavi_Mic_001

Professional radio noise reduction live microphone

rafavi F10 ENC bluetooth headset

rafavi F10 ENC bluetooth headset

Rafavi M10 Voice Wireless Mouse

Supports both MAC and WINDOWS operating systemsVoice typing, voice search, voice translation,...

Rafavi TWS Bluetooth Earbuds E2

Support call, music, voice prompt, listen to e-booksBluetooth protocol: A2DP, AVRCP, HFP, HSPCall...

    UUID,就是用来唯一识别一个特征值的ID. handle,就是对应的attribute的一个句柄。 所有对特征值的操作,都是通过对UUID的搜索得到对应的handle之后,通过handle来操作特征值的。   添加新的特征值CHAR6 下面对主要几个文件进行修改 simpleGATTprofile.h文件添加以下定义 #define SIMPLEPROFILE_CHAR6                  5 #define SIMPLEPROFILE_CHAR6_UUID           0xFFF6 #define SIMPLEPROFILE_CHAR6_LEN          5(单字节没这句)     SIMPLEPROFILE_CHAR6 全大写case参数用到如case SIMPLEPROFILE_CHAR6:   在simpleGATTprofile.c 1、  添加特征值UUID   // Characteristic 6 UUID: 0xFFF6 CONST uint8 simpleProfilechar6UUID[ATT_BT_UUID_SIZE] = {  LO_UINT16(SIMPLEPROFILE_CHAR6_UUID),   //低八位 HI_UINT16(SIMPLEPROFILE_CHAR6_UUID) }; //高八位   /**************#define HI_UINT16(a)   (((a) >> 8) & 0xFF)******* /**************#define LO_UINT16(a)  ((a) & 0xFF)*******   2、  设置属性       // Simple Profile Characteristic 6 Properties 可读可写(声明而已,只是能让lightblue在列表中显示为可读可写或通知,真正要改在属性表那里改。Props= Properties,Desp=Description,)   static uint8 simpleProfileChar6Props = GATT_PROP_READ | GATT_PROP_WRITE;   // Characteristic 6 Value   // simpleProfileChar6是个5位数组,接收数据后存在这 static uint8simpleProfileChar6[SIMPLEPROFILE_CHAR6_LEN] = { 0, 0, 0, 0, 0 };   // Simple Profile Characteristic 6 User Description static uint8 simpleProfileChar6UserDesp[17] = "Characteristic 6\0";                                                                                                                             3、  属性表 (Profile Attributes - Table)最重要,添加了这个才会在lightblue中列表出来   static gattAttribute_t simpleProfileAttrTbl[SERVAPP_NUM_ATTR_SUPPORTED] 这里要把数组改为 #define SERVAPP_NUM_ATTR_SUPPORTED       20 原来是17                                      (//添加了3组结构体数组CHAR6) simpleProfileAttrTbl表中,可读可写属性都是3个数组,只有char4的通知是4组,多了个// Characteristic 4 configuration   并把CHAR6添加进去  // Characteristic 6 Declaration (声明,没加这个lightblue属性表找不到)    {      { ATT_BT_UUID_SIZE, characterUUID },      GATT_PERMIT_READ,      0,      &simpleProfileChar6Props    }, // Characteristic Value 6   (特征值)!!!...

继续阅读完整内容

支持我们的网站,请点击查看下方广告

正在加载广告...

Bluetoothchina Wechat Official Accounts

qrcode for gh 84b6e62cdd92 258