Update checkwifi, autogateway discovery

Update checkwifi, autogateway discovery