Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8041

Beginners • Re: THONNY - WIFI command from the shell

$
0
0
I finally found a solution :
Whatever you use to create your current connection, just recreate a new object using the object name of the current connection. In the following example 'WLAN' is the current running object ( create something like an alias ) and use it to disconnect :

Code:

    nic = network.WLAN(network.STA_IF)    print("WLAN PROPERTIES : ", nic)    nic.disconnect()    nic.active(False)    nic.deinit()    print("WLAN PROPERTIES : ", nic)

Statistics: Posted by jcd95 — Sun May 04, 2025 4:06 pm



Viewing all articles
Browse latest Browse all 8041

Trending Articles