Skip to content

Commit

Permalink
Merge pull request #12 from PAGpK/main
Browse files Browse the repository at this point in the history
correction issue 123, initial values modified
  • Loading branch information
MkLHX authored May 30, 2022
2 parents fd7df70 + 1d80695 commit d156d9a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions GreenPonik_BLE/gattserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ class JsonService(Service):
JSON_SVC_UUID = "00000001-9e3e-4800-9fa6-fd34f6571ad7"

def __init__(self, index):
f = open("/etc/wpa_supplicant/wpa_supplicant.conf", "r")
for x in f:
if "ssid=\"" in x:
self.ssid = x.split('"')[-2]
elif "psk" in x:
self.pwd = x.split('"')[-2]
elif "country" in x:
self.country = x.split('=')[-1]
self.ssid = "ssid_init"
self.pwd = "pwd_init"
self.country = "country_init"
Expand Down

0 comments on commit d156d9a

Please sign in to comment.