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 70
70
_START_SCAN_NETWORKS = const (0x36 )
71
71
_GET_FW_VERSION_CMD = const (0x37 )
72
72
_SEND_UDP_DATA_CMD = const (0x39 )
73
+ _GET_REMOTE_DATA_CMD = const (0x3A )
73
74
_GET_TIME = const (0x3B )
74
75
_GET_IDX_BSSID_CMD = const (0x3C )
75
76
_GET_IDX_CHAN_CMD = const (0x3D )
@@ -847,6 +848,12 @@ def server_state(self, socket_num):
847
848
resp = self ._send_command_get_response (_GET_STATE_TCP_CMD , self ._socknum_ll )
848
849
return resp [0 ][0 ]
849
850
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
+
850
857
def set_esp_debug (self , enabled ):
851
858
"""Enable/disable debug mode on the ESP32. Debug messages will be
852
859
written to the ESP32's UART."""
You can’t perform that action at this time.
0 commit comments