Remove dead comments
This commit is contained in:
parent
ece994bf3b
commit
bc3e1dfd6f
|
@ -158,5 +158,3 @@ cython_debug/
|
|||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ repos:
|
|||
rev: 23.3.0
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3.10
|
||||
language_version: python3.11
|
||||
- repo: https://github.com/PyCQA/bandit
|
||||
rev: 1.7.5
|
||||
hooks:
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
import asyncio
|
||||
from bleak import BleakClient, BleakGATTCharacteristic
|
||||
|
||||
import bleak.exc
|
||||
|
||||
from bleak import BleakClient, BleakGATTCharacteristic
|
||||
from hexdump import hexdump
|
||||
from icecream import ic
|
||||
|
||||
address = "C8:05:E1:A1:93:00"
|
||||
|
||||
|
||||
services = {"read": [], "notify": [], "write": [], "write-without-response": [], "indicate": []}
|
||||
services = {
|
||||
"read": [],
|
||||
"notify": [],
|
||||
"write": [],
|
||||
"write-without-response": [],
|
||||
"indicate": [],
|
||||
}
|
||||
|
||||
|
||||
async def notification_handler(sender: BleakGATTCharacteristic, data: bytearray):
|
||||
|
@ -41,7 +45,7 @@ async def main(address):
|
|||
services[prop].append(char)
|
||||
ic(char.handle)
|
||||
ic("—" * 79)
|
||||
line ="[+] {}".format("="*70)
|
||||
line = "[+] {}".format("=" * 70)
|
||||
ic(line)
|
||||
|
||||
for service in services["notify"]:
|
||||
|
@ -49,10 +53,6 @@ async def main(address):
|
|||
|
||||
for service in services["notify"]:
|
||||
try:
|
||||
# await client.start_notify("00002ad2-0000-1000-8000-00805f9b34fb", notification_handler)
|
||||
# await client.start_notify("00002ada-0000-1000-8000-00805f9b34fb", notification_handler)
|
||||
# await client.start_notify("00002ad3-0000-1000-8000-00805f9b34fb", notification_handler)
|
||||
|
||||
ic(f"[+] start_notify {service}")
|
||||
await client.start_notify(service.uuid, notification_handler)
|
||||
ic(f"[+] handler registered for {service.uuid}")
|
||||
|
|
Loading…
Reference in New Issue