0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Zigbeeのおさらい

Last updated at Posted at 2020-05-06

Zigbee エンドデバイスを作る場合の設定

Zigbee エンドデバイスに必要な設定は大きなレイヤ順に以下の通りです。

  • 周波数を指定
  • チャンネルを設定
  • デバイスタイプを設定
  • アドレス設定
  • エンドポイント番号を設定
  • プロファイルIDを設定
  • クラスタを設定

周波数

IEEE802.15.4が使われていて、IEEE802.15.4は以下の仕様となっています。

周波数帯域 チャネル 変調方式 データ転送速度 地域
868MHz 0 BPSK 20kbps 主に欧州
915MHz 1〜10 BPSK 40kbps 主に北米、南米
2.4GHz 11〜26 O-QPSK 250kbps 日本を含む世界

チャンネル

2.4GHz帯を使う場合はチャンネルが11〜26となります。
全てのチャンネルをスキャンして接続先を探すこともできますが、チャンネルマスクを設定して任意のチャンネルの組み合わせのみで使うこともできます。

デバイスタイプ

コーディネーター、ルーター、エンドデバイスがあり、今回の目的ではエンドデバイスを指定します。

アドレス設定

通信に使用するアドレスはIEEE 802.15.4デバイス製造時に付加される64ビットのロングアドレスと、稼働時に割り振られる16bitのショートアドレスがあります。Zigbeeではショートアドレスを主に使います。エンドデバイスのショートアドレスは、PAN接続時にコーディネーターから割り当てられます。

エンドポイント番号を設定

TCP/IP の ポート番号のように、通信に番号をつけてアプリケーションごとに管理できます。

プロファイルIDを設定

Zigbee AllianceにおいてプロファイルIDが規定され、それに対応する通信パケットの通信形式と解釈が定義されています。
例えば、パブリックプロファイルとして定義されているものとして以下のものがあります。
Home Automation Profile = 0x0104

パブリックプロファイルは Zigbee Alliance が策定するもので、プライベートプロファイルは製造者が製造者固有プロファイルの認定を受けた上割り当てた番号が使えるようになります。

クラスタを設定

パブリックプロファイルでは、データ形式や単位があらかじめ規定されています。送るデータの種類ごとにクラスタという番号で以下のように定義されています。


・・・


  /* General clusters */
  ZB_ZCL_CLUSTER_ID_POLL_CONTROL = 0x0020,          /**< Poll control cluster identifier. */
  ZB_ZCL_CLUSTER_ID_GREEN_POWER  = 0x0021,          /**< Green Power cluster identifier. */

  ZB_ZCL_CLUSTER_ID_KEEP_ALIVE = 0x0025,            /**< Keep Alive cluster identifier. */

  /* Closures clusters */
  ZB_ZCL_CLUSTER_ID_SHADE_CONFIG = 0x0100,          /**< Shade configuration cluster identifier. */
  ZB_ZCL_CLUSTER_ID_DOOR_LOCK = 0x0101,             /**< Door lock cluster identifier. */
  ZB_ZCL_CLUSTER_ID_WINDOW_COVERING = 0x0102,       /**< Window covering cluster identifier. */
  /* HVAC clusters */
  ZB_ZCL_CLUSTER_ID_PUMP_CONFIG_CONTROL = 0x200,    /**< Pump configuration and control cluster
                                                      identifier. */
  ZB_ZCL_CLUSTER_ID_THERMOSTAT = 0x201,             /**< Thermostat cluster identifier. */
  ZB_ZCL_CLUSTER_ID_FAN_CONTROL = 0x202,            /**< Fan control cluster identifier. */
  ZB_ZCL_CLUSTER_ID_DEHUMID_CONTROL = 0x203,        /**< Dehumidification control cluster
                                                      identifier. */
  ZB_ZCL_CLUSTER_ID_THERMOSTAT_UI_CONFIG = 0x204,   /**< Thermostat user interface configur
・・・

資料

日本語仕様書(旧1.7) http://www.wirelessdesign.jp/doc/zigbee-spec_081209.pdf

ZigBee入門 - Skyley Support Wiki
http://www.skyley.com/wiki/index.php?ZigBee%E5%85%A5%E9%96%80

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?