blynkkk / blynk-library

Blynk library for IoT boards. Works with Arduino, ESP32, ESP8266, Raspberry Pi, Particle, ARM Mbed, etc.
https://blynk.io
MIT License
3.81k stars 1.38k forks source link

Arduino Nano 33 BLE won't pair via BLE #593

Closed maxgerhardt closed 7 months ago

maxgerhardt commented 8 months ago

Blynk library version: 1.3.2 IDE:Arduino IDE IDE version: 1.8.19 Board type: Arduino Nano 33 BLE Additional modules: None

Scenario, steps to reproduce

What I'm trying to achieve: Connect the board via BLE to the Blynk app on an iPhone.

  1. Flash the Arduino Nano 33 BLE with the following sketch, of course authentication tokens replaced with one gotten from "New Device". (sketch adapted from here)
#define BLYNK_PRINT Serial // Enables Serial Monitor
#define BLYNK_PRINT Serial
#define BLYNK_DEBUG
/* Fill in information from Blynk Device Info here */
#define BLYNK_TEMPLATE_ID "TMPL2-vWld9hg"
#define BLYNK_TEMPLATE_NAME "nano ble33"
#define BLYNK_AUTH_TOKEN "---secret removed ---"

#include <BlynkSimpleArduinoNanoBLE.h>

void setup()
{
  // See the connection status in Serial Monitor
 Serial.begin(9600);
delay(3000);
BLE.setAppearance(0x0080);
  // Here your Arduino connects to the Blynk Cloud.
  Blynk.begin(BLYNK_AUTH_TOKEN,"Blynk");
}

void loop()
{
 BLEDevice central = BLE.central();

  if (central) {    // If BLE is connected...
    Blynk.run();
    BLE.poll();
  }
}
  1. Open the serial monitor and see startup
    17:25:13.195 -> [3006] 
    17:25:13.195 ->     ___  __          __
    17:25:13.195 ->    / _ )/ /_ _____  / /__
    17:25:13.195 ->   / _  / / // / _ \/  '_/
    17:25:13.195 ->  /____/_/\_, /_//_/_/\_\
    17:25:13.195 ->         /___/ v1.3.2 on MBED
    17:25:13.195 -> 
    17:25:13.195 ->  #StandWithUkraine    https://bit.ly/swua
    17:25:13.195 -> 
    17:25:13.195 -> 
  2. Have an iPhone 13 running iOS 17.1
  3. Install the Blynk app on it
  4. "Add new device" -> "Find devices nearby"

Expected Result

Successfull bluetooth connection between the Blynk app on the iPhone and the board.

Actual Result

No devices are found in the Blynk app.

grafik

However, other Bluetooth apps do see the device!

grafik

vshymanskyy commented 7 months ago

Sorry for the confusion, direct BLE interaction with the device was deprecated and removed in Blynk 2.0. We may add this feature again in future