|
@@ -595,7 +595,7 @@ int setWPAconf()
|
|
|
// Wifi IP set by DHCP client or static
|
|
|
if(ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient==0)
|
|
|
{
|
|
|
- sprintf(cmdBuf, "/sbin/udhcpc -i %s -s /root/simple.script > /dev/null &", Wifi.currentInterface);
|
|
|
+ sprintf(cmdBuf, "/sbin/udhcpc -i %s -s /root/dhcp_script/wifi.script > /dev/null &", Wifi.currentInterface);
|
|
|
system(cmdBuf);
|
|
|
}
|
|
|
else
|
|
@@ -768,7 +768,7 @@ int checkIP(void)
|
|
|
system(cmd);
|
|
|
if(ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient==0)
|
|
|
{
|
|
|
- sprintf(cmd, "/sbin/udhcpc -i %s -s /root/simple.script > /dev/null &", Wifi.currentInterface);
|
|
|
+ sprintf(cmd, "/sbin/udhcpc -i %s -s /root/dhcp_script/wifi.script > /dev/null &", Wifi.currentInterface);
|
|
|
system(cmd);
|
|
|
}
|
|
|
DEBUG_INFO("Sending DHCP request...\n");
|
|
@@ -923,6 +923,7 @@ void proc_sta()
|
|
|
{
|
|
|
DEBUG_INFO("Wifi internet valid result: Pass\n");
|
|
|
ShmStatusCodeData->InfoCode.InfoEvents.bits.InternetDisconnectViaWiFi=0;
|
|
|
+ ShmSysConfigAndInfo->SysConfig.AthInterface.WifiNetworkConn=1;
|
|
|
cnt_pingDNS_Fail = 0;
|
|
|
sleep(30);
|
|
|
}
|
|
@@ -936,6 +937,7 @@ void proc_sta()
|
|
|
if(cnt_pingDNS_Fail >= 3)
|
|
|
{
|
|
|
ShmStatusCodeData->InfoCode.InfoEvents.bits.InternetDisconnectViaWiFi=1;
|
|
|
+ ShmSysConfigAndInfo->SysConfig.AthInterface.WifiNetworkConn=0;
|
|
|
cnt_pingDNS_Fail = 0;
|
|
|
|
|
|
DEBUG_INFO("Ping DNS failed...");
|