How to setup ESP Mesh network
How to setup ESP Mesh network
Postby rajendra » Sat Sep 17, 2016 5:28 pm
I have compiled MESH DEMO & downloaded it to ESP.
How to specify which ESP will play role of root node & which will be non root?
Re: ESP Mesh network
Postby ESP_Alen » Mon Sep 19, 2016 2:34 pm
rajendra wrote:Is there any guide to create ESP mesh network?
I have compiled MESH DEMO & downloaded it to ESP.
How to specify which ESP will play role of root node & which will be non root?
Hi,
Please follow up the README of git repository.
devices will contest for root device, and the other device will work as non-root device.
Re: ESP Mesh network
Postby rajendra » Mon Sep 19, 2016 2:37 pm
This is how my user_config.h looks
#ifndef __USER_CONFIG_H__
#define __USER_CONFIG_H__
#include "c_types.h"
#define MESH_DEMO_PRINT ets_printf
#define MESH_DEMO_STRLEN ets_strlen
#define MESH_DEMO_MEMCPY ets_memcpy
#define MESH_DEMO_MEMSET ets_memset
#define MESH_DEMO_FREE os_free
static const uint16_t server_port = 7000; /*PORT USED BY USER IOT SERVER FOR MESH SERVICE*/
static const uint8_t server_ip[4] = {192, 168, 100, 153}; /*USER IOT SERVER IP ADDRESS*/
static const uint32_t UART_BAUT_RATIO = 115200; /*UART BAUT RATIO*/
static const uint8_t MESH_GROUP_ID[6] = {0x18,0xfe,0x34,0x00,0x00,0x50}; /*MESH_GROUP_ID & MESH_SSID_PREFIX REPRESENTS ONE MESH NETWORK*/
static const uint8_t MESH_ROUTER_BSSID[6] = {0xF0, 0xB4, 0x29, 0x2C, 0x7C, 0x72}; /*MAC OF ROUTER*/
/*
* please change MESH_ROUTER_SSID and MESH_ROUTER_PASSWD according to your router
*/
#define MESH_ROUTER_SSID "MeshAP" /*THE ROUTER SSID*/
#define MESH_ROUTER_PASSWD "1234509876ABCDEF" /*THE ROUTER PASSWORD*/
#define MESH_SSID_PREFIX "MESH_DEMO" /*SET THE DEFAULT MESH SSID PREFIX;THE FINAL SSID OF SOFTAP WOULD BE "MESH_SSID_PREFIX_X_YYYYYY"*/
#define MESH_AUTH AUTH_WPA2_PSK /*AUTH_MODE OF SOFTAP FOR EACH MESH NODE*/
#define MESH_PASSWD "123123123" /*SET PASSWORD OF SOFTAP FOR EACH MESH NODE*/
#define MESH_MAX_HOP (4) /*MAX_HOPS OF MESH NETWORK*/
#endif
Please suggest what am I doing wrong?
Re: ESP Mesh network
Postby ESP_Alen » Mon Sep 19, 2016 5:56 pm
rajendra wrote:What should be Mesh router's SSID? Is this suppose to be WIFI router's SSID or anything which will be used bye ESP devices to form mesh?
This is how my user_config.h looks
#ifndef __USER_CONFIG_H__
#define __USER_CONFIG_H__
#include "c_types.h"
#define MESH_DEMO_PRINT ets_printf
#define MESH_DEMO_STRLEN ets_strlen
#define MESH_DEMO_MEMCPY ets_memcpy
#define MESH_DEMO_MEMSET ets_memset
#define MESH_DEMO_FREE os_free
static const uint16_t server_port = 7000; /*PORT USED BY USER IOT SERVER FOR MESH SERVICE*/
static const uint8_t server_ip[4] = {192, 168, 100, 153}; /*USER IOT SERVER IP ADDRESS*/
static const uint32_t UART_BAUT_RATIO = 115200; /*UART BAUT RATIO*/
static const uint8_t MESH_GROUP_ID[6] = {0x18,0xfe,0x34,0x00,0x00,0x50}; /*MESH_GROUP_ID & MESH_SSID_PREFIX REPRESENTS ONE MESH NETWORK*/
static const uint8_t MESH_ROUTER_BSSID[6] = {0xF0, 0xB4, 0x29, 0x2C, 0x7C, 0x72}; /*MAC OF ROUTER*/
/*
* please change MESH_ROUTER_SSID and MESH_ROUTER_PASSWD according to your router
*/
#define MESH_ROUTER_SSID "MeshAP" /*THE ROUTER SSID*/
#define MESH_ROUTER_PASSWD "1234509876ABCDEF" /*THE ROUTER PASSWORD*/
#define MESH_SSID_PREFIX "MESH_DEMO" /*SET THE DEFAULT MESH SSID PREFIX;THE FINAL SSID OF SOFTAP WOULD BE "MESH_SSID_PREFIX_X_YYYYYY"*/
#define MESH_AUTH AUTH_WPA2_PSK /*AUTH_MODE OF SOFTAP FOR EACH MESH NODE*/
#define MESH_PASSWD "123123123" /*SET PASSWORD OF SOFTAP FOR EACH MESH NODE*/
#define MESH_MAX_HOP (4) /*MAX_HOPS OF MESH NETWORK*/
#endif
Please suggest what am I doing wrong?
MESH_ROUTER_SSID: SSID of router AP
MESH_ROUTER_PASSWD: Password of router AP
server_ip: IP address of your server (demo_server.py)
MESH_SSID_PREFIX: SSID prefix of mesh AP (Device AP, not router AP)
MESH_PASSWD: Password of mesh AP (Device AP, not router AP).
Re: How to setup ESP Mesh network
Postby rajendra » Mon Sep 19, 2016 8:33 pm
demo_server is running on 192.168.100.153 port 7000 (this machine is also connected on "MeasAP" wifi network)
I use python esptool to download bin to esp device with following commands
python esptool.py -p /dev/ttyUSB0 write_flash --flash_freq=40m --flash_mode=qio --flash_size=8m 0x00000 /home/rajendra/espressif/ESP8266_MESH_DEMO-1.3.1/bin/eagle.flash.bin
python esptool.py -p /dev/ttyUSB0 write_flash --flash_freq=40m --flash_mode=qio --flash_size=8m 0x40000 /home/rajendra/espressif/ESP8266_MESH_DEMO-1.3.1/bin/eagle.irom0text.bin
When I turn on ESP devices there is no request to demo_server nor "MESH-DEMO......" acitve ssid.
When I connect to UART of ESP module I get following response.
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
I have attached binary files generated which I ma downloading to device.
What could be wrong?
- Attachments
-
- bin.zip
- (212.53 KiB) Downloaded 490 times
Re: How to setup ESP Mesh network
Postby ESP_Alen » Wed Sep 21, 2016 6:27 pm
rajendra wrote:My wifi network's SSID is "MeshAP" & password is "1234509876ABCDEF"
demo_server is running on 192.168.100.153 port 7000 (this machine is also connected on "MeasAP" wifi network)
I use python esptool to download bin to esp device with following commands
python esptool.py -p /dev/ttyUSB0 write_flash --flash_freq=40m --flash_mode=qio --flash_size=8m 0x00000 /home/rajendra/espressif/ESP8266_MESH_DEMO-1.3.1/bin/eagle.flash.bin
python esptool.py -p /dev/ttyUSB0 write_flash --flash_freq=40m --flash_mode=qio --flash_size=8m 0x40000 /home/rajendra/espressif/ESP8266_MESH_DEMO-1.3.1/bin/eagle.irom0text.bin
When I turn on ESP devices there is no request to demo_server nor "MESH-DEMO......" acitve ssid.
When I connect to UART of ESP module I get following response.
scandone
scan-ch:0
scandone
no ap to join
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
scandone
scan-ch:0
I have attached binary files generated which I ma downloading to device.
What could be wrong?
What's version of mesh you used ? master, debug or debug_for_light branch ?
Please follow the steps:
------------------------------------------------------------------------------------------------------
How to build run image:
1. Obtain IP address of local server.
2. Change server_ip in user_config.h according to the IP address of local server.
3. Run ./gen_misc.h
boot version: boot_v1.2+
bin generate: user1.bin
spi speed: 40MHz
spi mode: QIO
spi size and map: 1024 (512KB + 512KB)
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
Download image to device:
1. Get download tools from the official website of Esressif at http://espressif.com.
2. Download the following four files in ./bin/ to device:
------------------------------------------------------------------------------------------------------
file download_address
---------------------------------------------------------------
esp_init_data_default.bin 0xfc000
blank.bin 0xfe000
boot_v1.4(b1).bin 0x00000
upgrade/user1.1024.new1.bin 0x01000
---------------------------------------------------------------
NOTE: Before starting to download, please make sure you have selected the right flash size (8 Mbit).
Re: How to setup ESP Mesh network
Postby rajendra » Wed Sep 21, 2016 8:13 pm
https://github.com/espressif/ESP8266_MESH_DEMO
When I run gen_misc.sh & choose any other options other than default gives error as below.
-----------------------------
Please follow below steps(1-5) to generate specific bin(s):
STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none)
enter(0/1/2, default 2):
1
gen_misc.sh: 14: [: 1: unexpected operator
gen_misc.sh: 16: [: 1: unexpected operator
boot mode: none
----------------------------
I tried to use make directly with following parameters, but it is not creating upgrade/user1.bin. (There is no upgrade folder under bin)
make COMPILE=gcc BOOT=new APP=1 SPI_SPEED=40 SPI_MODE=QIO SPI_SIZE_MAP=0
I this a correct branch?
Re: How to setup ESP Mesh network
Postby ESP_Alen » Thu Sep 22, 2016 11:08 am
rajendra wrote:I am using ESP Mesh Demo from master branch
https://github.com/espressif/ESP8266_MESH_DEMO
When I run gen_misc.sh & choose any other options other than default gives error as below.
-----------------------------
Please follow below steps(1-5) to generate specific bin(s):
STEP 1: choose boot version(0=boot_v1.1, 1=boot_v1.2+, 2=none)
enter(0/1/2, default 2):
1
gen_misc.sh: 14: [: 1: unexpected operator
gen_misc.sh: 16: [: 1: unexpected operator
boot mode: none
----------------------------
I tried to use make directly with following parameters, but it is not creating upgrade/user1.bin. (There is no upgrade folder under bin)
make COMPILE=gcc BOOT=new APP=1 SPI_SPEED=40 SPI_MODE=QIO SPI_SIZE_MAP=0
I this a correct branch?
Please use dos2unix to format gen_mish.sh
Re: How to setup ESP Mesh network
Postby ESP_Alen » Fri Sep 23, 2016 6:25 pm
rajendra wrote:Thank you Alen, It is working now.
welcome.
Who is online
Users browsing this forum: No registered users and 54 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.