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
ESP8266 as DupleTX #1457
ESP8266 as DupleTX #1457
Conversation
With unified firmware letting anyone make their own hardware json, I'd like to revisit this so 3.0 can release with ESP8285 RX as TX for fun shenanigans controlling a model from a PC. I might need help though since time is getting tight! |
Flagged as Do Not Merge because it seems to crash when handling Lua commands beyond just loading. EDIT: Fixed! Stupid null-flippin callbacks. Who thought this was a good pattern?! Exception report``` Exception: 0 (Illegal instruction)epc1: 0x40223768: hwTimer::nullCallback() at ??:? ctx: cont sp: 0x3ffffc10 stack:
|
Some weren't even in IRAM although they needed to be!
Testing 80MHz vs 160MHz using DEBUG_RCVR_LINKSTATS to count packet jitter at 500Hz (my T-Pro isn't updated to do 1KHz yet) over 50,000 packets
So 80M had a slightly more accurate average, but with a little wider spread. Both seem close to a margin of error sort of thing. I feel like reducing the heat by reducing ESP8285 power usage is worth it, since receivers will not have any cooling and are in a terrible thermal form factor. We could always make it a Lua option if this ever becomes something that gets a real module solution, but I hope that doesn't happen nor should we approve ESP8285 modules due to their reduced flash capacity and lack of peripheral support. |
* Get ESP8266 working as DupleTX * Move AUXx constants to crsf_protocol * Fix things tied to unified_tx instead of proper platform * Add generic.tx_2400.dupletxesp * Remove old TX definition * Rename PIO target to DUPLETX_ESP * Fix breaking power GREEN_LED for other targets * Remove some nullcallback instances Some weren't even in IRAM although they needed to be! * Add TX wifi to Lua for esp8266 * Remove debugging FIRST, bry * 80MHz is back, baby! * Forgot to turn on SPIFFS * Move init logger to logging * Rename to Generic ESP8285 Full-duplex 2.4GHz TX
ESP8266 TXes only work in FREERUN mode with current master, this fixes them so they can operate as DupleTX TXes (internal full duplex modules). Video:
I've only used an EP2 RX, but any ESP-based RX should now be capable of operating in TX mode. The power draw of the EP2 in 10mW output mode is <50mA which means we can have a full TX running at 0.165W which is like 1/10th what an ESP32-based TX uses.
You'll note that I'm only running the ESP8266 at 80MHz because it seems to work just fine, but I am not measuring packet jitter so that may be impacted by the 1/6th the performance of an ESP32 at 240MHz, but the STM32 does it at 72MHz so why waste power? Update: BF RC_SMOOTHING_RATE logs below
Other Receivers
This creates a Unified 8285 TX target and a single DUPLETX_ESP target and others can make their own one-off TXes by editing the hardware.json. Example: a BetaFPV Nano RX can be used as a TX just by setting power_high, power_max, power_values, and setting radio_dcdc.
Why?
I dunno. It just seemed like a fun thing to do now that we have internal CRSF full duplex support and the half duplex issue holding back the ESP won't be a problem.
Channels generator
Using crsf_parser library, change COM10 to your FTDI, and possibly baud from 400000 to 921600 if your FTDI doesn't support arbitrary baud rates
https://github.com/AlessioMorale/crsf_parser