How to Power Off Basestations remotely?



I understand the note as that ‘connecting’ refers to the old behaviour of bt where you have to connect (aka pair) before you can exchange any data. But to be honest, i really have not much insights into BT at all, so while coding i am learning :slight_smile: and as said, i still have the out of the box libs from Microsoft itself…


There is a difference between the connecting and the pairing. You do not need to pair the basestations in order to talk to them, but you have to connect to them. This is the advantage of BLE, and since the lib is actually only supporting BLE, I would not interpret it as “pairing”.

While for advertising, broadcasting (or scanning), you do not need to connect to the devices. My Python script connects to the BS so it can then write the characteristic (i.e. the command).


Well thats bad news.

It will be very funny to build the app now with the out of the box methods from microsoft. But, whats the alternative? Buying WiFi Power Sockets? No way ! :smiley: And still better as to learn python :wink:


Well, i think that’s enough for today. I’ve managed to create a Xamarin.Forms app for UWP, iOS and Android. Incl. activate the support for all platforms…

only to find out that my BT Dongle on my PC isn’t being recognized as BT Device from windows (nativley) and therefore not from either. I will test it tomorrow on my android phone… oh man


The Clapper. Clap on! Clap off! :beers::joy::+1::sparkles:


Or a watch.
“K.I.T.T. shut down the basestations”


Well, so far not much luck. Even with the out of the box methods from windows i am not able to get my bt-adapter. Seems like it’s being wrapped by its own driver-software and only accessable via it.

I will try to get another bt-adapter which is more ‘basic’.


Is your BT adapter supporting BT LE? I believe you will not see non LE adapter in device enumeration.


Hi risa2000,

this is the one i am using. And from what i read, it should support BT LE:


I have tested the BluetoothLE Windows demo on this one: and it seemed to work to the point I could at least see my basestations (and other devices) and query them. I did not run my Python script on it as it can only run on my RPi (which already has integrated BT).

EDIT: You dongle looks ok to me :smiley:. Do you use Win 10? Did Windows install the drivers automatically (it should).


Microsoft Windows 10 [Version 10.0.17134.590] == version 1803. Latest is 1809.

The drivers had to be installed from a CD. Before then, it was not usable. Thats why i meant with that its not natively supported as bt.device :frowning:


Hi guys, no further development here?


In fact, I did some tests. I hope I will release soon some PoC in Python with the hope it may be included in the Open Source version of pitool.
What I have is a Python script :

  • Search for pimax powered on USB
  • Wake up Base B
  • Set Time Out on base B
  • Ping Base B every 30 seconds
  • If pimax is not present anymore then stops ping and wait

I have a pretty nasty code, and some bugs, but its very promising.

Thanks btw for all the usefull information shared here !


Nice! It’d be great, it’s very annoying the switch back & forth to Vive just for that.
I was just beginning to test with PyBluez-win10 (like first 5 minutes now) but seems you are way ahead :slight_smile:
If you need help with the code let me know.

Thanks everyone for the info!


Just curious, have you seen this (
Do you have Python script running on Windows? Which BT interface do you use?


Just thought I’d share some info that was very useful to me. I run stations in B and C mode. When I power off base B (using button on power strip), base C goes to sleep automatically - very handy feature


Yep, this is a great inspiration, very good work here.
I’m using bleak as library and a simple usb asus bt400.



As promised :
Just an early PoC, “It works for me”. I hope it will help you guys.


Definitely not to take away from @TheMalkavien’s achievements, because it looks far more convenient and is something I’ll definitely be trying, but I thought I’d post anyway:

In trying to solve this problem the low-tech way, I got one of these for $10 from Amazon Prime. It’s not automatic, needs line of sight, and will eventually run out of batteries, but it does work.


Thanks a lot @TheMalkavien!

I’ve made an improved version with auto-detection of Base Stations and system tray icon.
Also managed to create an exe version with pyinstaller for who’s not familiar with python and all the dependencies.
Should work in Windows 10 with latest FW for the Base Stations, just download in a folder and put a shortcut in the startup folder for auto startup or on the desktop for manual execution.

It is not necessary (at least for me) to recover the ID from the label on the back, the last digits in the advertised BLE name works for me to trigger the wake-up and the ping keep-alive.