Can´t connect with device on android Blynk IoT App

I am also facing the same problem, even manually I am unable to connect to wifi of esp8266 and it shows can’t connect to this network, :frowning:

@rahul_1 I’d suggest that you start a new topic and provide all of the appropriate information rather than hijacking someone else’s topic.

Pete.

2 Likes

I am really sorry about that sir!

Hello, @BlynkAndroidDev .
See bellow part of the log from Android phone.

y4.a.m:1
d9.b.A:2
com.blynk.android.communication.CommunicationService.E:2
com.blynk.android.communication.CommunicationService.onDestroy:2
android.app.ActivityThread.handleStopService:4428
android.app.ActivityThread.access$2000:250
android.app.ActivityThread$H.handleMessage:2016
android.os.Handler.dispatchMessage:106
android.os.Looper.loop:250
android.app.ActivityThread.main:7766
java.lang.reflect.Method.invoke:-2
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run:592
com.android.internal.os.ZygoteInit.main:958
16:19:53 DEBUG WebSocketTransport - stop
16:19:53 INFO WebSocketExecutor - onStateChanged: newState = CLOSING
16:19:53 DEBUG WebSocketExecutor - onBinaryMessage
16:19:53 INFO WebSocketExecutor - onStateChanged: newState = CLOSED
16:19:53 INFO WebSocketExecutor - onDisconnected: clientCloseFrame = WebSocketFrame(FIN=1,RSV1=0,RSV2=0,RSV3=0,Opcode=CLOSE,Length=2,CloseCode=1000,Reason=null), closedByServer = false
16:19:53 WARN WebSocketExecutor - stopThreadPool
java.lang.InterruptedException: null
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2095)
at java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1486)
at e9.c.H(WebSocketExecutor.java:2)
at e9.c.y(WebSocketExecutor.java:2)
at com.neovisionaries.ws.client.r.h(ListenerManager.java:2)
at com.neovisionaries.ws.client.l0.j(WebSocket.java:11)
at com.neovisionaries.ws.client.l0.D(WebSocket.java:1)
at com.neovisionaries.ws.client.l0.B(WebSocket.java:7)
at com.neovisionaries.ws.client.c0.G(ReadingThread.java:1)
at com.neovisionaries.ws.client.c0.b(ReadingThread.java:7)
at com.neovisionaries.ws.client.t0.run(WebSocketThread.java:3)
16:19:53 DEBUG WebSocketExecutor - write end

Thanks

Hi, @BlynkAndroidDev .
Revising the log .txt file i found those lines

16:13:15 DEBUG ProvisioningService - connectByPrefix: prefix=Blynk
16:13:15 DEBUG P.Android10orLaterConnector - connectByPrefix: prefix=Blynk connectivityManager=android.net.ConnectivityManager@ff10a8f
16:13:15 DEBUG WebSocketExecutor - onBinaryMessage
16:13:15 DEBUG CommunicationService.ServerBinder - removeOnServerResponseListener: clazz=EnhancedWiFiProvisioningActivity
16:13:15 DEBUG ProvisioningService - pause
16:13:15 DEBUG P.Android10orLaterConnector - pause

Regarding the app interface, I saw intructions pointig to devide SSID as “Blynk_XXXX”.
Maybe the Android app is waiting for this prefix to recognize device. In Iphone app is different. Does not appear this type of instruction and device connects easily.

Please attach your sketch, also please provide your library version. All devices that boybk app will connect too should start with Blynk, if your hardware has not such said, it means you had wrong set up in sketch,bor wrong library version

Hi.
I revised my code and found the issue at ConfigMode.h.

  const uint64_t chipId = ESP.getEfuseMac();
  uint32_t unique = 0;
  for (int i=0; i<4; i++) {
    unique = BlynkCRC32(&chipId, sizeof(chipId), unique);
  }
  unique &= 0xFFFFF;

  if (withPrefix) {
    snprintf(buff, len, "Blynk %s-%05X", BLYNK_DEVICE_NAME, unique);
  } else {
    snprintf(buff, len, "%s-%05X", BLYNK_DEVICE_NAME, unique);
  }
} 

I had deleted “Blynk” prefix in my code and the Iphone app was running ok.
Seems that in Android must keep the prefix.
I tried here and finally can find the device with Android phone.
I would like to suggest remove this prefix, so we can work just with Device Name.
Thanks.

@BuildInnovation no, we would not remove the prefix - it allows the fastest and easy scan during provisioning on the latest Android and iOs versions.

Still, it seems you have the wrong set-up in your sketch, @vshymanskyy please advise here.

@BuildInnovation please provide you sketch imports/defines part and version of the library you are using.

Ok, @BlynkAndroidDev.
Here is the part of the sketch you asked:

#define BLYNK_HEARTBEAT 30
#define BLYNK_TIMEOUT_MS 10000UL
#define BLYNK_PRINT Serial

#define BLYNK_TEMPLATE_ID "TMPL04st1jNQ"
#define BLYNK_DEVICE_NAME "Level Meter"
#define BLYNK_FIRMWARE_VERSION        "0.2.0" 

#define APP_DEBUG

#include "BlynkEdgent.h"
#include <esp_task_wdt.h>
#include <SoftwareSerial.h>

Library version is 1.0.1.
The only part I changed from the Edgente_Esp32 example in Arduino IDE was the prefix.
Returning with “Blynk” prefix it works for Android app provisioning.
My project is running smoothly now but @vshymanskyy eyes is always welcome.

Thanks again.

1 Like

Thanks, everything looks correct. So the issue’s cause has been the prefix removal.

The prefix is there for a good reason :wink:

But it seems that the iOS app isn’t fussy about the prefix…

Pete.

Thanks, guys.

Starting from Android 10 applications can’t request connection to hardware Wi-Fi in the same way as before, that’s why this prefix is a requirement now as it simplifies the process of Wi-Fi scan (without requesting locations permissions) and of connection to a selected point, both of which are now done on the system side, and not by Blynk app.

We have also an option for manual connection in Android app, but we do not show it straightforward, only when we received a system response that something wen wrong with the scan, or when there has been an issue later (after successful connection to the hardware Wi-Fi). Sometimes with some manufacturers devices there are strange delays before notifying the app that system has not been able to find any Wi-Fi points by the prefix, so this manual scan option is visible later than system ‘nothing found’ alert.

My nodemcu have a wireless adresa like ESP-1234, i dont change nothing from blynk_edgent esp8266 exemple. Can You help me ?

Which blynk library version are you using?

22:50:33.156 → [386] Using default config.
22:50:33.156 →
22:50:33.156 → >[387]
22:50:33.156 → ___ __ __
22:50:33.156 → / _ )/ /_ _____ / /__
22:50:33.156 → / _ / / // / _ / '/
22:50:33.156 → ///, /////
22:50:33.156 → /__/ v1.0.1 on ESP8266
22:50:33.156 →
22:50:33.156 → [391] --------------------------
22:50:33.156 → [394] Product: Panou WIFI irigatie demo
22:50:33.156 → [398] Firmware: 0.1.0 (build Oct 3 2021 22:49:32)
22:50:33.156 → [402] Device: ESP8266 @ 80MHz
22:50:33.156 → [405] MAC: D8:F1:5B:07:5D:9C
22:50:33.156 → [408] Flash: 4096K
22:50:33.203 → [410] ESP core: 3.0.2
22:50:33.203 → [412] ESP SDK: 2.2.2-dev(38a443e)
22:50:33.203 → [415] Boot Ver: 31
22:50:33.203 → [417] Boot Mode:1
22:50:33.203 → [418] FW info: 467920/1626112, MD5:7ffbbdad530fbc51521448d4bd5f3af6
22:50:33.391 → [626] Free mem: 31256
22:50:33.391 → [626] --------------------------
22:50:33.391 → [626] INIT => WAIT_CONFIG
22:50:34.000 → [1234] AP SSID: Blynk Panou WIFI irigatie demo-20467
22:50:34.000 → [1234] AP IP: 192.168.4.1
22:50:34.000 → [1235] AP URL: blynk.setup
22:51:34.115 → [61379] WAIT_CONFIG => CONFIGURING
22:51:52.257 → [79476] CONFIGURING => WAIT_CONFIG
22:51:53.839 → [81074] WAIT_CONFIG => CONFIGURING
22:52:11.862 → [99121] CONFIGURING => WAIT_CONFIG
22:52:13.498 → [100718] WAIT_CONFIG => CONFIGURING
22:52:31.520 → [118756] CONFIGURING => WAIT_CONFIG

[1234] AP SSID: Blynk Panou WIFI irigatie demo-20467 bere looks like it’s ok ssid name , but the real wifi ssid it’s ESP-xxxx(numbel)

@vshymanskyy please check this issue with wrong wifi ssid on esp8266

It’s too long. You need to cut to less than 32 chars. This is ESP issue.

1 Like

Wow great. This was the problem. Thanks !!