This works in 0.8.0-rc.1
void cloud_set_apn(void){
//Check that the modem is on and ready for AT commands
DEBUG("Checking if modem is on");
int response = Cellular.command(5000, "AT\r\n");
while( response != RESP_OK ){
DEBUG("Modem not responding... must not be on!");
Cellular.on();
response = Cellular.command(5000, "AT\r\n");
Particle.process();
};
}
in 0.8.0-rc.3 it is stuck in the loop forever.