3. Changes to Amazon Sidewalk stack configuration
struct sid_gsk_config, declared in sid_gsk_config.h, carries the GSK tunables: pass a pointer to it in sid_config.gsk_config and call sid_init(). All three fields apply to sub-GHz links only. gsk_config is not conditionally excluded and is read even when both SID_SDK_CONFIG_ENABLE_LINK_TYPE_2 and SID_SDK_CONFIG_ENABLE_LINK_TYPE_3 are 0, but no link then exists that could carry a session. In a build with SID_SDK_CONFIG_ENABLE_GSK (sid_sdk_config.h, default 1) set to 0, none of the three fields is read at all, no session is ever established, and nothing in this note applies; see the Gateway Session Key configuration section of the Amazon Sidewalk Sid API Developer Guide.
| Field | Range and default | Meaning |
|---|---|---|
idle_timeout_sec (uint32_t, seconds) | 10–600 s (SID_GSK_IDLE_TIMEOUT_MIN_SEC, SID_GSK_IDLE_TIMEOUT_MAX_SEC); 0 = 240 s default (SID_GSK_IDLE_TIMEOUT_DEFAULT_SEC). | The quiet window required on sub-GHz message traffic, both directions, before an establishment starts (§2.2). It is a floor on how long the lull must last, not a deadline: the actual wait can be longer. The keep-alive interval caps any usable value (§4, §6). |
app_ack_miss_threshold (uint32_t, count) | 3–10 (SID_GSK_APP_ACK_MISS_MIN, SID_GSK_APP_ACK_MISS_MAX); 0 = 6 default (SID_GSK_APP_ACK_MISS_DEFAULT). | Consecutive ack-requested uplinks transmitted but never acknowledged end to end, after which the session is discarded and the link continues in non-GSK mode. §2.2 gives what feeds the counter, what resets it, and what the counted uplinks cost. |
retry_interval_sec (uint32_t, seconds) | 43200–129600 s, that is 12–36 h (SID_GSK_RETRY_INTERVAL_MIN_SEC, SID_GSK_RETRY_INTERVAL_MAX_SEC); 0 = 86400 s default, one day (SID_GSK_RETRY_INTERVAL_DEFAULT_SEC). | How long the Endpoint stays in non-GSK mode after a fallback before it retries establishment. The wait repeats until one succeeds, and each attempt still waits for the idle window (§2.2). |
Table 3.1: Fields of struct sid_gsk_config.
Rules:
- A
NULLgsk_configpointer selects all three defaults — 240 s, 6 and 86400 s; a field value of0selects that field’s default independently. - Out-of-range values are silently clamped to the nearest bound, so
sid_init()never fails because ofgsk_config, and no API reads back the applied value. Assert your values against theSID_GSK_*macros at compile time (§5). - No
sid_optionretunes any of the three fields: callsid_deinit(), thensid_init()again. sid_gsk_config.hincludes only<stdint.h>andsid_api.hdoes not include it, so include it yourself. With the SDK’s CMake targets, link the header-onlysid_gsk_configtarget for its include path;sid_apidoes not expose it.
What a retune costs. sid_deinit() does not discard the stored session, so the following sid_init() reloads it exactly as a reboot does (§2.2): if it is no longer usable, the Endpoint spends up to one retry_interval_sec in non-GSK mode. Retune only in good coverage, and prefer a compile-time constant.
sid_stop() and sid_start() do not move the session lifecycle.