abandonware / bleno

A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals
https://mastodon.social/@rzr/106068437787315146#bleno
MIT License
149 stars 52 forks source link

[Question] How to send more than 1 response to a single write request? #29

Open gg-yang opened 3 years ago

gg-yang commented 3 years ago

I'm trying to implement a simulator that mimics a physical device that uses BLE to transmit messages. Whenever it receives a write request, it'll send an initial response (0xFFFF...), then the actual response (0x7F1002...). However, I'm only able to send 1 response with my Bleno implementation currently. How can I implement it to send both?

Further, if I need to send a response with more than 20 bytes, how can I do so with Bleno? I've gone through the examples, but not quite sure what I should be looking for.