ZigbeeEFRチップのバージョン番号の取得

ゲートウェイがV1.0.0などのファームウェア側のアプリケーションのバージョン番号を取得する場合は、この方法で取得できます。参照リンク
https://www.silabs.com/community/wireless/zigbee-and-thread/knowledge-base.entry.html/2018/09/21/reporting_custommes-cKOS

原則として、プラグインのXNCPを使用します。以下の情報を報告すると、ゲートウェイアプリケーションは情報を受信した後にそれを分析できます。

上記のリンクは定期的に報告します。一度報告してから、報告をオフにすることができます。

#define APP_VERSION "1.0"
#define XNCP_CUSTOM_REPORT_APP_VERSION   0xA0

EmberEventControl customReportEventControl;
void customReportEventHandler(void)
{
      char msg[32];
      msg[0] = XNCP_CUSTOM_REPORT_APP_VERSION;
      sprintf(&msg[1], "v%s",APP_VERSION);
      emberAfPluginXncpSendCustomEzspMessage(sizeof(msg), msg);
      emberEventControlSetInactive(customReportEventControl);
}


/** @brief Performs any additional initialization required at system startup.
 *
 * This function is called when the application starts and can be used to
 * perform any additional initialization required at system startup.
 */
void emberAfMainInitCallback(void) {
 // your code here
	emberEventControlSetDelayMS(customReportEventControl, 2000);
}

最終的な効果は次のとおりです。

おすすめ

転載: blog.csdn.net/xingzhibo/article/details/108620471