Open fschwiet opened 5 years ago
It seems that bleno.stopAdvertising()
and PrimaryService.shutdown()
aren't enough to stop sending ble packets all together. The only way I found to accurately simulate a device going out of range was to just shut down the bluetooth adapter with sudo hciconfig hci0 down
We're using bleno to simulate devices used by our app in automated testing. One scenario we want to test is the device going out of range. We can kind of get there by calling
bleno.stopAdvertising()
andbleno.disconnect()
, but this causes the bluetooth device to tell the server it is disconnecting. We want to test codepaths as if the device were truly out of range with no messages received.Is there a way we can get the bluetooth device to stop sending messages altogether? Our device is running on raspberry pi.