This code base was built for the ESP32-S2-DevkitC. Feel free to contact the author, Mikey Awbrey, with any questions on Discord @heuyhui (in the Radio Frequency Hackers Sanctuary).
Hardware is currently built to support 2 LEDs attached to pins 19 and 14. Pin 19 uses PWM to control brightness, Pin 14 blinks. Both are 3.3V out. The LEDs are not necessary for operation. Serial is needed to set the target and source MAC, as well as read output (if not uses the LEDs).
baud_rate = 115200
data_bits = UART_DATA_8_BITS
parity = UART_PARITY_DISABLE
stop_bits = UART_STOP_BITS_1
flow_ctrl = UART_HW_FLOWCTRL_DISABLE
rx_flow_ctrl_thresh = 122
Serial commands are executed by sending ` (backtick / grave)
startSingle stopSingle targetMAC: XX:XX:XX:XX:XX:XX sourceMAC: XX:XX:XX:XX:XX:XX
NOTE: stopSingle will probably just crash your device.
You must ensure that the MAC you are setting as the target or source is a VALID MAC. There is no error checking for this and it will save what you place there in non-volitile storage whcih will cause a crash loop!
The only recovery from this crash loop will be reflash the NVS. You have been warned!
If you don't know what I mean, here is a bit of a primer:
Unicast MAC addresses must never set the 1's place bit in the first byte. That's the "group" (multicast/broadcast) bit.
And if you REALLY aren't sure what any of that means...
JUST SET THE FIRST BIT TO 0x32 TO BE ON THE SAFE SIDE
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
|---|
I HIGHLY RECOMMEND USING VSCODE FOR THIS! ESP-IDF has an excellent plugin for VSCode that makes this so much easier, though it is just a wrapper for the ESP-IDF python code.
Make sure you set the build to your device and specific settings are set correctly. Things like flash size, SPI, all sorts of little details.
YMMV