Nikita Belyaev wrote:Hi Alen!
Would you tell me why do you implement mesh between app and transport layers?
Statistics: Posted by Nikita Belyaev — Wed Jun 22, 2016 1:47 am
Statistics: Posted by Guest — Mon Jun 20, 2016 6:23 pm
Statistics: Posted by Nikita Belyaev — Sun Jun 19, 2016 11:31 pm
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;
Statistics: Posted by Guest — Mon Jun 06, 2016 11:33 am
Statistics: Posted by Nikita Belyaev — Sun Jun 05, 2016 5:38 pm
Statistics: Posted by Guest — Mon May 30, 2016 1:21 pm
Statistics: Posted by Nikita Belyaev — Sat May 28, 2016 9:59 pm
[/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)
Statistics: Posted by Guest — Sat May 28, 2016 9:16 pm
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
[/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)
Statistics: Posted by Nikita Belyaev — Sat May 28, 2016 6:25 pm
Alen wrote:Please paste error log of server here.
Statistics: Posted by Guest — Sat May 28, 2016 5:23 pm
Statistics: Posted by Nikita Belyaev — Fri May 27, 2016 7:45 pm
Statistics: Posted by Guest — Fri May 27, 2016 11:30 am
Statistics: Posted by CipiCips — Thu May 26, 2016 1:58 am
Statistics: Posted by Guest — Wed May 25, 2016 10:01 pm
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?
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()
Statistics: Posted by Nikita Belyaev — Wed May 25, 2016 9:33 pm
Statistics: Posted by Guest — Wed May 25, 2016 7:41 pm
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?
Code:
self.buf = bytearray()
print(self)
Code:
HOST, PORT = "192.168.1.38", 7000
Statistics: Posted by Nikita Belyaev — Wed May 25, 2016 7:14 pm
Statistics: Posted by Guest — Wed May 25, 2016 7:05 pm
Statistics: Posted by Nikita Belyaev — Wed May 25, 2016 5:28 pm
Statistics: Posted by Guest — Wed May 25, 2016 1:03 pm
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.
Statistics: Posted by Nikita Belyaev — Wed May 25, 2016 1:20 am
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.
Statistics: Posted by Guest — Tue May 24, 2016 10:54 pm
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?
Statistics: Posted by Nikita Belyaev — Tue May 24, 2016 9:50 pm
Statistics: Posted by Guest — Tue May 24, 2016 9:02 pm