ESP-Now broadcast in NonOS SDK

Posts: 3
Joined: Mon Aug 08, 2016 9:27 pm

ESP-Now broadcast in NonOS SDK

Postby cnlohr » Sat Jan 13, 2018 5:42 pm

I've found an example or two of how to do broadcast in the ESP32, but I can't seem to find anything on the ESP8266.

It's easy to transmit packets, simply

Code: Select all

      uint8_t da[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
      esp_now_send(da, "ESP8266", 8 );

And, out pops a wonderfully complete vendor custom management frame with my data in it.

I can receive it on my PC or wireless router running my code.

But, if I try to send anything to the ESP, it never gets it. I've tried every combination of roles and adding controllers like this:

Code: Select all

      uint8_t routermac[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff,}; //Src Address of my router.
      printf( "PEERINFO: %d\n", esp_now_add_peer(routermac, ESP_NOW_ROLE_CONTROLLER, CHANNEL, 0, 0) );

But I don't see any indication of how to receive all packets directed on-channel to the broadcast address. What am I missing?

ALSO ... p_now.html is incorrect. There are 4 bytes of data that seem rather random at the beginning of the vendor-specific content. It is possible the reason I cannot get this to work is I may be misinterpreting them.

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 14 guests