APM Mission Planner with APC220 RF module

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

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Moderator

    Seems to work now?? Except for Read Waypoints:

    3692680839?profile=original

  • APC220 RF module works now & has been working for the last 2 release. MP setting has to be modified in configuration 
    unchecked reset USB on reset .
  • Moderator

    So close yet so far. 212 of 238 received...

    I haven't thrown them away just yet, just thought I'd try check and see if anything has changed. Nope

    3692565277?profile=original

  • Moderator

    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!

  • Mine works with MP 1.1.92

  • Moderator

    Confirmed, no connection at all with MP v1.1.85

  • Hello to everybody:

    I am new here,

    I have being flying with Arducopter since 6 months ago, I hade The APMplanner and I connected to my Acopter with dhw Wireless APC220

    everyting was OK but I have upgrade today and I cant not connet again with the wireless, I can do it with the USB cable but no with the APC220.

    The modems are OK because I use then to connect an MK to the MK tools and it works good.

    I receive the message " No Heatbeats packets received"

    Where is the problem??

    Thanks

    Alberto 

  • 100KM

    With mission planner 1.1.59 and APM 2.5.3 (git 21880a5d1750 ) no joy in connecting anymore.  It used to work with the sending rate of params / 3 on 1.1.56, but now even that won't connect.  I get a timeout (no heartbeat) and it won't even try to load params anymore...

    ctrl-T also doesn't want to connect.

    Damn this is annoying, what can I do to help troubleshoot this ?  I can modify ACM code, but I don't have visual studio and am not familiar with the mission planner code.

  • My module are still working on 2.5 & I have them duplexed 57600 baud rate ! use the latest misson planer! but not on APM2

  • I can confirm APM2 serial interface not connecting with APC220, RN-XV WiFly Module, RN-42 AT Bluetooth Modem - BlueSMiRF Silver. all these are working with APM1 any thing I can do to help resolve this issue?

This reply was deleted.

Activity