"MAVPROXY" ignores command

---------------------------------------Problem-------------------------------------------------------------------
I have set up a Raspberry Pi 3 to communicate with the APM2.8 via MAVProxy .
http://ardupilot.org/dev/docs/making-a-mavlink-wifi-bridge-using-the-raspberry-pi.html
It works great with mission planner but when try to command it with “mavproxy” commands are not accepted .In background i have a hotspot and pi and my remote laptop are connected as client
----------------------------------------OUTPUT-----------------------------------------------------------------------
like when i type >> mode it gives output of different modes but when i type >>mode STABILISE it do not change the mode,Also if try to change mode though our RC connections all logs are displayed and mode gets changed.
-------------------------------------HARDWARE CONNECTION---------------------------------------------------
on my copter i have connected my APM 2.8 board with a raspberry pi (on board) through USB
http://www.amazon.in/APM2-8-Controller-Multicopter-Quadcopter-ARDUPILOT/dp/B01MY55UQ8?tag=googinhydr18418-21&tag=googinkenshoo-21&ascsubtag=6cbb02f4-3cae-489b-a30d-7dbe1838c88f i have connected pi and remote laptop both through same wifi as client and a wifi router as server
------------------------------------Initiate connection------------------------------------------------------------------------
I initiate connection on remote laptop through mavproxy.py –master=udpout:xxx.xxx.xxx.xxx:14550
and in mavgateway it DAEMON_ARGS="–master=/dev/ttyACM0,115200 --out=udpin:0.0.0.0:14550 --daemon"
----------------------------------Ultimate Goal -------------------------------------------------------------------------------
we are making a person following drone we have used struck algorithm for object tracking and want to control our quadcopter through remote laptop .As this algorithm requires high resource we will be doing our object tracking on remote laptop and send data to apm through wifi bridge but apm is not taking our commands

Correct mode is STABILIZE

What command arent working ?

No mode is switching i tried other modes too like CIRCLE ,RTL it do not allow to switch . From my understanding it do not allow to write anything to apm :frowning:

Is the connection ok ? do you have an HEARTBEATH or some data coming from apm ?

Yes i have heart beat comming from apm and if i switch mode from rc input it shows the mode is changed

Try to add --mav10 mavlink cmdline . But I suspect that you got a connection problem. Can’t you use uart instead of USB ?
I don’t know the apm board, so I won’t be able to help much to use uart …

3 Likes

Thank You it worked great ! :slight_smile:

1 Like

thanks @khancyr it’s worked :grinning:

thank you @khancyr! it worked awesome… your help meant a lot!!

Thanks. It worked :smiley:

great it works thak you

Hello, can you tell me APM2.8 how to communicate with the Raspberry Pi?
Like how do you set up and communicate
Thank you

Hello Khancyr,

Thank you for sharing your solution.

However, in 2023 I’m getting the following error

mavproxy.py --master=/dev/ttyAMA0 --baudrate 57600 --aircraft MyCopter --mav10
WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk
Connect /dev/ttyAMA0 source_system=255
waypoint module not available; use old compat modules
Traceback (most recent call last):

  • File “/usr/local/bin/mavproxy.py”, line 1449, in *
  • mpstate.load_module(m, quiet=True)*
  • File “/usr/local/bin/mavproxy.py”, line 374, in load_module*
  • module = m.init(mpstate, *kwargs)
  • File “/usr/local/lib/python3.9/dist-packages/MAVProxy/modules/mavproxy_wp.py”, line 579, in init*
  • return WPModule(mpstate)*
  • File “/usr/local/lib/python3.9/dist-packages/MAVProxy/modules/mavproxy_wp.py”, line 19, in init*
  • super(WPModule, self).init(mpstate, “wp”, “waypoint handling”, public=True)*
  • File “/usr/local/lib/python3.9/dist-packages/MAVProxy/modules/lib/mission_item_protocol.py”, line 35, in init*
  • self.completions())*
  • File “/usr/local/lib/python3.9/dist-packages/MAVProxy/modules/lib/mission_item_protocol.py”, line 103, in completions*
  • cs = self.commands()*
  • File “/usr/local/lib/python3.9/dist-packages/MAVProxy/modules/mavproxy_wp.py”, line 162, in commands*
  • ret.update({*
    AttributeError: ‘NoneType’ object has no attribute ‘update’

I have heartbeat with the APM when connected with R pi zero 2W with the following command:

mavproxy.py --master=/dev/ttyAMA0 --baudrate 57600 --aircraft MyCopter
WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk
Connect /dev/ttyAMA0 source_system=255
no script MyCopter/mavinit.scr
Log Directory: MyCopter/logs/2023-09-12/flight15
Telemetry log: MyCopter/logs/2023-09-12/flight15/flight.tlog
Waiting for heartbeat from /dev/ttyAMA0
MAV> Detected vehicle 1:1 on link 0
online system 1
STABILIZE> Mode STABILIZE

I have followed this video to setup the mavproxy in my pi zero : https://www.youtube.com/watch?v=kB9YyG2V-nA&t=657s

and, I faced the same issue, where APM is unable to receive the Mavproxy command. However, Mavproxy is able to read the APM data.

I suspect I’m running some incompatible versions… but not sure what is wrong.

Please help me with this,
Thank you :slight_smile:

1 Like

how did you solve it?
am stuck at the same place