Blynk won't connect through Bluetooth (even tho everything seems fine)

• Arduino UNO with Bluetooth module (HC-05)
• Android 7.1.1
• Blynk server or local server: ?
• Blynk Library version: 0.6.1


// You could use a spare Hardware Serial on boards that have it (like Mega)
#include <SoftwareSerial.h>
SoftwareSerial DebugSerial(10, 11); // RX, TX

#define BLYNK_PRINT DebugSerial
#include <BlynkSimpleSerialBLE.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "4280c43cd6fc41ae880042010b38d0d9";

void setup()
{
  // Debug console
  DebugSerial.begin(9600);

  DebugSerial.println("Waiting for connections...");

  // Blynk will work through Serial
  // 9600 is for HC-06. For HC-05 default speed is 38400
  // Do not read or write this serial manually in your sketch
  Serial.begin(38400);
  Blynk.begin(Serial, auth);
}

void loop()
{
  Blynk.run();
}

Ok, I know this has been asked to death but I can’t seem to find the issue with my BT module and I don’t see this particular problem anywhere. When I try running the example shown above that came with the Blynk library, nothing happens. Literally. Nothing shows up in the serial monitor (with the Baud at 9600), not even a ‘‘waiting for connection’’. The Blynk app just says: '‘wasn’t online yet’. The BT module blinks with at 2 Hz showing a successful connection and yet nothing happens. The ARDUINO is working correctly, I’ve entered to the AT Command mode multiple times to check the status of the module and to my knowledge everything seems fine. I seriously don’t know what to do. Any ideas?

The connections are the following:
Vcc> 5 V
GND>Ground
Tx>PWM 10
Rx> PWM 11

If you’ve read this far, at least, thanks for that. Makes me feel less alone in this.

You have your BT module connected to DebugSerial, but then attempt connection to Blynk via the Serial link.

Basically backwards :wink:

The particular problem where you are using your links backwards, or the particular problem where you are not double checking your… well, everything… before asking… :smiley: We see that 2nd issue (and statement) all the time here :stuck_out_tongue_winking_eye:

You are never alone here… there is always someone to critique something :blush:

PS, don’t forget to correct this one as well… as printing across the communication link (once you fix it) will cause issues

Thanks for the fast reply. To be honest, I’m a complete novice and I thought that since the code was a library example everything was set up correctly. And the guy in this video didn’t change anything either: https://www.youtube.com/watch?v=SAX60zOwQyw

As I said, I’m a total noob, if it’s within the limit of your patience, could you edit the code I sent with your recommendations and post it?

Not always… there are way too many hardware combinations to do that properly all the time, so there are lots of commented alternatives and a fair degree of coding competency required… The developers even have a note of such potential issue in the pages…

image

Beside… this is the “official” example for UNO and HC-05… very different from your posting.

/*************************************************************
  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
    Follow us:                  http://www.fb.com/blynkapp
                                http://twitter.com/blynk_app

  Blynk library is licensed under MIT license
  This example code is in public domain.

 *************************************************************
  Note: This only works on Android!
        iOS does not support Bluetooth 2.0 Serial Port Profile
        You may need to pair the module with your smartphone
        via Bluetooth settings. Default pairing password is 1234

  Feel free to apply it to any other example. It's simple!

  NOTE: Bluetooth support is in beta!

  You’ll need:
   - Blynk App (download from AppStore or Google Play)
   - Arduino Uno board
   - Decide how to connect to Blynk
     (USB, Ethernet, Wi-Fi, Bluetooth, ...)

  There is a bunch of great example sketches included to show you how to get
  started. Think of them as LEGO bricks  and combine them as you wish.
  For example, take the Ethernet Shield sketch and combine it with the
  Servo example, or choose a USB sketch and add a code from SendData
  example.
 *************************************************************/

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial


#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11); // RX, TX
    
#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";

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

void setup()
{
  // Debug console
  Serial.begin(9600);

  SerialBLE.begin(9600);
  Blynk.begin(SerialBLE, auth);

  Serial.println("Waiting for connections...");
}

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}