<aside> ✏️

鏈路層狀態機 - Link Layer State Machine (LLSM)

image.png

</aside>

<aside> ✏️

鏈路層狀態 - Link Layer States

待機狀態 - Standby State

廣播狀態 - Advertising State

掃描狀態 - Scanning State

發起狀態 - Initiating State

連接狀態 - Connection State

同步狀態- Synchronization State

等時廣播狀態 - Isochronous Broadcasting State

</aside>

<aside> ✏️

狀態組合 - State Combination

  1. LLSM 不必實作所有的state,如果一個 MAC:

    1. 只會處在部分的 Link Layer State
    2. 在 Connection state 裡只支援一種角色 (ex. Peripheral only)

    就不需要實作那些**「只會在它不支援的 State/Role 裡出現的功能」**

  2. 不過有些狀況是支援 State Combination A 就必須支援 State Combination B (參考下表)

    State Combination A State Combination B Why?
    支援 Initiating + 其他狀態組合 C 支援 Connection (Central Role) + 相同狀態組合 C 確保連線前後其他功能要正常運作 (此處C可以為空)
    支援 Connection (Central Role) + Initiating + 其他狀態組合 C 支援 Connection (Central role) 同時連線多個 Peripheral + 相同狀態組合 C 如果你能在當 Central 時還能 Initiating 新連線,你就必須能處理多個 Peripheral 同時連上來 (此處C可以為空)
    支援 Connectable Advertising + 其他狀態組合 C 支援 Connection (Peripheral role) + 相同狀態組合 C 如果你的裝置會廣播自己可以被連線,那你也必須能真的進入被連線的狀態
    支援 Connection (Peripheral role) + Connectable Advertising + 其他狀態 C 支援 Connection (Peripheral role) 同時被多個 Central 連線 + 相同狀態組合 C 如果你的裝置能一邊當 Peripheral 連線、一邊還繼續做廣播,那你也必須能同時處理多個 Central 的連線。

</aside>