fix(esp_modem): Read module name with AT commands

This fixes basic IDF test case which supplied dummy module name.
This commit is contained in:
David Cermak
2021-11-25 16:24:49 +01:00
parent 5f0832a0ad
commit 8417e232aa
4 changed files with 6 additions and 22 deletions

View File

@ -28,6 +28,8 @@ int LoopbackTerm::write(uint8_t *data, size_t len)
response = "CONNECT\r\n";
} else if (command.find("AT+CSQ\r") != std::string::npos) {
response = "+CSQ: 123,456\n\r\nOK\r\n";
} else if (command.find("AT+CGMM\r") != std::string::npos) {
response = "0G Dummy Model\n\r\nOK\r\n";
} else if (command.find("AT+CBC\r") != std::string::npos) {
response = is_bg96 ? "+CBC: 1,2,123456V\r\r\n\r\nOK\r\n\n\r\n" :
"+CBC: 123.456V\r\r\n\r\nOK\r\n\n\r\n";