olympe icon indicating copy to clipboard operation
olympe copied to clipboard

CtrlBackendMuxIp failed to connect to 192.168.53.1 with SkyController 3.0

Open cthorey opened this issue 1 year ago • 3 comments

Hi, I am trying to update olympe to the latest version, I am noticing a problem why trying to connect to the SkyController via olympe.SkyController(SKY_IP) to my anafi USA.

2023-04-25 14:23:39,783 [INFO] olympe.backend - _retry_connect - CtrlBackendMuxIp failed to connect to 192.168.53.1 2023-04-25 14:23:42,784 [ERROR] olympe.backend - aconnect - Failed to connect to 192.168.53.1:4321: -16 2023-04-25 14:23:42,785 [INFO] olympe.backend - _retry_connect - CtrlBackendMuxIp failed to connect to 192.168.53.1 2023-04-25 14:23:43,782 [ERROR] olympe.drone - _do_connect - '192.168.53.1 connection retries failed 2023-04-25 14:23:43,782 [ERROR] olympe.drone - connect - '192.168.53.1 connection timed out

I have seen it already mentioned in #45. However, the firmware seems to be specific to the SkyController 4.0. My controller version is 1.8.1 - Thanks in advance for your help!

cthorey avatar Jun 06 '23 09:06 cthorey

Hi

Since the 7.6 release, the olympe.SkyController class use the CtrlBackendMuxIp that is only supported by the latest SkyController4 firmwares causing this regression when using a SkyController3 instead.

With a SkyController3 (running the latest 1.8.1 firmware) your should use the "olympe.Drone" class with the SkyController IP (192.168.53.1) and everything should be working.

ndessart avatar Jun 06 '23 10:06 ndessart

If I use olympe.Drone - I can indeed connect to the SkyController, however I can't start the streaming -->

2023-06-06 14:36:34,208 [INFO] 	olympe.drone.Skycontroller 3 - _link_quality_cb - Link quality: tx=60, rx=100, rx_useful=98
Traceback (most recent call last):
  File "/workdir/scripts/test.py", line 41, in <module>
    v.start()
  File "/workdir/scripts/test.py", line 17, in start
    self.drone.streaming.start()
  File "/usr/local/lib/python3.9/site-packages/olympe/video/pdraw.py", line 1174, in start
    return self.play(*args, **kwds)
  File "/usr/local/lib/python3.9/site-packages/olympe/video/pdraw.py", line 1220, in play
    return self.pdraw_thread_loop.run_async(
  File "/usr/local/lib/python3.9/site-packages/olympe/concurrent/future.py", line 143, in result_or_cancel
    return self.result(timeout=timeout)
  File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 448, in result
    raise TimeoutError()
concurrent.futures._base.TimeoutError
2023-06-06 14:36:34,874 [INFO] 	olympe.pdraw.Skycontroller 3 - _destroy_pomp_loop - Pomp loop has been destroyed: Thread-4
2023-06-06 14:36:34,875 [INFO] 	olympe.pdraw.Skycontroller 3 - _stop - pdraw callbacks thread loop stopped
2023-06-06 14:36:34,928 [INFO] 	olympe.drone.Skycontroller 3 - _disconnected_cb - Disconnected from device: Skycontroller 3
2023-06-06 14:36:35,111 [INFO] 	olympe.media - _websocket_event_reader - websocket closed
2023-06-06 14:36:37,011 [INFO] 	olympe.media - _destroy_pomp_loop - Pomp loop has been destroyed: Thread-3
2023-06-06 14:36:37,031 [ERROR] 	olympe.pdraw.Skycontroller 3 - destroy - Pdraw.destroy() timedout
2023-06-06 14:36:37,034 [INFO] 	olympe.drone.Skycontroller 3 - _on_device_removed - <olympe.arsdkng.cmd_itf.DisconnectedEvent object at 0x7ff70875ef70>
2023-06-06 14:36:37,035 [INFO] 	olympe.scheduler - _destroy_pomp_loop - Pomp loop has been destroyed: subscribers_thread

The minimal example I am running is the same as in #45. I am running the script via docker but I got the same output when running this script from the host directly.

cthorey avatar Jun 06 '23 12:06 cthorey

Is there a fix for this? I started experiencing this as well. I am running the streaming example and I was able to get 1-2 runs in but then started getting the timeout error.

Using Skycontroller 3 but I am getting this with both the drone and the controller.

All firmware up to date and I'm using v7.7.1 of the SDK.

guzman109 avatar Nov 11 '23 03:11 guzman109