|
@@ -2629,6 +2629,11 @@ void InitEthernet()
|
|
|
char tmpbuf[256];
|
|
|
unsigned int natInterface = 0;
|
|
|
|
|
|
+ // Detele bridge interface
|
|
|
+ system("/sbin/ifconfig uap0 down");
|
|
|
+ system("/sbin/ifconfig br0 down");
|
|
|
+ system("/usr/sbin/brctl delbr br0");
|
|
|
+
|
|
|
//Init Eth0 for internet
|
|
|
memset(tmpbuf,0,256);
|
|
|
sprintf(tmpbuf,"/sbin/ifconfig eth0 %s netmask %s up &",
|
|
@@ -2874,15 +2879,14 @@ void InitEthernet()
|
|
|
(access("/sys/class/net/br0/address", F_OK) == -1))
|
|
|
{
|
|
|
sleep(10);
|
|
|
- system("/sbin/ifconfig br0 down");
|
|
|
- system("/usr/sbin/brctl delbr br0");
|
|
|
system("/usr/sbin/brctl addbr br0");
|
|
|
- system("/sbin/ifconfig br0 192.168.10.200 up");
|
|
|
- system("/usr/sbin/brctl addif br0 uap0");
|
|
|
system("/usr/sbin/brctl addif br0 eth0");
|
|
|
+ system("/usr/sbin/brctl addif br0 uap0");
|
|
|
+ system("/sbin/ifconfig br0 192.168.10.200 up");
|
|
|
system("/bin/sed -i '/interface/d' /etc/udhcpd.conf");
|
|
|
system("/bin/echo 'interface br0' >> /etc/udhcpd.conf");
|
|
|
- system("pkill Module_Wifi");
|
|
|
+ system("kill udhcpd");
|
|
|
+ system("/usr/sbin/udhcpd /etc/udhcpd.conf");
|
|
|
|
|
|
DEBUG_INFO("Bridge uap0 & eth0 for local power sharing by ethernet.\n");
|
|
|
}
|
|
@@ -4210,7 +4214,7 @@ void checkTask()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(strcmp((char *)&ShmSysConfigAndInfo->SysConfig.MaintainServerURL,"") != 0)
|
|
|
+ if(strcmp((char *)&ShmSysConfigAndInfo->SysConfig.MaintainServerURL,"") != 0 && !ShmSysConfigAndInfo->SysConfig.isEnableLocalPowerSharging)
|
|
|
{
|
|
|
if(system("pidof -s OcppBackendPH > /dev/null") != 0)
|
|
|
{
|