Open fvpalha opened 8 years ago
Hi @raburton
With this tiny change is possible define the host and the port of server.
A sample code:
void config_cmd_ota(uint8_t argc, char *argv[]) { char msg[50]; char *val; char *host = argv[1], *port = argv[2]; if (argc == 0) { val = "192.168.1.107"; setOtaHostIp (val); setOtaHostPort (80); } else if (argc == 1) { setOtaHostIp (host); setOtaHostPort (80); } else if (argc == 2) { setOtaHostIp (host); setOtaHostPort (atoi(port)); } //disable global interrupt ETS_GPIO_INTR_DISABLE(); // start the upgrade process if (rboot_ota_start((ota_callback)OtaUpdate_CallBack)) { os_sprintf(msg, "Updating..."); } else { os_sprintf(msg, "Updating failed!"); } uart0_send(msg); }
How to change the OTA Server by command
Hi @raburton
With this tiny change is possible define the host and the port of server.
A sample code: