Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client socket bind to CONTROL_UDP_PORT? #143

Closed
jtamaki opened this issue Apr 8, 2022 · 2 comments
Closed

client socket bind to CONTROL_UDP_PORT? #143

jtamaki opened this issue Apr 8, 2022 · 2 comments

Comments

@jtamaki
Copy link

jtamaki commented Apr 8, 2022

Why do you explicitly bind the client socket to CONTROL_UDP_PORT?https://github.com/damiafuentes/DJITelloPy/blob/master/djitellopy/tello.py#L113

I am trying to get a program using DJITelloPy to communicate with a simulator running on the same machine.
The simulator process also uses the same port, so I get an error.

I think the client socket should use the port assigned by os.
My program worked even after removing the relevant line.

@M4GNV5
Copy link
Collaborator

M4GNV5 commented Apr 11, 2022

I always assumed the Tello sends UDP packets back to this specific port, but to the IP address it received the command command from. I never tested wether it works with a different port though.
You should be able to try another port by setting Tello.CONTROL_UDP_PORT = 8887 before initializing the first Tello instance.
Can you confirm that works with regular Tellos?

Also what simulator are you using? Because I am not aware of any Tello simulators in existence 😃

@jtamaki
Copy link
Author

jtamaki commented Apr 12, 2022

I always assumed the Tello sends UDP packets back to this specific port, but to the IP address it received the command command from.

Yes. I tried it with my "Tello(non edu)"

You should be able to try another port by setting Tello.CONTROL_UDP_PORT = 8887 before initializing the first Tello instance.
Can you confirm that works with regular Tellos?

It did not work because the program would try to send commands to port 8887 of "tello".
I think it is reasonable to remove the code that binds the client socket to the CONTROL_UDP_PORT port.

Also what simulator are you using? Because I am not aware of any Tello simulators in existence 😃

I am trying to control AirSim multirotor by creating my own "bridge/wrapper" program to communicate like Tello.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants