ESP32 Using ESP NOW...
 
Notifications
Clear all

ESP32 Using ESP NOW and Bluetooth

212 Posts
5 Users
23 Reactions
7,678 Views
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 311
Topic starter  

Last year I completed a project that controls vents, fans, heat lamps, lights, and water bowl heaters in my chicken coop (Project).  This system runs off of an ESP32-S3 and communicates with another unit in my house using ESP NOW.  I can change the system operation from the house.

Lately we have had problems with the chickens not getting back into the coop before the automated chicken door closes (we're using dawn to dusk).  I've purchase another automated chicken coop door that also opens/closes using light mode and also comes with a simple Bluetooth remote to open and close the door if necessary.

Since the ESP32-S3 also has Bluetooth, I would like to be able to use the unit in the house to send a command to the chicken coop to have the coop ESP32-S3 send out a Bluetooth command to open/close the door when necessary (I also have cameras inside and outside the coop so I can tell is chickens didn't get inside before the door closed). 

My questions are:

1.  Can you capture the open/close door Bluetooth command from the remote?

2.  Can the ESP32-S3 use Bluetooth at the same time as it's using ESP NOW?

I purchased an Adafruit Bluefruit LE sniffer (just noticed the LE in the title) which works with wire shark to capture commands.  

3. I just noticed the LE in the sniffer title.  Will this device capture non-LE Bluetooth?

 

Thanks

Mike

 


   
Quote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 8 months ago
Posts: 329
 

@huckohio,

Answers out of order:

Posted by: @huckohio

1.  Can you capture the open/close door Bluetooth command from the remote?

2.  Can the ESP32-S3 use Bluetooth at the same time as it's using ESP NOW?

I purchased an Adafruit Bluefruit LE sniffer (just noticed the LE in the title) which works with wire shark to capture commands.  

3. I just noticed the LE in the sniffer title.  Will this device capture non-LE Bluetooth?

According to Espressif, Yes.

( https://www.espressif.com/en/solutions/low-power-solutions/esp-now#:~:text=ESP%2DNOW%20can%20work%20with,remote%20controlling%2C%20sensors%2C%20etc.)

Posted by: @huckohio

I purchased an Adafruit Bluefruit LE sniffer (just noticed the LE in the title) which works with wire shark to capture commands.  

3. I just noticed the LE in the sniffer title.  Will this device capture non-LE Bluetooth?

I believe you use these separately, i.e., you would two connections: one classic BT and the other BLE. They'd be separate conversations.

Posted by: @huckohio

1.  Can you capture the open/close door Bluetooth command from the remote?

This is the hang-up, I believe. Bluetooth has limited range. The coop should/might be able to capture the door action, but then you'd need to xmit it via ESP-Now to the house (200+ ft, IIRC). Reverse is the same; Bluetooth won't reach the coop so you'd use Bluetooth in the house to tell the control panel to xmit a command via ESP-Now to the coop and then xmit that to the door.

I could be wrong. I often am.  

 

 

 

 

The one who has the most fun, wins!


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 311
Topic starter  

@tfmccarthy  Than you for your reply.

Posted by: @tfmccarthy

I believe you use these separately, i.e., you would two connections: one classic BT and the other BLE. They'd be separate conversations.

I purchased the "sniffer" to try and capture the command/data coming from the remote to the chicken coop door.  The "sniffer" is for low energy BT and I am assuming the coop is classic BT.  I'll need to see of the BLE "sniffer" can intercept the classic BT command.  If not, I did find a couple windows based tools that I can try.

Posted by: @tfmccarthy

This is the hang-up, I believe. Bluetooth has limited range. The coop should/might be able to capture the door action, but then you'd need to xmit it via ESP-Now to the house (200+ ft, IIRC). Reverse is the same; Bluetooth won't reach the coop so you'd use Bluetooth in the house to tell the control panel to xmit a command via ESP-Now to the coop and then xmit that to the door.

Agree.  My approach would be to update the software in both the house and coop ESP32-S3s.  The house would send an open or close door command to the ESP32-S3 in the coop (distance is about 200 feet) using ESP NOW.  When the command is received by the coop ESP32-S3 the desired BT command would be sent from the coop ESP32-S3 using the BT capability.  The distance between the coop ESP32-S3 and the door is about 2 feet.

The communications would be one-way from the house to the coop.  I have a camera outside the coop door that I can monitor to see if the door opened or closed.

 

Thanks

Mike


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 8 months ago
Posts: 329
 

@huckohio,

Apparently my reading comprehension skills are on vacation.

Posted by: @huckohio

I would like to be able to use the unit in the house to send a command to the chicken coop to have the coop ESP32-S3 send out a Bluetooth command to open/close the door when necessary (I also have cameras inside and outside the coop so I can tell is chickens didn't get inside before the door closed). 

You can do this.

You need both open/close commands.

The one who has the most fun, wins!


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 8 months ago
Posts: 329
 

Posted by: @huckohio

The "sniffer" is for low energy BT and I am assuming the coop is classic BT. 

Nope. Your coop ESP's will support the ESP-NOW connection, a classic Bluetooth connection, and a BLE connection simultaneously. Since the sniffer device is BLE, that's all you need plus the ESP-NOW. Actually, it's the automatic door device you need to talk to. The sniffer just allows you to analyze the conversation.

The rest you got in hand.

Neat.

The one who has the most fun, wins!


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 311
Topic starter  

@tfmccarthy 

Thank you.  Door arrived yesterday and charged overnight.  Adding Wire Shark to the PC and will start "sniffing" today.

 

Mike


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 311
Topic starter  

Unfortunately the sniffer I purchased from Adafruit was faulty.  Searching for a new source. 

I did test the distance of the Bluetooth on the new door.  The coop is approximately 200' from the house.  With my wife standing by the kitchen window she was able to open and close the door from approximately 180 feet.  So close!


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 8 months ago
Posts: 329
 

@huckohio 

Does the Door mfg. provide any info on the Bluetooth interface?

How did you determine the Adafruit sniffer was faulty? Do they have a return policy?

The one who has the most fun, wins!


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 8 months ago
Posts: 329
 

@huckohio 

Posted by: @huckohio

I did test the distance of the Bluetooth on the new door.  The coop is approximately 200' from the house.  With my wife standing by the kitchen window she was able to open and close the door from approximately 180 feet.  So close!

So just move the coop closer...no, move the house...no, add a new room...ah, rats!

Never mind.

The one who has the most fun, wins!


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 311
Topic starter  

@tfmccarthy 

I was going to send the manufacture's support group asking if they could provide that information.  I went with the sniffer first because I've never played with BT.  I watched Bill's video again today and it seems straight forward.

 

I was following the Adafruit instructions for setup and operation and I noticed that when I switched from Data to Command mode there was no indication from the sniffer that the mode was changed (led blinking sequence).  Also, there was a constant stream of garbage on the terminal window no matter what I changed.  I worked through there instructions several times before I finally gave up.  The mode change was a definite anomaly based on the instructions. 


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 311
Topic starter  

@tfmccarthy 

I was thinking of cutting the center out of the yard and pushing the two halves together.  That way I don't have to move the coop or house.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 4 years ago
Posts: 2601
 

@huckohio 

Silly question but do you have a yard light or some other existing powered location between the house and coop ?

if so, maybe you could rig up a sort of relay station to receive from either site and then transmit to the other site. I'm assuming that the major limitation will be power for the relay station, so a yard light could be tapped to operate the relay site as well as offering a relatively safe elevated location for the relay package.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 311
Topic starter  

@will Nothing between the house and the coop. 

I am going to look for another BLE sniffer and I would like to learn how to capture all the data necessary to send the coop door open/close commands through the ESP32-S3s and then have the Coop ESP32-S3 send the command via BLE to the door.  May be overkill....but why not?!

Mike


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 311
Topic starter  

@tfmccarthy 

Posted by: @tfmccarthy

Does the Door mfg. provide any info on the Bluetooth interface?

I purchased the door from amazon.  I did find the manufacturer (not seller) and all the webpages are in Chinese...go figure!  I sent an email through Amazon asking if they are using BT and if they would provide me the data required to send the address/command through a microcontroller.  Not holding me breath for an answer.

 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 8047
 

@huckohio Make sure you are not negatively affected by the esp32 rev 3 breaking changes. Check LINK. The quick fix is revert the ESPRESSIF esp32 bord entry to 2.0.17. See my response to another post re this esp32 only issue. Post is at https://forum.dronebotworkshop.com/2022-videos/mecanum-wheel-robot-car-esp-now-remote/paged/4/#post-49832

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Page 1 / 15