Flash firmware as per xiaomi_config.jpeg
sudo apt-get install bluetooth libbluetooth-dev
sudo install pip
sudo install git
pip install git+https://github.com/pybluez/pybluez.git#egg=pybluez
sudo apt install python3-bluez
sudo setcap cap_net_raw,cap_net_admin+eip $(eval readlink -f 'which python3')
https://stackoverflow.com/questions/70310413/python-fcntl-ioctl-errno-1-operation-not-permitted