Open momor10 opened 5 years ago
it will actually hang in the while loop of the Uart::flush() method in https://github.com/arduino/ArduinoCore-samd/blob/master/cores/arduino/Uart.cpp:
void Uart::flush()
{
while(txBuffer.available()); // wait until TX buffer is empty <-- stuck here
sercom->flushUART();
}
Hello, disconnecting the antenna during runtime will cause the MKR 1400 (didnt test any other) to crash. It happens in the MODEM.cpp in the send method during the _uart->flush();
it doesnt matter when the antenna is disconnected , it always happens at the next call of that line. Im not sure how the antenna and the uart are related to eachother. why would it crash and why wouldnt it recover after reconnecting the antenna. After commenting out the _uart->flush() line it works and recovers from the signal loss after reconnecting the antenna. However im sure that line wasnt added just for fun. So is there another way to make sure all data are transmitted without using flush?
Im also having stability issues and waiting for https://github.com/arduino-libraries/MKRGSM/issues/66 and https://github.com/arduino-libraries/MKRGSM/issues/27 to be resolved. For now i added some timeouts to the while loops in the GSMClient.cpp and am testing..