Provisioning over WiFi without COM Port
Posted: Sat Jan 29, 2022 12:46 am
First, I want to say you guys have done a tremendous job with Rainmaker, and I'm able to create a node and add parameters to my heart's desire. What is puzzling me is; how to provision an ESP32 with an existing WiFi connection. Indeed, if I disable WiFi, the ESP makes a new bar code just fine.
I have a few ESP widgets that are tough to get to, so I've tried things in various order. I should be able to TelnetStream.print the URL for the barcode. I also have conventional OTA working over WiFi. My setup code is as below:
// *************************************************************************
void setup(){
uint8_t mac[6];
Serial.begin(115200);
pinMode(GAS_ON, INPUT_PULLUP);
pinMode(PWR_ING, INPUT_PULLUP);
delay(2000);
WiFisetup(); // Once connected, begin Telnet
TelnetStream.begin(); // start telnet BEFORE Rainmaker for Telnet Provisioning
RMakerSetup(); // We can TelnetStream the URL for provisoning here
delay(500); //
GetRunTime();
OTAsetup(); // start over-the-air support
Version = ArduinoOTA.getHostname(); // OTA should have set Hostname
//StoreInitialHours(); // Need Preferences after Factory Reset
}// --------------------------- end setup -------------------------------------
If I comment out WiFisetup and TelnetStream.begin and OTAsetup, I get successful barcode. If I enable WiFi, the node doesn't connect with the Android Phone App.
Suggestions would be appreciated.
I have a few ESP widgets that are tough to get to, so I've tried things in various order. I should be able to TelnetStream.print the URL for the barcode. I also have conventional OTA working over WiFi. My setup code is as below:
// *************************************************************************
void setup(){
uint8_t mac[6];
Serial.begin(115200);
pinMode(GAS_ON, INPUT_PULLUP);
pinMode(PWR_ING, INPUT_PULLUP);
delay(2000);
WiFisetup(); // Once connected, begin Telnet
TelnetStream.begin(); // start telnet BEFORE Rainmaker for Telnet Provisioning
RMakerSetup(); // We can TelnetStream the URL for provisoning here
delay(500); //
GetRunTime();
OTAsetup(); // start over-the-air support
Version = ArduinoOTA.getHostname(); // OTA should have set Hostname
//StoreInitialHours(); // Need Preferences after Factory Reset
}// --------------------------- end setup -------------------------------------
If I comment out WiFisetup and TelnetStream.begin and OTAsetup, I get successful barcode. If I enable WiFi, the node doesn't connect with the Android Phone App.
Suggestions would be appreciated.