Dear All,
Firt...let me thank you guys working very hard with all these Ardu-things (ArduPilot, ArduCopter, APM, ...). Very nice and I love it!
I have bought a set of APC220 RF sender/receivers for using as telemtry link for my ArduCopter. I could not connect with the APM Mission Planner...got a time-out for "no heartbeat sent". It did however work with HK GCS and QGroundStation so I started to dig into why it did not work with APM. Luckily, the code is available and hence I have now managed to get it to work.
The APC220 requires the RTS and DTR to be false at all times as no handshaking can be used. I also found that the version of ArduCopter (2.4.1) that I have does not send heartbeats on the telemetry port...have I set something up badly here?
To get this to work you can edit the code to change how the OpenBg() is executed in the MavLink.cs according to:
lock (objlock) // so we dont have random traffic
{
log.Info("Open port with " + BaseStream.PortName + " " + BaseStream.BaudRate);
if (useAPC220)
{
// No RTS/DTR at all for this one...
BaseStream.RtsEnable = false;
BaseStream.DtrEnable = false;
BaseStream.Open();
BaseStream.DiscardInBuffer();
}
else
{
BaseStream.Open();
BaseStream.DiscardInBuffer();
BaseStream.toggleDTR();
}
Thread.Sleep(1000);
}
I added a small "useAPC220" propery that I set to "true".
I also added/changed a setting where the code expects the heartbeats to come:
if (useAPC220)
{
// No hearbeats coming from my 2.4.1 FW using APC220...why?
// firmware issue?
sysid = 1;
compid = 1;
mavlinkversion = 2;
aptype = 2;
break;
}
else
{
// incase we are in setup mode
BaseStream.WriteLine("planner\rgcs\r");
buffer = getHeartBeat();
// incase we are in setup mode
BaseStream.WriteLine("planner\rgcs\r");
System.Threading.Thread.Sleep(1);
buffer1 = getHeartBeat();
}
So, I hardcoded some values (version, id's etc) that is coming from the heartbeat package normally.
Anyhow, this is a rather bad approach (but quick and dirty and works for my special case). So, now I wonder if it would be possible to add a few settings in the APM Mission Planner to handle this? Maybe one can have a setting for "use handshake" and one for "expect heartbeat". This would make the APM to be compatible with the APC220 as well.
Well...that was what I had in mind. Thanx once again for your hard work!
/Stefan
Tags:

P.S. MP v1.1.51 also connects fine through the APC220's to APM1, does not however connect to APM2.
Permalink Reply by OG on March 13, 2012 at 7:17am Hello,
I am using these modules & I am duplexing them for more bandwidth. I do have connection issues from Tim to time but I am sure it user error. do not keep updating you MP after you have lorded your code on to the APM . that seems to have corected miy issues for me.
This work very well even it signal is lost MP start back up when the craft is back in range. I will try APM2 board today to see how well it works.
Permalink Reply by Stefan Grufman on March 13, 2012 at 9:20am I can also confirm that 1.1.51 now works with APC220! The disabling of the RTS worked. Thank you Michael for adding this patch into the code so quick! Very happy and glad that I could contribute back to all you have done!

Thanks to both of you for the fixes, now I just hope something can be done for APM2 too :)

Are you guys compiling from source or using the 51 update? I ask because now my APM1 w/ 220s hoses toward the end of the parameter list... Was good in 49. I'm also running AC2 from Git rev. bb6e9b69e9a7

Okay, I just updated my local clone and ran AMP from the release folder and I have connected and pulled the parameters list just fine. Then I disconnected and tried again and received consistent failures after SR3_EXTRA3.

Mine does that with APM2 at the same place but APM1 is fine, MP v1.1.51 from update and compiled version from Stefan (different solution)
Permalink Reply by Stefan Grufman on March 13, 2012 at 10:32pm 
Hi Stefan,
On my bench we're configured at 19k2 Rf and tried both 19k2 and 57k6 for the serial speed and it doesn't make a difference to where the parameter list generally pukes. I think AC2 is streaming another set of data for the tlogs that may be pushing us over the top now? In past releases where there's been this issue I've commented out the request for one of these streams that are not configurable through the planner (I need to go back and see if I still have that edit somewhere).
Anyway, let me know what I can do to help. I'd rather have a robust solution to handling the data than eliminating chunks of data altogether.
Permalink Reply by Stefan Grufman on March 14, 2012 at 8:13am Ok, at least we know that it is not this then... :) I will dig into this, but I am afraid it will have to be put a side for a few weeks as I am traveling with both my family (skiing!!! nice!) and then directly with my work. After that, if it is still not solved, I will see if I can dig deeper! Sorry for the delay.
Permalink Reply by u4eake on March 14, 2012 at 9:13am I have the same problem with APM1 1280 with git release 692227efe040 and mission planner 1.1.51.
After SR3_EXTRA3 the connection freezes. Sometimes, after a few seconds I get a few parameters more, but it never gets to the end and connects :(
This is a damn nuisance, as I want logging to mission planner to help debug and improve arducopter :(
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.692 members
51 members
186 members
1298 members
24 members
© 2013 Created by Chris Anderson.
Powered by
