You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
childProcess.exec(`ubus call iwinfo info '{"device":"wlan0"}'`,(error,results)=>{
1463
-
if(error){
1464
-
recursiveWifi();
1465
-
}else{
1466
-
try{
1467
-
varnetwork=JSON.parse(results);
1468
-
1469
-
if(network.ssid===undefined){
1470
-
// using 6 because it's the lowest count with accurate results after testing
1471
-
if(checkCount<6){
1472
-
checkCount++;
1473
-
recursiveWifi();
1474
-
}else{
1475
-
varmsg='Tessel is unable to connect, please check your credentials or list of available networks (using tessel.network.wifi.findAvailableNetworks()) and try again.';
1476
-
throwmsg;
1477
-
}
1474
+
childProcess.exec(`ubus call iwinfo info '{"device":"wlan0"}'`,(error,results)=>{
1475
+
if(error){
1476
+
recursiveWifi();
1477
+
}else{
1478
+
try{
1479
+
varnetwork=JSON.parse(results);
1480
+
1481
+
if(network.ssid===undefined){
1482
+
// using 6 because it's the lowest count with accurate results after testing
varmsg='Tessel is unable to connect, please check your credentials or list of available networks (using tessel.network.wifi.findAvailableNetworks()) and try again.';
1488
+
throwmsg;
1487
1489
}
1488
-
}catch(error){
1489
-
reject(error);
1490
+
}else{
1491
+
recursiveIP(network);
1490
1492
}
1493
+
}catch(error){
1494
+
reject(error);
1491
1495
}
1492
-
});
1496
+
}
1497
+
});
1498
+
}
1499
+
1500
+
// when immediately connecting and restarting the wifi chip, it takes a few moments before an IP address is broadcast to Tessel.
1501
+
// This function keeps checking for that IP until it's available.
0 commit comments