Connecting to anafi with laptop in python linux

hi, i have a problem with connecting my laptop to anafi. ive installed olympe sdk for controlling anafi from laptop in python in ubuntu but you should connect to drone first to send commands. i can just connect with my laptops wifi and i cant conect from terminal to send commands i have a problem in drone=olympe.Drone(“ip address”) i put ip address but it doesnt work.

Hi,
please follow each step from https://developer.parrot.com/docs/olympe/installation.html#installation and post messages with a clear status and the faulty step.
Thanks

hi jerome,
i’ve installed olympe for anafi even i’ve installed 1.0.1 but i cant connect too actual drone. what should i write in ip address bar in this code? drone = olympe.Drone(“10.202.0.1”). cause when i write drone.connection() i get this.drone.connection()
03/07/2019 07:37:39.022845 _start_net_discovery Net discovery object has been created
I arsdkctrl: discovery ‘net’: start
03/07/2019 07:37:39.023846 _backend_socket_cb backend_pointer <olympe_deps.LP_struct_arsdkctrl_backend_net object at 0x7f25e8c19510> socket_fd 10 socket_kind 0 userdate_pointer None
03/07/2019 07:37:39.024578 _start_net_discovery Net discovery has been started
03/07/2019 07:37:41.025717 _backend_socket_cb backend_pointer <olympe_deps.LP_struct_arsdkctrl_backend_net object at 0x7f25e8bfd950> socket_fd 10 socket_kind 0 userdate_pointer None
03/07/2019 07:37:43.027004 _backend_socket_cb backend_pointer <olympe_deps.LP_struct_arsdkctrl_backend_net object at 0x7f25e8bfd950> socket_fd 10 socket_kind 0 userdate_pointer None
I arsdkctrl: discovery ‘net’: stop
03/07/2019 07:37:44.091229 connection Unable to connect to the device. IP : b’192.168.42.73’
ReturnTuple(OK=False, message="Unable to connect to the device. IP : b’192.168.42.73’ ", value=None, error_code=107)

03/07/2019 07:37:44.091954 _stop_discovery Discovery has been stopped
03/07/2019 07:37:44.092639 _stop_discovery Discovery object has been destroyed
and im using anafi drone my laptop is connected to the drone but i cant connect to it in terminal.

are you sure this is the correct log? The IP address seems wrong…

What is the output of the following script?

import olympe
drone = olympe.Drone("10.202.0.1")
drone.connection()

hi
when i run
import olympe
drone = olympe.Drone(“10.202.0.1”)
drone.cennection()
i get the same error i dont know why

Hi,

This should be drone.connection().

If that doesn’t solve your problem, I will need more information…

Which drone are you trying to connect to ? A simulated drone or a physical one ?

  • For a simulated drone (with running with Parrot-Sphinx), the IP address of the drone is 10.202.0.1 by default.
    Have you checked the Sphinx system requirements ?
    Have you installed sphinx yet ? What is the console output of Sphinx ?

  • For a physical drone, you should first connect to the drone wifi SSID and then connect to the drone at 192.168.42.1.

thank you for your helps ive connected to the drone and i can send commands to anafi.
but i have another problem now when i use move by command when i use these values (5, 0, 0, 0,)
for moving the drone it doesnt work it just work with (10, 0, 0, 0) i dont know why.

Hello @ndessart
I’m facing the same problem, cannot connect to the drone via Olympe
I’ve successfully connected to the drone’s network at 192.168.1.1. I get 192.168.1.2 as ip adress
However, trying to connect to the physical drone via 192.168.1.1 or 192.168.42.1 does not work.
Do you know why I cannot connect?
The drone is a AR Drone 2.0
The results is
ReturnTuple(OK=False, message="Unable to discover the device: b'192.168.1.1'", value=None, error_code=107)

Thank you in advance!

Setting the log level to DEBUG, I can see a connection refused on port 44444

2020-11-19 17:05:56,971 [INFO]  olympe.backend - _create_pomp_loop - Creating pomp loop
2020-11-19 17:05:56,972 [INFO]  olympe.backend - _do_create - device callbacks have been added to arsdk_ctrl
2020-11-19 17:05:56,972 [DEBUG]         olympe.backend - _do_create - New net backend has been created
2020-11-19 17:05:56,972 [DEBUG]         olympe.backend - _do_create - Set backend socket callback OK
2020-11-19 17:05:56,972 [INFO]  olympe.backend - create_timer - Creating pomp timer
2020-11-19 17:05:56,972 [INFO]  olympe.scheduler - _create_pomp_loop - Creating pomp loop
2020-11-19 17:05:57,077 [INFO]  olympe.backend - create_timer - Creating pomp timer
2020-11-19 17:05:57,077 [DEBUG]         olympe.backend - _do_start - Net discovery object has been created
2020-11-19 17:05:57,077 [DEBUG]         olympe.backend - _socket_cb - backend_pointer <olympe_deps.LP_struct_arsdkctrl_backend_net object at 0x7f6d9177d1c0> socket_fd 15 socket_kind 0 userdate_pointer None
2020-11-19 17:05:57,077 [DEBUG]         olympe.backend - _do_start - Net discovery has been started
2020-11-19 17:05:59,079 [DEBUG]         olympe.backend - _socket_cb - backend_pointer <olympe_deps.LP_struct_arsdkctrl_backend_net object at 0x7f6d9177d1c0> socket_fd 15 socket_kind 0 userdate_pointer None
2020-11-19 17:05:59,082 [INFO]  olympe.drone - connect - Net discovery failed for b'192.168.1.1'
2020-11-19 17:05:59,082 [INFO]  olympe.drone - connect - Trying 'NetRaw' discovery for b'192.168.1.1' ...
2020-11-19 17:05:59,083 [DEBUG]         olympe.backend - _do_stop - Discovery has been stopped
2020-11-19 17:05:59,083 [DEBUG]         olympe.backend - _do_stop - Discovery object has been destroyed
2020-11-19 17:05:59,084 [DEBUG]         olympe.backend - _do_start - Net discovery object has been created
2020-11-19 17:05:59,084 [DEBUG]         olympe.backend - _do_start - Net discovery has been started
2020-11-19 17:05:59,088 [DEBUG]         olympe.backend - _add_device - 192.168.1.1:44444 is closed
2020-11-19 17:06:01,092 [ERROR]         olympe.drone - connect - Unable to discover the device: b'192.168.1.1'
2020-11-19 17:06:01,103 [DEBUG]         olympe.backend - _do_stop - Discovery has been stopped
2020-11-19 17:06:01,103 [DEBUG]         olympe.backend - _do_stop - Discovery object has been destroyed
2020-11-19 17:06:01,104 [DEBUG]         olympe.backend - _do_stop - No discovery instance to be stopped
2020-11-19 17:06:01,107 [INFO]  olympe.scheduler - _destroy_pomp_loop - Pomp loop has been destroyed
2020-11-19 17:06:01,108 [DEBUG]         olympe.backend - _destroy - Destroying backend...
2020-11-19 17:06:01,108 [DEBUG]         olympe.backend - _destroy - Net backend has been destroyed
2020-11-19 17:06:01,108 [INFO]  olympe.backend - _destroy - Manager has been destroyed
2020-11-19 17:06:01,118 [DEBUG]         olympe.backend - _destroy - Destroying backend...
2020-11-19 17:06:01,118 [INFO]  olympe.backend - destroy_timer - Pomp loop timer has been destroyed
2020-11-19 17:06:01,118 [INFO]  olympe.backend - destroy_timer - Pomp loop timer has been destroyed
2020-11-19 17:06:01,119 [INFO]  olympe.backend - _destroy_pomp_loop - Pomp loop has been destroyed

Hi,

AR Drone 2.0 is not supported by Olympe or GroundSDK.
The developer documentation of ARSDK2 (for AR Drone 2.0) is available here: https://developer.parrot.com/docs/SDK2/ARDrone_SDK_2_0_1.zip

Regards
Nicolas

Oh, zut!
Thank you, I’ll read the documentation you sent me.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.