ESP32 Bluetooth LE Secure Server for multi clients (ft. PassKey)

  Рет қаралды 18,598

That Project

That Project

Күн бұрын

Пікірлер: 74
@ThatProject
@ThatProject 3 жыл бұрын
That Project's Channel - kzbin.info Join FB Group - facebook.com/groups/138965931539175
@jamesdulangon1265
@jamesdulangon1265 3 жыл бұрын
Great work! Loving your projects
@ThatProject
@ThatProject 3 жыл бұрын
Thanks, man.
@TheCzarsoham
@TheCzarsoham 4 ай бұрын
Oh my god, thank you so much! I have been struggling with this for the past full week. Finally I have it running
@abusufianshawon599
@abusufianshawon599 3 жыл бұрын
Wow! Great work. Thanks for sharing.
@jacekjafree2353
@jacekjafree2353 11 күн бұрын
In the video you can see that the connection number changes even before entering the code. After entering the code, it doesn't want to connect me automatically.
@RamonFPV
@RamonFPV Жыл бұрын
Good morning from Spain. Sorry for my English on Google. I don't find a complete schematic of many of your projects connections, pins, etc. Thank you for your work it is impressive
@ThatProject
@ThatProject Жыл бұрын
It's the TTGO T-Display model. You can find more detailed information here. www.lilygo.cn/prod_view.aspx?Id=1126
@nilray5676
@nilray5676 Жыл бұрын
Why this ble_secure_server is not showing in my iPhone 13pro? (On Android its working properly)
@ThatProject
@ThatProject Жыл бұрын
oh really? Apple changed something for their BLE policy??? Let me check it.
@davec1406
@davec1406 3 жыл бұрын
This is a great video and explanation - thank you for sharing information like this!
@ThatProject
@ThatProject 3 жыл бұрын
Thanks, Dave.
@WalidsTech
@WalidsTech Жыл бұрын
Can the connected devices send data? Or they only can receive it
@ThatProject
@ThatProject Жыл бұрын
Connected devices can send and receive data.
@thexht7927
@thexht7927 2 жыл бұрын
Can you make a video about why the advertised name of the ESP32 BLE updated very slowly? It may take up to 1 minute to show up the new BLE device name if you change it from the old name.
@ThatProject
@ThatProject 2 жыл бұрын
It is very common. The past usage name of the connected device is stored internally and displayed first. After that, it will be updated with the new name. Other Bluetooth devices work the same.
@MrSasha3050
@MrSasha3050 3 жыл бұрын
Could you please complete a code for 3 characteristics for esp32 ble client? Thank you
@rohanyemul3498
@rohanyemul3498 2 жыл бұрын
I am trying to create an react native application and include this pin pairing feature in app. But couldn't find the implementation anywhere.
@ThatProject
@ThatProject 2 жыл бұрын
I'm not sure about the react native application.
@ahmadsyahdi3683
@ahmadsyahdi3683 4 ай бұрын
Hi, I'm developing a system using BLE Secure. In your video, when the client tries to connect to the BLE server, a pop-up appears asking for the passkey to be entered manually. Is it possible for the client to automatically send a saved passkey in client instead when attempting to authenticate?
@ThatProject
@ThatProject 4 ай бұрын
@@ahmadsyahdi3683 I know what you are trying to do, but I can't tell you exactly because I haven't tried it. Usually, apps where the client is mobile use the API of the BT stack, so it doesn't seem easy to bypass it. However, if the client is an MCU, I think there may be a way, but I'm not sure.
@ahmadsyahdi3683
@ahmadsyahdi3683 4 ай бұрын
​@@ThatProjectOh okay, thanks for your explanation earlier. I have another option: when the mobile application shows a pop-up to input the passkey, the passkey stored in the mobile application will automatically be entered into the passkey field and immediately matched. Is this possible?
@ThatProject
@ThatProject 4 ай бұрын
@@ahmadsyahdi3683 Seems possible. Give it a try!
@eugeniusz7144
@eugeniusz7144 Жыл бұрын
This code has an issue - when the connected devices goes out of range for a couple of minutes and then get back - re-connect doesn't work.
@ThatProject
@ThatProject Жыл бұрын
That's weird. Usually, Mobile OS will try to reconnect automatically. What kind of device did you test with?
@eugeniusz7144
@eugeniusz7144 Жыл бұрын
@@ThatProject well, the problem is not with the mobile OS which is Android, the problem is with the security - I get an error code 88 when it tries to reconnect. I have to restart bluetooth on esp32 in order to allow the reconnection
@ThatProject
@ThatProject Жыл бұрын
@@eugeniusz7144 Rebooting the ESP32 will reconnect without any problems? If this is a security issue, this shouldn't work without entering the pin number. I currently don't know anything about this unless I test it myself. I'll let you know when there's an update.
@ClaudioBellunato
@ClaudioBellunato 4 ай бұрын
Is it possible to send data, e.g. strings, from esp32 to a specific connected client via BLE?
@ThatProject
@ThatProject 4 ай бұрын
@@ClaudioBellunato Sure. You can send any data, about 20 bytes at a time, to the BLE device connected to the ESP32.
@ClaudioBellunato
@ClaudioBellunato 4 ай бұрын
@@ThatProject Yes, I tried, it works but it sends the same message to all clients, I mean sending the message to a specific client distinguished by its own address
@ThatProject
@ThatProject 4 ай бұрын
@@ClaudioBellunato I think you should keep the client's address separately when connecting, so you can specify the client when sending a message.
@electricalcoder3025
@electricalcoder3025 3 жыл бұрын
do we need to send the pass code each time we need to connect with it or does esp32 remembers the previously connected phones
@ThatProject
@ThatProject 3 жыл бұрын
If you forcefully disconnect from your mobile, you must re-enter the passcode. Otherwise, you don't need to put it in again.
@electricalcoder3025
@electricalcoder3025 3 жыл бұрын
@@ThatProject No like what I was asking is once we typed the pass code and it successfully connected...and once we go out of the range of our BLE ..and then we came back ...will it automatically connect with my phone ...without asking for passcode
@ThatProject
@ThatProject 3 жыл бұрын
@@electricalcoder3025 Not sure but I believe so. Have you tested it?
@CablesCoffee
@CablesCoffee 3 жыл бұрын
@@ThatProject I can't get that to happen. It never reconnects. I have to forcefully remove and pair it again to be able to reconnect. If using nRF Connect app with autoConnect option it connects after going out of range. So annoying.
@santiagoguerrero262
@santiagoguerrero262 3 жыл бұрын
Hi nice project, did you now how to connect a ESP32 Bluetooth client to this secure server ?
@ThatProject
@ThatProject 3 жыл бұрын
Interesting. I've never thought about the client-side with ESP32 to connect the secure BLE server. What's your progress?
@pictrance
@pictrance 7 ай бұрын
You have the example for the esp32 that is "Client secure"
@ThatProject
@ThatProject 7 ай бұрын
It's BLE_Secure_Server.ino for this project. Did you find it in this video description?
@nageshwarrao8629
@nageshwarrao8629 3 жыл бұрын
Waiting for a GPS navigation, by casting android mobile scren
@marwan.naasan
@marwan.naasan Жыл бұрын
Hi, Great video, I'm thinking if can i make a password for ESP32 and only to send Char to do something on arduino as client but your code does not work, can you help me ? this is important project to me.
@ThatProject
@ThatProject Жыл бұрын
I don't get it. Which part is the problem?
@marwan.naasan
@marwan.naasan Жыл бұрын
@@ThatProject I mean, what if I want to receive data and keep it in a specific variable, what is the code that I have to write (I am a beginner in this setup)
@ThatProject
@ThatProject Жыл бұрын
@@marwan.naasan This project only has the function of notifying data from the BLE server to the connected client. You need to implement BLECharacteristicCallbacks to receive data. Please take a look at my previous projects. github.com/0015/ThatProject/blob/master/E-Paper_Projects/01_Emoji2MiniE-Paper/ESP32_Pico_GxEPD2_BLE/ESP32_Pico_GxEPD2_BLE.ino
@marwan.naasan
@marwan.naasan Жыл бұрын
@@ThatProject I'm sorry.. but I entered this link and found a scary code haha. My project is simple with what you do.. I want a password for Bluetooth and hide the UUID with receiving numbers and putting them in a variable only this.. I have a code for this thing except for hiding the UUID. Can I share it with you in order to modify it for me? I'm new to ESP32 and my English is not that good
@kamatihasheela2995
@kamatihasheela2995 3 жыл бұрын
Thanks, this was extremely helpful.
@achmadarifmunaji3320
@achmadarifmunaji3320 3 жыл бұрын
Are you opening an IoT project creation service?
@ThatProject
@ThatProject 3 жыл бұрын
Could you be more specific? I've provided IoT-related services so far.
@achmadarifmunaji3320
@achmadarifmunaji3320 3 жыл бұрын
@@ThatProject Do you have an email or personal contact that I can use to contact and discuss this with you further?
@ThatProject
@ThatProject 3 жыл бұрын
@@achmadarifmunaji3320 You can find my business email from my channel page.
@rghrg
@rghrg 3 жыл бұрын
Hi! Is there any method to limit client connections to only one? Thank you!
@ThatProject
@ThatProject 3 жыл бұрын
The easiest way is to do "BLEDevice::startAdvertising();" only when there is no number of clients connected, so only one client can connect. Without this, clients cannot access it because it is no longer advertised.
@rghrg
@rghrg 3 жыл бұрын
@@ThatProject Thank you, Yes, I finally did it that way. Stopping advertising onConnect.
@aldv6298
@aldv6298 3 жыл бұрын
Hi friend, thank you for this very good tutorial that answers to a lot of questions I had. However, one thing remains unclear to me. I'm struggling to distinguish the implementation of encryption of data between client / server from one side, and for example the automatic prompt message of association on smartphone (client) or the pin/passkey authentification from the other side. Indeed, I'd like to mitigate the impact on UI/UX so on the smartphone, and would like to encrypt the informations during the exchanges without all this process of authentication. So my main question would be the following : Is it possible to automatically accept this prompt message of association (like you have at 10:04, the "Pair with BLE-Secure-Server?" one) ? If it implies to overload something in the Android side for the UI, do you know any tutorial on this subject ? The reason is my user on my app could be an old person or not very comfortable with technologies, so I'd like to facilitate as much as possible without taking the risk to transmit data without encryption. Thank you very much, and looking forward to reading you. Alex
@ThatProject
@ThatProject 3 жыл бұрын
Hey Alex, As far as I know, it takes a series of processes to encrypt, and Receiving a pin code from the user is also part of this. Not sure but, when I was working on this project, I remember communicating without a popup on their mobile. But I'm not sure at all if this was crypto communication. Please try it while changing the options.
@newtscott8502
@newtscott8502 2 жыл бұрын
exactly i have ble blints im connecting to esp32 wall switchwes which need to connect to with a pin and this helps alot thanks!
@Josh-jj5hk
@Josh-jj5hk 6 ай бұрын
Hi i am Making BLE server with Clients that can connect and send simple string text. over BLE serial. I am Having A problem with BlE i cant get it to keep advertising while client is connected. Is there any way i can have at least 3 clients connected at once that can send info to Ble server. I would rellay like o have 10 but i think it can only do 9 and its not sugeted to do more than 3. I need Help. I am using esp Wroom 32.
@ThatProject
@ThatProject 6 ай бұрын
BLEDevice::startAdvertising(); Please check whether this part was executed after connecting the client. Also, as far as I know, you can connect a maximum of 4 BLE devices with Arduino BLE library but if you use NimBLE-Arduino you can increase connections up to 9. Check this out, github.com/h2zero/NimBLE-Arduino
@Josh-jj5hk
@Josh-jj5hk 6 ай бұрын
@@ThatProject okay thanks for help, but i don't know how to set max connections. so once the maxed is reacted it need to kick the longest connected device. and that will allow it to make a new connection infinitely. allowing new device to connect and old devices will disconnect.
@ThatProject
@ThatProject 6 ай бұрын
@@Josh-jj5hk How many devices can currently be connected? If the maximum number of connections is reached, no more connections will be possible unless you have the advertise function in your code.
@Josh-jj5hk
@Josh-jj5hk 6 ай бұрын
@@ThatProject well i only got 3 to connect but i want at least 5 and i am using the nimble library. it sed up to 9. but how do you make it to kick the oldest device off and allowing the new device to connect. yes i under stand that there should be 6 device able to connect. and if there is 6 then disconnect the oldest device. leaving the 6 free space open. and when another device connects it will do the same thing.
@Josh-jj5hk
@Josh-jj5hk 6 ай бұрын
And yes right know i have advertising when device connects or device disconnect so its always advertising.
@vjgoutham
@vjgoutham 3 жыл бұрын
I did not try this yet.. But its a great video
@talatkuyuk6556
@talatkuyuk6556 3 жыл бұрын
Hi thanks for videos. I utilize from your videos, you are awesome. I am flutter mobile app developer. I need advice from you. Let's say, I have mobile phone that has already connected with wi-fi. Is it possible to send the wi-fi ssid and wi-fi password automatically to ESP32 / ESP8266 device without entering the password again (with Wi-Fi, not with Bluetooth)?
@ThatProject
@ThatProject 3 жыл бұрын
The mobile phone is already connected with WIFI, how can we give the data to ESP32??? In this case, there seems to be no other way than Bluetooth.
@nilray5676
@nilray5676 Жыл бұрын
Great work sir.... It's working properly..can you just suggest me how to save paired password in flutter side code? And simply connect with paired device without re-enter password if device is not unpaired.
@RidwanGhibran
@RidwanGhibran 3 жыл бұрын
this is awesome.. the code you provided runs perfectly, even though i don't use TFT panel, but in the middle of the way the connection always disconnects by itself when i try it, is there any solution for that ? Thank you..
@ThatProject
@ThatProject 3 жыл бұрын
Have you tested it on other devices? Occasionally, it can be a Bluetooth client problem.
@RidwanGhibran
@RidwanGhibran 3 жыл бұрын
@@ThatProject ohh yeah.. exactly as you said, i tested it on other devices and it works fine.. but stuff like that might be a bit annoying.. and hey, i tweaked the code a bit and it seems to be working fine too.
@RidwanGhibran
@RidwanGhibran 3 жыл бұрын
@@ThatProject Thanks in advance, your video helped me a lot.. have a nice day bro..👍👍
Dev Story - From Hardware to Software (ft. Treasure Hunter)
13:29
That Project
Рет қаралды 2,7 М.
Bluetooth Proximity Detection | FireBeetle ESP32
5:20
Davy Wybiral
Рет қаралды 107 М.
BLE with ESP32 tutorial part 1: the Server
25:23
MoThunderz
Рет қаралды 102 М.
How to Make your Project look Amazing
9:27
Volos Projects
Рет қаралды 270 М.
ESP32 BLE - Bluetooth Low Energy sending data to phone
8:31
Slint UI works very well on ESP32-P4 #MadeWithSlint #GUI #ESP32P4
4:57
#419 ESP32 Audio Tutorial with lots of examples
13:48
Andreas Spiess
Рет қаралды 266 М.
ESP32 Technical Tutorials: BLE Notifications
15:35
Kolban Technical Tutorials
Рет қаралды 62 М.
Getting started with ESP32 development using the TTGO T-DISPLAY
16:08
Retro Tech & Electronics
Рет қаралды 117 М.
ESP32TTGO - Battery Indicator 🔋⚡
9:50
That Project
Рет қаралды 50 М.