Arduino BLE HC-08 Module - Connecting... Can't connect. Please retry or choose another device

Hello,
I have an Arduino Mega 2560 board connected to an SH-HC-08 Bluetooth Low Energy Module.
I’m trying connect the module to Blynk through the BLE Widget inside the Blynk app, but it just gets stuck on “Connecting…”, and sometimes displays the message “Connecting… Can’t connect. Please retry or choose another device.”
The devices that I have tried this on: iPhone 7+, Google Nexus 6, and HTC One M8. All 3 have BLE capabilities as far as I know.
I have tried connecting to the SH-HC-08 with AND without pairing it before directly to the phone through the Settings app.

The sketch uploaded to the arduino is blank (just an empty setup and loop), but the Bluetooth module should still connect to the app?!

As a reference, this is the Data Sheet for the SH-HC-08: https://drive.google.com/file/d/0B4urklB65vaCcEVyMm5haVVpMUk/view

What should I do?

Have you confirmed that your module is setup properly for connection with any other BLE app or device?

Have you properly created a project using BLE and passed the auth code onto your sketch?

http://help.blynk.cc/hardware-and-libraries/arduino/bluetooth-20-spp-40-le

No. You still need a proper sketch to make the connection work.

also, you should know that in the past there were some ble / bluetooth issues.

I will try that in a second. Just to make sure the config on my HC-08 module is fine:
Baud rate is 9600 (Module DEFAULT)
There are 3 types that I can choose:
0. Not need PIN Code (Module DEFAULT)

  1. Auth no PIN
  2. Auth with PIN

Is the baud rate okay and does the type influence anything?
I’m assuming they should all work with the iPhone?

Also, from the example, can I use the other Serial Pins on the Arduino Mega?
For example: using pin 19(which is labeled RX1) and pin 18(which is labeled TX1)?

This should be fine.

You can use the hardware serial ports that are on the Mega, but then you need comment out:

// SoftwareSerial SerialBLE(10, 11); // RX, TX

And use:

Serial1.begin(9600);  // Use Mega Hard Serial1 wired appropriately to your serial device.
Blynk.begin(Serial1, auth);

The Arduino Mega has three additional serial ports: Serial1 on pins 19 (RX) and 18 (TX), Serial2 on pins 17 (RX) and 16 (TX), Serial3 on pins 15 (RX) and 14 (TX).

Thank you!
I got it to work.

This is unrelated to the above topic, but how would I be able to still run code even while Blynk is not connected? Right now if I don’t connect it just sits in setup at the line Blynk.begin(SerialBLE, auth); trying to connect and does not keep going

That is normal… Blynk usually requires a connection to server for most WiFi applications, and connection to the phone/app for BT/BLE connection.

There are alternative connection commands, that will allow “unconnected” sketches to keep running… but I don’t know if they work the same for a BT/BLE application.

https://www.arduino.cc/en/Reference/Serial

I have another question. What’s special about pins 10 and 11? I tried to use other pins such as 2 and 3 on the Mega and Blynk fails to connect when using those

All has worked well so far. Thanks for the help

When using SoftwareSerial, the supported pins vary with the Arduino board types.

When using the MEGA, use one of the auxiliary hardware serial options (Serial1, Serial2, Serial3) instead of the Software Serial library, for better reliability.

You should use the latest library version (i.e. v0.6.1). Please do not append new questions to the old topics - create a new one.