Bluetooth for Wifi credential #1381
-
I am building wifi speaker and at this point, I need to be able to write wifi credentials on the board. I have found this code example BUT I can not integrate it into my Wifi Speaker module ` #include "AudioTools.h" const char *urls[] = { ICYStream urlStream(ssid, pass); float volume = 1; //bluetooth parameters BluetoothSerial ESP_BT; //Object for Bluetooth void next(bool, int, void *) { void up(bool, int, void *) { void down(bool, int, void *) { void previous(bool, int, void *) { void stopResume(bool, int, void *) { // Arduino setup Serial.println("Waiting For Wifi Updates 60 seconds"); while (!check_wifiUpdate() == true) { int i = temp.length(); Serial.println("Stored SSID"); if (WiFi.waitForConnectResult() != WL_CONNECTED) { //audio // setup output // setup navigation // setup player boolean check_wifiUpdate() { if (currentMillis - previousMillis >= interval) {
} else if (ESP_BT.available()) //Check if we receive anything from Bluetooth
} else { // Arduino loop this code could be awful so tell me if there is example or some other project on ESP32 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
I don't understand you! You can save some lines of code if you provide the password and ssid via the corresponding methods... |
Beta Was this translation helpful? Give feedback.
I don't understand you!
If you do the authentication outside of the ICYStream or URLStream you just don't provide any login parameters!
I just added this functionality so that I don't have to code the wifi login functionality in each sketch.
You can save some lines of code if you provide the password and ssid via the corresponding methods...