Blynk ESP32 via BLE - not working with IOS Blynk APP V2.12.0 - ESP32 device not found

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();
}

Hi @Janosch

ESP32 BLE is currently in beta, there is a topic with a sketch example for it from @vshymanskyy: [BETA] ESP32 BLE initial support

I used exactly this script - it is not connecting to the current IOS App.
(It seems to be connecting to the Blynk APP for Android users)

As Volodymyr is writing "_I tested it with Android only. iOS may work better, or fail completely! :slight_smile:" . Unfortunately the latter is the case.

I would kindly ask the Blynk IOS App team to confirm and fix this bug.

Thanx,

Can you define

#define BLYNK_DEBUG

and show the output?

Nothing additional will be shown.

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.

The same behavior happens if I use Neil Kolbans BLE UART Script
–> https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLETests/Arduino/BLE_uart/BLE_uart.ino

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.

1 Like

Hi

I’m also seeing the same problem on an M5stack / ESP32. Would it help if I submit logs also ?

In BlynkSimpleEsp32_BLE.h, there is

// Start advertising
pServer->getAdvertising()->start();

Shouldn’t that be

// Start advertising
BLEAdvertising *advertising = pServer->getAdvertising();
BLEAdvertisementData advertisingData;
advertisingData.setPartialServices(BLEUUID(SERVICE_UUID));
advertising->setAdvertisementData(advertisingData);
advertising->start();

Thanks for suggesting. We’ve fixed advertising with correct UUID: https://github.com/blynkkk/blynk-library/commit/f51f8106ae35acfddd6a782debf22579625ed397

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).

Fantastic news, I’ve been patiently awaiting an update. Anyway to register for a beta build so we can get the latest update without waiting ?

PM me your Apple ID

Hi Eugene,

Thanks PM sent.

Alan