I'm putting together a small telemetry board using esp8266 Wifi plus a LoRa radio. The Wifi is high bandwidth and relatively short range and the LoRa radio supports low-bandwidth long range telemetry. In my case this is for a boat, but it could be used on any px4 set-up really. I'm wondering how to best connect this to a pixracer (or pixhawk).
The main issue is the bandwidth difference between Wifi and LoRa. For the latter expect 10kbps (ten kilobits per second) max and down to 1kbps for long range (could go lower, but then it's probably only useful for very basic GPS and attitude info).
The first question is how to connect such a board to a pixracer. I want to use "raw" sx1278 LoRa modules, not ones that have a serial interface. The sx1278 uses an SPI interface and there is no way to connect an external SPI device to a pixracer, so the esp8266 will have to control the LoRa radio (there's software out there and I'm very familiar with driving the LoRa chips).
The second question is how to control what goes over the LoRa link. The esp8266 only has a single usable UART RX, so it's not practical to connect it to a second telemetry port which could be configured for a lower data rate.
make the split in the esp8266: it could be configured with a priority order of mavlink message types and it fills the slow LoRa link with the highest priority messages that are being sent over wifi. Or a slightly different scheme could be used that assigns packet rate ratios to various message types, e.g., for every 10 GPS position packets send one mission status packet.
make the esp8266 software dynamically send PX4 commands to change the data rates depending on whether it has wifi connectivity or only LoRa. I don't know whether this is possible or not, but it sounds tricky, specially the hand-offs could have significant time gaps.
multiplex the serial port to the esp8266 to carry two logical telemetry channels, one for Wifi the other for LoRa. Each packet could be prefixed with a channel byte. Sounds like this could take quite some code and it makes the telemetry port protocol non-standard, non-compatible.
A nice thing about having an esp8266+LoRa board is that on the QGC end it can be used as a LoRa to Wifi bridge, so two board with different software can be used to make a complete solution.
I would very much appreciate any input here! I am planning to fab boards at osh park and would make the designs available if there is interest.