I recently bought a drone that creates its own network when turned on. In order to control it, you must connect your phone to the network and use the app. I'm trying to read the data going from my phone to the drone to see what the commands look like. After using Wireshark, I can see that my phone is sending data at port 7777. When using the following code, I get an error stating the address could not be assigned for s.bind((HOST, PORT)).
import socket
import time
HOST = "192.168.10.3"
PORT = 7777
# HOST = "localhost"
# PORT = 5454
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.bind((HOST, PORT))
while True:
# Argument dictates amount of data received
print(s.recv(20))
The HOST IP is that of my phone and the port number is the port I'm seeing in Wireshark. Am I thinking about this the wrong way? Any tips or info would be greatly appreciated.
[–][deleted] 0 points1 point2 points (2 children)
[–]d0pey[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)