When using BLE on boards using the library arduino-BLEPeripheral, the Blynk connection request nearly always fails with the message “Packet too big”.
Following boards are using the library arduino-BLEPeripheral when using Blynk:
- BBC Microbit
- RF Duino BLE
- RedBearLab nRF51822
- and other nRF51822 based boards
- nRF8001 based boards
The main cause of this problem is the size of the receiving buffer, which has only has a maximum size of 20 bytes. Other Blynk implementations of BLE boards however have a receiving buffer of 512 bytes maximum.
I created a pull request https://github.com/blynkkk/blynk-library/pull/463 to solve this issue, and to make the code more in line with other Blynk BLE implementations:
I only tested with Android & BBC Microbit, so I am looking forward to hear results on other setups.
If you can’t wait until a next release of the Arduino library, which hopefully will contain this fix, or in case you want to test it, you can simply replace BlynkBLEPeripheralSerial.h with the following one:
B.T.W. “Packet too big” can also occur in case of packet loss during bad BLE reception quality or when using SoftwareSerial, but this fix is only for the mentioned boards.