ESP8266 Developer Zone The Official ESP8266 Forum 2016-06-27T11:09:38+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=2213 2016-06-27T11:09:38+08:00 2016-06-27T11:09:38+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7508#p7508 <![CDATA[Re: Question from Nikita about mesh]]> Statistics: Posted by Guest — Mon Jun 27, 2016 11:09 am


]]>
2016-06-22T01:47:39+08:00 2016-06-22T01:47:39+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7452#p7452 <![CDATA[Re: Question from Nikita about mesh]]>
Alen wrote:
Nikita Belyaev wrote:Hi Alen!

Would you tell me why do you implement mesh between app and transport layers?


Please refer to the document:
https://github.com/espressif/ESP8266_ME ... ecture.pdf



Thanks, but this doc is on chines. Google doesnt translate it correctly(

Statistics: Posted by Nikita Belyaev — Wed Jun 22, 2016 1:47 am


]]>
2016-06-20T18:23:27+08:00 2016-06-20T18:23:27+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7424#p7424 <![CDATA[Re: Question from Nikita about mesh]]>
Nikita Belyaev wrote:
Hi Alen!

Would you tell me why do you implement mesh between app and transport layers?


Please refer to the document:
https://github.com/espressif/ESP8266_ME ... ecture.pdf

Statistics: Posted by Guest — Mon Jun 20, 2016 6:23 pm


]]>
2016-06-19T23:31:59+08:00 2016-06-19T23:31:59+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7408#p7408 <![CDATA[Re: Question from Nikita about mesh]]>
Would you tell me why do you implement mesh between app and transport layers?

Statistics: Posted by Nikita Belyaev — Sun Jun 19, 2016 11:31 pm


]]>
2016-06-06T11:33:37+08:00 2016-06-06T11:33:37+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7215#p7215 <![CDATA[Re: Question from Nikita about mesh]]>
Nikita Belyaev wrote:
Alen wrote:SoftAP of all the nodes with two hops away from router has the same IP address, it's 2.255.255.1.

I think you don't need to care about the mesh, please focus on the Application packet based on mesh;


Hi, Alen!
Thanks a lot for your answers! You really help me!

Would you tell whats happen in devicefind.c ? and where can i find process of connection establishment between two esp?

Thanks!


1. Device.c is not essential, Mobile-App uses the UDP-Broadcast to find root device.
device.c is used to response UDP-Broadcast.
2. You can't find the code for connection establishment, it is implemented in libmesh.a

Statistics: Posted by Guest — Mon Jun 06, 2016 11:33 am


]]>
2016-06-05T17:38:53+08:00 2016-06-05T17:38:53+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7204#p7204 <![CDATA[Re: Question from Nikita about mesh]]>
Alen wrote:
SoftAP of all the nodes with two hops away from router has the same IP address, it's 2.255.255.1.

I think you don't need to care about the mesh, please focus on the Application packet based on mesh;


Hi, Alen!
Thanks a lot for your answers! You really help me!

Would you tell whats happen in devicefind.c ? and where can i find process of connection establishment between two esp?

Thanks!

1. Device.c is not essential, Mobile-App uses the UDP-Broadcast to find root device.
device.c is used to response UDP-Broadcast.
2. You can't find the code for connection establishment, it is implemented in libmesh.a

Statistics: Posted by Nikita Belyaev — Sun Jun 05, 2016 5:38 pm


]]>
2016-05-30T13:21:20+08:00 2016-05-30T13:21:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7130#p7130 <![CDATA[Re: Question from Nikita about mesh]]>
I think you don't need to care about the mesh, please focus on the Application packet based on mesh;

Statistics: Posted by Guest — Mon May 30, 2016 1:21 pm


]]>
2016-05-28T21:59:20+08:00 2016-05-28T21:59:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7124#p7124 <![CDATA[Re: Question from Nikita about mesh]]>
Alen wrote:
    1. The SoftAP's IP of all nodes with IP address of 2.255.255.* is 3.255.255.1, so their sub-nodes are possible to have the same IP address.
    2. You don't need to care the forwarding path, you just build packet with destination mac, then use espconn_mesh_sent to send packet.
    the routing is composed of upwards routing and downwards routing.
    If current node successes to find destination mac address in route table, it uses downwards routing, otherwise, it uses upwards routing.
    In another word, the mesh will forward packet according to route table, if the current node fails to find destination device in route table, it forwards the packet to its parent. the parent is default routing path.
    3. you can build multiple packet and send the packet one by one.
    4. You can use ucast or p2p packet to communicate between tow nodes.
    5. We have measured the speed of connection, every node send packet to its parent, and parent echo the packet back to node.
    and mean performance about round robin is 10pps with maximum length packet(1300).



What does it mean SoftAP of 2.255.255.*? I don't have such 3.255.255.1.
Things you are talking about are the same with picture from 2-nd page https://github.com/espressif/ESP8266_MESH_DEMO/blob/master/document/Mesh%20protocol%20architecture.pdf. But I cant understand( Would u pleas explain?

Routing is exactly what is interesting for me.

Statistics: Posted by Nikita Belyaev — Sat May 28, 2016 9:59 pm


]]>
2016-05-28T21:16:58+08:00 2016-05-28T21:16:58+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7123#p7123 <![CDATA[Re: Question from Nikita about mesh]]>

Hi! Thanks for answers!

Can you explain why its so - there are multiple devices with the same IP address.
I have started my small network of 3 esp and there are 3 different IP - 2.255.255.1, 2.255.255.2 and 2.255.255.3

Am I right if say that when leaf node want to send data, he create p2p packet and send it to his non-leaf (parent) node. If this node have information about desired destination he create p2p packet to this destination? But if he don't have desired mac he send packet to upper parent and so on till any node with destination MAC in routing table.
So, does the node create each time p2p packets while transmitting data?

Is this a table on root node?
[/list]
    2. child-1 ----------mac list table(mac address list)
    child-2-----------mac list table(mac address list)
    child-3-----------mac list table(mac address list)
    child-4-----------mac list table(mac address list)



P.S. Is it possible to measure sped of connection between nodes?


    1. The SoftAP's IP of all nodes with IP address of 2.255.255.* is 3.255.255.1, so their sub-nodes are possible to have the same IP address.
    2. You don't need to care the forwarding path, you just build packet with destination mac, then use espconn_mesh_sent to send packet.
    the routing is composed of upwards routing and downwards routing.
    If current node successes to find destination mac address in route table, it uses downwards routing, otherwise, it uses upwards routing.
    In another word, the mesh will forward packet according to route table, if the current node fails to find destination device in route table, it forwards the packet to its parent. the parent is default routing path.
    3. you can build multiple packet and send the packet one by one.
    4. You can use ucast or p2p packet to communicate between tow nodes.
    5. We have measured the speed of connection, every node send packet to its parent, and parent echo the packet back to node.
    and mean performance about round robin is 10pps with maximum length packet(1300).

Statistics: Posted by Guest — Sat May 28, 2016 9:16 pm


]]>
2016-05-28T18:25:46+08:00 2016-05-28T18:25:46+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7122#p7122 <![CDATA[Re: Question from Nikita about mesh]]>
Alen wrote:
Nikita Belyaev wrote:
Alen wrote:Please paste error log of server here.


Hi Alen!
I'll post my logs a bit later.

Now i have really important question - why have you chose MAC adr. as main adr for routing?
Why we cant use IP? You sad befor, that IP adr is now unique, but its not so!!
Its so unussual to make routing by using MAC adr. on layer above TCP.

One more question - how does routing table looks like (structure).

Thanks


    1. Because IP address is not unique, there are multiple devices with the same IP address.
    MAC address is unique. So we use MAC address.
    2. child-1 ----------mac list table(mac address list)
    child-2-----------mac list table(mac address list)
    child-3-----------mac list table(mac address list)
    child-4-----------mac list table(mac address list)


Hi! Thanks for answers!

Can you explain why its so - there are multiple devices with the same IP address.
I have started my small network of 3 esp and there are 3 different IP - 2.255.255.1, 2.255.255.2 and 2.255.255.3

Am I right if say that when leaf node want to send data, he create p2p packet and send it to his non-leaf (parent) node. If this node have information about desired destination he create p2p packet to this destination? But if he don't have desired mac he send packet to upper parent and so on till any node with destination MAC in routing table.
So, does the node create each time p2p packets while transmitting data?

Is this a table on root node?

[/list]
    2. child-1 ----------mac list table(mac address list)
    child-2-----------mac list table(mac address list)
    child-3-----------mac list table(mac address list)
    child-4-----------mac list table(mac address list)



P.S. Is it possible to measure sped of connection between nodes?

Statistics: Posted by Nikita Belyaev — Sat May 28, 2016 6:25 pm


]]>
2016-05-28T17:23:40+08:00 2016-05-28T17:23:40+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7118#p7118 <![CDATA[Re: Question from Nikita about mesh]]>
Nikita Belyaev wrote:
Alen wrote:Please paste error log of server here.


Hi Alen!
I'll post my logs a bit later.

Now i have really important question - why have you chose MAC adr. as main adr for routing?
Why we cant use IP? You sad befor, that IP adr is now unique, but its not so!!
Its so unussual to make routing by using MAC adr. on layer above TCP.

One more question - how does routing table looks like (structure).

Thanks


    1. Because IP address is not unique, there are multiple devices with the same IP address.
    MAC address is unique. So we use MAC address.
    2. child-1 ----------mac list table(mac address list)
    child-2-----------mac list table(mac address list)
    child-3-----------mac list table(mac address list)
    child-4-----------mac list table(mac address list)

Statistics: Posted by Guest — Sat May 28, 2016 5:23 pm


]]>
2016-05-27T19:45:57+08:00 2016-05-27T19:45:57+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7110#p7110 <![CDATA[Re: Question from Nikita about mesh]]>
Alen wrote:
Please paste error log of server here.


Hi Alen!
I'll post my logs a bit later.

Now i have really important question - why have you chose MAC adr. as main adr for routing?
Why we cant use IP? You sad befor, that IP adr is now unique, but its not so!!
Its so unussual to make routing by using MAC adr. on layer above TCP.

One more question - how does routing table looks like (structure).

Thanks

Statistics: Posted by Nikita Belyaev — Fri May 27, 2016 7:45 pm


]]>
2016-05-27T11:30:28+08:00 2016-05-27T11:30:28+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7100#p7100 <![CDATA[Re: Question from Nikita about mesh]]>
CipiCips wrote:
Dear Alen,


1. You've told us that packet from server is distributed all over mesh to every node in that mesh. For example if we have 20 nodes and they are listed like 1, 2, 3, 4, 5, ect. is it possible to send data to specific node not all ?


Regards

Ivan


Yes, you just build packet using destination node's MAC as destination address, the packet will be forwarded to the node.

Statistics: Posted by Guest — Fri May 27, 2016 11:30 am


]]>
2016-05-26T01:58:12+08:00 2016-05-26T01:58:12+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7083#p7083 <![CDATA[Re: Question from Nikita about mesh]]>

1. You've told us that packet from server is distributed all over mesh to every node in that mesh. For example if we have 20 nodes and they are listed like 1, 2, 3, 4, 5, ect. is it possible to send data to specific node not all ?


Regards

Ivan

Statistics: Posted by CipiCips — Thu May 26, 2016 1:58 am


]]>
2016-05-25T22:03:51+08:00 2016-05-25T22:03:51+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7079#p7079 <![CDATA[Re: Question from Nikita about mesh]]> Statistics: Posted by Guest — Wed May 25, 2016 10:03 pm


]]>
2016-05-25T22:01:33+08:00 2016-05-25T22:01:33+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7078#p7078 <![CDATA[Re: Question from Nikita about mesh]]>

This one - Which protocol is using on MAC layer to control access to media?
Also have such question - u have marked all connections red and said its TCP. Does this TCP connections are sets on demand or they are establish for all the time?


1. Ieee802.11 with CSMA/CA
2. All the tcp connections are persist connect.

Statistics: Posted by Guest — Wed May 25, 2016 10:01 pm


]]>
2016-05-25T21:33:54+08:00 2016-05-25T21:33:54+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7077#p7077 <![CDATA[Re: Question from Nikita about mesh]]>
Alen wrote:
Thanks a lot!
Thats i was waiting from u))

But what about pre last question about protocol on mac?

further more:
1. mesh inside is using wi-fi to connect nodes. how do they chose wifi channel?
2. this line in server.py doesnt work
CODE: SELECT ALL
self.buf = bytearray()
print(self)

my local ip is 192.168.1.38, so i set it
CODE: SELECT ALL
HOST, PORT = "192.168.1.38", 7000

what I'm doing wrong?


1. which question ?
2. all the nodes use the same channel with router.
3. could you paste the your server.py here ?


This one - Which protocol is using on MAC layer to control access to media?
Also have such question - u have marked all connections red and said its TCP. Does this TCP connections are sets on demand or they are establish for all the time?

My server.py is same with your from git

Code:

#!/usr/bin/env python

import sys
import struct
if sys.version_info[0] < 3:
    import SocketServer as socketserver
else:
    import socketserver

class MeshHandler(socketserver.BaseRequestHandler):

    def handle(self):
        self.buf = bytearray()
        print(self)
        try:
            while True:
                header = self.read_full(4)
                l, = struct.unpack_from('<H', header[2:4])
                body = self.read_full(l-4)
                req = bytearray()
                req.extend(header)
                req.extend(body)
                resp = bytearray()
                resp.extend(req[0:4])
                resp.extend(req[10:16])
                resp.extend(req[4:10])
                resp.extend(req[16:])
                self.request.sendall(resp)
        except Exception as e:
            print(e)

    def read_full(self, n):
        while len(self.buf) < n:
            try:
                req = self.request.recv(1024)
                if not req:
                    raise(Exception('recv error'))
                self.buf.extend(req)
            except Exception as e:
                raise(e)
        read = self.buf[0:n]
        self.buf = self.buf[n:]
        return bytes(read)

class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
    pass

if __name__ == "__main__":
    HOST, PORT = "192.168.1.38", 7000
    server = ThreadedTCPServer((HOST, PORT), MeshHandler)
    server.allow_reuse_address = True
    print('mesh server works')
    server.serve_forever()



Thanks for help!

Statistics: Posted by Nikita Belyaev — Wed May 25, 2016 9:33 pm


]]>
2016-05-25T19:41:42+08:00 2016-05-25T19:41:42+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7076#p7076 <![CDATA[Re: Question from Nikita about mesh]]>

Thanks a lot!
Thats i was waiting from u))

But what about pre last question about protocol on mac?

further more:
1. mesh inside is using wi-fi to connect nodes. how do they chose wifi channel?
2. this line in server.py doesnt work
CODE: SELECT ALL
self.buf = bytearray()
print(self)

my local ip is 192.168.1.38, so i set it
CODE: SELECT ALL
HOST, PORT = "192.168.1.38", 7000

what I'm doing wrong?


1. which question ?
2. all the nodes use the same channel with router.
3. could you paste the your server.py here ?

Statistics: Posted by Guest — Wed May 25, 2016 7:41 pm


]]>
2016-05-25T19:14:33+08:00 2016-05-25T19:14:33+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7075#p7075 <![CDATA[Re: Question from Nikita about mesh]]>
Alen wrote:
I do not understand!
you implement mesh between App. layer and TCP layer, but using mac adr.,who are uses only on MAC layer.

does it mean that you have created distributed application if your "mesh" works upon tcp layer?

(1)---(2)---(3)---(4)
..........|......|
........(5).....(6)

Can we say that in case of necessary to transmit data from 1 to 6 they establish tcp connection with each and there can exist only one connection in network at the same time?

If two nods want to send data at the same time?
Which protocol is using on MAC layer to control access to media?

do u have any idea how to send data from server to desired node and push that data to pc via uart?


1. Yes, we implement distributed application, and node just uses MAC to forward packet, the data packet is sent using TCP.
2. Every red line represents one TCP connection in topology map.
3. Please build packet according to the mesh format, and then send the packet to root device.
The packet will forwarded to destination device.
When destination device receive packet, it can transmit packet to PC using UART.


Thanks a lot!
Thats i was waiting from u))

But what about pre last question about protocol on mac?

further more:
1. mesh inside is using wi-fi to connect nodes. how do they chose wifi channel?
2. this line in server.py doesnt work

Code:

self.buf = bytearray()
        print(self)

my local ip is 192.168.1.38, so i set it

Code:

HOST, PORT = "192.168.1.38", 7000

what I'm doing wrong?

Statistics: Posted by Nikita Belyaev — Wed May 25, 2016 7:14 pm


]]>
2016-05-25T19:05:33+08:00 2016-05-25T19:05:33+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7074#p7074 <![CDATA[Re: Question from Nikita about mesh]]>

I do not understand!
you implement mesh between App. layer and TCP layer, but using mac adr.,who are uses only on MAC layer.

does it mean that you have created distributed application if your "mesh" works upon tcp layer?

(1)---(2)---(3)---(4)
..........|......|
........(5).....(6)

Can we say that in case of necessary to transmit data from 1 to 6 they establish tcp connection with each and there can exist only one connection in network at the same time?

If two nods want to send data at the same time?
Which protocol is using on MAC layer to control access to media?

do u have any idea how to send data from server to desired node and push that data to pc via uart?


1. Yes, we implement distributed application, and node just uses MAC to forward packet, the data packet is sent using TCP.
2. Every red line represents one TCP connection in topology map.
3. Please build packet according to the mesh format, and then send the packet to root device.
The packet will forwarded to destination device.
When destination device receive packet, it can transmit packet to PC using UART.

Statistics: Posted by Guest — Wed May 25, 2016 7:05 pm


]]>
2016-05-25T17:28:34+08:00 2016-05-25T17:28:34+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7073#p7073 <![CDATA[Re: Question from Nikita about mesh]]>
Alen wrote:
    1. Yes, it's just a tree; Now, we just implement mesh between App. layer and TCP layer.
    2. the element of route table is mac address, because the IP address of device is not unique.
    We use mac address to forward packet.
    You can get detail information about mesh format from document you mentioned above.



Thanks for your answer!

Sadly that its not mesh(((

I do not understand!
you implement mesh between App. layer and TCP layer, but using mac adr.,who are uses only on MAC layer.

does it mean that you have created distributed application if your "mesh" works upon tcp layer?

(1)---(2)---(3)---(4)
..........|......|
........(5).....(6)

Can we say that in case of necessary to transmit data from 1 to 6 they establish tcp connection with each and there can exist only one connection in network at the same time?

If two nods want to send data at the same time?
Which protocol is using on MAC layer to control access to media?

do u have any idea how to send data from server to desired node and push that data to pc via uart?

Statistics: Posted by Nikita Belyaev — Wed May 25, 2016 5:28 pm


]]>
2016-05-25T13:03:55+08:00 2016-05-25T13:03:55+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7066#p7066 <![CDATA[Re: Question from Nikita about mesh]]> 1. Yes, it's just a tree; Now, we just implement mesh between App. layer and TCP layer.
    2. the element of route table is mac address, because the IP address of device is not unique.
    We use mac address to forward packet.
    You can get detail information about mesh format from document you mentioned above.

Statistics: Posted by Guest — Wed May 25, 2016 1:03 pm


]]>
2016-05-25T01:20:52+08:00 2016-05-25T01:20:52+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7063#p7063 <![CDATA[Re: Question from Nikita about mesh]]>
Alen wrote:
Nikita Belyaev wrote:
Alen wrote:
Dear Alen,thanks a lot for such detailed answer!
However,let's talk more about routing))

Imagine such small network:
(1)---(2)---(3)---(4)
.........|.....|
........(5)---(6)

Node 1 desire to send a packet to 6. How this packet will go through other nodes? How node 2 know that he should forward this packet to 5 not to 6?


Node 1 sends packet to Node 2, Node 2 forwards packet to Node 3 according its route table, then Node 3 forwards packet to Node 6.
Node 2 doesn't forward packet to Node 5, because there is only one path from Node 1 to Node 6.

In addition, Node 1 doesn't know every detail hop to Node 6, it just knows that Node 2 is only path to Node 6.


If thee is only one path between 2 nodes,why do u call its mesh??? It's just tree!
In pdf,that comes in documents from git is written that:
There are three schemes to implement mesh:
1) mesh between App. layer and TCP layer
2) mesh between IP and MAC layers
3)...

How can I change between them? And which one is realized in mesh_demo??
I still can't understand routing procedure.
If we use mesh upon TCP we can't work with mac adr.,only IP (maybe I'm nor right)
How does routing table looks like?

Statistics: Posted by Nikita Belyaev — Wed May 25, 2016 1:20 am


]]>
2016-05-24T22:54:46+08:00 2016-05-24T22:54:46+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7060#p7060 <![CDATA[Re: Question from Nikita about mesh]]>
Nikita Belyaev wrote:
Alen wrote:
The most important for me is about routing!

thanks!
1) what is the method of dynamic routing? which criterias nodes are uses to find best route?
2) Server just print that he is available and thats all? So how can I monitor the proses of mesh working? Where and how can I investigate bits in packets as you do it in ESP8266 Mesh User Guide?
3) I still cant understand where to look for such prints))

mesh will print "**** mesh is busy"


4) where in code should I look for description of events that are wreaten in README file such as
2. Every node sends one packet to server per 7 seconds after it joins mesh network.
3. Every node gets mac address of all devices working in mesh per 14 seconds after it joins mesh?

5) Finally what is the procedure of election root and non root node?


Response:
    1. There is just one path from one node to anther node, the router path is established during the mesh establishment.
    2. You can print more information when you receive packet from node.
    Now, the server will print packet content when it receive packet, please pay attention to the line 14 of demo_server.py
    You may pay attention to line 17 ~ 27 of demo_server.py, they are the packet format.
    3. mesh just hold one packet from user, before it send the packet out, if user try to send another packet, you will get the indication "mesh is busy"
    4. Please pay attention to esp_mesh_demo_test in mesh_demo.c, the test case will send one packet to server per 7 seconds.
    at the same time, mesh_topo_test in mesh_none.c, it is the case to send topology request packet to get all device working in mesh per 14 seconds.
    5. You can make one device as root according to your plan, or contest for root automatically.
    If you select contest solution, all the node will try to as root device, and we implement solution to check the conflict of root.
    The RSSI and current capacity of node will determine the final root.
    The root with max RSSI and most capacity continues as root, the other root would not be as root, and re-join mesh as non-root device.


Dear Alen,thanks a lot for such detailed answer!
However,let's talk more about routing))

Imagine such small network:
(1)---(2)---(3)---(4)
.........|.....|
........(5)---(6)

Node 1 desire to send a packet to 6. How this packet will go through other nodes? How node 2 know that he should forward this packet to 5 not to 6?


Node 1 sends packet to Node 2, Node 2 forwards packet to Node 3 according its route table, then Node 3 forwards packet to Node 6.
Node 2 doesn't forward packet to Node 5, because there is only one path from Node 1 to Node 6.

In addition, Node 1 doesn't know every detail hop to Node 6, it just knows that Node 2 is only path to Node 6.

Statistics: Posted by Guest — Tue May 24, 2016 10:54 pm


]]>
2016-05-24T21:50:11+08:00 2016-05-24T21:50:11+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7058#p7058 <![CDATA[Re: Question from Nikita about mesh]]>
Alen wrote:
The most important for me is about routing!

thanks!
1) what is the method of dynamic routing? which criterias nodes are uses to find best route?
2) Server just print that he is available and thats all? So how can I monitor the proses of mesh working? Where and how can I investigate bits in packets as you do it in ESP8266 Mesh User Guide?
3) I still cant understand where to look for such prints))

mesh will print "**** mesh is busy"


4) where in code should I look for description of events that are wreaten in README file such as
2. Every node sends one packet to server per 7 seconds after it joins mesh network.
3. Every node gets mac address of all devices working in mesh per 14 seconds after it joins mesh?

5) Finally what is the procedure of election root and non root node?


Response:
    1. There is just one path from one node to anther node, the router path is established during the mesh establishment.
    2. You can print more information when you receive packet from node.
    Now, the server will print packet content when it receive packet, please pay attention to the line 14 of demo_server.py
    You may pay attention to line 17 ~ 27 of demo_server.py, they are the packet format.
    3. mesh just hold one packet from user, before it send the packet out, if user try to send another packet, you will get the indication "mesh is busy"
    4. Please pay attention to esp_mesh_demo_test in mesh_demo.c, the test case will send one packet to server per 7 seconds.
    at the same time, mesh_topo_test in mesh_none.c, it is the case to send topology request packet to get all device working in mesh per 14 seconds.
    5. You can make one device as root according to your plan, or contest for root automatically.
    If you select contest solution, all the node will try to as root device, and we implement solution to check the conflict of root.
    The RSSI and current capacity of node will determine the final root.
    The root with max RSSI and most capacity continues as root, the other root would not be as root, and re-join mesh as non-root device.


Dear Alen,thanks a lot for such detailed answer!
However,let's talk more about routing))

Imagine such small network:
(1)---(2)---(3)---(4)
.........|.....|
........(5)---(6)


Node 1 desire to send a packet to 6. How this packet will go through other nodes? How node 2 know that he should forward this packet to 5 not to 6?

Statistics: Posted by Nikita Belyaev — Tue May 24, 2016 9:50 pm


]]>
2016-05-24T21:02:10+08:00 2016-05-24T21:02:10+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2213&p=7057#p7057 <![CDATA[Question from Nikita about mesh]]>

The most important for me is about routing!

thanks!
1) what is the method of dynamic routing? which criterias nodes are uses to find best route?
2) Server just print that he is available and thats all? So how can I monitor the proses of mesh working? Where and how can I investigate bits in packets as you do it in ESP8266 Mesh User Guide?
3) I still cant understand where to look for such prints))

mesh will print "**** mesh is busy"


4) where in code should I look for description of events that are wreaten in README file such as
2. Every node sends one packet to server per 7 seconds after it joins mesh network.
3. Every node gets mac address of all devices working in mesh per 14 seconds after it joins mesh?

5) Finally what is the procedure of election root and non root node?


Response:
    1. There is just one path from one node to anther node, the router path is established during the mesh establishment.
    2. You can print more information when you receive packet from node.
    Now, the server will print packet content when it receive packet, please pay attention to the line 14 of demo_server.py
    You may pay attention to line 17 ~ 27 of demo_server.py, they are the packet format.
    3. mesh just hold one packet from user, before it send the packet out, if user try to send another packet, you will get the indication "mesh is busy"
    4. Please pay attention to esp_mesh_demo_test in mesh_demo.c, the test case will send one packet to server per 7 seconds.
    at the same time, mesh_topo_test in mesh_none.c, it is the case to send topology request packet to get all device working in mesh per 14 seconds.
    5. You can make one device as root according to your plan, or contest for root automatically.
    If you select contest solution, all the node will try to as root device, and we implement solution to check the conflict of root.
    The RSSI and current capacity of node will determine the final root.
    The root with max RSSI and most capacity continues as root, the other root would not be as root, and re-join mesh as non-root device.

Statistics: Posted by Guest — Tue May 24, 2016 9:02 pm


]]>