My ESP32 (MH ET Live ESP32 Mini kit) is not connecting with my iphone.
This has happened with multiple example sketches,
currently Blynk, ESP32_WiFi example from the Arduino IDE
Blynk library examples. The only change I have made is to paste in real values for
char auth, char ssid and char pass.
I have run the WiFiScan example from Arduino IDE WiFi examples and the ESP32 showed
my phone in ther serial monitor, along with other WiFi networks.
I have previouly had contact between several different ESP32 boards and my iphone.
I deleted all Blynk libraries from my arduino library folder an reinstalled them today.
The serial monitor doesn’t put out any debug information, untill you press the reset button on the board, then there is some.
ESP32 board is currently powered by USB cable from laptop. The WiFi network I chose is my phone WiFi hotspot, exactly as named in the WiFi Scan
I have also attempted collection with quickStart as well with similar results
Serial monitor outpup, none untill reset on board is pressed;
!⸮⸮:0⸮LB⸮=]⸮ON⸮M⸮T)I⸮⸮⸮:0⸮3⸮i⸮}ST⸮*⸮H_⸮⸮Q%
22:14:37.973 -> ⸮˙⸮gsZ⸮b⸮A%]⸮:0⸮⸮5
22:14:37.973 -> cl⸮E⸮v:⸮⸮0)}⸮⸮v:⸮⸮0,d⸮⸮⸮i0x⸮,⸮.⸮⸮rv'⸮⸮0,h⸮E⸮⸮:0⸮0⸮}⸮rv⸮⸮⸮0
22:14:37.973 -> [⸮iDI⸮ ⸮oc-"⸮⸮:1C!⸮+⸮⸮0x3⸮⸮018⸮+⸮i4
!녑:0⸮f⸮⸮⸮⸮⸮⸮YK⸮⸮4⸮C!⸮+⸮⸮0x4⸮7⸮⸮⸮b╹i10L&SH⸮⸮⸮d:⸮⸮0⸮0⸮⸮bb⸮⸮⸮585S⸮⸮⸮⸮ 0⸮⸮6⸮j
22:14:38.207 -> ```
Code;
``` /*************************************************************
Download latest Blynk library here:
https://github.com/blynkkk/blynk-library/releases/latest
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: http://www.blynk.cc
Sketch generator: http://examples.blynk.cc
Blynk community: http://community.blynk.cc
Follow us: http://www.fb.com/blynkapp
http://twitter.com/blynk_app
Blynk library is licensed under MIT license
This example code is in public domain.
*************************************************************
This example runs directly on ESP32 chip.
Note: This requires ESP32 support package:
https://github.com/espressif/arduino-esp32
Please be sure to select the right ESP32 module
in the Tools -> Board menu!
Change WiFi ssid, pass, and Blynk auth token to run :)
Feel free to apply it to any other example. It's simple!
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
/* Fill-in your Template ID (only if using Blynk.Cloud) */
//#define BLYNK_TEMPLATE_ID "YourTemplateID"
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "a5eN2TZKo4kIYq4v3CCg0bs26-M-CjCH";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Vere's iphone";
char pass[] = "ta35eeymp64fd";
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
}
void loop()
{
Blynk.run();
}
@vere please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```
Yes, it’s good to put triple backticks before and after your serial output too.
I’d start by using 115200 as the baud rate for your serial output instead of 9600…
as that is probably the native baud rate for your ESP32 and will turn your current start-up messages from your device into something intelligible.
I’d also chose an SSID for your phone hotspot that doesn’t include apostrophes or spaces.
You may find that your phone’s hotspot software or mobile carrier blocks some of the Blynk traffic, but you should at least be getting some feedback about failed connection to blynk.cloud in your serial monitor.
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
/* Fill-in your Template ID (only if using Blynk.Cloud) */
//#define BLYNK_TEMPLATE_ID "YourTemplateID"
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxx";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "VeresiPhone";
char pass[] = "xxxxxx";
void setup()
{
// Debug console
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
}
void loop()
{
Blynk.run();
}
iPhone 7.
This was working a few months ago. Wondering if there are libraries that are corrupted that I didn’t find. I only found Blynk libraries in Arduino/Libraries
Verbose debugging was on, but because this is an example on the Arduino IDE, I expected it to boot OK, I can post the whole debug output but there are no errors mentioned.
the serial output was with this code section enabled for max debug output.
Comment this out to disable prints and save space
#define BLYNK_PRINT Serial
I have tried to read about these errors but haven’t found much relevant yet
It looks to me like you’ve enabled debugging in the IDE Tools me I and selected a debug level that includes WiFi debugging.
I guess that with this turned off, your serial monitor output would be identical to what you were seeing originally.
I have made some progress.
It seems that the token I am using was generated when I was using Quickstart,
presumably once you generate a token that way, it has to be used with the appropriate TEMPLATE ID
even when using sketch that came from elsewhere (in this case from examples in the Blynk library)
After another iphone reset. (maybe I changed the SSID after the 1st reset and it required another ??)
with Blynk template commented out the Serial monitor output was ;
23:03:19.294 → [20655] Connecting to blynk-cloud.com:80
23:03:19.900 → [21269] Invalid auth token
23:03:37.282 → [38655] Connecting to blynk-cloud.com:80
23:03:38.118 → [39486] Invalid auth token
When I un-commented the Blynk template line, the serial monitor gave no output, **intill ** I pressed the on-board reset button, then got this serial monitor output below.
I have repeated this several times and I don’t get serial output till I do a manual reset.
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
/* Fill-in your Template ID (only if using Blynk.Cloud) */
#define BLYNK_TEMPLATE_ID "xxxx" //try uncommenting
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxx";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "xxxx";
char pass[] = "xxxxx";
void setup()
{
// Debug console
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
}
void loop()
{
Blynk.run();
}