File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 7070_START_SCAN_NETWORKS = const (0x36 )
7171_GET_FW_VERSION_CMD = const (0x37 )
7272_SEND_UDP_DATA_CMD = const (0x39 )
73+ _GET_REMOTE_DATA_CMD = const (0x3A )
7374_GET_TIME = const (0x3B )
7475_GET_IDX_BSSID_CMD = const (0x3C )
7576_GET_IDX_CHAN_CMD = const (0x3D )
@@ -847,6 +848,12 @@ def server_state(self, socket_num):
847848 resp = self ._send_command_get_response (_GET_STATE_TCP_CMD , self ._socknum_ll )
848849 return resp [0 ][0 ]
849850
851+ def get_remote_data (self , socket_num ):
852+ """Get the IP address and port of the remote host"""
853+ self ._socknum_ll [0 ][0 ] = socket_num
854+ resp = self ._send_command_get_response (_GET_REMOTE_DATA_CMD , self ._socknum_ll , reply_params = 2 )
855+ return {"ip_addr" : resp [0 ], "port" : struct .unpack ("<H" , resp [1 ])[0 ]}
856+
850857 def set_esp_debug (self , enabled ):
851858 """Enable/disable debug mode on the ESP32. Debug messages will be
852859 written to the ESP32's UART."""
You can’t perform that action at this time.
0 commit comments