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

DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13, 2022
DIY Robocars via Twitter
RT @araffin2: 🏎️ After hours of video editing, I'm happy to share a best of my Twitch videos on learning to race with RL. 🏎️ Each part is…
Oct 13, 2022
More…