Mac <---- wifi ----> companion (ubuntu) <---- usb ----> PX4

I have a huge problem: I’m trying to connect Pixhawk to a companion computer
with ubuntu 22.04 via USB cable and next connect companion computer to Mac with M1 via wifi, I need to use mavros or mavlink-router ?, and how can I do to perform the link?. I need a good and exhaustively explanation because I’ve tried all for one week without any success. I’m using PX4 and QGroundControl.
Thanks for the time and answers

you should use mavlink router for that. There are lengthy docs in the readme. What have you tried/ doesn’t work?

Thanks for the answer, it works with MR but I should use mavros for this project in the noetic distro. I had install that from ardupilot guide with binary installation and i’m trying to set the file as the guide in px4 Says for the example