From f3d662db74e141ec2c6cf0b7a3f48da46a0a736a Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 5 May 2021 11:23:55 -0700 Subject: [PATCH] test: add test utility for Roam() method --- test/force-roam | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 test/force-roam diff --git a/test/force-roam b/test/force-roam new file mode 100755 index 00000000..b590c84a --- /dev/null +++ b/test/force-roam @@ -0,0 +1,16 @@ +#!/usr/bin/python3 + +import sys +import dbus + +if (len(sys.argv) != 3): + print("Usage: %s " % (sys.argv[0])) + sys.exit(1) + +bus = dbus.SystemBus() +device = dbus.Interface(bus.get_object("net.connman.iwd", sys.argv[1]), + "net.connman.iwd.StationDiagnostic") + +mac = sys.argv[2].replace(':', '') + +device.Roam(dbus.ByteArray.fromhex(mac))