Generating using convert_to_cmake.py, with some minor cleanup
optimize the speed when do wifi connect