I'm trying to use noble and bleno together in a single application to allow linux to be in the central role but also be the GATT server. I actually have this working, but had to remove an if statement in bleno. Namely, I had to remove this if:
With that if the AclStream never gets set up and bleno never responds to discover services requests (or any other request).
I understand why that check is there, since a connection callback is valid in both the central and peripheral contexts, however, I believe a GATT server is equally valid in both contexts. Any thoughts on this? Would an environment variable be the right approach to skip that check in cases like mine?
I use bleno and noble to develop node-fitbit-livedata module for getting live data from fitbit devices.
I also have met this problem when these modules work on Raspbian.
I'm trying to use noble and bleno together in a single application to allow linux to be in the central role but also be the GATT server. I actually have this working, but had to remove an
if
statement in bleno. Namely, I had to remove thisif
:from here.
With that if the
AclStream
never gets set up and bleno never responds to discover services requests (or any other request).I understand why that check is there, since a connection callback is valid in both the central and peripheral contexts, however, I believe a GATT server is equally valid in both contexts. Any thoughts on this? Would an environment variable be the right approach to skip that check in cases like mine?