I checked the API's esp_mesh_send part: http://esp-idf.readthedocs.io/en/latest ... esh_opt_ti
It says "if the packet is outgoing to external IP network such as an IP server address, translate IPv4:PORT known as “to”."
I tried with data type MESH_PROTO_BIN, MESH_PROTO_JSON, MESH_PROTO_HTTP. The data content is a simple string.
The relevant part:
Code: Select all
mesh_addr_t serverAddr;
IP4_ADDR(&serverAddr.mip.ip4, 192,168,0,132); // 192.168.0.132 is my pc
serverAddr.mip.port = 8089; // I'm running running a python script to handle requests
esp_mesh_send(&serverAddr, &data, MESH_DATA_TODS, NULL , 0);
https://pastebin.com/Y9nLayKa
Python socket script:
https://pastebin.com/yLjAftWc