-
Notifications
You must be signed in to change notification settings - Fork 536
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
[TW#25858] esp-now support broadcast? #8
Comments
Hi, ESP-NOW does support broadcast in ESP8266 non OS SDK V2.1, we will revise the documentation. |
in the description for this repository's new update code . link here --->90c641e Version 2.1.0(116b762) System
Lwip
AT
WiFi
|
Hi, thanks for your reporting. The documentation has been updated, see Chapter 3.8 in API Guide. |
How can we perform a broadcast with ESP-NOW? Do we transmit to mac address {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}? Because I tried that and it didn't seem to work ... I would like to use broadcasts to let ESP-NOW devices discover other devices, with which they haven't paired yet. Is that possible? Could you enlighten me, @FayeY ? |
from the header file it seems we have to set it to "null"
I don't have multiple ESP32's to test with yet, will report once I do,
We also need to add a Peer to the peer list with MAC addr FF:FF:FF:FF:FF:FF From this example it seems that un-peered devices will still recieve Broadcasts ( as expected ) |
That’s not a real broadcast if you ask me. I haven’t looked at the source code, but I presume that it just loops through the peers one by one, doesn’t it?
It would be cool to allow ESPs to discover each other by broadcasting, and then adding each other as peers.
… Op 27 nov. 2017 om 19:34 heeft Daniel ***@***.***> het volgende geschreven:
from the header file it seems we have to set it to "null"
"
/**
* @brief Send ESPNOW data
*
* @attention 1. If peer_addr is not NULL, send data to the peer whose MAC address matches peer_addr
* @attention 2. If peer_addr is NULL, send data to all of the peers that are added to the peer list
* @attention 3. The maximum length of data must be less than ESP_NOW_MAX_DATA_LEN
* @attention 4. The buffer pointed to by data argument does not need to be valid after esp_now_send returns
*
* @param peer_addr peer MAC address
* @param data data to send
* @param len length of data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_INTERNAL : internal error
* - ESP_ERR_ESPNOW_NO_MEM : out of memory
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
* - ESP_ERR_ESPNOW_IF : current WiFi interface doesn't match that of peer
*/
esp_err_t esp_now_send(const uint8_t *peer_addr, const uint8_t *data, size_t len);
I don't have multiple ESP32's to test with yet, will report once I do
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
It seems its a real broadcast .. Device A :
test .ino here ( quick modified version of the esp-Now example, flashed to 2 ESP32 dev boards ) |
Oh, then I stand corrected! However, I only have one ESP32 so I can't test it on the ESP32. I have multiple ESP8266s so I will have a try asap. 🙂 Or did you already try it with multiple ESP8266s? |
This doesn't seem to be working for me. I am able to send things freely when I call
However, I never seem to be able to receive anything. I've tried adding many different combinations but even this...
Nothing gets received. I am able to look at Wireshark and see appropriate messages going back and forth. One note: Your protocol described here: http://esp-idf.readthedocs.io/en/latest/api-reference/wifi/esp_now.html is incomplete. There are 4 undocumented bytes between the vendor-specific action frame and vendor-specific action content. I still do not understand what they do. |
I encountered the same issue as @cnlohr where I can successfully send to FF:FF:FF:FF:FF:FF, but those broadcast packets are never received. |
@FayeY Can we please re-open this issue as it is definitely present in the current nonos sdk. I am stuck back at 1.5.2 for projects where this is needed. |
I have the same Problem with esp8266. I can send boardcasts, but no esp8266 receive them. |
Indeed. the issue is still very much open and very much a problem with the official NONOS sdk. I am not sure why espressif is leaving this issue closed. |
I can confirm this problem too. Devs, do we have anyone working on this? Thanks |
I'm not really sure how to get their attention... |
@cnlohr, as far as I'm concerned they might as well have abandoned esp8266 and are working on esp32. Most of them are dedicated to direct customers of espressif (for example alibaba), with features going into the SDK only if they need them for the customers. If only everything could be open source... 🙄 |
@Junhao-Espressif, PTAL |
@FayeY I am glad that Espressif is pursuing this again. It is much more powerful than any framework could be. By having true broadcast access, it opens a lot of doors that are unworkable with different options. |
@FayeY I am coming up on a commercial project that will be using 2,500 units and I really could use this feature. I don't want to stick the customer with the old firmware version. |
Hi @limin-liu @franklinvv @Daniel-dk @cnlohr Please try using the following two files. After testing, we will update them on GitHub.
|
I cannot look into this for another few days. But, I am eagerly going to try it out when I can! |
@Junhao-Espressif I gave the libs posted on September 9th a try, and they worked! In the setup I called esp_now_add_peer() with NULL for the key, and 0 for the key length and was able to broadcast and receive unencrypted packets. Thanks! |
Also I did my testing with @cnlohr, so I think those libs can be uploaded to the repository. |
Is there a way to try the fix in lib_support_broadcast.tar.gz with the Arduino/ESP8266 code? When I try updating with the two files in lib_support_broadcast.tar.gz then all the compiles fail with:
Thats with the latest (today) Arduino/esp8266 github code where system_get_sdk_version() returns: 3.0.0-dev(c0f7b44) |
@Junhao-Espressif Can you tell me how to implement this fix for a normal Esp8266 with Arduino IDE? As I cannot figure out how to install that file you posted, and I really need to be able to broadcast to get my project working. @AEFeinstein Or can you tell me how you got it working, if you were using an Arduino IDE that is? (this is for windows btw) |
I was not using the Arduino IDE, I was using the non os sdk directly with a makefile on Linux. Sorry I cannot help you. |
Hi @DavidAC95 , Could you tell me the SDK verison ? |
@Junhao-Espressif the most recent ESP8266 core for the Arduino IDE (2.5.0-beta2) was released just yesterday and that uses SDK version 3.0.0-dev(c0f7b44). |
not according to this file: https://github.com/esp8266/Arduino/blob/2.5.0-beta2/tools/sdk/version#L1 |
Mmm, interesting. I just now did a |
@Junhao-Espressif I dont have the system in front of me at this moment. And I won't for a few weeks now but the last library update I did was for esp8266 2.4.2 which was on Dec 13th. |
I too am interested in the Arduino IDE release of this fix. |
@Junhao-Expressif has any progress been made on this issue for the Arduino IDE? |
@ arduino users, please understand that espressif cannot answer here for arduino. |
If thats the case then in the interim is there any possibility of having the ESP-Now broadcast fix thats in nonos-sdk-v3 back ported to the nonos-sdk version used in esp8266/Arduino#5521 (comment)? |
@d-a-v I understand, then we will probably switch to the esp32 as we need broadcast capability. I do have one more question though, can the esp32 talk to esp8266? As in if we have the main hub being a esp32 could it broadcast to the esp8266s that we already have? |
Hi I have this issue too and have tried 2.5 beta2 and 2.4.2 and neither seem to work. I have changed the 2 libraries from 2.5 beta 2 to the ones about and then get linker errors. Anyone have broadcasting working? @Junhao-Espressif any update on the bug? @DavidAC95 I have an esp32 sending an espnow message to an esp8266 (directly using its mac address) and the esp8266 receiving it. Broadcasting from the esp32 to the esp8266 is what doesn't seem to work. thanks Lee. |
Here's the fix for the Arduino library: esp8266/Arduino#6174 |
In my experience, the Arduino framework uses a library that implements only pseudo broadcast.[1] So if you want to simply send messages to all devices, you will be satisfied. Protocol will not function if you have any requirements for time. You may want to use the ESP-IDF framework based on freeRTOS. This version supports broadcast too. It isn't a real broadcast also. But I'll be planning to inspect this problem in more detail. I'll actualize the information. |
In your decribetion of code :
WIFI
3. Allow sending a broadcast ESP-NOW packet, but make sure that the packet is unencrypted;
But in your reference V2.1.0 :
3.8 part for ESPNOW still "ESP-NOW do not support broadcast and multicast.“
So ESPNOW actually support broadcast or not?
The text was updated successfully, but these errors were encountered: