monteslu / ble-serial

a node-serialport implementation using BLE for sending and receiving serial data.
17 stars 5 forks source link

drop noble requirement? #7

Open monteslu opened 7 years ago

monteslu commented 7 years ago

Now that we have https://github.com/sandeepmistry/noble/blob/master/with-bindings.js it's possible to be specific about how noble is instantiated. This is particularly helpful for things like the noble-webbluetooth shim.

Should we yank the dependency and require people to pass it to the ble-serial constructor?

techniq commented 7 years ago

@monteslu Anymore considering on this? It seems like it would help with this React Native use case where we could pass in our own instance of Noble (in this case, an instance from react-native-ble).

It's been a little while since I've looked at this so things may have changed (for the better), but I know I was struggling to get it to work due to the having to use rn-nodeify to shim react-native-ble as noble

monteslu commented 7 years ago

Yeah, maybe make noble an optional dep and use default constructor if a noble instance isn't passed in?

techniq commented 7 years ago

That sounds like a good approach to me.