hi,
How to use BT and BLE in esp32. How to configure both BT and BLE in esp 32 using ardunio ide.
Thanks in advance.
Info regarding BT and BLE
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: Info regarding BT and BLE
Please ask Arduino-related questions in the Arduino forums.
Re: Info regarding BT and BLE
Any ETA on BT/BLE support?
I can barely wait
I can barely wait
Re: Info regarding BT and BLE
@Shadow,
How do you plan to use BT/BLE on the ESP32? Do you have a use case or project in mind?
How do you plan to use BT/BLE on the ESP32? Do you have a use case or project in mind?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Info regarding BT and BLE
I want to expose the values read from a BME280 and push them to an Android phone, and, as I understand, BLE is much more suitable for this than WiFi.
Re: Info regarding BT and BLE
Thanks for your response. I'm going to practice my words on BLE and BLE design (I feel like a baby who is learning to speak as I study this stuff ... and if I don't practice ... I'll be forever stuttering and mispronouncing ... so if you or anyone else sees errors in my thinking ... yell out).
I'm imaging an ESP32 connected to a sensor (in your case a BME280). As such, the ESP32 can "read" data from that sensor and know its values. Great. Now I'm imagining the ESP32 being a BLE peripheral (I think that is the correct term ... our choices are peripheral or controller). The ESP32 will then start advertising itself via the GAP protocol ... it will advertise its Bluetooth Device Address (bd_address) as well as the "services" it exposes. Your Android phone will act as a BLE controller. It will locate the ESP32 because of its transmitted advertisements.
Now ... lets pause here ... because this may literally be the end of the story. Using BLE GAP, an ESP32 should be able to be a "broadcaster" meaning that it can literally publish BLE packets with a payload of up to 31 bytes of data without forming ANY network connections to anyone. In this mode, the ESP32 will be broadcasting its sensor read data ... presumably periodically (once a second, once a minute etc etc). The Android phone can passively receive these broadcasts and just "use" the data. This story would only be useful for broadcasts where there is no security involved. For example, the temperature or air pressure of data within range of your BT phone doesn't "feel" sensitive.
And ... this may be all you need.
Do you have any requirements to send instructions "to" the ESP32?
I'm imaging an ESP32 connected to a sensor (in your case a BME280). As such, the ESP32 can "read" data from that sensor and know its values. Great. Now I'm imagining the ESP32 being a BLE peripheral (I think that is the correct term ... our choices are peripheral or controller). The ESP32 will then start advertising itself via the GAP protocol ... it will advertise its Bluetooth Device Address (bd_address) as well as the "services" it exposes. Your Android phone will act as a BLE controller. It will locate the ESP32 because of its transmitted advertisements.
Now ... lets pause here ... because this may literally be the end of the story. Using BLE GAP, an ESP32 should be able to be a "broadcaster" meaning that it can literally publish BLE packets with a payload of up to 31 bytes of data without forming ANY network connections to anyone. In this mode, the ESP32 will be broadcasting its sensor read data ... presumably periodically (once a second, once a minute etc etc). The Android phone can passively receive these broadcasts and just "use" the data. This story would only be useful for broadcasts where there is no security involved. For example, the temperature or air pressure of data within range of your BT phone doesn't "feel" sensitive.
And ... this may be all you need.
Do you have any requirements to send instructions "to" the ESP32?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Info regarding BT and BLE
Hi,
Your description seems accurate from my basic understanding of how BLE works
Since this is a school project, sending data from the ESP32 to the Android phone might be just enough.
I have to think if there's any need for any initial configuration that might require the Android phone to send data... maybe OTA updates? Would those work with just Bluetooth?
Your description seems accurate from my basic understanding of how BLE works
Since this is a school project, sending data from the ESP32 to the Android phone might be just enough.
I have to think if there's any need for any initial configuration that might require the Android phone to send data... maybe OTA updates? Would those work with just Bluetooth?
Re: Info regarding BT and BLE
The acronym "OTA" means "Over The Air" ... and is simply the name of a story for an architecture and practices for receiving new versions of an application over a network connection and how that application can replace your existing application without "bricking it" if something goes wrong.
If I remember correctly, the ESP OTA story doesn't "care" how the new data that is the application arrives. Whether that is over WiFi, serial or BT ... I don't think it cares. What I'd suggest you do is write down a specification of what you want to achieve. Look at the list carefully and start making plans to see what technology components you need (BT, BLE, WiFi etc etc). Ask yourself "What is the minimum I need to do to get something working" ... for our kinds of projects, we don't want to boil the ocean but we also want to get something working sooner than later.
If I remember correctly, the ESP OTA story doesn't "care" how the new data that is the application arrives. Whether that is over WiFi, serial or BT ... I don't think it cares. What I'd suggest you do is write down a specification of what you want to achieve. Look at the list carefully and start making plans to see what technology components you need (BT, BLE, WiFi etc etc). Ask yourself "What is the minimum I need to do to get something working" ... for our kinds of projects, we don't want to boil the ocean but we also want to get something working sooner than later.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Info regarding BT and BLE
Well, I think I would be grateful just for Arduino BLE support
Any other things would be a nice bonus.
I'm sure other people with more ideas for commercial products would ask for more features here
Any other things would be a nice bonus.
I'm sure other people with more ideas for commercial products would ask for more features here
Re: Info regarding BT and BLE
Hi!
In my case, I want the bluetooth just for one main reason:
Enter the password and the name of the Wi-Fi network to esp32 on your first connection, without using a cable connection. I don´t know if it would be easier to configure the esp32 first as a wifi server, and after entering SSID and password, make it connect to this SSID network.
Thanks!
In my case, I want the bluetooth just for one main reason:
Enter the password and the name of the Wi-Fi network to esp32 on your first connection, without using a cable connection. I don´t know if it would be easier to configure the esp32 first as a wifi server, and after entering SSID and password, make it connect to this SSID network.
Thanks!
Who is online
Users browsing this forum: No registered users and 134 guests