tl;dr: I can make LED’s on my BLE-connected device blink when using the blynk iOS app, but when the state change is initiated by the RESTful API, the iOS app updates but the device does not.
Using an Adafruit Bluefruit nRF52 Feather board with the demo Blynk sketch loaded on.
I created a simple Blynk app on iOS with just the bluetooth/BLE widget and two button widgets for D17 and D19 (these connect to the LEDs on the Feather – easy visual indicator).
The Blynk app connects to the Feather marvelously. I can tap the buttons on my phone and the LEDs on the Feather turn on and off. Beautifully easy.
Now lets up the stakes a bit. I use the REST API to change D17 and D19 using my computer. On my phone I see the button states update – the phone app is syncing with the Blynk cloud successfully. However, there’s no change on the Feather’s LEDs.
I can go back to tapping the buttons on the phone and the device LEDs update according to what’s on the phone so that state change still works, but the state change doesn’t make it through to the device if it comes in through the RESTful API.
I should add that on the blynk app, I have my device set as Device:
Generic Board and Connection Type:
Probably not supported on BT/BLE… use WiFi instead as the MCU device needs internet access.
Specifically was hoping to use BLE because trying to do an internet-enabled wearable… my cellphone always has internet, the environment I’m wearing it in might not have WiFi. So WiFi is not an option for me – trying to use BLE to treat my cellphone as internet access for my arduino.
Either way, sounds like this is an BLE issue/bug… the REST API updates my phone, and my phone updates the MCU over BLE. However, going all the way through doesn’t work.
I read that BLE is still beta, especially on ios. Can we change the thread’s label back to Issues and Errors since this appears to require a BLE bugfix?
No… as it is not a bug. To the best of my knowledge, REST API requires internet on the device.
Look, I’m not going to get into a fight with the mods about what is a bug and what is expected behavior, but here’s some constructive user feedback…
I’m new to Blynk. Looks like an awesome project because it trying to be the easiest way to sync state across embedded, mobile, and cloud. This thread is a case where 1) state syncs between cloud and mobile; 2) state syncs between mobile and embedded; but 3) state diverges and fails to sync between cloud and embedded.
To me that sounds like a bug w.r.t. the goals that Blynk is trying to be, so this is the bug report. /shrug.
Is there another widget/way I can send data cloud --> mobile --> embedded via BLE? The webhook widget perhaps?
And yet you try
This is not a fight on my end… you brought up an issue, I supplied an answer… sorry you didn’t like my answer, but BT/BLE do NOT use internet/network connection to the Blynk Server… and many Widgets and functions (i.e. Webhook - as it’s name implies) that REQUIRE internet, will not work when using BT/BLE. Not sure how to be clearer on that issue.
As for whether the developers get around to changing that behaviour, or not… well you are not the first to inquire… and we are not privy to their timetable. As for topic status, the Developers read them all, regardless of color or label. So either switch to a WiFi/GSM based connection option on your device, or await a drastic change in the BT/BLE operation.
Sorry if this thread got contentious – didn’t mean it to. Appreciate you helping out, really do. These are the joys and misunderstandings of being on the bleeding edge. : )
Seems like my confusion arises from a different mental model of how Blynk BLE support works. I was assuming Blynk acts as a full end-to-end state sync, but it seems like BLE is something far simpler and only passes actions to the device it’s directly connected with.
Googlebots: I found this thread that provides more context on how webhook works and why it doesn’t on BLE.
So it sounds like there’s simply no way to provide internet connectivity to a BLE Blynk MCU.
If the devs read this, +1 to improving BLE support. Huge opportunity to make really cheap internet-connected MCU’s by leveraging people’s cell phones. And doesn’t seem like it would be that hard (again, cloud syncs with mobile, and mobile syncs with embedded via BLE… why not have the mobile device act as an internet-connected state relay?)
NOT a knock against you in particular but I see many similar suggestions all too often… Apparently being a software developer is a piece of cake… according to the many users who say it is “easy” for developers to make things the way they (the users) want… but they (the users) seem unwilling/unable to contribute to this “easy” coding effort
ESP based MCUs are just as cheap as a BT/BLE… even more so, considering they don’t need to interface to another MCU for I/O.
@floatrock Thanks for the feedback. At the moment BLE communication is indeed not synced to/from server. (Though server access is still required).
At the moment no timing of when BLE will be improved. It really depends on our business customers and their needs.