BLYNK_READ will fail on Android 1.15.3

The last few days I was working on my hardware and wanted to try my old code now on a new RFduino PCB (this is a BLE project). Starting with my Huawei P9 lite on Android 6.0 with Blynk 1.15.3 only the direct virtualWrite’s work. The BLYNK_READ functions are not called.

I delete the project and started with a new one (only a LED and a few displays) - without luck. The counter is polled within a READ but is not triggered:

BLYNK_READ(V10) {
  Blynk.virtualWrite(V10, IOcount);
  Serial.println(IOcount++);
  Serial.print("UptimeCounter, "); Serial.println(state);
}

Then I logged out on the Android device and launched the project on my iPad. With Blynk iOS 2.5.5 everything is working as expected and the READs are now working.

Is there a bug in 1.15.3 regarding BLYNK_READ?

THX odyssey

Hello. What widget do you use to trigger V10?

Hello Dmitriy, I used value display widgets. V10 (Uptime) is type M and the others are type S. The uptime counter should be called in 1sec an interval and the others are 5sec and more.

Hope that helps?

Could you please post here those widget settings?

Here are screenshots from the project and from the settings. In the original version I also used the gauge widget.

did you try it set frequency to “push” not 1 sec?

Thanks for the suggestion! I tried it, without avail. But PUSH won’t trigger a READ or I am wrong?

Pushing data is done simply with:

Blynk.virtualWrite(Vx, pushed_data);

Yes and these “pushed” data is showing up in the app. BUT when I try to get a trigger from the app with a BLYNK_READ it is currently only working with iOS - that’s the problem. I do not want to configure a flexible readout time in my code, because Blynk has the READ feature and I can set up and alter my polling interval.

@odyssey I think that’s because you have a case of mistaken identity.

READ is not what you think, try WRITE.

Blynk coders wrote the functions from the servers point of view rather than the ESP’s.

Sorry Costas, I know! Please understand that my code is working, but now only on my iPad and no more on my android mobile. I am no novice to Blynk.

So I want to get the app doing a trigger to get the data and this is done with BLYNK_READ from the server perspective and within the app I set the interval for that poll.

The code was working fine and for three weeks I concentrated on the hardware and did App-Updates without verifying. Now it is not working anymore.

BTW this is my project: Development of a BLE-Dongle to monitor my Smart electric drive EV with all the properties I hacked from the CAN-Bus - now with a RFduino:

@odyssey just to be sure I have this right, you want data from the server to the app or from the “ESP” to the app?

@odyssey just checked my Android and all looks fine.

BLYNK_READ(V10) {
  Blynk.virtualWrite(V10, millis() / 1000 );
} 

V10 small Value display with 1 sec frequency. Are you saying this isn’t working for you?

@Costas: exactly this is not working for me!

@Dmitriy: I will try to reinstall the app (was updated), but here are the DEBUG outputs in the meantime:

Android 1.15.3:

[48] Blynk v0.3.9 on Arduino
Waiting for connections...
[8310] Device connected
[9710] >[02|00|01|00] 
[9760] >f6c38699494b448bbbe30f710f5b3c55
[9761] Ready
[9761] <[00|00|01|00|C8]
[9780] <[11|00|01|00]Vver[00]0.3.9[00]h-bea
[9827] <t[00]10[00]buff-in[00]256[00]dev
[9871] <[00]Arduino[00]con[00]RFduino
[9912] <BLE[00]build[00]Sep 30 201
[9949] <6 18:28:05[00]
[10060] >[00|00|01|00|C8]
[19975] <[06|00|02|00|00]
[20060] >[00|00|02|00|C8]
[29976] <[06|00|03|00|00]
[30110] >[00|00|03|00|C8]
[39977] <[06|00|04|00|00]
[40060] >[00|00|04|00|C8]
[49978] <[06|00|05|00|00]
[50059] >[00|00|05|00|C8]
[59979] <[06|00|06|00|00]
[60059] >[00|00|06|00|C8]
[69980] <[06|00|07|00|00]
[70059] >[00|00|07|00|C8]
[77208] Device disconnected
[77209] Disconnected

On iOS (2.5.5) - working:

[48] Blynk v0.3.9 on Arduino
Waiting for connections...
[7092] Device connected
[7754] >[02|00|01|00] 
[7754] >f6c38699494b448bbbe30f710f5b3c55
[7757] Ready
[7772] <[00|00|01|00|C8]
[7799] <[11|00|01|00]Vver[00]0.3.9[00]h-bea
[7845] <t[00]10[00]buff-in[00]256[00]dev
[7889] <[00]Arduino[00]con[00]RFduino
[7929] <BLE[00]build[00]Sep 30 201
[7966] <6 18:28:05[00]
[14533] >[14|18]q[00|05]
[14533] >vr[00]11
[14563] >[14]v[F8|00|05]
[14563] >vr[00]10
[14563] <[14]v[F8|00|07]vw[00]10[00]0
0
UptimeCounter, 0
[14623] >[14]EG[00|04]
[14648] >vr[00]1
[14667] <[14]EG[00|0A]vw[00]1[00]0.000
[14708] <[14]EG[00|0A]vw[00]2[00]0.000
[14749] >[14|03]![00|04]
[14776] >vr[00]9
[14795] >[14]}[A8|00|04]
[14822] >vr[00]3
[14840] <[14]}[A8|00|0A]vw[00]3[00]0.000
[14884] <[14]}[A8|00|0D]vw[00]4[00]-300.000
[14930] <[14]}[A8|00|06]vw[00]5[00]0
[14970] >[14]H*[00|05]
[14995] >vr[00]11
[15103] >[14]4[1F|00|05]
[15103] >vr[00]10
[15103] <[14]4[1F|00|07]vw[00]10[00]1
1

Please have a look - THX :wink:

@odyssey nice looking project.

Just put V10 into a standalone sketch and then you can confirm, or otherwise, that there is no problem with BLYNK_READ() for Android.

@Costas: I followed your advice and made this simple sketch for testing and created a new project. Still no avail :frowning: It is only working on iOS and not on Android. I also tested on another RFduino module - no luck. The counter is only working on my iPad…

#define BLYNK_DEBUG
#define BLYNK_PRINT Serial

#include <BlynkSimpleRFduinoBLE.h>
#include <RFduinoBLE.h>

unsigned long IOcount = 0;

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

void setup() {
  Serial.begin(9600);

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

}

void connectRFDuino () {
  RFduinoBLE.deviceName = "RFDuino2";
  RFduinoBLE.advertisementInterval = MILLISECONDS(300);
  RFduinoBLE.txPowerLevel = 0;  // (-20dbM to +4 dBm)

  // start the BLE stack
  RFduinoBLE.begin();

  Blynk.begin(auth);
}

BLYNK_READ(V10) {
  Blynk.virtualWrite(V10, IOcount);
  Serial.print(IOcount++);
  Serial.println(", UptimeCounter event");
}


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

I am guessing all your problems relate to the experimental Bluetooth stuff which I have no knowledge of.

BLYNK_READ() for Android per se is fine.

@Dmitriy: Please advise! Can I test something further? The code was working for the last month, but now with 1.15.3 stopped to work. Can I downgrade to 1.15.2 for testing?

@Costas: Thank you for your support so far. It seems to be BLE related - very frustrating as I specially made the PCB for the project - before I had no luck with the Arduino 101 and the RFduino is normally very stable…

Best regards odyssey

I tested now with a completely new account and the simple sketch on an BLE nano (a borad that is on the boards-list in the app) but still the same! iOS working directly and on my Android no READ triggered.

Please, can someone from the Blynk-team give advice?

Kind regards
odyssey

@odyssey we are checking this.