Backup:fast start ap function.
This commit is contained in:
parent
e5a2d7cfd9
commit
79a29db217
|
@ -14,11 +14,13 @@
|
|||
*/
|
||||
#include "WifiHal.h"
|
||||
#include "LinuxApi.h"
|
||||
#include "ILog.h"
|
||||
StatusCode WifiHal::OpenApMode(void)
|
||||
{
|
||||
// fx_system("ifconfig wlan0 192.168.169.1 netmask 255.255.255.0");
|
||||
// fx_system("hostapd -d /etc/hostapd.conf &");
|
||||
// fx_system("touch /var/lib/misc/udhcpd.leases");
|
||||
// fx_system("udhcpd -f /etc/udhcpd.conf &");
|
||||
LogInfo(" ==================================== OpenApMode. \n");
|
||||
fx_system("ifconfig wlan0 192.168.169.1 netmask 255.255.255.0");
|
||||
fx_system("hostapd -d /etc/hostapd.conf &");
|
||||
fx_system("touch /var/lib/misc/udhcpd.leases");
|
||||
fx_system("udhcpd -f /etc/udhcpd.conf &");
|
||||
return CreateStatusCode(STATUS_CODE_OK);
|
||||
}
|
|
@ -31,6 +31,7 @@ const StatusCode AppManager::Init(const AppParam ¶m)
|
|||
LogError("Get wifi hal failed.\n");
|
||||
return CreateStatusCode(STATUS_CODE_NOT_OK);
|
||||
}
|
||||
LogInfo("ssssssssssssssssssssssssssssssssssssssssssssssssss\n");
|
||||
wifi->OpenApMode();
|
||||
AppManagerMakePtr::GetInstance()->CreateProtocolHandle(mProtocolHandle);
|
||||
HttpServerStart(param);
|
||||
|
|
|
@ -186,7 +186,9 @@ StatusCode WebServerInit(const WebServerParam webParam)
|
|||
char authPath[BUF_LENGTH] = {0};
|
||||
char listen[BUF_LENGTH] = {0};
|
||||
snprintf(routePath, BUF_LENGTH, "%s/route.txt", GOAHEAD_CONFIG_FILE_PATH);
|
||||
LogInfo("ssssssssssssssssssssssssssssssssss routePath %s\n", routePath);
|
||||
snprintf(authPath, BUF_LENGTH, "%s/auth.txt", GOAHEAD_CONFIG_FILE_PATH);
|
||||
LogInfo("ssssssssssssssssssssssssssssssssss authPath %s\n", authPath);
|
||||
snprintf(listen, BUF_LENGTH, "%s:%d", webParam.mIp, webParam.mPort);
|
||||
// initPlatform();
|
||||
if (websOpen(documents, routePath) < 0) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user