Chat freely about anything...

User avatar
By BitBanger
#6626 I had some time on my hands and was anxious to take your mesh out for a test drive. This definitly has potential in for my application of a network of small mircroprocessors similar to arduino.

I flashed the code into three modules and powered them on. A Mesh was created. It seem to work well. I noticed that if you change the baud rate of a module then power it off and back on the baud rate change is not persistant and gets reset back to 115200. This is unfortunate for me because I only have two FTDI modules capable of 115200. So I could only monitor two of the three ESP modules. I have a slew of old serial modules that will run 9600 but since the ESP boots at 115200 I can't use these old modules unless the baud rate change can be made persistant.

Anyway, The three ESP modules worked as a mesh. It looks like one of the modules was sending data to only one link. In this case link 251. I was able to squeeze the AT+CIFSR, AT+CWLIF and AT+CIPSTATUS commands into the mix and sure 'nough CIPSTATUS showed one connection of 251. See Excerpt data capture:

Code: Select allAT+CIFSR
+CIFSR:APIP,"38.64.158.0"
+CIFSR:APMAC,"1a:fe:34:9e:40:26"
+CIFSR:STAIP,"130.62.158.100"
+CIFSR:STAMAC,"18:fe:34:9e:40:26"
>
OK
AT+CWLIF
-> SEND OK
AT+CIPSTATUS
STATUS:2
+CIPSTATUS:251,"TCP","130.62.158.0",9999,0

OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [1117 > 9607]
1,3 : [9607 > 91845]
2,3 : [91845 > 1117]

************************ END **************
>
>>> AP Good. State= 9

-> SEND OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [1117 > 9607]
1,3 : [9607 > 91845]
2,3 : [91845 > 1117]

************************ END **************

+IPD,251,38B:>$:9607 ,91845:91845,1117 :1117 ,9607
OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [1117 > 9607]
1,3 : [9607 > 91845]
2,3 : [91845 > 1117]

************************ END **************
>
>>> AP Good. State= 9

-> SEND OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [1117 > 9607]
1,3 : [9607 > 91845]
2,3 : [91845 > 1117]

************************ END **************

+IPD,251,38B:>$:9607 ,91845:91845,1117 :1117 ,9607
OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [1117 > 9607]
1,3 : [9607 > 91845]
2,3 : [91845 > 1117]

************************ END **************
>
>>> AP Good. State= 9

-> SEND OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [1117 > 9607]
1,3 : [9607 > 91845]
2,3 : [91845 > 1117]

************************ END **************

+IPD,251,38B:>$:9607 ,91845:91845,1117 :1117 ,9607
OK


Things rocked along then all of a sudden a fourth radio showed in the mesh. Somehow mesh node 91845 got a 6 appended and added to the mesh as 918456.

Code: Select all ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [1117 > 9607]
1,3 : [9607 > 91845]
2,3 : [91845 > 1117]

************************ END **************
>
>>> AP Good. State= 9

-> SEND OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [1117 > 9607]
1,3 : [9607 > 91845]
2,3 : [91845 > 1117]

************************ END **************

+IPD,251,38B:>$:9607 ,91845:91845,1117 :1117 ,9607
OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [1117 > 9607]
1,3 : [9607 > 91845]
2,3 : [91845 > 1117]

************************ END **************
>
>>> AP Good. State= 9

-> SEND OK
> 3 : [918456,918456,1117]

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,4 : [1117 > 9607]
1,4 : [9607 > 91845]
2,4 : [91845 > 1117]
3,4 : [918456 > 1117]

************************ END **************

+IPD,251,38B:>$:9607 ,91845:91845,1117 :1117 ,9607
OK

+IPD,251,50B:STAIP-"131.0.158.100"
STAMC-"18:fe:34:9e:3e:82"

OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,4 : [1117 > 9607]
1,4 : [9607 > 91845]
2,4 : [91845 > 1117]
3,4 : [918456 > 1117]

************************ END **************
>
>>> AP Good. State= 9

-> SEND OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,4 : [1117 > 9607]
1,4 : [9607 > 91845]
2,4 : [91845 > 1117]
3,4 : [918456 > 1117]

************************ END **************

+IPD,251,38B:>$:9607 ,91845:91845,1117 :1117 ,9607
OK
AT+CIFSR
+CIFSR:APIP,"38.64.158.0"
+CIFSR:APMAC,"1a:fe:34:9e:40:26"
+CIFSR:STAIP,"130.62.158.100"
+CIFSR:STAMAC,"18:fe:34:9e:40:26"
>
OK
AT+CWLIF

-> SEND OK
AT+CIPSTATUS
STATUS:2
+CIPSTATUS:251,"TCP","130.62.158.0",9999,0

OK



The other module I could monitor showed three links via the AT+CIPSTATUS command and data being sent to all three links. Once again I squeezed a CIPSTATUS command in.:
Code: Select all>
>>> AP Good. State= 9

-> SEND OK

AT+CIFSR
+CIFSR:APIP,"130.62.158.0"
+CIFSR:APMAC,"1a:fe:34:9e:3e:82"
+CIFSR:STAIP,"38.64.158.100"
+CIFSR:STAMAC,"18:fe:34:9e:3e:82"
>
OK
AT+CWLIF
SEND OK : CLIENT
AT+CIPSTATUS
STATUS:2
+CIPSTATUS:0,"TCP","130.62.158.100",39193,1
+CIPSTATUS:1,"TCP","130.62.158.101",1389,1
+CIPSTATUS:251,"TCP","38.64.158.0",9999,0

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************

+IPD,251,51B:>$:1117 ,9607 :9607 ,1117 :91845,1117 :918456,1117
OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************
>
+IPD,0,51:>$:1117 ,9607 :9607 ,1117 :91845,1117 :918456,1117
OK

SEND OK : CLIENT

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************
>
+IPD,1,38:>$:91845,9607 :9607 ,91845:1117 ,9607
OK

SEND OK : CLIENT

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************
>
>>> AP Good. State= 9

-> SEND OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************

+IPD,251,51B:>$:1117 ,9607 :9607 ,1117 :91845,1117 :918456,1117
OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************
>
+IPD,0,51:>$:1117 ,9607 :9607 ,1117 :91845,1117 :918456,1117
OK


I reset one of the nodes then noticed messages going to links 4 and 5 rather than 0 and 1 as I had seen on initialization. CIPSTATUS gave an interesting result.

Code: Select all ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************
>
>>> AP Good. State= 9

-> SEND OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************

+IPD,251,38B:>$:91845,9607 :9607 ,91845:1117 ,9607
OK
AT+CIFSR
+CIFSR:APIP,"130.62.158.0"
+CIFSR:APMAC,"1a:fe:34:9e:3e:82"
+CIFSR:STAIP,"131.0.158.100"
+CIFSR:STAMAC,"18:fe:34:9e:3e:82"
>
OK
AT+CWLIF
-> SEND OK
AT+CIPSTATUS
STATUS:2
+CIPSTATUS:0,"TCP","130.62.158.100",39193,1
+CIPSTATUS:1,"TCP","130.62.158.101",1389,1
+CIPSTATUS:2,"TCP","130.62.158.100",45239,1
+CIPSTATUS:3,"TCP","130.62.158.100",18138,1
+CIPSTATUS:4,"TCP","130.62.158.100",49332,1
+CIPSTATUS:5,"TCP","130.62.158.100",10440,1
+CIPSTATUS:251,"TCP","131.0.158.0",9999,0

OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************
>
+IPD,5,38:>$:1117 ,9607 :9607 ,91845:91845,1117
OK

SEND OK : CLIENT

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************
>
+IPD,4,38:>$:91845,9607 :9607 ,91845:1117 ,9607
OK

SEND OK : CLIENT

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************
>
>>> AP Good. State= 9

-> SEND OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************

+IPD,251,38B:>$:91845,9607 :9607 ,91845:1117 ,9607
OK

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************
>
+IPD,5,38:>$:1117 ,9607 :9607 ,91845:91845,1117
OK

SEND OK : CLIENT

 ***********Network Links ***************
 Link no, Total link : [Source_ID > Dest_ID]
0,3 : [9607 > 91845]
1,3 : [91845 > 1117]
2,3 : [1117 > 9607]

************************ END **************
>
+IPD,4,38:>$:91845,9607 :9607 ,91845:1117 ,9607
OK

SEND OK : CLIENT



I was able to AT+Close links 0,1,2 and 3. After some period of time the messages migrated from going to links 4 and 5 back to 0 and 1. I then closed links 4 and 5.

Like I said, this is really cool stuff you're doing. I'll be glad to continue to help test future releases if you'd like. I have 6 ESP-01 modules I can use for testing but would be glad to get more if it'ld help.

Keep up the good work!

BB
User avatar
By chandan2002x
#6765 BB,
I must appreciate for your post and detailed observation.

I have observed the issues you have mentioned. The server timeout is 1hour hence, even if the client is closed, the socket is still opened in server side. I have already added the timer in Link-table that will indicate (and will close the socket automatically after expected time =15 sec(link info set time)* No of Links).... Also, the Link-info table will carry the Link-id so that the info can proceed through the mesh :)

I am just puzzled with routing table....the question is : either the "Link-Info will be broadcasted to all nodes, so that all nodes can decide the route?" or " Can follow a IP addressing structure so that the network will be a TREE?"

After a lot of thinking I am proceeding with the IP structure and in next release, you will see, there are symmetry in IP, not random or static. The APIP will be derived from STAIP. The First live node will be the Root (or, so-called co-ordinator).

Will update soon.
Thanks,
User avatar
By chandan2002x
#8783 Hi BB,
V0.9.3 has two major issues:
1. AP DHCP assigns same IP to different clients if they connect in almost equal time slot.
2. SSID length is fixed to 10. I need more. 32 is enough for now.

Hence, porting to 0.9.4 which seems OK.
Shall update soon.

Regards,