I have been trying to connect with the pixhawk using MAVproxy in order to control quadrotor through CLI.
But I am facing problems in connecting to the pixhawk 2.4.8 using MAVproxy.
As son as I try to connect, the pixhawk doesnt revert any details (appears as if its not even connected to autopilot). As expected, all my commands entered through mavproxy return nothing.
pluto@pluto-macbook:~$ mavproxy.py --master=/dev/ttyUSB0 --baudrate 576000 --aircraft MyCopter
MyCopter/logs/2014-08-14/flight5
Logging to MyCopter/logs/2014-08-14/flight5/flight.tlog
no script MyCopter/mavinit.scr
MAV> param show
MAV>
Could you help me how the solution of it? Thank you so much
Your baud rate is incorrect. Make sure it is the same on both ends.
MyCopter/logs/2014-08-14/flight5
Logging to MyCopter/logs/2014-08-14/flight5/flight.tlog
no script MyCopter/mavinit.scr
MAV> param show
MAV>
This prompt indicates you’re not talking with the autopilot at all. Don’t
expect any commands to work until you are. When you do connect you’ll
know it (and the prompt will change to indicate the current flight mode).
could you teach me how to talking with the ardupilot at all?
it just appear nothing process
MyCopter/logs/2014-08-14/flight5
Logging to MyCopter/logs/2014-08-14/flight5/flight.tlog
no script MyCopter/mavinit.scr
MAV> param show ARMING_CHECKING
MAV>
MAV>
MAV>
pi@raspberrypi:~ $ sudo -s
root@raspberrypi:/home/pi# mavproxy.py --master=/dev/ttyS0 --baudrate 57600 --aircraft MyCopter
Connect /dev/ttyS0 source_system=255
no script MyCopter/mavinit.scr
Log Directory: MyCopter/logs/2017-10-02/flight4
Telemetry log: MyCopter/logs/2017-10-02/flight4/flight.tlog
MAV> Waiting for heartbeat from /dev/ttyS0
Exception in thread main_loop:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 810, in __bootstrap_inner
self.run()
File “/usr/lib/python2.7/threading.py”, line 763, in run
self.__target(*self.__args, **self.__kwargs)
File “/usr/local/bin/mavproxy.py”, line 751, in main_loop
master.wait_heartbeat()
File “/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py”, line 386, in wait_heartbeat
return self.recv_match(type=‘HEARTBEAT’, blocking=blocking)
File “/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py”, line 347, in recv_match
m = self.recv_msg()
File “/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py”, line 310, in recv_msg
s = self.recv(n)
File “/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py”, line 832, in recv
ret = self.port.read(n)
File “/usr/local/lib/python2.7/dist-packages/serial/serialposix.py”, line 501, in read
’device reports readiness to read but returned no data '
SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
pi@raspberrypi:~ $ sudo -s
root@raspberrypi:/home/pi# mavproxy.py --master=/dev/ttyS0 --baudrate 57600 --aircraft MyCopter
Connect /dev/ttyS0 source_system=255
no script MyCopter/mavinit.scr
Log Directory: MyCopter/logs/2017-10-04/flight3
Telemetry log: MyCopter/logs/2017-10-04/flight3/flight.tlog
MAV> Waiting for heartbeat from /dev/ttyS0
Exception in thread main_loop:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 810, in __bootstrap_inner
self.run()
File “/usr/lib/python2.7/threading.py”, line 763, in run
self.__target(*self.__args, **self.__kwargs)
File “/usr/local/bin/mavproxy.py”, line 751, in main_loop
master.wait_heartbeat()
File “/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py”, line 386, in wait_heartbeat
return self.recv_match(type=‘HEARTBEAT’, blocking=blocking)
File “/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py”, line 347, in recv_match
m = self.recv_msg()
File “/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py”, line 310, in recv_msg
s = self.recv(n)
File “/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py”, line 832, in recv
ret = self.port.read(n)
File “/usr/local/lib/python2.7/dist-packages/serial/serialposix.py”, line 501, in read
’device reports readiness to read but returned no data '
SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
Hi, pi3 has changed the uart access a bit because of the onboard bluetooth. In short, you need to disable the onboard bluetooth and reassign the exposed uart gpio back to the PL011 which has better timing at different clockspeeds. It’s then accessed as before on /dev/ttyAMA0.
Add this to /boot/config.txt:
enable_uart=1
dtoverlay=pi3-disable-bt
Then you should see the AMA0 in the tty devices using command ls /dev/tty*
Launch the Mavproxy using AMA0
sudo mavproxy.py --master=/dev/ttyAMA0 --baudrate 57600 --aircraft MyCopter