6. Choosing a GSK configuration
idle_timeout_sec — how long a lull do I need before interrupting my link is acceptable?
L = min( shortest routine gap between my sub-GHz messages,
smallest effective keep-alive interval across my enabled sub-GHz links )
idle_timeout_sec <= 0.75 * L i.e. leave at least 25 % of L as margin
Figure 6.1: Sizing rule for `idle_timeout_sec`.
The second term of L is easy to miss; read the effective keep-alive interval (§4). Count every uplink your product generates, including location resolve uplinks (sid_location, Amazon Sidewalk Location Library Developer Guide).
app_ack_miss_threshold — how many unacknowledged ack-requested uplinks in a row before I stop trusting the session? Detection latency is N × K, where K is the shortest candidate cadence (Figure 6.2, Table 6.1).
| Candidate term of K | Applies when |
|---|---|
Your own request_ack = true cadence | You send ack-requested uplinks |
| The keep-alive interval | The link and profile arm one; see the Amazon Sidewalk Keep-Alive (KA) Application Note |
Table 6.1: Candidate terms of K, the ack-requested-uplink cadence.
latency ~= N * K
where N = app_ack_miss_threshold, K = the effective ack-requested-uplink cadence above
Figure 6.2: Worst-case desync detection latency.
Treat that latency as an upper bound: in a real desync the keep-alive’s own teardown and rejoin usually resolves the session sooner (§2.2). idle_timeout_sec changes only where a disruption lands, never its cost (§2.1): a short window accepts one inside a traffic burst, a long window pushes it into a lull.
If that latency is too slow, three levers shorten it, ordered by available room:
- Lower the keep-alive interval with
SID_OPTION_DL_ROUTE_VALIDITY(19). Keep it aboveidle_timeout_sec, or no session establishes (§4). Prefernwsync_time× 60 s ≥ 4/3 ×idle_timeout_secfor the Figure 6.1 margin. - Send your own periodic ack-requested uplink. This lowers K directly, whatever currently sets it.
- Lower
app_ack_miss_threshold. The 3–10 bound makes it the smallest change available.
retry_interval_sec — how long may the Endpoint run in non-GSK mode after a fallback? It trades recovery latency against repeated attempt cost (§3): take the 43200 s (12 h) minimum where establishment normally succeeds, and keep the 86400 s default on a SubG-CSS device at the fringe of MDR coverage, where each attempt that reaches MDR and then fails pays the switch to MDR and the re-initialization back to LDR (unless the application selected MDR, §2.1).
Rule of thumb, and it differs by link. Set app_ack_miss_threshold from the cost of a false positive. On SubG-CSS where MDR is offered a false positive costs link-layer acknowledgement and retries until the next establishment retry (§3), and returns the link to LDR for that whole wait (unless the application selected MDR, §2.1), so bias toward 6 or higher. On SubG-FSK it costs at most one retry interval in non-GSK mode, with no PHY or throughput penalty, so 4 is defensible. 3 discards a good key on a short RF outage on either link.