This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can more methods be made public in pc-ble-driver-js

I'm attempting to build a binding for the noble (https://github.com/noble/noble) BLE library.   Currently some methods are private by underscore prefix convention.

I'd like for some of these to be made public if possible.

I'd really like for the handle writing methods to be made public, since noble provides an API to write/read to/from them.

I'd also like an easier way to hook into the state management for the connected devices. Currently I have to track the state myself to match addresses to deviceInstanceIds, and also uuids to the various service, characteristic, and descriptor instance ids.

For example: the api for reading a characteristic looks like  `write(address, serviceUuid, characteristicUuid)`

I'd be willing to submit a PR for this if this is acceptable. I'll probably alias the _ prefixed methods to the non prefixed ones.

  • Hi,

    I talked to the writers of  pc-ble-driver-js and they had the following comments:

    1. It would be nice to know a little more about how and why you intend to integrate noble to PC-driver-js?
    2. It should be possible to call these methods even though they have underscores. Can you elaborate? 
    3. You are welcome to make a pull request and enter info there, but we reserve the right to decide whether it will be merged once we have seen the changes.
Related