is there any specific reason mavlink is restricted to just 4 serial ports? I have just built my rover around mavlink to discover that you can only use it on 4 ports
Im curently running
mavlink hoverboard motor controller,
mavlink AI camera,
Mavlink Lidar,
8266 wifi adapter
mavlink UHF telemetry
mavlink monitoring computer
as soon as i enable more than 4 ports one stops working.
I would say that is a scheduling issue. Mavlink in/out is handled from the main thread so it could be a burden to the main loop scheduling if there is too much mavlink routing involved.
There should be indeed : MAVLINK_COMM_NUM_BUFFERS == 5 mavlink port working (usb will take one by default).
Good question anyway as H7 should “theorically” be able the handle more than F4.
Notice that MAVLINK_COMM_NUM_BUFFERS was extented to 7 with networking enabled, so the limit could problably be raised
I tried enabling ppp but it’s still limited to 5 on the serial ports.even if they were rate limited it would work fine for me as only 1 of them is a high speed device the rest is just sensors that send back at 1hz.
I have had to get creative, I have multiple devices connected to the serial 1 TX pin at 115200 so they can all get data at 115200 then im using a RP–2040 to buffer the data back to the flight controller to a different port that runs at 1500000 so it doesnt get overloaded. because all mavlink packets get sent to all the ports it still works.using TX and RX on 2 different ports.