Page 1 of 1

ESP_ERR_MESH_ARGUMENT When sending package to root

Posted: Wed Aug 14, 2019 4:44 pm
by StefanRvO

I'm trying to send a package from a node to the root. I call the following function:

Code: Select all

esp_mesh_send(NULL, &data, 0, NULL, 0);
Where &data is just my custom payload.

I have no problem sending broadcasts from the root to the other nodes, but i can't seem to make data flow the other way, i just get ESP_ERR_MESH_ARGUMENT as return value from the send function.

I previously was using the mwifi API, and was able to send messages from the nodes to the root, but changed to just using plain ESP mesh as i was having trouble with a lot of latency when using the mwifi layer.

I'm using the latest esp-idf (39f090a4f1).

You can see the code in its entirety here: ... e_module.c

Re: ESP_ERR_MESH_ARGUMENT When sending package to root

Posted: Thu Aug 15, 2019 3:41 am
by it_zzc
1. If you are sending a packet to the root node, you need to set `data.tos = MESH_TOS_P2P`
2. Even if you use esp_mesh_xxx directly, you can't avoid the problem of packet blocking to the root node. This is because of the ESP-MESH mechanism. ESP-MESH sends flow control to the root node, so it can only block the upward sending data. .

I suggest you use the mwifi_xxx API. If you have problems, you can ask for your needs. We can provide some solutions according to your usage scenarios.