Files
python/tests/tcp-test.py
2023-03-31 20:09:59 +02:00

19 lines
350 B
Python

# reported by @ScriptBlock
import sys
from pubsub import pub
import meshtastic
def onConnection(
interface, topic=pub.AUTO_TOPIC
): # called when we (re)connect to the radio
print(interface.myInfo)
interface.close()
pub.subscribe(onConnection, "meshtastic.connection.established")
interface = meshtastic.TCPInterface(sys.argv[1])