-
Notifications
You must be signed in to change notification settings - Fork 239
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
ESP-NOW strategy support for esp8266 #277
Comments
Ciao @dominikborkowski thank you for your support. The first error may be fixed changing the condition as follows: #if !defined(ESP32) || !defined(ESP8266) If you are using ESP8266 the constant should be defined and so the error should be avoided. I am not sure about the second question, @xlfe (the creator of ESPNOW strategy), what do you think? Changing the |
Thanks for your prompt reply. I'm not sure why, but that logical OR doesn't seem to work. I can use simple
or
and the code compiles just fine. As soon as I add the logical OR, regardless of order, it doesn't seem to work:
With regards to FreeRTOS, I'm wondering what's the applicable library? Presumably this should have been set up with platformIO as a dependency. PlatformIO lists quite a few FreeRTOS libs, none of them seem to be applicable to ESP8266: https://platformio.org/lib/search?query=freertos Is it possible this is requiring 'esp8266-rtos-sdk' framework in platformIO as opposed to 'arduino'? Full details:
Platform:
|
Doh! This should have been the right incantation, logical AND not OR:
|
After further digging, it appears that ESP-NOW strategy leverages esp-idf, which is esp32 specific. I guess that answers the original question, whether this could be used on esp8266. It would be interesting to see if this strategy could be implemented eventually to support this simpler platform. Thanks! |
Ciao @dominikborkowski I am sorry, my stupidity to answer when there was not enough available time to develop a correct reply. I hope you have not lost a lot time because of that. Indeed the logical OR is not the right way to do it, although also the AND is not what we are looking for considering that the error should be thrown if also just one of the two constants is not defined, a way to solve that is to define 2 conditions, also to keep what is happening clear. #if !defined(ESP32)
#error "ESP32 constant is not defined."
#endif
#if !defined(ESP8266)
#error "ESP8266 constant is not defined."
#endif I agree with you @dominikborkowski that would be nice to have ESP8266 compatibility. Thank you for your support. |
I think it is possible - see https://github.com/yoursunny/WifiEspNow/tree/master/src for an example - I've got a few things on my plate so if anyone wants to give it a god they should go ahead and not wait for me to try! |
Thank you kindly for your responses. Unfortunately, writing that is currently beyond the scope of my experience with C/C++ and familiarity with PJON itself. However, I'd be more than happy to pitch in by testing/debugging if such port ever appears. Cheers! |
Ciao @xlfe thank you for pointing out WifiEspNow, it deserves for sure some time to be studied, and compliments for the new PJON-cython release. |
Just wondering if any progress was achieved on the PJON ESP8266 ESPNOW implementation? Has anybody made some more experiments to have an idea how complex it would be? |
Ciao @ulno, @dominikborkowski after a lot of work and thanks to the support of the community v12.0 will be soon released. After that, I will focus, solve this issue and add the compatibility. I am now sadly stuck with the release related hassle and I cannot focus fully on this although looking at this library that has support for both ESP8266 and ESP32, it seems quite straight-forward. The ESPNOW strategy would need minimal changes to support both. I can start the work on this in the first week of october, if some of you has the will to work on this, all support is wellcome :) |
Is ESPNow protocol implemented yet on ESP8266 ? |
In my IoT class last year, we have used and run some tests with ESPNow, both on esp32 and esp8266 and got in spite of common myths surrounding ESPNow on the ESP32 the same result (only about 100m line of sight connections - though both platforms worked well). Is anybody else taking a look at this? If not, I will see if I can make it work on PJON. |
Ciao @ulno that would be a great help :) |
I have just created a pull request to introduce the support. I will be glad if you review the change and help me improve it. Also, I am not sure if I broke ESP32 support, because I only have ESP8266s laying around... link to pull request: #361 |
Hi,
I was wondering if PJON's support for ESP-NOW could be extended to the esp8266 platform. On the surface it appears it may be currently available for the esp32.
Quick test using platformIO and sample code from https://github.com/gioblu/PJON/blob/master/examples/ESP32/ESPNOW/PingPongArduinoIDE/Device1/Device1.ino I get errors such as:
I can define said constant, but I'm not sure what the repercussions would be. Then we have another error regarding support for freertos library. Not sure which FreeRTOS library it expects:
Using the sample code above on esp8266 one has to change
Thanks!
The text was updated successfully, but these errors were encountered: