From 0e4b51551466248cb2bd866b9bfa1df4d752f3a3 Mon Sep 17 00:00:00 2001 From: Marcos Kirsch Date: Mon, 15 Feb 2016 13:12:19 -0600 Subject: [PATCH] Default to join an existing WiFi network, more common at least for my own testing --- init.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 45aaeab..70bfb68 100644 --- a/init.lua +++ b/init.lua @@ -2,15 +2,18 @@ local wifiConfig = {} --- wifi.STATION -- station: join a WiFi network --- wifi.AP -- access point: create a WiFi network --- wifi.wifi.STATIONAP -- both station and access point -wifiConfig.mode = wifi.STATIONAP -- both station and access point +-- Uncomment the WiFi mode you want. +wifiConfig.mode = wifi.STATION -- station: join a WiFi network +-- wifiConfig.mode = wifi.AP -- access point: create a WiFi network +-- wifiConfig.mode = wifi.STATIONAP -- both station and access point wifiConfig.accessPointConfig = {} wifiConfig.accessPointConfig.ssid = "ESP-"..node.chipid() -- Name of the SSID you want to create wifiConfig.accessPointConfig.pwd = "ESP-"..node.chipid() -- WiFi password - at least 8 characters +-- Configure fixed IP address +wifi.sta.setip({ip="10.0.7.111q", netmask="255.255.224.0", gateway="24.55.0.1"}) + wifiConfig.stationPointConfig = {} wifiConfig.stationPointConfig.ssid = "Internet" -- Name of the WiFi network you want to join wifiConfig.stationPointConfig.pwd = "" -- Password for the WiFi network