mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-27 09:17:29 +02:00
Compare commits
6 Commits
console_cm
...
modem-v1.0
Author | SHA1 | Date | |
---|---|---|---|
82c2cf8936 | |||
997cff5338 | |||
ed8bbf2666 | |||
b220d1ee5e | |||
671190bc6d | |||
bf99f287bc |
@ -3,6 +3,6 @@ commitizen:
|
||||
bump_message: 'bump(modem): $current_version -> $new_version'
|
||||
pre_bump_hooks: python ../../ci/changelog.py esp_modem
|
||||
tag_format: modem-v$version
|
||||
version: 1.0.4
|
||||
version: 1.0.5
|
||||
version_files:
|
||||
- idf_component.yml
|
||||
|
@ -1,5 +1,29 @@
|
||||
# Changelog
|
||||
|
||||
## [1.0.5](https://github.com/espressif/esp-protocols/commits/modem-v1.0.5)
|
||||
|
||||
### Major changes
|
||||
|
||||
- Added support for implementing user defined modules in standard C-API ([Support for custom modules with C-API](https://github.com/espressif/esp-protocols/commit/0254d50))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Added test injecting unexpected replies ([b220d1e](https://github.com/espressif/esp-protocols/commit/b220d1e), [#426](https://github.com/espressif/esp-protocols/issues/426))
|
||||
- Fixed inconsistent state on data after OK ([bf99f28](https://github.com/espressif/esp-protocols/commit/bf99f28), [#426](https://github.com/espressif/esp-protocols/issues/426))
|
||||
- TLS example: Added restore session support in mbedtls-wrap ([79d38e5](https://github.com/espressif/esp-protocols/commit/79d38e5))
|
||||
- Fixed examples to show netif on ppp-changed event ([a70b197](https://github.com/espressif/esp-protocols/commit/a70b197))
|
||||
- remove unused GNU Make based buildsystem files ([d6b6f63](https://github.com/espressif/esp-protocols/commit/d6b6f63))
|
||||
- specify override_path in example manifest files ([5b78da4](https://github.com/espressif/esp-protocols/commit/5b78da4))
|
||||
- Added test-cases that exercise mode transitions ([aff571d](https://github.com/espressif/esp-protocols/commit/aff571d))
|
||||
- Fixed mode transitions between any state and UNDEF ([93cb2ca](https://github.com/espressif/esp-protocols/commit/93cb2ca), [#320](https://github.com/espressif/esp-protocols/issues/320))
|
||||
- Fixed API docs within doxygen comments ([020b407](https://github.com/espressif/esp-protocols/commit/020b407))
|
||||
- Support for custom modules with C-API ([0254d50](https://github.com/espressif/esp-protocols/commit/0254d50))
|
||||
- Fix CRLF issue with esp_modem_c_api.cpp ([2661b4d](https://github.com/espressif/esp-protocols/commit/2661b4d))
|
||||
|
||||
### Updated
|
||||
|
||||
- ci(common): Created reusable action for host and coverage tests ([9ad04de](https://github.com/espressif/esp-protocols/commit/9ad04de))
|
||||
|
||||
## [1.0.4](https://github.com/espressif/esp-protocols/commits/modem-v1.0.4)
|
||||
|
||||
### Bug Fixes
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: "1.0.4"
|
||||
version: "1.0.5"
|
||||
description: Library for communicating with cellular modems in command and data modes
|
||||
url: https://github.com/espressif/esp-protocols/tree/master/components/esp_modem
|
||||
issues: https://github.com/espressif/esp-protocols/issues
|
||||
|
@ -347,6 +347,9 @@ void DTE::on_read(got_line_cb on_read_cb)
|
||||
|
||||
bool DTE::command_cb::process_line(uint8_t *data, size_t consumed, size_t len)
|
||||
{
|
||||
if (result != command_result::TIMEOUT) {
|
||||
return false; // this line has been processed already (got OK or FAIL previously)
|
||||
}
|
||||
if (memchr(data + consumed, separator, len)) {
|
||||
result = got_line(data, consumed + len);
|
||||
if (result == command_result::OK || result == command_result::FAIL) {
|
||||
|
@ -33,6 +33,20 @@ TEST_CASE("DTE command races", "[esp_modem]")
|
||||
// this command should either timeout or finish successfully
|
||||
CHECK((ret == command_result::TIMEOUT || ret == command_result::OK));
|
||||
}
|
||||
|
||||
// Now we test the same, but with some garbage after the expected data and inject the reply in chunks by 3 bytes
|
||||
uint8_t resp2[] = {'O', 'K', '\n', '1', '2', '\n'};
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
loopback->inject(&resp2[0], sizeof(resp2), 3, /* 1ms before injecting reply */0, 0);
|
||||
auto ret = dce->command("check\n", [&](uint8_t *data, size_t len) {
|
||||
if (len > 0 && data[0] == 'O') { // expected reply only when it starts with '0'
|
||||
return command_result::OK;
|
||||
}
|
||||
return esp_modem::command_result::TIMEOUT;
|
||||
}, 1);
|
||||
// this command should either timeout or finish successfully
|
||||
CHECK((ret == command_result::TIMEOUT || ret == command_result::OK));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("Test polymorphic delete for custom device/dte", "[esp_modem]")
|
||||
|
Reference in New Issue
Block a user