Skip to content

Commit

Permalink
fix(modem): Fix to allow MSC frame (SIM800 CMUX) after v1.0.2
Browse files Browse the repository at this point in the history
Fixes the regression from 8edbac6 that added more strict conditions
for CMUX protocol, but didn't allow MSC frames that might be sent during
initializaiton by SIM800.

Closes #366
  • Loading branch information
david-cermak committed Sep 26, 2023
1 parent 4f2ebaa commit 8d5947e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/esp_modem/src/esp_modem_cmux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ bool CMux::data_available(uint8_t *data, size_t len)
return false;
}
} else if ((type & FT_UIH) == FT_UIH && dlci == 0) { // notify the internal DISC command
if (len > 0 && (data[0] & 0xE1) == 0xE1) {
if ((len > 0 && (data[0] & 0xE1) == 0xE1) || (data == nullptr)) {
// Not a DISC, ignore (MSC frame)
return true;
}
Expand Down

0 comments on commit 8d5947e

Please sign in to comment.