Requirement:
- Mac OS PC
- Raspberry PI:
- Pi Zero W
- Raspberry PI 3 / 4


Copy the Bluetooth controller’s MAC address to your clipboard. We’ll need this value later.
Switch over to the raspberry pi console
This is an optional step / use only when l2ping is not working.
Now, pair the Raspberry Pi (or any other Linux-based system) with the MAC. This step is only required once.
sudo apt-get update
sudo apt-get install bluez
sudo bluetoothctl
agent on
power on
pair <bluetooth_controller_mac>
connect <bluetooth_controller_mac>
trust <bluetooth_controller_mac>
Then you can wake up you Mac using:
sudo l2ping -c 5 <bluetooth_controller_mac>