luluxie / weixin-iot

一些原创的与微信硬件开发有关的小工具,分享出来方便更多开发者。
48 stars 11 forks source link

Characteristics with value can be read only #3

Open karlzheng opened 7 years ago

karlzheng commented 7 years ago

MAC=00:1a:7d:da:71:13, DevName=微信互联硬件, LocalName=WeChat BLE

on -> stateChange poweredOn on -> advertisingStart success /usr/local/lib/node_modules/bleno/lib/characteristic.js:16 throw new Error('Characteristics with value can be read only!'); ^

Error: Characteristics with value can be read only! at Characteristic (/usr/local/lib/node_modules/bleno/lib/characteristic.js:16:11) at new WeRunPedoMeterChar (/home/karlzheng/Desktop/server_maitain/online/hoct_wx_sec/work/debug_wx_req/weixin-iot/ble-simulator.js:100:28) at new WxBLEService (/home/karlzheng/Desktop/server_maitain/online/hoct_wx_sec/work/debug_wx_req/weixin-iot/ble-simulator.js:196:23) at Bleno. (/home/karlzheng/Desktop/server_maitain/online/hoct_wx_sec/work/debug_wx_req/weixin-iot/ble-simulator.js:235:23) at emitOne (events.js:77:13) at Bleno.emit (events.js:169:7) at Bleno.onAdvertisingStart (/usr/local/lib/node_modules/bleno/lib/bleno.js:159:8) at emitOne (events.js:77:13) at emit (events.js:169:7) at BlenoBindings.onAdvertisingStart (/usr/local/lib/node_modules/bleno/lib/hci-socket/bindings.js:134:8)

ceipi commented 6 years ago

Have the same problem with the Bleno echo example. The example works with a null value but does not accept a preset value.

if I tried to change the value to anything else at line 12 of charasteristic.js:
uuid: 'ec0e', properties: ['read', 'write', 'notify'], value: null <------------------------- tried to have a value here

Did you find a solution?