Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this a valid tool? #3

Open
ipsod opened this issue Feb 1, 2022 · 6 comments
Open

Is this a valid tool? #3

ipsod opened this issue Feb 1, 2022 · 6 comments

Comments

@ipsod
Copy link

ipsod commented Feb 1, 2022

Hi. I was considering using this and wondered whether you would recommend it? Development seems to have stopped a while ago - did you quit using the code for some reason?

@mreditor97
Copy link

Hi,
I found the code to work, and have used it to help me create communication between ESP devices and a host Raspberry Pi. It turns out it works quite well once the wireless configuration has been properly setup on the Pi.

I don't think there is any particular requirement to keep updating it as it works. Also this is the only method I found to enable ESP Now communication on non ESP based devices.

Hope this helps!

@thomasfla
Copy link
Owner

Hello,
Indeed, the code is working well, even if not updated for some time.
This can be seen as a proof of concept more than a polished library.
BTW, this code has been integrated in a robotic project I'm involved in: https://github.com/open-dynamic-robot-initiative/master-board

Hope this helps,
Thomas.

@ipsod
Copy link
Author

ipsod commented Feb 1, 2022

@mreditor97

Hi, I found the code to work, and have used it to help me create communication between ESP devices and a host Raspberry Pi. It turns out it works quite well once the wireless configuration has been properly setup on the Pi.

That's great. I would like to set it up on a Pi, as well. Do you have any tips for setting up the wireless, or should I find that in the docs?

@thomasfla

Ok, sounds good. I've been using serial to communicate with an ESP32, and using that to interface with ESP-NOW, and it would save quite a bit of trouble if I could just directly use ESP-NOW. I'll see if I can understand your code well enough to use it. I was looking over your simple example and on the surface it's confusing (ie: why does the receive callback call handler->send()? plus, I've never done cpp threading, so that's its own can of worms). I'll see if I can't understand it better by diving into the library.

Would you have any tips for setting it up to work with Python? I was thinking to use cppyy to load the code in Python, so that messages are received via a Python callback and sent via a Python function. I've only barely used cppyy (or c++ on the desktop at all), so I'm really just kind of feeling my way through the dark, but I already have a lot of my project built in Python, so I'm trying to stick with that. Not trying to be fancy with the cppyy thing - just found it to make development of small libraries much easier, since it lets me introspect and use c++ code and objects through Python - but nothing I've made is so complex as your library, so maybe it'd be best to let it run in its own executable and communicate through sockets, files, or maybe ZeroMQ?

@thomasfla
Copy link
Owner

thomasfla commented Feb 1, 2022

why does the receive callback call handler->send()?

If I remember correctly, the basic example was a ping test, so it sends a message as soon as an incoming one is received.

Would you have any tips for setting it up to work with Python?

We have an implementation (specific to the robot control) that has been binded in python using boost python https://github.com/open-dynamic-robot-initiative/master-board/tree/master/sdk/master_board_sdk
You can take inspiration from this, but be warned that you would have to clean a lot of things to remove all the layers we needed for our application. Also, this is not a very nice solution since you have to run your python interpreter as sudo to have the monitor mode access.

I fill that having a c++ executable communicating with your python scripts, as you describe, might be a simpler option.

Best,
Thomas.

@ipsod
Copy link
Author

ipsod commented Feb 1, 2022

Thank you for the info and advice.

@nicklasb
Copy link

nicklasb commented Mar 2, 2023

Hi,

I am looking at this and is thinking that it would be such a blast if a generalized implementation was made.
Then I could automate way more testing of my ESP32-code on Mac/Linux/Windows machines.
However, it seems that there is kernel patching required, is this something that could be worked around or will that always be a deal breaker?

Cool project!

Kind regards, Nicklas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants