diff --git a/examples/tcp_mchome_msg.py b/examples/tcp_mchome_msg.py index cf8762f..de2da44 100755 --- a/examples/tcp_mchome_msg.py +++ b/examples/tcp_mchome_msg.py @@ -4,10 +4,11 @@ import asyncio import json from meshcore import MeshCore from meshcore import TCPConnection +from meshcore import EventType HOSTNAME = "mchome" PORT = 5000 -DEST = "t1000" +DEST = "t114_fdl" MSG = "Hello World" async def main () : @@ -21,6 +22,9 @@ async def main () : if contact is None: print(f"Contact '{DEST}' not found in contacts.") return - await mc.commands.send_msg(contact ,MSG) + ret = await mc.commands.send_msg(contact ,MSG) + print (ret) + exp_ack = ret["expected_ack"].hex() + print(await mc.wait_for_event(EventType.ACK, attribute_filters={"code": exp_ack}, timeout=5)) asyncio.run(main())