Hi Pavel,
Hi all,
I still have problems to get the ESP32 working with a direct BLE connection (on IOS).
I suggest it is cause by the BLYNK IOS APP (2.12.0 (1)).
No ESP32 BLE device (with a running “ESP32_BLE.ino” is being found in the IOS APP. )
If I connect via an other BLE App (on IOS) the Arduino Serial Monitor is displaying a connection.
Waiting for connections...
[20]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ v0.5.1 on Arduino
[9142] BLE connect
[27741] BLE disconnect
[27741] Disconnected
May you find some time to debug this ?
Thank you very very much!
Andreas
/*************************************************************
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
Social networks: 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 shows how to use ESP32 BLE
to connect your project to Blynk.
Warning: Bluetooth support is in beta!
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#define BLYNK_USE_DIRECT_CONNECT
#include <BlynkSimpleEsp32_BLE.h>
#include <BLEDevice.h>
#include <BLEServer.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "myBlynkAuthCode";
void setup()
{
// Debug console
Serial.begin(115200);
Serial.println("Waiting for connections...");
Blynk.begin(auth);
}
void loop()
{
Blynk.run();
}
But I was trying to figure it out. And found a superstrage behavior:
If I Clone in the Blynk Peripheral in the LightBlue Explorer BLE App as an Virtual Peripheral,
This cloned device will show in the Blynks BLE Device chooser on Blynks IOS APP.
If I compile it on ESP32 it will not show up in Blynks BLE chooser in the APP
If I clone this “UART Service” in the LightBlue Explorer BLE App, the Name of my iPhone will appear in the BLE device chooser in the Blynk App!
So either the ESP BLE advertising is not Okay, or the BLE chooser in the IOS App has is buggy.
Maybe this is a hint to further debug and find a solution…
This cloned virtual BLE Device will show up in the Blynks BLE device manager.
iOS Blynk app works fine with ESP32 BLE in upcoming 2.19.0 update. (Unfortunately we’re facing delays with publishing to App Store. Sorry for inconveniences).