I am experimenting with Arduino Mega 2560 and HC-08 BLE module (a clone of HM-10).
My results are:
Never use SoftwareSerial to comunicate with HM-10 because it is the reason of “Packet too big” error
BLE widget on Android app cannot connect. I personally tested Android 8 (Samsung A5 and Xiaomi redmi Note 5), Android 5.0.1 and Android 4.4.2 with no succes. May be HC-08 is not a fully compatible HM-10 device. Do you know if the original HM-10 works like a charm?
iOS app works better but it is not perfect. BLE widget connect to HC-08 but device is not reported online even if communication is established. Data from the app to arduino works. Any communication from arduino to the app doesn’t work. BLYNK_WRITE(vPin) works but virtualWrite() doesn’t update virtual pin on the app.
When the BLE widget will be out of the beta phase?
It works with simple sketch (see below) but it doesn’t works with more complex scketch. Blynk protocol looks the same on debug print. I will add some debug output.
I believe this “ternary operator” is a TRUE FALSE comparison argument…
…But, if I am interpreting this correctly, you appear to be sending many different values from the V0 widget…
EDIT - it actually looks like you are sending lots of other widget commands on different vPins/digital pins (nothing on V0), but nothing in your code matches up to all that? Are you also running direct pin manipulation in some App widgets? I have found it best to never mix direct pin manipulation and virtual pins… one or the other.
As for your V0 example, It needs to be a button or switch with 0/1 not a slider or other range in order for anything to happen with V1
And besides… if you are connected and seeing actions in the debug from App processes (even if not quite what you expect), then your BLE connection is working… so what is the issue?
Sorry for the mistake. The log is not related to the code.
The published code is the easy one that works.
The log is related to a more complex code and a different app. The code is very long to attach here. I am attaching a few lines of code.
The full code is available here https://github.com/alf45tar/Pedalino/tree/master/src/esp
The strange thing is that Arduino is sending the correct values but they are not used by the app.
Sure it can… it is not the App that is the limitation, it is the phone/tablet device. My LG G6 works just fine with BLE and either my Light Blue Bean or an ESP32 and Blynk, but my Nexus 6 does not like the LLB, whereas my old Samsung Note 8 tablet does…
I do not have any BLE module to test on Arduinos through.
Again… I don’t blame the Blynk compatibility entirely. I have four different BLE capable phone/tablets and each has varying results with BLE connections… even when NOT using Blynk
Android still not working but I resolved iOS BLE virtualWrite issue.
My app is using 2 devices: an ESP32 via wifi and an Arduino Mega via HC-08 BLE.
I deleted the second device, changed the remaining one to Arduino MEGA + BLE, relinked all the widgets to virtual PIN and now is working as expected.
Sorry, I haven’t been paying attention so I am a bit lost on your situations status about what works and what doesn’t.
I dusted off my BLE kung-foo and converted a WiFi rover sketch over to BLE, in order to use something that is complex, (and even left in the Arduino WiFi OTA to add to the complexity, and make it easier to convert back to WiFi).
Out of 5 (five) devices total… 3 tablets and 2 phones… all were eventually able to connect and run via BLE, but some did so instantly and others took multiple attempts.
The phone and tablets that do work flawlessly are both newer LG models. So my conclusion remains the same… it is the devices overall internal BLE chipset compatibility more so than Blynk that is the issue.
That said, what I did notice when using multiple android devices is that unless I explicitly disconnect, and sometimes disable BT/BLE, on all other Androids, before trying to connect with a particular android device, then there did seem to be some “pick me, pick me” confusion going on as sometimes most other androids would either say “connecting” or actually say “connected”, when it was really only the one device that was truly connected and working.
I was having the same problem, and I have found a workaround solution to it. In any value display widgets in your app, choose refresh interval to be anytime except “push”. Then, in your code, any virtualWrite should succeed.