Packets too big causes Login timeout?

Running the following sketch on Arduino Uno
DSD Tech HM-10 BLE module
Apple 10 Xr, IOS 13.6.1
why does the connection timeout?
the BLE widget remains connected to the HM-10
sketch and serial monitor below


//************LiveWIRE Temperature*************************************************
 
//
#include <SimpleTimer.h>
#define BLYNK_PRINT Serial
#include <SoftwareSerial.h>
#include <BlynkSimpleSerialBLE.h>
//SoftwareSerial SwSerial(11,12); // RX, TX

// Auth Token in the Blynk App.

char auth[] = "xxx";

SimpleTimer timer;

SoftwareSerial SerialBLE(11,12); //Rx Tx

//TEMPERATURE
// First we include the libraries
#include <OneWire.h> 
#include <DallasTemperature.h>

// Data wire is plugged into pin 2 on the Arduino 
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices   
OneWire oneWire(ONE_WIRE_BUS); 

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

int tempC;
int tempF;

void setup()
{
  sensors.begin(); 
  Serial.begin(9600);
  SerialBLE.begin(9600);
  Blynk.begin(SerialBLE, auth);

while (Blynk.connect() == false) {
    //Wait until connected
  }
  
   
  sensors.setResolution(10);
  timer.setInterval(3000L, sensor); 
}

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

void sensor()
{
  sensors.requestTemperatures();
  tempC = sensors.getTempCByIndex(0);
  tempF = sensors.getTempFByIndex(0);
  Serial.println(tempF);
  Blynk.virtualWrite(V5, tempF);
  Blynk.virtualWrite(V6, tempC);
}
[83timeout
[46] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.6.1 on Arduino Uno

[136] Connecting...
[3277] Login timeout
[5277] Connecting...
[8397] Login timeout
[10397] Connecting...
[10517] Ready
[15517] Connecting...
[15636] Ready (ping: 0ms).
79
79
79
79
79
79
(deleted data)
85
85
85
85
85
85
85
84
84
84
84
84
84
84
84
84
84
[325067] Packet too big: 12288
[325193] Packet too big: 16130
[325199] Connecting...
[325342] Packet too big: 5213
[325347] Packet too big: 30322
84
[330322] Connecting...
[330442] Packet too big: 40448
83
83
[335442] Connecting...
[335561] Packet too big: 64256
83
83
[340562] Connecting...
83
[343682] Login timeout
83
[345878] Connecting...
83
[348999] Login timeout
[350999] Connecting...
83
[354119] Login timeout
83
[356119] Connecting...
83
[359239] Login timeout
83
[361239] Connecting...
83
[366360] Connecting...
82
[369480] Login timeout
82
[371480] Connecting...
82
[374600] Login timeout
82

Does your phone have a reliable internet connection?

Pete.

Yes, I used my home wifi and also tried just the cell connection

Any other suggestions Pete? Thx

Maybe sign-up for the iOS beta version of Blynk, which requires you to download TestFlight.
I assume that you are using the 0.6.1 Blynk library?

Pete.

Yes, Blynk 6.1

What is the difference between the Blynk timer and the simple timer.

Is ‘packets too big’ mean too much data? I’m only sending a couple temperature channels every 3sec

BlynkTimer is an improved version of SimpleTimer. You should use BlynkTimer.

I think it must means that there is a communication issue, with the size of the data packet being different from what was expected.

Pete.

Ok! Thanks Pete. I appreciate your attention

Pete, I added the debug command and here is the complete sequence where it fails with ‘packets too big’, invalid header type, can’t read body…

lower down is the more complete debug output

any thoughts?

72
[1642193] >[14]b([00|04]
[1642194] >vr[00]1
[1642194] >[14]8K[00|04]
[1642206] >vr[00]5
[1642227] >[14]3[87|00|04]
[1642256] >vr[00]5
[1642276] >[14|0C|F0|00|04]
[1642307] >vr[00]7
[1642328] >[14|08|AB|00|02]
[1642358] >vr
[1644103] >[00]9[14|0C]U
[1644108] >[00|04]vr[00]
[1644114] >1[14]p[F5|00]
[1644120] Packet too big: 62720
[1644152] >[04]vr[00]5
[1646108] >[14]][0A|00|04]vr[00]5[14]c#[00|04]vr[00]7[14]J[01|00|04]vr[00]9[14]Q[9F|00|04]vr[00]1[14]w)[00|04]vr[00]5[14]n[18|00|04]vr[00]
[1646188] Invalid header type: 4
[1646223] >5[14]>c[00]
[1646247] Packet too big: 25344
[1646282] >[04]vr[00]7
[1649306] Can’t read body
[1649306] <[14|12|FE|00|07]vw[00]5[00]72
-196
-196
[1649421] Connecting…
[1649422] <[1D|00|01|00] jo-CmOxau_rzOY7
[1649490] <W4NV9OVCzbRnERu7C
72

[1640180] >[14] [FB|00|04]
[1640180] >vr[00]1
[1640181] >[14|1F]G[00|04]
[1640197] >vr[00]5
[1640217] >[14]dF[00|04]
[1640244] >vr[00]5
[1640265] >[14]_}[00|04]
[1640292] >vr[00]7
[1640312] >[14|1B|0D|00|04]
[1640343] >vr[00]9
[1640364] <[14|12|F8|00|07]vw[00]5[00]72
[1640526] <[14|12|F9|00|07]vw[00]6[00]22
-196
[1640647] <[14|12|FA|00|09]vw[00]7[00]-196
[1640769] <[14|12|FB|00|09]vw[00]8[00]-127
-196
[1640891] <[14|12|FC|00|09]vw[00]9[00]-196
[1641013] <[14|12|FD|00|0A]vw[00]10[00]-127
72
[1642193] >[14]b([00|04]
[1642194] >vr[00]1
[1642194] >[14]8K[00|04]
[1642206] >vr[00]5
[1642227] >[14]3[87|00|04]
[1642256] >vr[00]5
[1642276] >[14|0C|F0|00|04]
[1642307] >vr[00]7
[1642328] >[14|08|AB|00|02]
[1642358] >vr
[1644103] >[00]9[14|0C]U
[1644108] >[00|04]vr[00]
[1644114] >1[14]p[F5|00]
[1644120] Packet too big: 62720
[1644152] >[04]vr[00]5
[1646108] >[14]][0A|00|04]vr[00]5[14]c#[00|04]vr[00]7[14]J[01|00|04]vr[00]9[14]Q[9F|00|04]vr[00]1[14]w)[00|04]vr[00]5[14]n[18|00|04]vr[00]
[1646188] Invalid header type: 4
[1646223] >5[14]>c[00]
[1646247] Packet too big: 25344
[1646282] >[04]vr[00]7
[1649306] Can't read body
[1649306] <[14|12|FE|00|07]vw[00]5[00]72
-196
-196
[1649421] Connecting...
[1649422] <[1D|00|01|00] jo-CmOxau_rzOY7
[1649490] <W4NV9OVCzbRnERu7C
72
-196
-196
72
-196
-196
[1650238] >[14]:[CF|00|04]
[1650239] >vr[00]1
[1650239] >[14|02]r[00|04]
[1650256] >vr[00]5
[1650277] >[14]l[D7|00|04]
[1650306] >vr[00]5
[1650327] >[14]{[E6|00|04]
[1650356] >vr[00]7
[1650376] >[14]S[15|00|04]
[1650406] >vr[00]9
72
-196
-196
[1652239] >[14]'[D1|00|04]
[1652240] >vr[00]1
[1652241] >[14]kh[00|04]
[1652255] >vr[00]5
[1652277] >[14]<[D0|00|04]
[1652305] >vr[00]5
[1652326] >[14|02]e[00|04]
[1652356] >vr[00]7
[1652376] >[14|05|AE|00|04]
[1652406] >vr[00]9
[1652550] Login timeout
72
-196
-196
[1654550] Connecting...
[1654550] <[1D|00|01|00] jo-CmOxau_rzOY7
[1654612] <W4NV9OVCzbRnERu7C
[1654672] >[14]p[1F|00|04]
[1654672] >vr[00]1
[1654673] >[14]x[9F|00|04]
[1654684] >vr[00]5
[1654705] >[14]i[07|00|04]
[1654734] >vr[00]5
[1654755] >[14]7[E1|00|04]
[1654784] >vr[00]7
[1654805] >[14|05]{[00|04]
[1654834] >vr[00]9
72
-196
-196
[1656239] >[14|1E|9C|00|04]
[1656240] >vr[00]1
[1656240] >[14]-[DC|00|04]
[1656258] >vr[00]5
[1656279] >[14|10]![00|04]
[1656307] >vr[00]5
[1656329] >[14]'[C9|00|04]
[1656357] >vr[00]7
[1656378] >[14]bi[00|04]
[1656406] >vr[00]9
[1657673] Login timeout

Have you tried the iOS Beta app?

Pete.

no, i would have to install over my current Blynk app. Will I have to rebuild my project from scratch?

It’s very simple. You just run the Beta version of the app and if you want to go back to the current release you can.
No need to make any changes to your project.

You can even run the same project in Beta on one device and in the current release on another (although I wouldn’t recommend it!)

Pete.

i’ll try it… I just changed to Blynk 5.4 lib and now when there is a connection error it will reconnect and keep working

72
[40788] Connecting…
-196
-196
[42668] Packet too big: 51220
[42673] Packet too big: 1142
[42679] Packet too big: 5137
[42696] Packet too big: 30322
[42728] Packet too big: 17920
72
-196
-196
[46031] Connecting…
[46171] Ready (ping: 20ms).
72
-196
-196