微信小程序报错:notifyBLECharacteristicValueChange:fail:nodescriptor的解决办法

文章目录

一、发现问题

微信小程序报错:notifyBLECharacteristicValueChange:fail:nodescriptor

二、分析问题

这个提示有点问题,应该是该Characteristic的Descriptor有问题,而不能说nodescriptor。

描述符的类型不能是0x2901的Characteristic User Description

应该是0x2902的Client Characteristic Configuration

二、解决问题

修改蓝牙设备的Descriptor UUID即可。

不同的Descriptor UUID定义如下。

c 复制代码
#define ESP_GATT_UUID_CHAR_EXT_PROP                 0x2900          /*  Characteristic Extended Properties */
#define ESP_GATT_UUID_CHAR_DESCRIPTION              0x2901          /*  Characteristic User Description*/
#define ESP_GATT_UUID_CHAR_CLIENT_CONFIG            0x2902          /*  Client Characteristic Configuration */
#define ESP_GATT_UUID_CHAR_SRVR_CONFIG              0x2903          /*  Server Characteristic Configuration */
#define ESP_GATT_UUID_CHAR_PRESENT_FORMAT           0x2904          /*  Characteristic Presentation Format*/
#define ESP_GATT_UUID_CHAR_AGG_FORMAT               0x2905          /*  Characteristic Aggregate Format*/
#define ESP_GATT_UUID_CHAR_VALID_RANGE              0x2906          /*  Characteristic Valid Range */
#define ESP_GATT_UUID_EXT_RPT_REF_DESCR             0x2907          /*  External Report Reference */
#define ESP_GATT_UUID_RPT_REF_DESCR                 0x2908          /*  Report Reference */
#define ESP_GATT_UUID_NUM_DIGITALS_DESCR            0x2909          /*  Number of Digitals */
#define ESP_GATT_UUID_VALUE_TRIGGER_DESCR           0x290A          /*  Value Trigger Setting */
#define ESP_GATT_UUID_ENV_SENSING_CONFIG_DESCR      0x290B          /*  Environmental Sensing Configuration */
#define ESP_GATT_UUID_ENV_SENSING_MEASUREMENT_DESCR 0x290C          /*  Environmental Sensing Measurement */
#define ESP_GATT_UUID_ENV_SENSING_TRIGGER_DESCR     0x290D          /*  Environmental Sensing Trigger Setting */
#define ESP_GATT_UUID_TIME_TRIGGER_DESCR            0x290E          /*  Time Trigger Setting */

修改后,微信小程序的报错就消失了。

觉得好,就一键三连呗(点赞+收藏+关注)

相关推荐
大黄说说10 小时前
SaaS小程序制作平台对比:码云数智、有赞、微盟
微信小程序
liuniu081813 小时前
如何在aosp11中打开蓝牙日志--bt_snoop
蓝牙·rk3566·泰山派·bt_snoop·aosp11
清风絮柳1 天前
65.少儿英语微信小程序
vue.js·spring boot·微信小程序·小程序·毕业设计
tjsoft2 天前
unigui开发微信小程序
微信小程序·小程序
嵌入式小企鹅2 天前
蓝牙学习系列(七):BLE GATT 数据模型详解
学习·蓝牙·ble·蓝牙协议栈·蓝牙开发·gatt
zhaoshuzhaoshu3 天前
蓝牙 ACL 与 SCO 链路联系与详细区别对比
网络·物联网·蓝牙·无线
苏灵凯3 天前
智能环境监测终端全栈设计:从单片机到微信小程序,手把手搞定!
单片机·嵌入式硬件·mcu·物联网·微信小程序·小程序·蓝牙模块
nhc0883 天前
贵阳纳海川科技有限公司・货运物流行业解决方案
科技·微信小程序·小程序·软件开发·小程序开发
admin and root3 天前
AWS S3 对象存储攻防&云安全之OSS存储桶漏洞
微信小程序·小程序·渗透测试·云计算·aws·src·攻防演练
李庆政3704 天前
uniapp+unicloud打包部署微信小程序
微信小程序·小程序·uni-app