meshcore_py/examples/node_infos.py
2025-03-29 12:32:10 +01:00

18 lines
310 B
Python
Executable file

#!/usr/bin/python
from meshcore import TCPConnection
from meshcore import MeshCore
import asyncio
HOSTNAME = "mchome"
PORT = 5000
async def main () :
con = TCPConnection(HOSTNAME, PORT)
await con.connect()
mc = MeshCore(con)
await mc.connect()
print(mc.self_info)
asyncio.run(main())