Buffer overflow error only in iphone

I’m using iphone 5s. I connect esp8266 module to arduino mega board as exactly on blynk tutorial and used sample code “LED Blink” in Blynk example browser. but when i run it, everything fine untill esp8266 connect to my personel hotspot. after that " Buffer overflow " appeared in serial monitor my phone indicated that device is offline. But everythink work fine in android devices.

  /*************************************************************
  Download latest Blynk library here:
   

  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.

    

  Blynk library is licensed under MIT license
  This example code is in public domain.

 *************************************************************
  WARNING!
    It's very tricky to get it working. Please read this article:
    

  Blynk using a LED widget on your phone!

  App project setup:
    LED widget on V1
 *************************************************************/

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial


#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "04ff75de571e4a11832fe65c9a98f195"/*"cffec781a9754881835c45beb9429996"*/;

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Emperor_Rukz"/*"J7 Pro"*/;
char pass[] = "sachin27290"/*"12345678"*/;

// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial1

// or Software Serial on Uno, Nano...
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200

ESP8266 wifi(&EspSerial);

WidgetLED led1(V1);

BlynkTimer timer;

// V1 LED Widget is blinking
void blinkLedWidget()
{
  if (led1.getValue()) {
    led1.off();
    Serial.println("LED on V1: off");
  } else {
    led1.on();
    Serial.println("LED on V1: on");
  }
}

void setup()
{
  // Debug console
  Serial.begin(9600);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);

  Blynk.begin(auth, wifi, ssid, pass);
  

  timer.setInterval(1000L, blinkLedWidget);
}

void loop()
{
  Blynk.run();
  timer.run();
}

You didn’t format your posted code as requested…

Blynk - FTFC

If it works on Android but not on iOS, then double check that your iOS app is up to date… possibly even remove and reinstall it.

Also, what exact widgets are you running? Are any using digital/analog pins and/or are set in reading rate mode?

Are both phones using the same carrier?
It’s possible that the carrier for the SIM in your iPhone is blocking some ports when you use it as a hotspot.

Pete.

1 Like

i set virtual pin “v1” as in the screenshot. app is up to date and re installed it. I also tried servo sample code , but same result.

not same carrier

Can you swap the SIM cards and try again?

Pete.

When I connect iphone and esp8266 to my router, it works fine. but not work when connect direct to iphone’s personel hotspot

As I said, the provider for the SIM card you’re using is probably blocking some ports.

But, you could always send me your iPhone and I’ll take a look at it! :rofl::rofl::rofl:

Pete.

1 Like

can u provide me a sketch for esp8266 module using as a hotspot customizing above code please?
i need my phone connect to esp8266, not to esp8266 connect my phone

There is no special code that will change how your cell phone and/or carrier supports ports or bandwidth usage… your issue is not the code.

Sounds like the overflow is from both the App and device using the same cellular data stream to communicate back and forth to the cloud server… either that iPhone just can’t keep up with the data flow or your carrier limits the bandwidth. Stop using that particular phone as the hotspot for the ESP and stick with the router or Android.

I want to my phone connect esp8266 module wifi hotspot (ESP8266 as master) to control a servo using slide widget. please tell me how to code and connect wires for it

Please don’t create multiple topics for same scenario.

Also, we try to help you learn about Blynk and IoT, not write your code or teach programming.

Search this forum for slider/servo code and start experimenting…