noble / bleno

A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals
MIT License
2.12k stars 447 forks source link

how to run multiple instance? #381

Closed slixin closed 6 years ago

slixin commented 6 years ago

I have run bleno sucessfully on MacOS, but Id like to know how to run multi instances on the same server? Does it support?

sandeepmistry commented 6 years ago

@slixin have you tried just running multiple node apps? Let us know if this doesn't work.

leonardofreitass commented 6 years ago

Even running multiple node apps, it does not work. If I run a second node app, it will override the advertisement of the service in the first node app. Is this a bug or bleno really doesn't support this yet?

petersaints commented 4 years ago

I'm currently using this fork of bleno because the "official" version does not support the latest versions of Node: https://github.com/abandonware/bleno

However, I believe that this issue applies to both versions. I'm using the "startAdvertisingIBeacon" to simulate an iBeacon, but I'm only able to run one instance of my application that does it. As soon as I run another instance the previous one stops advertising.

Is this something that can be done at the Node.js/bleno level. Or is it some inherent limitation of BlueZ or perhaps even an hardware limitation? For instance, on certain Android phones I'm able to advertise multiple iBeacon signals concurrently on an app such as this one: https://play.google.com/store/apps/details?id=net.alea.beaconsimulator&hl=en