-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Description
1 import network
2
3 def do_connect(ssid, password):
54
sta_if = network. WLAN (network.STA_IF)
if not sta_if.isconnected():
7
print('Conectando a la red', ssid
- '...')
8
sta_if.active(True)
9
10
sta_if.config(dhcp_hostname="erickL
")
11
12
sta_if.connect(ssid, password)
13
14
while not sta_if.isconnected():
15
pass
16
17
print('Conectado a la red:', ssid)
18
print(' Configuración de red (IP/netmask/gw/DNS):', sta_if.ifconfig())
19
print(' Hostname actual:', sta_if.conf ig('dhcp_hostname'))
20
21
22
do_connect('ErickL', 'urtizebelgrano33')
Metadata
Metadata
Assignees
Labels
No labels