Hi Any suggestions how to diagnose “delivery fail” ?
I’ve double checked all wiring and MAC addresses.
Not sure what to do next.
Hi Jack.
What code are you using?
It might be a problem in your code or you might be using the wrong MAC address of the receiver.
Did you get the MAC address using our code? https://raw.githubusercontent.com/RuiSantosdotme/Random-Nerd-Tutorials/master/Projects/ESP/ESP_Get_MAC_Address.ino
What’s the distance between the two boards?
Regards,
Sara
Hi Sara
I am using the code from Module 8, Unit 2, and as mentioned, I double checked the MAC addresses.
No problem with he one-way communication exercise.
The distance is 8 inches !
Do you get the delivery fail message for both boards?
You can try using the broadcast MAC address and see if you get them working?
Like this:
uint8_t broadcastAddress[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
Regards,
Sara
Thanks Sara. I did not realize the space after each comma was critical. All good now ; )
Jack
Hi Jack.
Just to clarify: 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF is the broadcast address. This means that all devices will receive the message. If you want only one board to receive the message, you should insert its specific MAC address.
Regards,
Sara
Ok, now I am confused (again!). In this unit (Unit 2) regarding two-way, ie, peer-to-peer, communication, I thought the code is specific to only two boards talking to each other, and indeed I am inserting the specific receiver MACs. So your first two sentences are confusing to me.
I wanted to also ask a few other related questions. Probably simple solutions but I’m still learning to code.
- How to save the sensor data in an array along with clock date/time for later retrieval and plotting? Would the extra code be the same for both sender (with the sensors) and the receivers?
- How much data can an esp32 hold? Is here a mechanism to extend storage?
- In Unit 3 the demonstration suggests to connect each or all the receiver boards to a computer, and use Putty. What if you want to see the output without a connection? I guess the only option would be to add a display?
- Is remote access to an esp32 to change code is possible? So in a situation where a board is deployed in an inaccessible environment or location and a change of code is needed, is it possible or you are basically out of luck?
Hi Jack.
The example is the two boards talking to each other. But because you were getting the “failed” message, I suggested that you use the broadcast address to see if it was some problem receiving or sending.
Because it was working with the broadcast address, I suppose there must be something wrong with the specific MAC address of the boards. If it was something related with issues with the ESP-NOW communication, it wouldn’t have worked with the broadcast address. I only suggested using the broadcast address to try to figure out what might have been wrong. I’m sorry if I didn’t explain myself clearly.
1. If you want to get date and time to store the readings in SD card, for example, you can get time using NTP server. But you need access to the internet. For example, when you get readings, call a function to get the time and add that info to the structure you want to send.
2. How much data it can hold? What do you mean? Stored in SPIFFS for example? Or in ESP-NOW messages? You can send 250 bytes in each message.
3. Yes, to see the reading without a connection, you can add a display. An OLED display is the easiest to deal with (in my opinion).
4. You can change the code in a remote access if you add OTA (over the air) updates features. Search for “ESP32 OTA” and see if you get any examples that would be applicable to your project.
Finally, I’m sorry for the delay in my response.
If you need further help, just ask.
Regards,
Sara