Info regarding BT and BLE

kamesh
Posts: 30
Joined: Sat Aug 06, 2016 5:14 am

Info regarding BT and BLE

Postby kamesh » Tue Dec 20, 2016 7:18 am

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.

ESP_Sprite
Posts: 406
Joined: Thu Nov 26, 2015 4:08 am

Re: Info regarding BT and BLE

Postby ESP_Sprite » Tue Dec 20, 2016 9:24 am

Please ask Arduino-related questions in the Arduino forums.

shadow
Posts: 22
Joined: Fri Dec 02, 2016 4:56 pm

Re: Info regarding BT and BLE

Postby shadow » Thu Jan 05, 2017 3:42 pm

Any ETA on BT/BLE support?
I can barely wait :)

User avatar
kolban
Posts: 508
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Info regarding BT and BLE

Postby kolban » Thu Jan 05, 2017 3:56 pm

@Shadow,
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

shadow
Posts: 22
Joined: Fri Dec 02, 2016 4:56 pm

Re: Info regarding BT and BLE

Postby shadow » Thu Jan 05, 2017 4:41 pm

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.

User avatar
kolban
Posts: 508
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Info regarding BT and BLE

Postby kolban » Thu Jan 05, 2017 5:06 pm

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?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

shadow
Posts: 22
Joined: Fri Dec 02, 2016 4:56 pm

Re: Info regarding BT and BLE

Postby shadow » Thu Jan 05, 2017 5:31 pm

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?

User avatar
kolban
Posts: 508
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Info regarding BT and BLE

Postby kolban » Thu Jan 05, 2017 5:44 pm

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.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

shadow
Posts: 22
Joined: Fri Dec 02, 2016 4:56 pm

Re: Info regarding BT and BLE

Postby shadow » Thu Jan 05, 2017 7:51 pm

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 :)

LEDOFF
Posts: 2
Joined: Mon Jan 09, 2017 9:10 am

Re: Info regarding BT and BLE

Postby LEDOFF » Mon Jan 09, 2017 9:36 am

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!

Who is online

Users browsing this forum: No registered users and 1 guest