微信小程序报错: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 */

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

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

相关推荐
腾讯云云开发5 小时前
微信发布AI小程序成长计划:免费云开发资源+1亿token额度!
微信小程序·ai编程·小程序·云开发
FinClip1 天前
微信AI小程序“亿元计划”来了!你的APP如何一键接入,抢先变现?
前端·微信小程序·app
RFCEO1 天前
蓝牙设备配对与连接失败问题全面分析及解决对策
蓝牙·bt·配对失败·连接失败·蓝牙连接配对时序·连接失败原因对策
计算机毕设指导61 天前
基于微信小程序的考研资源共享系统【源码文末联系】
java·spring boot·后端·考研·微信小程序·小程序·maven
沉默-_-1 天前
从小程序前端到Spring后端:新手上路必须理清的核心概念图
java·前端·后端·spring·微信小程序
week_泽1 天前
百战商城商品数据云函数化改造总结_百战_3
数据库·笔记·微信小程序·小程序
『 时光荏苒 』1 天前
微信小程序we分析如何采集webview的体验信息
微信小程序·小程序·webview·we分析
百锦再1 天前
Vue大屏开发全流程及技术细节详解
前端·javascript·vue.js·微信小程序·小程序·架构·ecmascript
项目題供诗1 天前
微信小程序黑马优购(项目)(十五)
微信小程序·小程序
云起SAAS1 天前
婚礼邀请函请柬请帖制作生成抖音快手微信小程序看广告流量主开源
微信小程序·小程序·ai编程·看广告变现轻·婚礼邀请函