I have been experimenting with the APM hardware for almost 6 months now. I have been able to write a custom MAVLink message to send down from the APM to my ground station. So far, I have been able to successfully transmit this message using the APM1 (v1.4 or above). Although, when I try to transmit this message with the APM2, there is never an attempt to send. This is weird to me because I haven't changed any of the firmware; the same firmware is loaded on both chips.
Therefore, I believe there is somewhere within the code that checks for the APM2 hardware and subsequently masks my message to be sent. I tried locating it, but couldn't find anywhere in the code that stopped my message from being sent because of a certain hardware. I have placed my send_message(CUSTOM_MESSAGE) method call right after the send_message(MSG_LOCATION) method call, which works tremendously for the APM1. These methods calls are both located in the data_stream_send() method, which is contained in the GCS_Mavlink.pde file. Does anyone have any insight on why the APM2 wouldn't be sending this message?
EDIT: refer to the 3rd comment i've made for an update to the problem.
I've done some more research. It seems like the APM2 will only send out heartbeat packets. Is there some sort of acknowledgement sent back to the APM after a heartbeat message is sent, which makes the APM2 start sending mavlink messages? Maybe this is what is happening when you hit connect on the mission planner? If this is the case, why doesn't the APM1 require this?
have you remembered to uncomment the line in the APM_COnfig.h that tells the system ot use the APM2 settings?
// comment the line out for APM1, uncomment it for APM2
Just FYI I have followed the protocol for generating custom MAVLink messages, so that shouldn't be the issue.