At first glance I thought that the Bluetooth_SPP_ESP32 component could make a ESP32 to receive data from another device. But this appears to only be a slave component.
I've never looked into Bluetooth on FC before so my apologies for this question: how do I make an ESP32 to receive data from a (slave) device?
I only know the slave device's name and need to figure out what kind of data it sends (to later act on).
Some any suggestions or examples?
What component to receive bluetooth on ESP32?
-
- Posts: 336
- http://meble-kuchenne.info.pl
- Joined: Tue Dec 08, 2020 5:11 pm
- Has thanked: 93 times
- Been thanked: 67 times
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: What component to receive bluetooth on ESP32?
Hi
I've not looked at ESP32 BT capabilities, but if it is only a "slave" then I doubt if it will communicate with any other "slave" device. It should connect to any other device configured as "Master" though, perhaps a PC or another chip connecting via HC06 or the like?
I've posted a couple of examples of connecting Master / Slave using HC05/HC06, perhaps in the "old" forum.
When testing BT I use an android running Serial Bluetooth Terminal by Kai Morich. Very handy.
Regards
I've not looked at ESP32 BT capabilities, but if it is only a "slave" then I doubt if it will communicate with any other "slave" device. It should connect to any other device configured as "Master" though, perhaps a PC or another chip connecting via HC06 or the like?
I've posted a couple of examples of connecting Master / Slave using HC05/HC06, perhaps in the "old" forum.
When testing BT I use an android running Serial Bluetooth Terminal by Kai Morich. Very handy.
Regards
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: What component to receive bluetooth on ESP32?
Hi
As mentioned I haven't yet explored ESP32 BT but I used the HC05/06 here
https://www.matrixtsl.com/mmforums/view ... 06#p107295
They use the UART so things were quite simple to implement.
Looking at the FC ESP32 BT component it looks like it's a Slave, and from within you can set the device Name and Send/Receive much like other devices. Didn't see anything about PIN though.
If I get the chance I'll try and have a play over the weekend, but I'm also trying to get a Creality Ender-5+ to print, so far without much luck (detaches at about 70%).
Regards
PS
If I do play, I'll set up one of the HCxx modules as Master connected directly to a PC running "Terminal" via TTL-USB converter
As mentioned I haven't yet explored ESP32 BT but I used the HC05/06 here
https://www.matrixtsl.com/mmforums/view ... 06#p107295
They use the UART so things were quite simple to implement.
Looking at the FC ESP32 BT component it looks like it's a Slave, and from within you can set the device Name and Send/Receive much like other devices. Didn't see anything about PIN though.
If I get the chance I'll try and have a play over the weekend, but I'm also trying to get a Creality Ender-5+ to print, so far without much luck (detaches at about 70%).
Regards
PS
If I do play, I'll set up one of the HCxx modules as Master connected directly to a PC running "Terminal" via TTL-USB converter
Re: What component to receive bluetooth on ESP32?
Thank you Chipfryer!
But I don't want to use external components for the ESP32 if this is already available on the chip.
So, all I want is to connect to a slave device from where I only know the name of, and receive data from it.
Is there a way to use the ESP32 as a Bluetooth master is more like what I want to accomplish.
But I don't want to use external components for the ESP32 if this is already available on the chip.
So, all I want is to connect to a slave device from where I only know the name of, and receive data from it.
Is there a way to use the ESP32 as a Bluetooth master is more like what I want to accomplish.
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: What component to receive bluetooth on ESP32?
Hi
From what I see in my brief look at the FC component for ESP32 BT, it only operates as a slave. That isn't to say it cannot act as a Master, just that you may need to include your own "C" or such like to do so.
What do you intend to connect to? Most phones by default operate in Master as does my Laptop. I can see it being handy though as Master. Gather info from a sensor (or whatever) and pass it on to whatever via WiFi.
Regards
From what I see in my brief look at the FC component for ESP32 BT, it only operates as a slave. That isn't to say it cannot act as a Master, just that you may need to include your own "C" or such like to do so.
What do you intend to connect to? Most phones by default operate in Master as does my Laptop. I can see it being handy though as Master. Gather info from a sensor (or whatever) and pass it on to whatever via WiFi.
Regards
Re: What component to receive bluetooth on ESP32?
Thank you again Chipfryer!!!
But my question remains the same: is there a way to get a ESP32, without external components to act as a master?
All I want is to connect a device (as a slave), only by knowing it's name and pair it with an ESP32 (that acts as a master).
The device (a kind of remote control), will send commands on which the ESP should act on.
So my question is: how can I use an ESP32 in FC10 to receive data from a device that is paired by knowing it's name?
In parallel I will ask for a component that does just that.
But my question remains the same: is there a way to get a ESP32, without external components to act as a master?
All I want is to connect a device (as a slave), only by knowing it's name and pair it with an ESP32 (that acts as a master).
The device (a kind of remote control), will send commands on which the ESP should act on.
So my question is: how can I use an ESP32 in FC10 to receive data from a device that is paired by knowing it's name?
In parallel I will ask for a component that does just that.
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: What component to receive bluetooth on ESP32?
Hi
Is there any reason the ESP cannot act as a slave to the device sending instructions to it?
Briefly and non-technically, a Slave advertises it's presence and a Master instigates a connection. Other than that, once paired comms is very straightforward. Whatever the Master or Slave sends, the other end will receive. With BLE you could potentially have a Master talking to multiple Slaves but most instances are one-on-one.
What is the other device? A uC or such like?
Regards
Is there any reason the ESP cannot act as a slave to the device sending instructions to it?
Briefly and non-technically, a Slave advertises it's presence and a Master instigates a connection. Other than that, once paired comms is very straightforward. Whatever the Master or Slave sends, the other end will receive. With BLE you could potentially have a Master talking to multiple Slaves but most instances are one-on-one.
What is the other device? A uC or such like?
Regards
Re: What component to receive bluetooth on ESP32?
The slave device that should connect with the ESP is a kind of remote control.
There is no way of making this device a Master...
But in Arduino there are library's to make the ESP the master so.. this must be possible in FC too?
There is no way of making this device a Master...
But in Arduino there are library's to make the ESP the master so.. this must be possible in FC too?
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: What component to receive bluetooth on ESP32?
Hi
I agree it's possible to set as Master, but at present not without your own code.
It would be a nice feature though.
Regards
I agree it's possible to set as Master, but at present not without your own code.
It would be a nice feature though.
Regards