Start network on esp8266

Configure network as client
import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect('ssid', 'password')

Show IP-adress
wlan.ifconfig()

Configure network as access Point

import network
ap = network.WLAN(network.AP_IF)
ap.active(True)
ap.config(essid="network-name", authmode=network.AUTH_WPA_WPA2_PSK, password="abcdabcdabcd")


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *