One way to communicate is through MavLink many persons say than this is easy. Other way is use
hal.console -> print(message to company)
hal.console -> write(message to company)
hal.console -> read(message from company)
UART PORT A
hal.uartA -> print(message to company)
hal.uartA -> write(message to company)
hal.uartA -> read(message from company)
More over, you can use ports uartB, uartC and uartD. But, you need to configure this ports in mission Planner (or APM planner) without protocol (-1). I recommend upload the next sketch if you want to try by this way.
./waf build --target examples/UART_test --upload
By this way you can communicate each PixHawk with one computer aboard and each computer communicate (via wifi or other ) at one computer (Master).