-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ps_min_ modem
feature
#103
Conversation
bjoernQ
commented
Dec 21, 2022
- on ESP32-C3 the example sometimes runs into a timeout - seems like it's more an issue in the socket util since at least there are data-packets received/sent
- not yet mentioning it in the README since it needs a bit more testing
- definitely the ping gets worse when using the power-safe mode (which is pretty much expected)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Tested on a C3 and I could see the ping differences when ps_min_modem
is enabled. I have a couple of comments, but nothing to stop this from merging.
By the way do you have an idea of the power saved in the mode? Just curios :)
@@ -474,6 +474,7 @@ impl<'s, 'n: 's> Socket<'s, 'n> { | |||
.network_interface() | |||
.get_socket_and_context::<TcpSocket>(self.socket_handle); | |||
let remote_endpoint = (addr, port); | |||
sock.set_ack_delay(Some(smoltcp::time::Duration::from_millis(100))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something that should only be used with the ps_min_modem
feature, or just a general improvement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it shouldn't hurt in any case - the default 10ms are also somewhat optimistic but not really sure t.b.h
* | ||
****************************************************************************/ | ||
#[no_mangle] | ||
pub unsafe extern "C" fn esp_timer_get_time() -> i64 { | ||
trace!("esp_timer_get_time"); | ||
(crate::timer::get_systimer_count() / crate::timer::TICKS_PER_SECOND / 1_000) as i64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct by the way? Can't the "time since boot" actually get lower when the systimer wraps around?
Maybe we need a proper rolling timer instead (don't worry about it for this PR though)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's probably not really good this way - I think we have a few places where the wrapping isn't correctly handled - I should create an issue for that 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created issue #104 for that
I haven't measured anything t.b.h. |