3geE
July 27, 2022, 6:39am
1
• Esp32s ble
• Android 4.4.2
• Blynk server
• Version 1.1.0
#define BLYNK_USE_DIRECT_CONNECT
#include <BlynkSimpleEsp32_BLE.h>
#include <BLEDevice.h>
#include <BLEServer.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "X0TJTB-54TVrgIyl-x-SecukBkumRZJc";
void setup()
{
// Debug console
Serial.begin(9600);
Serial.println("Waiting for connections...");
Blynk.setDeviceName("Blynk");
Blynk.begin(auth);
}
void loop()
{
Blynk.run();
}
John93
July 27, 2022, 6:48am
2
First of all, please edit your post and add triple backticks ``` before and after your whole sketch.
3geE:
Version 1.1.0
you’re using blynk legacy so you should downgrade the blynk library to version 0.6.1
Well, you haven’t included any Blynk libraries, and even if you had, I don’t see how this sketch tells the Blynk library to use the ESP32’s BLE port to establish the connection.
Pete.
3geE
July 27, 2022, 8:55am
5
I installed both the library and the code is one of the code samples of the blynk library but the problem still persists.
3geE
July 27, 2022, 9:35am
7
Desktop.rar - 13 KB
I can’t post photos directly because I’m a new user.
now i tried again it worked thank you all.
but sometimes it still doesn’t work.(not working now)
3geE
July 27, 2022, 10:04am
8
not solved still only worked once, not working now
John93
July 27, 2022, 10:48am
9
How are you powering your board ?
We don’t want a photo of your serial monitor output, we want the text, formatted with triple backticks the same was as when you post code.
You’ve edited your forts post multiple times since your initial sketch, but I still don’t see how it knows to use the BLE connection - although I’ve never used BLE with Blynk.
Pete.
3geE
July 27, 2022, 2:28pm
11
17:27:06.610 -> configsip: 0, SPIWP:0xee
17:27:06.610 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
17:27:06.610 -> mode:DIO, clock div:1
17:27:06.610 -> load:0x3fff0018,len:4
17:27:06.610 -> load:0x3fff001c,len:1044
17:27:06.610 -> load:0x40078000,len:10124
17:27:06.610 -> load:0x40080400,len:5856
17:27:06.610 -> entry 0x400806a8
17:27:07.031 -> Waiting for connections...
17:27:07.031 -> [28]
17:27:07.031 -> ___ __ __
17:27:07.031 -> / _ )/ /_ _____ / /__
17:27:07.031 -> / _ / / // / _ \/ '_/
17:27:07.031 -> /____/_/\_, /_//_/_/\_\
17:27:07.031 -> /___/ v0.6.1 on ESP32
17:27:07.031 ->
This pops up when I try to connect from the phone.
17:29:58.757 -> lld_pdu_get_tx_flush_nb HCI packet count mismatch (0, 1)
John93
July 27, 2022, 4:25pm
12
Which version of the Arduino ESP32 core are you using ?
John93
July 27, 2022, 5:16pm
14
Open the Arduino IDE, go to tools/board/board manager and search for esp32.
John93
July 27, 2022, 5:29pm
16
Okay, try the latest version of the esp32 core (2.0.4).
3geE
July 27, 2022, 5:34pm
18
I couldn’t send 2 photos at the same time, I sent it as an extra message.
John93
July 27, 2022, 5:47pm
19
3geE
July 27, 2022, 6:10pm
20
i uploaded i will try now