General suggestions for ESP mesh functionality

Yanminge
Posts: 3
Joined: Tue Jan 17, 2017 3:42 am

General suggestions for ESP mesh functionality

Postby Yanminge » Thu Jul 12, 2018 1:55 am

When using espressif‘s esp mesh, although it has a function of
esp_mesh_fix_root
but it still can't be used away from the router. Because in the function

Code: Select all

esp_mesh_set_parent
, the parent configuration, the ssid and the channel of the parent are mandatory. Therefore, in the case of leaving the router, it will trigger the

Code: Select all

MESH_EVENT_PARENT_DISCONNECTED 
event.
But in fact, the mesh network itself can still communicate normally.

Because the root is fixed,So I think the parent of the root is preferably optional. If you offer such a choice, we can build a network system that does not require router. It can extend the application scenario of esp mesh .I really hope to get your official reply.
Last edited by Yanminge on Thu Jul 12, 2018 5:40 am, edited 1 time in total.

ESP_Sprite
Posts: 9757
Joined: Thu Nov 26, 2015 4:08 am

Re: General suggestions for ESP mesh functionality

Postby ESP_Sprite » Thu Jul 12, 2018 2:30 am

Moved to MDF, as it's more relevant there,

ESP_yudong
Posts: 68
Joined: Wed May 16, 2018 12:31 pm

Re: General suggestions for ESP mesh functionality

Postby ESP_yudong » Thu Jul 19, 2018 9:33 am

Thanks for your suggestions.
And we also have the plan to support non-router network in the near future. Then you could build a network like you said.

More Suggestions are welcome.

Yanminge
Posts: 3
Joined: Tue Jan 17, 2017 3:42 am

Re: General suggestions for ESP mesh functionality

Postby Yanminge » Fri Jul 27, 2018 8:00 am

Do you have an expected release plan?
Now I am dealing with this,

Set a parent node that does not exist.

Code: Select all

void wifi_mesh_set_root_parent(void)
{
  wifi_config_t parent =
  {
    .sta =
    {
      .ssid = CONFIG_MESH_ROUTER_SSID,
      .password = CONFIG_MESH_ROUTER_PASSWD,
      .channel = CONFIG_MESH_CHANNEL,
    },
  };
  ESP_ERROR_CHECK(esp_wifi_scan_stop());
  wifi_scan_config_t scan_config = { 0 };
  scan_config.show_hidden = 1;
  ESP_ERROR_CHECK(esp_wifi_scan_start(&scan_config, 0));
  ESP_ERROR_CHECK(esp_mesh_set_parent(&parent, &mesh_configuration.mesh_id, MESH_ROOT, 1));
and then if event MESH_EVENT_PARENT_DISCONNECTED triggered,still call esp_mesh_comm_p2p_start directly.

Code: Select all

    case MESH_EVENT_PARENT_DISCONNECTED:
      mesh_layer = esp_mesh_get_layer();
      if (esp_mesh_is_root())
      {
        //tcpip_adapter_dhcpc_stop(TCPIP_ADAPTER_IF_STA);
        tcpip_adapter_dhcpc_start(TCPIP_ADAPTER_IF_STA);
      }
      esp_mesh_comm_p2p_start();

Who is online

Users browsing this forum: No registered users and 14 guests