

# 排定將下行訊息傳送至多點傳送群組中的裝置
<a name="lorawan-multicast-schedule-downlink"></a>

在成功將裝置新增至多點傳送群組之後，便可開始多點傳送工作階段，並設定要傳送至這些裝置的下行訊息。必須將下行訊息排定在 48 小時內，且多點傳送的開始時間必須至少晚於目前時間的 30 分鐘。

**注意**  
多點傳送群組中的裝置無法在收到下行訊息時進行確認。

## 必要條件
<a name="lorawan-multicast-downlink-prereq"></a>

必須先建立一個多點傳送群組，並成功新增裝置至要傳送下行訊息的群組，才可以傳送下行訊息。在排定多點傳送工作階段的開始時間後，您便無法新增更多裝置。如需詳細資訊，請參閱[建立多點傳送群組以及將裝置新增至群組](lorawan-create-multicast-groups.md)。

如果有任何裝置未能成功新增，則多點傳送群組和裝置狀態將包含有助您解決錯誤的資訊。若錯誤仍然存在，請參閱 [監控及疑難排解多點傳送群組和群組中裝置的狀態](lorawan-multicast-status.md) 了解解決這些錯誤的相關資訊。

## 使用主控台排定下行訊息
<a name="lorawan-multicast-downlink-console"></a>

若要使用主控台傳送下行訊息，請前往 AWS IoT 主控台的 [Multicast groups](https://console.aws.amazon.com/iot/home#/wireless/multicastGroups) (多點傳送群組) 頁面，然後選擇建立的多點傳送群組。在 multicast group details (多點傳送群組詳細資訊) 頁面中，選擇 **Schedule downlink message** (排定下行訊息)，然後選擇 **Schedule downlink session** (排定下行工作階段)。

1. 

**排定下行訊息時段**

   您可以為要傳送至多點傳送群組中裝置的下行訊息，設定一個時間範圍。必須在 48 小時內排定下行訊息。

   若要排定多點傳送工作階段，請指定以下參數：
   + **Start date** (開始日期) 和 **Start time** (開始時間)：開始日期和時間必須至少為目前時間的 30 分鐘後和 48 小時前。
**注意**  
應以 UTC 指定時間，因此請在排定下行時段時考慮到時差問題。
   + **工作階段逾時**：若未收到任何下行訊息，則希望讓多點傳送工作階段逾時的時間。最小逾時為 60 秒。B 類多點傳送群組的最大逾時值為 2 天，C 類多點傳送群組則為 18 小時。

1. 

**設定下行訊息**

   若要設定下行訊息，請指定以下參數：
   + **資料傳輸速率**：選擇下行訊息的資料傳輸速率。資料傳輸速率依 RFRegion 和承載規模而定。US915 區域的預設資料傳輸速率是 8，EU868 區域的預設資料傳輸速率是 0。
   + **頻率**：選擇傳送下行訊息的頻率。若要避免訊息衝突，請依據 RFRegion 來選擇可用頻率。
   + **FPort**：選擇一個可用的頻率連接埠，將下行訊息傳送至裝置。
   + **承載**：根據資料傳輸速率指定承載的規模上限。若使用預設資料傳輸速率，US915 RfRegion 中的承載規模上限為 33 位元組，EU868 RfRegion 中則為 51 個位元組。若使用較高的資料傳輸速率，則承載規模上限可達 242 位元組。

   若要排定下行訊息，請選擇 **Schedule** (排程)。

## 使用 API 排定下行訊息
<a name="lorawan-multicast-downlink-api"></a>

若要使用 API 排定下行訊息，請使用 [https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_StartMulticastGroupSession.html](https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_StartMulticastGroupSession.html) API 操作或 [https://docs.aws.amazon.com/cli/latest/reference/iotwireless/start-multicast-group-session](https://docs.aws.amazon.com/cli/latest/reference/iotwireless/start-multicast-group-session) CLI 命令。

您可以使用以下 API 操作或 CLI 命令來取得多點傳送群組的相關資訊或刪除多點傳送群組。
+ [https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_GetMulticastGroupSession.html](https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_GetMulticastGroupSession.html) 或 [https://docs.aws.amazon.com/cli/latest/reference/iotwireless/get-multicast-group-session](https://docs.aws.amazon.com/cli/latest/reference/iotwireless/get-multicast-group-session)
+ [https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_DeleteMulticastGroupSession.html](https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_DeleteMulticastGroupSession.html) 或 [https://docs.aws.amazon.com/cli/latest/reference/iotwireless/delete-multicast-group-session](https://docs.aws.amazon.com/cli/latest/reference/iotwireless/delete-multicast-group-session)

若要在工作階段開始後將資料傳送至多點傳送群組，請使用 [https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_SendDataToMulticastGroup.html](https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_SendDataToMulticastGroup.html) API 操作或 [https://docs.aws.amazon.com/cli/latest/reference/iotwireless/send-data-to-multicast-group](https://docs.aws.amazon.com/cli/latest/reference/iotwireless/send-data-to-multicast-group) CLI 命令。

## 後續步驟
<a name="lorawan-multicast-downlink-next"></a>

在設定要傳送至裝置的下行訊息後，系統會於工作階段開始時傳送該訊息。多點傳送群組中的裝置無法確認是否收到訊息。

### 設定其他下行訊息
<a name="lorawan-multicast-downlink-additional"></a>

您還可以設定要傳送至多點傳送組中裝置的其他下行訊息：
+ 若要從主控台設定其他下行訊息：

  1. 前往 AWS IoT 主控台的 [Multicast groups](https://console.aws.amazon.com/iot/home#/wireless/multicastGroups) (多點傳送群組) 頁面，然後選擇建立的多點傳送群組。

  1. 在 multicast group details (多點傳送群組詳細資訊) 頁面中，選擇 **Schedule downlink message** (排定下行訊息)，然後選擇 **Configure additional downlink message** (設定其他下行訊息)。

  1. 以為第一個下行訊息設定這些參數的相似方法，指定參數 **Data rate (資料傳輸速率)**、**Frequency (頻率)**、**FPort** 以及 **Payload (承載)**。
+ 若要使用 API 或 CLI 來設定其他下行訊息，請呼叫每個其他下行訊息的 [https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_SendDataToMulticastGroup.html](https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_SendDataToMulticastGroup.html) API 操作或 [https://docs.aws.amazon.com/cli/latest/reference/iotwireless/send-data-to-multicast-group](https://docs.aws.amazon.com/cli/latest/reference/iotwireless/send-data-to-multicast-group)CLI 命令。

### 更新工作階段排程
<a name="lorawan-multicast-downlink-update"></a>

您也可以更新工作階段排程，為多點傳送工作階段使用新的開始日期和時間。新的工作階段排程會覆寫之前排定的工作階段。

**注意**  
僅在必要時更新多點傳送工作階段。這些更新可能會讓一組裝置長時間處於喚醒狀態，繼而耗盡電池電量。
+ 若要從主控台更新工作階段排程：

  1. 前往 AWS IoT 主控台的 [Multicast groups](https://console.aws.amazon.com/iot/home#/wireless/multicastGroups) (多點傳送群組) 頁面，然後選擇建立的多點傳送群組。

  1. 在 multicast group details (多點傳送群組詳細資訊) 頁面中，選擇 **Schedule downlink message** (排定下行訊息)，然後選擇 **Update session schedule** (更新工作階段排程)。

  1. 以為第一個下行訊息指定這些參數的相似方法，指定參數 **State date** (開始日期)、**Start time** (開始時間) 以及 **Session timeout** (工作階段逾時)。
+ 若要從 API 或 CLI 更新工作階段排程，請使用 [https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_StartMulticastGroupSession.html](https://docs.aws.amazon.com/iot-wireless/2020-11-22/apireference/API_StartMulticastGroupSession.html) API 操作或 [https://docs.aws.amazon.com/cli/latest/reference/iotwireless/start-multicast-group-session](https://docs.aws.amazon.com/cli/latest/reference/iotwireless/start-multicast-group-session) CLI 命令。