# Inconsistent ethernet connection

**URL:** <https://discuss.px4.io/t/inconsistent-ethernet-connection/37441>\
**Category:** MAVSDK\
**Created:** [March 23, 2024, 9:38pm UTC](https://discuss.px4.io/t/inconsistent-ethernet-connection/37441 "2024-03-23T21:38:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bryie](https://discuss.px4.io/user_avatar/discuss.px4.io/bryie/32/13849_2.png) [@bryie](https://discuss.px4.io/u/bryie)\
**Post date:** [March 23, 2024, 9:38pm UTC](https://discuss.px4.io/t/inconsistent-ethernet-connection/37441/1 "2024-03-23T21:38:30Z")

</div>

I am trying to control a drone using MAVSDK, and to test its functionality, I have been trying to run the example [takeoff and landing script](https://github.com/mavlink/MAVSDK-Python/blob/69576ac9ab223317f853f6612a364572f5a8eae8/examples/takeoff_and_land.py). I modified the script to reflect the fact that my onboard computer is connected to my Pixhawk 6X FC via ethernet cable by changing the line

```auto
await drone.connect(system_address="udp://:14540")

```

to

```auto
await drone.connect(system_address="udp://192.168.0.4:14540")

```

since the IP address of the Pixhawk is set to 192.168.0.4, and the UDP port is 14540 as per the instructions in the [PX4 ethernet setup](https://docs.px4.io/main/en/advanced_config/ethernet_setup.html). However, the connection is pretty unreliable; the drone successfully connects maybe once out of every 10 or 20 times that I run the script. Does anyone know why this may be happening or any tips to make the connection more reliable?
