Board Communication
I tried to get my boards to talk by going back to board 1 and watching the monitor.
This showed me something was still wrong.
With a bit of help from Chat, we discovered that the transmitter and receiver were not on the same channel.
Chat had me add in a line to force the channel selection to channel 1.
With that change Board 1 was now reading a message of Peer added successfully, but also a send error.
Board two though, with the fixes sent out ESP-NOW ready.
The last step to communicate was figuring out the error I was getting for board 1.
I learned a lot about the ESP-NOW error/state code: 12396.
I saw it as both a send error and a send result code on board 1 while trying to solve it.
This error has a couple of possible meanings, and I tried to look into each of them as a fix.
Some of the reasons you can recieve this error is wrong peer addresses or channels (which we fixed), mismatched WIFI channel between boards, wwrong MAC addresses, packet loss, or poor signal.
Basically, its saying thiers some sort of problem communicating, reminds me of the ambiguous Exit status 1 in Arduino.
One thing that Chat did suggest though while trying to solve this communication issue is that I try using two of the same types of boards instead of mixed boards.
At Chats suggestions, I swapped out board 2 for a new board that was also a C6.
Eventually, I may need to try the other methods it suggested, such as UDP, because I will most likely have this issue later for my final project.
Receiver - Board 4
It was at this point that I skipped tring to use my screen with the built in chip and jumped into just using a second C6.
I needed the mac address for this board so I started there.
Board 4: 98:a3:16:85:4d:a8
I updated the MAC address on the sending code and reuploaded to board 1 and got no change in the Monitor.
Still, send result code: 12396.
This time arround though, my Recieving board (Board 4) put out a new message in the monitor.
Along side saying ESP-NOW Ready, it also said Reciever Ready.
Bourd one though, the transmitter, is still putting out the 12396 error.
I contnued to work with chat to get board 1 out of the error state.
With a quick code edit from Chat, I got the closest yet to connecting them.
My Receiving board now showed:
booting...
WiFi Channel (receiver): 0
ESP-NOW READY
And my transmitter board showed:
Sender booting...
WiFi Channel (sender): 0
ESP-NOW READY
Send result: 12396
Chat told me this is a good sign, and should be an easy fix because were actually attempting to send out but we havent established an actual channel yet, hence the 0.
I tried to update with the fix chat made me, and my computer Blue Screened during the upload process. Yay!
Sometimes you just want to give up, and this feels like one of those times…
Im grateful that everything I had worked on up this point was either saved manually or on a google doc which auto save.
I took a mental break and strepped away from my computer, but I am so glade I didnt give up completly.
After letting my computer reset, and letting myself reset as well, I tried one last time with the updated code from Chat.
And I was finally successfully talking between the two boards.
Hallelujah!
Now to make it do something.