ESP-MDF scan and list mesh networks

robokishan
Posts: 1
Joined: Sun Apr 14, 2019 2:36 pm

ESP-MDF scan and list mesh networks

Postby robokishan » Sun Apr 14, 2019 2:41 pm

so i was working for about a week and finally decided to post this on forum.
first i love esp i am moving from nrf52840 which is very frustrating chip.
but i love esp32.
but can anyone help how can i scan a mesh network and get list of mesh id .
so far what i want to do connect esp32 to mesh network using mobile app now i have several available mesh network.
but what i want to do is scan and list and then choose which i want to connect enter password for that mesh id and boom i can connect dynamically to the mesh id

ESP_LBB
Posts: 76
Joined: Fri May 18, 2018 3:41 am

Re: ESP-MDF scan and list mesh networks

Postby ESP_LBB » Mon Apr 15, 2019 1:46 pm

Hi robokishan,

First of all, have you succeeded in building a mesh network with the devices and the ESP-Mesh app ? This app can be found https://www.espressif.com/en/support/download/apps for Android or search ESP-Mesh in App Store for iOS.

Then we can build several networks under one router with different MeshID, however for now we don't need to input any password to control the network as long as we list the networks. But this can be done on the app side if you want. The source code for the Android version is put here for your reference:https://github.com/EspressifApp/EspMeshForAndroid

rbh_birinder
Posts: 2
Joined: Sat Jun 08, 2019 1:13 pm

Re: ESP-MDF scan and list mesh networks

Postby rbh_birinder » Sat Jun 08, 2019 1:39 pm

I am able to make my root node on ESP Chip. but App is not Connecting

See the Data from ESP32 Chip

I (14150) mesh: [scan]new scanning time:600ms
event 11
?[0;32mI (14150) mesh_main: <MESH_EVENT_ROOT_GOT_IP>sta ip: 192.168.100.102, mask: 255.255.255.0, gw: 192.168.100.1?[0m
?[0;32mI (14160) event: sta ip: 192.168.100.102, mask: 255.255.255.0, gw: 192.168.100.1?[0m
W (14170) wifi: [beacon]new interval:300ms
I (14180) mesh: <nvs>write layer:1
event 7
?[0;32mI (14180) mesh_main: <MESH_EVENT_PARENT_CONNECTED>layer:0-->1, parent:80:38:bc:f7:a0:bc<ROOT>, ID:77:77:77:77:77:77?[0m
event 7.1
event 7.2
comm 0
comm 1
tx_main
comm 2
event 7.3
tx_main 0
event 17
?[0;32mI (14200) mesh_main: <MESH_EVENT_TODS_REACHABLE>state:0?[0m
tx_main 2
event 10
tx_main 4
?[0;32mI (14200) mesh_main: <MESH_EVENT_ROOT_ADDRESS>root address:a4:cf:12:0b:a3:5d?[0m
tx_main 000
rx_main 1
?[0;33mW (14210) mesh_main: [#RX:1/1][L:1] parent:80:38:bc:f7:a0:bc, receive from a4:cf:12:0b:a3:5c, size:1460, heap:181932, flag:0[er
r:0x0, proto:0, tos:0]?[0m
rx_main 2
event 11
?[0;32mI (14790) mesh_main: <MESH_EVENT_ROOT_GOT_IP>sta ip: 192.168.100.11, mask: 255.255.255.0, gw: 192.168.100.1?[0m
?[0;32mI (14790) event: sta ip: 192.168.100.11, mask: 255.255.255.0, gw: 192.168.100.1?[0m
tx_main 8
tx_main 0
tx_main 2
tx_main 5
rx_main 1
?[0;33mW (15220) mesh_main: [#RX:2/2][L:1] parent:80:38:bc:f7:a0:bc, receive from a4:cf:12:0b:a3:5c, size:1460, heap:181936, flag:0[er

ESP_LBB
Posts: 76
Joined: Fri May 18, 2018 3:41 am

Re: ESP-MDF scan and list mesh networks

Postby ESP_LBB » Mon Jun 10, 2019 3:23 am

Hi,

Please try to connect the somartphone to the router that your ment network is connected, and then launch the app.

Only when there are several different MeshID groups exsit, then in the page of group on the app will show the MeshID groups.

rbh_birinder
Posts: 2
Joined: Sat Jun 08, 2019 1:13 pm

Re: ESP-MDF scan and list mesh networks

Postby rbh_birinder » Mon Jun 10, 2019 11:48 am

Yes doing the same but no success. Does the sample code internal_communications have the base code to connect with App ?

ESP_LBB
Posts: 76
Joined: Fri May 18, 2018 3:41 am

Re: ESP-MDF scan and list mesh networks

Postby ESP_LBB » Tue Jun 11, 2019 3:10 am

Ah you are running the example in IDF, I'm sorry haven't asked this earlier.

No the example of Mesh in IDF just shows the basic functions of ESP-MESH: networking and internal communication, there is no application layer example, so you won't be able to find the devices on the app.

You can run the examples in MDF, for example you can run the demo of light https://github.com/espressif/esp-mdf/tr ... _kit/light, this is a demo that you can run on ESP-DevKitC, and it works with the ESP-Mesh App.

By the way, in MDF we added netconfig, OTA, etc. , to make it easier to adapted to your own application.

Who is online

Users browsing this forum: No registered users and 3 guests