obnizのフォーラムは新しいシステムに移行しております。
新しいフォーラムはこちらになりますDoes Obniz support Notify on the periferal side of BLE?
-
I have a question about BLE.
Does Obniz support Notify on the periferal side of BLE?
-
Hi みやかわ,
We have developed it and testing now.
I think, it will release in one or two week.When it release, I will tell you in this thread.
-
Hi みやかわ,
obniz sdk version 1.9.5 released and it includes BLE notifications.
The document is hereYou can use like this.
Don't forget to set CCCD descriptor (0x2902).var characteristic = new obniz.ble.characteristic({ uuid: 'FFF1', data: [0x0e, 0x00], properties : ["read","write","notify"], // add notify properties descriptors: [ { uuid: '2902', //CCCD data: [0x00, 0x00], //2byte }, ], }); var service = new obniz.ble.service({ uuid: 'FFF0', characteristics: [characteristic], }); obniz.ble.peripheral.addService(service); // after central connected characteristic.notify();
If you want to notify when someone change value,
characteristic.onwritefromremote = function(address, newvalue){ characteristic.notify(); }
-
Hi, Kido( @kido ).
Thank you for adding BLE notification.
I actually tried BLE notification.
As a result, it worked!!
Thank you!!
SUGGESTED TOPICS
-
Polar OH1 と connect後、Notifyの受信が無く、接続から15秒に disconnectします。
Question and Troubles • 2021年10月11日 2:58 • 常田文克 2021年10月21日 1:41 -
M5StackBasicのButtonAのイベントを拾おうとしているのですが反応しません
Question and Troubles • 2021年9月5日 6:20 • 福井 暢宏 2021年9月5日 6:47 -
BLEデバイスに接続した場合に20秒ほど接続に時間がかかる
Question and Troubles • 2021年8月30日 4:49 • GDAS 2021年8月31日 1:37 -
obnizIDを入れたのに実行画面でNo new obniz foundと表示される
Question and Troubles • 2021年10月27日 8:15 • Fukushima701 2021年11月17日 7:46 -
UT-201BLEおよびUA-651BLEの値を読み出そうとするとObnizBleHciStateErrorが発生する
Question and Troubles • 2021年9月7日 6:49 • yuuu 2021年9月8日 2:28