mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-18 04:52:18 +02:00
fix(esp_modem): Correction of switching to CMUX
* BG96 needs a small pause between CMUX command reception and actual use of the CMUX mode * Correct CMUX payload reception to check FT_UIH message type (P/F flag could be cleared or set) Closes https://github.com/espressif/esp-protocols/issues/33
This commit is contained in:
@ -103,7 +103,7 @@ struct CMux::CMuxFrame {
|
||||
|
||||
void CMux::data_available(uint8_t *data, size_t len)
|
||||
{
|
||||
if (data && type == 0xFF && len > 0 && dlci > 0) {
|
||||
if (data && (type&FT_UIH) == FT_UIH && len > 0 && dlci > 0) { // valid payload on a virtual term
|
||||
int virtual_term = dlci - 1;
|
||||
if (virtual_term < MAX_TERMINALS_NUM && read_cb[virtual_term]) {
|
||||
// Post partial data (or defragment to post on CMUX footer)
|
||||
|
Reference in New Issue
Block a user