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

Views: 4731

Reply to This

Replies to This Discussion

Try planner 1.1.52
That was reported stable with Apc220.

Thanks.

Where can I found this version??

EDIT.

I have found it.

The APC220 is working but I can not use it with the arducopter version  I´ve got.

What arducopter version can I use with planner 1.1.52??

Confirmed, no connection at all with MP v1.1.85

Mine works with MP 1.1.92

No, I still can't get mine to work, Juan how did you get yours to work?

Tried that, still nothing. Followed this to set up the two APC220 modules: http://wiki.openpilot.org/display/Doc/APC220+Transceiver+Telemetry, is that correct. Is there anyway to test whether they are in fact communicating?

Yes, is correct. I did mine wirh this tutorial.

If you connect one to your computer and the other just to power and make a jumper betwin  Tx and RX. open a program like Hyperterminal with the APC settings and write a letter and intro it must be the same letter back again (you type A and youreceived another A, you read AA)

Thank you Alberto, it's working now, I checked the box, unchecked it, checked it and unchecked it again (!) and it seems fine now. Will test again in the morning.

OK, I can connect, get parameters and get flight data, but if I change a parameter and hit 'Write' it's fine but I can only do that once, then I get a "set param_xx failed" error. However even though I get that error the parameter appears to have been written because if I hit Refresh the parameter that I changed shows correctly. HOWEVER, more often than not on Refresh I get a "serial link isn't fast enough" error.


These APC220's are really frustrating, maybe I must just throw them away!

i got the same issue ever since i upgraded to 2.6 

RSS

Social Networking

Contests

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.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service