Skip to content

Commit

Permalink
Add delay to SIM800 driver
Browse files Browse the repository at this point in the history
The modem sometimes is not able to handle a command directly
after receiving data.
  • Loading branch information
Georg Lippitsch committed Sep 6, 2022
1 parent 3c095cb commit cef0514
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cicada/commdevices/modemdetect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ void ModemDetect::run()
{
if (_detectedModem) {
_detectedModem->run();
_detectedModem->setLastRun(lastRun());
setDelay(_detectedModem->delay());
return;
}
Expand Down
2 changes: 2 additions & 0 deletions cicada/commdevices/sim800.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ void Sim800CommDevice::run()
break;

case sendCiprxget4:
setDelay(0);
_waitForReply = _okStr;
_sendState = sendCiprxget2;
_replyState = ciprxget4;
Expand Down Expand Up @@ -350,6 +351,7 @@ void Sim800CommDevice::run()
} else if (_bytesToReceive > 0) {
_sendState = sendCiprxget2;
} else {
setDelay(10);
_sendState = sendCiprxget4;
}
break;
Expand Down

0 comments on commit cef0514

Please sign in to comment.