Skip to content

Commit 3dcedbc

Browse files
committed
Updated instructions
1 parent a73b14e commit 3dcedbc

File tree

3 files changed

+75
-16
lines changed

3 files changed

+75
-16
lines changed

Readme.md

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,48 @@
1-
# Bluetooth Headset Battery Level
1+
# 🔋🎧 Bluetooth Headset Battery Level
22

3-
This is a simple python script to get the battery charge level of some bluetooth headsets
3+
This is a python script to fetch the battery charge level of some Bluetooth headsets.
44

55
You need python version 3.6.0 or newer to run the script.
66

7-
# How to run
7+
# ▶️ How to run
8+
89
```bash
910
chmod +x bl_battery.py
10-
./bl_battery.py [BT_MAC_ADDRESS_1] ...
11+
./bl_battery.py [BT_MAC_ADDRESS_1] ...
1112
```
12-
You can input addresses for as many headphones and devices as you want seperated by spaces.
13+
14+
You can input addresses for as many devices as you want separated by space.
15+
16+
### It didn't work?
17+
18+
You can set the port number manually by adding a dot at the end of mac address, like this: `00:00:00:00:00.3`
19+
20+
Try port numbers `1 to 9` to find the one that works for your device.
21+
22+
If that didn't work, disconnect your device first, and then try again.
23+
24+
## Still doesn't work?
25+
26+
Please consider that this script doesn't guarantee to support every bluetooth device.
27+
28+
You can open a new issue for discussion or check the existing ones for more information.
1329

1430
## Tested on
1531

16-
- [x] Linux (ArchLinux 5.4.15-arch1-1)
32+
- [x] Linux (ArchLinux 5.6.11)
1733

18-
## Donate
34+
# 💸 Donate
1935

20-
You can donate if you like this little project :)
36+
You can donate if you like this project :)
2137

22-
BTC:
23-
1KXJPJSmXUocieC3neRZEDakpzfcyumLqS
38+
BTC: `1KXJPJSmXUocieC3neRZEDakpzfcyumLqS`
2439

25-
BTC Cash:
26-
qzsf6jdju8pq5l4wm6e0r7ahc2hljeyn3sldew58l8
40+
BCH: `qzsf6jdju8pq5l4wm6e0r7ahc2hljeyn3sldew58l8`
2741

28-
ETHER:
29-
0xb6178080c8f0792e6370959909199647e26b8457
42+
ETH: `0xb6178080c8f0792e6370959909199647e26b8457`
3043

3144
Thank you!
3245

33-
# License
34-
GPL-3.0
46+
# 📜 License
3547

48+
This project is a free software licensed under GPL-3.0 or newer.

Readme.md.backup

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# 🔋🎧 Bluetooth Headset Battery Level
2+
3+
This is a python script to fetch the battery charge level of some Bluetooth headsets.
4+
5+
You need python version 3.6.0 or newer to run the script.
6+
7+
# ▶️ How to run
8+
```bash
9+
chmod +x bl_battery.py
10+
./bl_battery.py [BT_MAC_ADDRESS_1] ...
11+
```
12+
13+
You can input addresses for as many devices as you want separated by space.
14+
15+
### It didn't work?
16+
17+
You can set the port number manually by adding a dot at the end of mac address, like this: `00:00:00:00:00.3`.
18+
Try port numbers `1 to 9` to find the one that works for your device.
19+
20+
If that didn't work, disconnect your device first, and then try again.
21+
22+
## Still doesn't work?
23+
24+
Please consider that this script doesn't guarantee to support every bluetooth device.
25+
You can open a new issue for discussion or check the existing ones for more information.
26+
27+
## Tested on
28+
29+
- [x] Linux (ArchLinux 5.6.11)
30+
31+
# 💸 Donate
32+
33+
You can donate if you like this project :)
34+
35+
BTC: `1KXJPJSmXUocieC3neRZEDakpzfcyumLqS`
36+
37+
BCH: `qzsf6jdju8pq5l4wm6e0r7ahc2hljeyn3sldew58l8`
38+
39+
ETH: `0xb6178080c8f0792e6370959909199647e26b8457`
40+
41+
Thank you!
42+
43+
# 📜 License
44+
This project is a free software licensed under GPL-3.0 or newer.
45+

bl_battery.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def getATCommand(sock, line, device, port):
6565
def main():
6666
if (len(sys.argv) < 2):
6767
print("Usage: bl_battery.py <BT_MAC_ADDRESS_1>[.PORT] ...")
68+
print(" Port number is optional (default = 4)")
6869
exit()
6970
else:
7071
for device in sys.argv[1:]:

0 commit comments

Comments
 (0)