dronekit.APIException: mode (0, 0) not available on mavlink definition

I don’t really understand why I get this error when running a python script in my raspberry pi.

I have connected R-PI’s uart (rx and tx) pins to the Telem 2 port of the cube. I did the same thing when I was using a PixHawk. I have already ran multiple python scripts when I was integrating PixHawk and raspberry pi and all of them worked.
Now that I am using Cube Orange, I get this error.
I tried running maxproxy.py --master=/dev/ttyAMA0 and I can see that there is a connection in the terminal. I can read the vehicle type, the modes, the arm, etc.
However, when I run a python script, this kind of error shows up.

ERROR:dronekit:Exception in message handler for HEARTBEAT
Traceback (most recent call last):
  File "C:\Users\munsterlander\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dronekit\__init__.py", line 1531, in notify_message_listeners
    fn(self, name, msg)
  File "C:\Users\munsterlander\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dronekit\__init__.py", line 1223, in listener
    raise APIException("mode (%s, %s) not available on mavlink definition" % (m.custom_mode, m.base_mode))
dronekit.APIException: mode (0, 0) not available on mavlink definition
ERROR:dronekit:Exception in message handler for HEARTBEAT
Traceback (most recent call last):
  File "C:\Users\munsterlander\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dronekit\__init__.py", line 1531, in notify_message_listeners
    fn(self, name, msg)
  File "C:\Users\munsterlander\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dronekit\__init__.py", line 1223, in listener
    raise APIException("mode (%s, %s) not available on mavlink definition" % (m.custom_mode, m.base_mode))
dronekit.APIException: mode (33554837, 0) not available on mavlink definition

Additional info:

  • Telem 1 is connected to my HereLink’s UART
  • Telem 2 is connected to my R-Pi’s RX and TX
  • Serial5_protocol is -1, serial 2 is 2 and serial2_baud is 921600
  • I tried connecting to the cube orange using through the r-pi’s usb port and it still shows the same error.

I have also read many issues similar to this one because of the Cube Orange and none worked so far. How do we fix this one?

Sounds like the problem with ADSB crosstalk, see also:

But you seemed to have reconfigured serial5 already, so I have also no additional hints.

1 Like