ESP32 Using ESP NOW...
 
Notifications
Clear all

ESP32 Using ESP NOW and Bluetooth

212 Posts
5 Users
23 Reactions
3,739 Views
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 301
Topic starter  

@zander Thanks for the reminder.  Back in August @tfmccarthy helped me regarding the library change and gave me the code changes necessary.  Everything works with the new library.

Mike


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

@huckohio Ok, just be aware it's still under construction. That means what works today my not work tomorrow even if you didn't change the code.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and 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
TFMcCarthy
(@tfmccarthy)
Member
Joined: 6 months ago
Posts: 249
 

@huckohio

Posted by: @huckohio

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?!

I think this is the right way to do this, not overkill. You're simply passing a command along using a different channel, similar to a WiFi to USB transmission. There's probably some reformatting and the BT control to manage but that's really overhead.

Give me a link to the door on Amazon and I'll poke around.


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 6 months ago
Posts: 249
 

@zander 

Have there been more changes? On another issue I'm running into issues after upgrading the esp board library.


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

@tfmccarthy They are ongoing, I won't use the 3.x versions until I hear some word they have wound down the team working on the changes. At the moment, there are 596 OPEN issues.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and 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
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 301
Topic starter  

@tfmccarthy

Posted by: @tfmccarthy

Give me a link to the door on Amazon and I'll poke around.

Here is the link


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 301
Topic starter  

@tfmccarthy

Posted by: @tfmccarthy

Give me a link to the door on Amazon and I'll poke around.

I received a response from the manufacturer.  The commands are sent via infrared and not BLE.  I asked again if they would provide me with those commands. 

Can you intercept infrared data like you can with BLE?

Mike

 


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 6 months ago
Posts: 249
 

@huckohio 

OK, IR is the target.

Posted by: @huckohio

Can you intercept infrared data like you can with BLE?

Yes, if you have an IR receiver. The problem is the plethora of IR formats used. Like a TV remote, there are dozens of them, and it seems that every mfg. devises their own format, so they don't overlap with each other, and you don't open the garage (or coop) door when you change channels. IIRC, there's a site somewhere with all the different known IR formats. 

IIRC, capturing the IR data isn't complex. So given a mfg. controller, you can capture all the commands and then simply play them on demand.

And I'm gob-smacked that there's a custom, commercial, solar powered, chicken coop door opener. (Didn't they have an air conditioner product, as well? Bathrooms, dining hall, lounge, etc.? No wonder the Bunnies complained! If this keeps up, you may want to move into the coop and throw the chickens into the house.)

You need an IR transmitter and receiver. I fear a directional issue will surface but maybe not.


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 301
Topic starter  

@tfmccarthy

Posted by: @tfmccarthy

You need an IR transmitter and receiver. I fear a directional issue will surface but maybe not.

So to capture the IR data, I can use an IR Receiver and use the remote control as the transmitter?  Guess I need to buy some more parts 🤨.  I think the directional issue can be solved.  The control box is directly above the coop door. 

 

 


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 301
Topic starter  

@tfmccarthy

Posted by: @tfmccarthy

You need an IR transmitter and receiver. I fear a directional issue will surface but maybe not.

It looks like the IR freq spectrum ranges from 660 to 3400.  Will a "typical" IR receiver we would use with microcontrollers cover these ranges?   


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 6 months ago
Posts: 249
 

@huckohio 

Posted by: @huckohio

It looks like the IR freq spectrum ranges from 660 to 3400.  Will a "typical" IR receiver we would use with microcontrollers cover these ranges? 

Check out the DBWS article: IR Remotes Revisited – 2023 ( https://dronebotworkshop.com/ir-remotes/)

I haven't done anything with it other than use what came with a kit (Bittle robot and the Elegoo Penguin Bot) but my hunch is you can use the "common" receiver/transmitter frequency.


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 6 months ago
Posts: 249
 

@huckohio 

Posted by: @huckohio

So to capture the IR data, I can use an IR Receiver and use the remote control as the transmitter? 

I forgot to respond to this.

You want to capture the IR commands that the remote controller issues to the door to open and close the door. You record them with the ESP32 + IR receiver. This is a separate pre-step.

Now you use the IR transmitter to play the pre-recorded commands back to the door (as if you were the remote control) depending on the commands you get through the ESP-NOW connection.

So,

at the house Elmer Fudd sends the ESP-NOW "open door" command to coop ESP

Coop ESP transmits the pre-recorded "open door" IR command to the door.

Door opens and Foghorn Leghorn enters the coop.

Back at the house, Elmer Fudd sees this on the camera sends the "close door" command via ESP-NOW to the coop.

Coop ESP transmits the pre-recorded "close door" IR command to the door.

Elmer pats himself on the back and opens a brewski to celebrate a hard day's work.


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 301
Topic starter  

@tfmccarthy

Posted by: @tfmccarthy

Foghorn Leghorn

LOL!  We grew-up watching the same shows 😆 .  I ordered a couple different IR receiver/transmitters today. 

Thanks!


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 301
Topic starter  

@tfmccarthy 

Heard back from the manufacturer on my request for the IR commands.  They said they didn't know the commands, their job is assembling components from many suppliers.

IR receivers arrive this weekend.

Mike


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 5 years ago
Posts: 301
Topic starter  

@zander

Posted by: @zander

That means what works today my not work tomorrow even if you didn't change the code

Ron,

I did check to make sure my code compiles with the current version of the the current ESP32 Board library.  No issues found.  Thanks for the reminder!

 

Mike  


   
ReplyQuote
Page 2 / 15