Skip to content

Commit

Permalink
tests/psoc6/multi/network: WIP network config tests.
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 17, 2023
1 parent a0790da commit f5e7d21
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/psoc6/multi/network.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import binascii, network, time

channel_default = 9
channel_new = 5


# Access Point
def instance0():
Expand Down Expand Up @@ -44,6 +47,8 @@ def instance0():
# ifconfig()

# config()
print("ap channel: ", ap_if.config("channel") == channel_default)
ap_if.config(channel=channel_new)


# Station
Expand Down Expand Up @@ -83,6 +88,7 @@ def instance1():
print("sta is (now) connected: ", sta_if.isconnected() == True)

# status()
# The test boards are placed next to each other (few cm range)
print("sta status rssi in range: ", -70 < sta_if.status("rssi") < 0)

print(" > yield access point")
Expand All @@ -100,3 +106,7 @@ def instance1():
# ifconfig()

# config()
print("sta assoc ap channel: ", sta_if.config("channel") == channel_new)

# # As teardown
# sta_if.disconnect()
2 changes: 2 additions & 0 deletions tests/psoc6/multi/network.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ap has no client: True
ap has clients: True
ap cannot disconnect: network STA required
ap status has stations: True
ap channel: True
--- instance1 ---
sta instance created
sta is not active: True
Expand All @@ -24,3 +25,4 @@ sta status rssi in range: True
sta is disconnected: True
sta attempt connection to ap (with bssid)
sta is active: True
sta assoc ap channel: True

0 comments on commit f5e7d21

Please sign in to comment.