What did I do wrong? wifi.ap.config
Posted: Thu Aug 10, 2017 12:22 pm
Ok - so, I bought one of those fancy PLDuinos (Arduino Mega based) with an integrated ESP8266 running NodeMCU (I think). By PLDuino default, the ESP8266 advertises an AP signal called "wifi-test."
All I want to do is change the SSID and password - everything else can stay stock. After much hair pulling, I finally found that I can pass commands to NodeMCU via the serial port. The ESP8266 is connected to the Arduino via Serial2. (That's fine except that I can seem to find any way to see a response when I send it a serial command on Serial2.)
Anyway - So, in my Arduino IDE sketch, I passed a simple:
Serial2.println("wifi.ap.config(myssid,mypassword);
thinking that would be all that's necessary.
But then, I saw no signal at all from the PLDuino. A little research later, I found that (perhaps) I need quotes for the values. So I send:
Serial2.println("wifi.ap.config(\"myssid\",\"mypassword\");
Note: When I print that string to Serial1 and watch serial monitor, it translates to: wifi.ap.config("myssid","mypassword")
Exactly what I want (I think).
Still no signal from the PLDuino
So I decide to go hog wild and send ALL of the available parameters:
Serial.println("wifi.ap.config{ssid=\"myssid\",pwd=\"mypassword\",auth=\"wifi.WPA2_PSK\",channel=\"1\",hidden=\"false\",max=\"4\",beacon=\"100\",save=\"false\"})");
Still no signal.
Final note: apparently the "save" parameter is the default. So, whatever configuration(s) I made origianlly, they survive a power cycle.
Where'd I go wrong and how do I recover?
Thanks in advance,
R
P.S. Being a complete newbie here, I sure I'm just missing something really simple.
All I want to do is change the SSID and password - everything else can stay stock. After much hair pulling, I finally found that I can pass commands to NodeMCU via the serial port. The ESP8266 is connected to the Arduino via Serial2. (That's fine except that I can seem to find any way to see a response when I send it a serial command on Serial2.)
Anyway - So, in my Arduino IDE sketch, I passed a simple:
Serial2.println("wifi.ap.config(myssid,mypassword);
thinking that would be all that's necessary.
But then, I saw no signal at all from the PLDuino. A little research later, I found that (perhaps) I need quotes for the values. So I send:
Serial2.println("wifi.ap.config(\"myssid\",\"mypassword\");
Note: When I print that string to Serial1 and watch serial monitor, it translates to: wifi.ap.config("myssid","mypassword")
Exactly what I want (I think).
Still no signal from the PLDuino
So I decide to go hog wild and send ALL of the available parameters:
Serial.println("wifi.ap.config{ssid=\"myssid\",pwd=\"mypassword\",auth=\"wifi.WPA2_PSK\",channel=\"1\",hidden=\"false\",max=\"4\",beacon=\"100\",save=\"false\"})");
Still no signal.
Final note: apparently the "save" parameter is the default. So, whatever configuration(s) I made origianlly, they survive a power cycle.
Where'd I go wrong and how do I recover?
Thanks in advance,
R
P.S. Being a complete newbie here, I sure I'm just missing something really simple.