BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

BLE connection problems / a question to all blynk users

hi!

i kindly ask anybody on this forum, who has a working and stable system using bluetooth with blynk, to share the details with me (like: exactly what bluetooth module are you using, where did you bought it, what mcu, phone, android version, sketch, etc)

i have problems using blynk with ble (bluetooth low energy 4.0). upt to now, for 2 weeks i try to figure out what could be the problem, discussed with several founder members, tried all kind of things, nothing helped.

  • a lots of times the app can not find the ble module
  • when finds it, sometimes can not connect, or becomes unresponsive (just displays “connecting…” forever)
  • when connects, the data transfer between the arduino and phone is working, but sometimes just after a few seconds it stops receiving any data (although apparently remains connected)
  • if i put the app in background with an working connection, the next time i open it, can not connect, no matter what i try (restart project, restart the app, etc)
  • when i restart the app, the paired ble module always disappears. although the ble widget is still blue (indicating that it is paired), when i click on the widget, the list is empty, no devices are shown)

my system has these specs:

  • arduino nano
  • hm-10 ble module
  • latest blynk lib (v0.4.3)
  • samsung gt-i9300
  • android 4.3
  • latest blynk app (v2.1.0)

on the arduino i run a very basic sketch:

#define BLYNK_USE_DIRECT_CONNECT
#include <BlynkSimpleSerialBLE.h>

char auth[] = "ed479a2617574c84ada0ac76a284ed59";

void setup()
{
  Serial.begin(9600);
  Blynk.begin(Serial, auth);
  
}

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

BLYNK_READ_DEFAULT()
{
  Blynk.virtualWrite(V8, 99);
  Blynk.virtualWrite(V9, millis() / 1000);
  Blynk.virtualWrite(V20, 11111);
}

i also tried:

  • arduino uno
  • motorola xt925 + android 4.4.1
  • hc-08 ble module
  • different blynk app and library version
    the results are the same.

thank you in advance!

Hi @wanek, I’m having the same issue. Could you finally find the solution?

Thanks

Well I know you asked for anyone with a stable system… but apparently that does not exist :wink:

However I will share my recent (a few days ago) tests using the Light Blue Bean; Turns out I was getting almost the exact same issues as you… I thought it was the Bean, but now I think not so much.

I set up the test sketch with the ZeRGBa Widget, a Display Widget for uptime count in seconds and a Slider for controlling a PWM pin.

The Bean was powered by external LiPo battery (not the coin cell).

  • Not always detecting the Bean.
  • Not always connecting, or taking forever (must cancel and keep trying).
  • When connected, I was able to run the ZeRGBa to control the built in RGB OK (really the only thing that did work properly).
  • If I used a slider to control another LED on a PWM pin, it would work if I slowly faded up and down, sometimes, but usually locked up when on full and I had to disconnect and reconnect again.

Usually when that “lockup” happened, after reconnect, the uptime counter would go into overtime, as in microseconds instead of seconds, requiring a power cycle of the Bean as well.

I stopped fiddling with it after that… the fun was lost :disappointed:

Sorry @GunnerTechTools, for LBB we could never get stable result, so it is marked as “soon available” in https://github.com/blynkkk/blynkkk.github.io/blob/master/SupportedHardware.md
It is very hard to get something really solid stable with that amount of hardware we have on the market.
We’re also hoping for the community help in this direction :wink:

@Tokylabs, no, unfortunately i could never find what the problem was. i had some conversations with @BlynkAndroidDev and @vshymanskyy about these issues, but they said that bluetooth devices were working fine on their test. based on the debug log files and other information i sent from my phones they could not identify the problems i had.

this was several months ago, and in the meantime i had to advance with my project, so i had to find another solution for communication. i switched to wemos d1 mini pro, and using wifi.

however, it seems that after all this is not an isolated case, because i talked with other members on the forum, and they reported very similar problems:

and right now also @Tokylabs and @GunnerTechTools experiencing very similar problems…

@wanek I’m curious (having suffered from issues myself). What log files did you send exactly?

@vshymanskyy / @BlynkAndroidDev, et al: I’d love to help, these issues should be trivial to track down - I can get easily my Arduino device to log every piece of BLE communication to the serial monitor. If I could get my phone to log every piece of BLE communication to a logfile it would be simple to check these against each other to pinpoint these issues. Is this possible?

Or even better - some sort of open source / dev access on the app itself? I realise you guys have an IP interest here and a living to make - but honestly solving bugs are a bigger problem than any piracy issues. Heck, I’m more than happy to buy you guys a couple of Adafruit feather boards and send over an old android phone if it means you’ll take a look :stuck_out_tongue:

http://www.argenox.com/bluetooth-low-energy-ble-v4-0-development/library/ultimate-guide-to-debugging-bluetooth-smart-ble-products/

I hope this can clarify how to investigate those issues

1 Like

i also offered this several times for various older android phones, hm10, hc05, hc06, hc08 modules, but never got any reply…

Hi all.

I’ve made additional logging build for BLE issues: https://drive.google.com/open?id=0B9c7bWQmIMfHMTRQZkF1TE1YTWs. If you could try it with your BLE boards and reproduce your bugs - you can send a log file from about screen. Your help would be appreciated.

Thanks

2 Likes

That part I understood, but I didn’t realize it was removed as of last App update… until I just tried to power up my project and experiment with servos and the servo library on the PWM pins, instead of the failed direct pin manipulation. But now it pops up “Unknown Projects Hardware” and I can’t run it :cry:

This darn LBB has “been” :stuck_out_tongue_winking_eye: a disappointment from the beginning… Marketed as multi-platform, but first year only Apple connectivity, now finally Windows but with a lot of hoops.

Then a week ago I discovered that I could finally do ‘something’ with it, even if glitchy, using Blynk… I know it is not official or stable, but can you please bring it back (in the hardware list) perhaps as “Noted as Unstable” option until you get it finalised?? Then perhaps I can also contribute to the additional log tests, if that would help?

2 Likes

hello!

by the time i sold nearly all my different ble / bluetooth modules, because i could not use them :frowning:

currently i have just a adafruit feather and a hc-08 module. eventually i can do some test on those when i will have some free time.

what i wonder, it wouldn’t be better to have some basic “testing” sketches and procedures, and use those for debug? this way everyone could have more or less similar testing environment, with less variables.

for example, to create and share a blynk app, and also a sketch for debug (it should contain various widgets to send and also to receive data). then everyone who willing to test, could use exactly the same setup…

@wanek I solved my problem, thanks a lot for your extensive answer.
In my case, the problem was that I was using Xiaomi as Android device, and i didn’t accepted the GPS permission which is needed to use the BLE widget.
Once is accepted, everything is smoothly connected.

Thanks!

@BlynkAndroidDev Somehow, after installing your latest VLC patch, I got my LBBean back in the devices list :smile: (still shows 2.11.0)

So I am trying it out with virtual pins on everything but the button. So far so good… as long as I don’t try to utilise any PWM pins much higher than around 25% duty cycle… either with PWM or servo library, as that eventually locks up the LBBean. I will have to test if that issue also exists without a Blynk sketch.

Anyhow… my question is, if I install your LOG patch… will I loose my LLB device option again??

Aaa it’s due to several flags that enable support for log, they also enable support for debug hardware boards ) Video build has also log support, so there should be no problems

If there would be some issues - I’ll create a build with support for debug boards

All,

I’ve updated the build due to recent release and also added some additional logging for handling serial Bluetooth issues and connectivity issues. It has much bigger size than the previous one (due to now better video support) - if it is too large you could use another one build (it should be supported by most devices): https://drive.google.com/open?id=0B9c7bWQmIMfHb1l6djdxa1BqdXc

@BlynkAndroidDev Regarding my LLBean test, after leaving it run whilst I sleep, it stayed stable; The only thing I noticed is that battery level and voltage never change, even though they are called every second in the script. Other sensors, RGB LED, button, potentiometer graph, all continued to work without issue.

So anyhow, I had to uninstall Blynk in order to get your LOG patch to install… but upon restarting Blynk… the LLBean was automatically reconnected and continued showing uninterrupted uptime :astonished:

However within a few seconds of adjusting the servo (small servo on separate PSU)… the board locked up, requiring a power cycle. But then it reconnected automatically again!! Wow… many improvements here already!

I am sending the log files with ref to this post.

1 Like

Are you using Light Blue Bean or Light Blue Bean+? In our test, only first one were stable in work.

And thanks for the log, I will check it for the cause of interrupted connection

The original LLB… after their extremely long delay in supporting Android and Windows (despite marketing as Multi-Platform), I doubt I will invest in another from them.

@vshymanskyy So now that I have LBB back in the hardware options, what (if anything) can I do to assist Blynk with, as far as stability/functionality troubleshooting with it and other Bluetooth and BLE devices?

Aside from the LBB, I also have an UNO setup with a JY-MCU (HC-06?) module that I am testing with. I even have a gomcu HC-05… yep, all the latest gear - circa 2012 :stuck_out_tongue_winking_eye: