Skip to content

Commit

Permalink
tests/psoc6/multi/network_config.py: Added network config multi test.
Browse files Browse the repository at this point in the history
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
  • Loading branch information
jaenrig-ifx committed Jul 20, 2023
1 parent 278c518 commit b0bd665
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/psoc6/multi/network_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
channel_new = 5
ssid_new = "mpy-test-conf-wlan"
pass_new = "alicessecret"
sec_new = network.WPA3
sec_new = network.WLAN.WPA2


# Access Point
Expand All @@ -14,13 +14,16 @@ def instance0():
# ifconfig()

# get config()
print("ap config get channel: ", ap_if.config("channel") == channel_new)
ap_if.config(channel=channel_new)
print("ap config get ssid: ", ap_if.config("ssid") == ssid_new)
print("ap config get channel: ", ap_if.config("channel") == channel_new)
ap_if.config(ssid=ssid_new)
print("ap config get pass: ", ap_if.config("key") == pass_new)
print("ap config get ssid: ", ap_if.config("ssid") == ssid_new)
ap_if.config(security=sec_new, key=pass_new)
print("ap config get security: ", ap_if.config("security") == sec_new)
ap_if.config(sec=ssid_new, key=pass_new)
try:
ap_if.config("password") # only if default
except ValueError as err:
print(err)

# active()
ap_if.active(True)
Expand Down Expand Up @@ -63,9 +66,6 @@ def instance1():
try:
sta_if.config("key") # not for STA
except ValueError as err:
print("network config key not for sta: ", err)
print(err)

# print(" > yield access point")
# multitest.next()

# ifconfig()
# # ifconfig()
19 changes: 19 additions & 0 deletions tests/psoc6/multi/network_config.py.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- instance0 ---
ap instance created
ap config get channel: True
ap config get ssid: True
ap config get security: True
network conf password only queryable for default password
ap is activated
> yield station
ap has clients: True
ap status has stations: True
--- instance1 ---
sta instance created
sta attempt connection to ap
sta is (now) active: True
sta is (now) connected: True
sta assoc ap channel config: True
sta assoc ap ssid config: True
sta assoc ap security config: True
network access point required

0 comments on commit b0bd665

Please sign in to comment.