MESH_DEMO from github

CipiCips
Posts: 13
Joined: Sun Apr 24, 2016 10:26 pm

MESH_DEMO from github

Postby CipiCips » Sat May 07, 2016 12:36 am

Hello,

I have manage to compile MESH_DEMO from github provided by AlenXiao.

Now I am planning to implement that mesh with few devices that have esp8266 esp-07 connected via RX/TX to microcontroller. My goal is to send from server one data to every node and receive it via UART to the microcontroller.

After programming esp with corresponding files from MESH_DEMO I am unable to figure out how this work. Server from pyton is running and I can only see when something is connected to it.

Are there any guids how to implement something inside this demo, for example adding default baud rate ect.

Thx
Ivan

ESP_Alen

Re: MESH_DEMO from github

Postby ESP_Alen » Thu May 12, 2016 7:34 pm

CipiCips wrote:Hello,

I have manage to compile MESH_DEMO from github provided by AlenXiao.

Now I am planning to implement that mesh with few devices that have esp8266 esp-07 connected via RX/TX to microcontroller. My goal is to send from server one data to every node and receive it via UART to the microcontroller.

After programming esp with corresponding files from MESH_DEMO I am unable to figure out how this work. Server from pyton is running and I can only see when something is connected to it.

Are there any guids how to implement something inside this demo, for example adding default baud rate ect.

Thx
Ivan


You can use AT to comunicate between MCU and ESP8266, and you can get AT demo from current non-os-sdk-v1.5.3:
viewtopic.php?f=46&t=2041#p6488

If you plan to use your own server to sent packet to all the node working in mesh, you just build mesh bcast packet, then send the packet to root node, the packet will been forwarded to every node.

Please refer to detail format of mesh packet:
https://github.com/espressif/ESP8266_ME ... r/document

ESP_Alen

Re: MESH_DEMO from github

Postby ESP_Alen » Fri May 13, 2016 7:03 pm

We have merged the mesh with nonos-sdk-v1.5.3, please pull the current mesh lib from github.

CipiCips
Posts: 13
Joined: Sun Apr 24, 2016 10:26 pm

Re: MESH_DEMO from github

Postby CipiCips » Mon May 16, 2016 9:30 pm

Dear Alen

thx for help, we will try to implement what we need and we will post all questions and problems here.

ESP_Alen

Re: MESH_DEMO from github

Postby ESP_Alen » Tue May 17, 2016 6:09 pm

CipiCips wrote:Dear Alen

thx for help, we will try to implement what we need and we will post all questions and problems here.


Any problem, please feel free to post it on BBS.

CipiCips
Posts: 13
Joined: Sun Apr 24, 2016 10:26 pm

Re: MESH_DEMO from github

Postby CipiCips » Thu May 19, 2016 12:38 am

Dear Alen,

So far we have managed to compile mesh_demo from github repository.
We have flashed two esp-12 modules (one is root node one is client node) with generated files as instructed at README file.

Our question is how can we see is this working, we have run demo_server from mesh demo and all we got is this:

Code: Select all

mesh server works
<__main__.MeshHandler instance at 0x0000000002259248>


From serial monitor we got a lot of information for both esp modules

Code: Select all

free heap:42856
recv entrance
mesh_json_proto_parser
len:27, data:{"req_key":"req_key_val"}

recv entrance
mesh_json_proto_parser
len:31, data:{"mcast":"18:fe:34:da:c0:b3"}

idx: 0, mac:e8:40:f2:47:0e:22
idx: 1, mac:18:fe:34:da:50:3a
recv entrance
mesh_json_proto_parser
len:31, data:{"mcast":"18:fe:34:da:50:3a"}

free heap:42856
recv entrance
mesh_json_proto_parser
len:27, data:{"req_key":"req_key_val"}

recv entrance
mesh_json_proto_parser
len:31, data:{"bcast":"18:fe:34:da:50:3a"}



Regards
Ivan

ESP_Alen

Re: MESH_DEMO from github

Postby ESP_Alen » Thu May 19, 2016 4:57 pm

It works.

CipiCips
Posts: 13
Joined: Sun Apr 24, 2016 10:26 pm

Re: MESH_DEMO from github

Postby CipiCips » Thu May 19, 2016 7:39 pm

Dear Alen,

Is it possible to set baud rate to 9600 ?

We will try to modify our server to use mesh bcast packet. Is it possible to send string of 20 characters maximum to all nodes ? When node receive packet string of 20 characters is it possible to send that string over USART to MCU ?

Regards
Ivan

ESP_Alen

Re: MESH_DEMO from github

Postby ESP_Alen » Thu May 19, 2016 8:37 pm

CipiCips wrote:Dear Alen,

Is it possible to set baud rate to 9600 ?

We will try to modify our server to use mesh bcast packet. Is it possible to send string of 20 characters maximum to all nodes ? When node receive packet string of 20 characters is it possible to send that string over USART to MCU ?

Regards
Ivan


1. Please use following statement to set serial baut ratio, we have merge the statements and push it on github.
uart_div_modify(0, UART_CLK_FREQ / 9600);
uart_div_modify(1, UART_CLK_FREQ / 9600);
2. The maximum length of mesh packet is 1300.
3. When node receive packet, it's feasible to send packet to MCU with USART.

Nikita Belyaev
Posts: 15
Joined: Wed May 18, 2016 11:09 pm

Re: MESH_DEMO from github

Postby Nikita Belyaev » Thu May 19, 2016 10:10 pm

Hi everyone!

Can someone ask for this questions:
1) On which OSI layer does mesh protocols works?
2) How to create root node?
3) When I burned my esp8266 with mesh_demo from git, which kind of node I did? And how can I change user data?
4) Why I'm not able to change server IP? Be default its 0.0.0.0 7000. And when it started I cant see anything except "mesh server works"

There are more questions, but I cant go further without understanding of that things))

Thanks for your cooperation!

BR, Nik

Who is online

Users browsing this forum: No registered users and 235 guests