From c0b1ef2c62020f0756d74e1e2f1aeebb5665c098 Mon Sep 17 00:00:00 2001 From: Adam Urban Date: Mon, 6 Aug 2018 16:02:17 -0400 Subject: [PATCH] Example to get wifi password from panda over USB using python library --- examples/get_panda_password.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 examples/get_panda_password.py diff --git a/examples/get_panda_password.py b/examples/get_panda_password.py new file mode 100644 index 00000000000000..11071d035346be --- /dev/null +++ b/examples/get_panda_password.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python +from panda import Panda + +def get_panda_password(): + + try: + print("Trying to connect to Panda over USB...") + p = Panda() + + except AssertionError: + print("USB connection failed") + sys.exit(0) + + wifi = p.get_serial() + #print('[%s]' % ', '.join(map(str, wifi))) + print("SSID: " + wifi[0]) + print("Password: " + wifi[1]) + +if __name__ == "__main__": + get_panda_password() \ No newline at end of file