summaryrefslogtreecommitdiffstats
path: root/src/main.py
diff options
context:
space:
mode:
authorAlex Schofield <git@ajschof.me>2025-02-07 21:38:41 +0000
committerAlex Schofield <git@ajschof.me>2025-02-07 21:38:41 +0000
commitbf2ae303bdd3b69be69eba4962f154baaed98cfd (patch)
treee408ea0aa1c5541f2be4bfac4d23cf5dc1ae22fd /src/main.py
parenta77ced9f72eedcee6b1b0cdae655937dd9bcf1ae (diff)
downloadtp-logger-bf2ae303bdd3b69be69eba4962f154baaed98cfd.tar.gz
tp-logger-bf2ae303bdd3b69be69eba4962f154baaed98cfd.zip
add functionality to connect to device and find characteristics and properties
Diffstat (limited to 'src/main.py')
-rw-r--r--src/main.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.py b/src/main.py
index ecd075a..94c0559 100644
--- a/src/main.py
+++ b/src/main.py
@@ -1,4 +1,5 @@
from discover import discover
+from connect import connect
import os
from logger import get_logger
import asyncio
@@ -42,6 +43,10 @@ async def main(debug_flag=None):
else:
device = devices[0]
logger.info(f"Single device selected: {device['name']} - {device['address']}")
+
+ conn = await connect(device['address'])
+
+ return conn
if __name__ == "__main__":
asyncio.run(main())
git.ajschof.me — hosted by ajschofield — powered by cgit