What command(s) do I need to send to the rov to initialize and to start message sending (data packets) from the Pixhawk.
Currently I have to start up either mission planner or qgroundcontrol to initialize and start data transmission.
I can receive and decode the MavLink data packages OK but haven’t worked out the initialization process when first connecting to the rov.
I have waded through the source code but can’t find where the initialization commands are sent.
or is their a script I can use to make this automatic whenever the sub is powered up
I believe you just need to send a heartbeat, make sure the sysid (use 255) and compid are unique. If you want some messages to be streamed, check the ‘stream rate’ parameters: Redirecting...
Just set up a simple flightcontroller (Omnibus Nano V6) with latest ardusub firmware available on website, configured it through QGroundControl so that the SR1_params are identical to the respective SR0_params.
Now with only the controller’s TX1 pin connected to a serial to usb interface, i can use mavproxy --console to display heading, pitch and roll right after putting power to the controller. No need to send anything to the controller or initializing something to receive the data.
Just i can’t use qgroundcontrol to display the data as it won’t connect over a simplex link, but from a MavLink point of view everything seems to be ok so far.
Take a look in our pymavlink documentation. For C++ projects, please share a minimum example in pastebin or github, remember to provide build instructions for it or any build system.