{"id":320990,"date":"2021-04-06T15:01:39","date_gmt":"2021-04-06T15:01:39","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=320990"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2021-04-06T15:01:39","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=320990","title":{"rendered":"Hello NXP Zigbee World"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4ee\/a53\/fb6\/4eea53fb6d82fc796ae25f83dfdb020e.png\" width=\"654\" height=\"431\"><figcaption><\/figcaption><\/figure>\n<p>\u0418 \u0441\u043d\u043e\u0432\u0430 \u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c<a href=\"https:\/\/habr.com\/ru\/post\/547374\/\" rel=\"noopener noreferrer nofollow\"> \u0441\u0442\u0430\u0442\u044c\u0438 Hello NXP JN5169 World<\/a>. \u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u043c\u044b \u043f\u043e\u0441\u0442\u0438\u0433\u0430\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u044b \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 JN5169, \u0435\u0433\u043e \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u044e, \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u044b, \u0442\u043e \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0441\u0442\u0438\u0433\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0444\u0438\u0448\u043a\u0443 \u044d\u0442\u043e\u0433\u043e \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 &#8212; \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 ZigBee \u0441\u0435\u0442\u044f\u0445. \u0421\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0434\u0443\u043c\u0447\u0438\u0432\u044b\u043c \u043f\u0435\u0440\u0435\u0432\u0430\u0440\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043e\u0442 NXP, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 NXP ZigBee SDK.<\/p>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u044f \u0431\u0443\u0434\u0443 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043d\u0443\u043b\u044f, \u043f\u043e\u043d\u0435\u043c\u043d\u043e\u0433\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0432 \u043d\u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b (\u0430 \u0437\u0430\u043e\u0434\u043d\u043e \u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044f\u0441\u044c \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435). \u0426\u0435\u043b\u044c &#8212; \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043e\u0434\u043d\u043e\u043a\u043b\u0430\u0432\u0438\u0448\u043d\u044b\u0439 \u0443\u043c\u043d\u044b\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u043e ZigBee.<\/p>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u043c\u0438\u0440 ZigBee?<\/p>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438<\/h2>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0448\u044c\u0441\u044f \u0441 ZigBee \u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0448\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0437\u043d\u0430\u043d\u0438\u0439<\/p>\n<ul>\n<li>\n<p>\u0412 \u0441\u0435\u0442\u0438 ZigBee \u0435\u0441\u0442\u044c 3 \u0442\u0438\u043f\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 &#8212; \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440, \u0440\u043e\u0443\u0442\u0435\u0440\u044b, \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/p>\n<ul>\n<li>\n<p>\u0412 \u0441\u0435\u0442\u0438 ZigBee \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u043e\u0433\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043b\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\/\u043e\u0442 \u0440\u043e\u0443\u0442\u0435\u0440\u043e\u0432, \u043d\u0435 \u044f\u0432\u043b\u044f\u044f\u0441\u044c \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u044b\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0420\u043e\u0443\u0442\u0435\u0440\u044b \u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438 \u0441\u0435\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u043e\u0443\u0442\u0435\u0440\u0430\u043c\u0438, \u0430 \u0431\u0430\u0442\u0430\u0440\u0435\u0439\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 &#8212; \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0442\u044c ZigBee \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c mesh \u0441\u0435\u0442\u044c\u044e, \u0433\u0434\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043c\u0438\u043d\u0443\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0421\u0435\u0442\u044c ZigBee \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430.&nbsp;<\/p>\n<ul>\n<li>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 (zigbee2mqtt, SLS, sprut), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0432 \u043e\u0434\u043d\u0443 \u0441\u0435\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043a\u0440\u044b\u0442\u0443\u044e \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0433\u0434\u0435 \u043d\u0438\u043a\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0442\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f (\u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043a\u043b\u044e\u0447 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f)<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u043e \u0441\u0445\u043e\u0436\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c (\u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0438, \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0438, \u0442\u0435\u0440\u043c\u043e\u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u044b) \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0443 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0438 \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u044e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0423 ZigBee \u043d\u0435\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043a\u0430\u043a \u0443 Z-Wave. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0442\u043e\u044f\u0442 \u0434\u0435\u0448\u0435\u0432\u043b\u0435, \u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043d\u0435\u0440\u043e\u0434\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 (\u0432 \u0440\u043e\u0434\u043d\u044b\u0445, \u0432\u043f\u0440\u043e\u0447\u0435\u043c, \u0442\u043e\u0436\u0435)<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e05\/103\/937\/e05103937eb3240ba24dbd13d71a32cf.png\" alt=\"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 ZigBee 3.0 Stack User Guide JN-UG-3113 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 ZigBee \u0441\u0435\u0442\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432.\" title=\"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 ZigBee 3.0 Stack User Guide JN-UG-3113 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 ZigBee \u0441\u0435\u0442\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432.\" width=\"1017\" height=\"612\"><figcaption>\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 ZigBee 3.0 Stack User Guide JN-UG-3113 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 ZigBee \u0441\u0435\u0442\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432.<\/figcaption><\/figure>\n<p>\u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0437\u043d\u0430\u043d\u0438\u0439 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0440\u044f\u0434\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f, \u0432 \u0442.\u0447. \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0430\u043c \u0441\u0435\u0431\u0435 \u0441\u0442\u0440\u043e\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0430. \u041d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0431\u0430\u0437\u0430 \u0437\u043d\u0430\u043d\u0438\u0439 \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445, \u043d\u044e\u0430\u043d\u0441\u0430\u0445, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445, \u0438 \u0433\u043b\u044e\u043a\u0430\u0445 \u0442\u0435\u0445 \u0438\u043b\u0438 \u0438\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u043e. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0441\u043e\u043a &#8212; \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u0442\u044c \u0446\u0435\u043b\u0443\u044e \u043a\u0443\u0447\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0448\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c.<\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.&nbsp;<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/346\/da4\/1fe\/346da41fe57cc09652e4998695f6429f.png\" width=\"670\" height=\"687\"><figcaption><\/figcaption><\/figure>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u044d\u0442\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0441\u043d\u0438\u0437\u0443 \u0432\u0432\u0435\u0440\u0445.&nbsp;<\/p>\n<ul>\n<li>\n<p>ZigBee \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u0431\u0430\u0437\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 <strong>IEEE 802.15.4<\/strong>. \u0427\u0430\u0441\u0442\u044c <strong>PHY <\/strong>\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u0435\u0442\u0438 &#8212; \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0431\u0438\u0442\u044b \u0438 \u0431\u0430\u0439\u0442\u044b \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0434\u0438\u043e\u043a\u0430\u043d\u0430\u043b. \u041c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u043e\u043c \u0440\u0430\u0434\u0438\u043e \u0441\u0440\u0435\u0434\u044b, \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0434\u0438\u043e\u043a\u0430\u043d\u0430\u043b \u0441\u0432\u043e\u0431\u043e\u0434\u0435\u043d. \u0412\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0431\u0435\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>IEEE 802.15.4 MAC<\/strong> \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u044b\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438 \u0441\u0435\u0442\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043d\u0430\u043c \u043b\u0435\u0437\u0442\u044c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f, \u0440\u0430\u0437\u0432\u0435 \u0447\u0442\u043e \u043a\u0430\u043a\u0430\u044f \u043d\u0438\u0431\u0443\u0434\u044c \u043e\u0448\u0438\u0431\u043a\u0430 \u043e\u0442\u0442\u0443\u0434\u0430 \u043f\u0440\u0438\u043b\u0435\u0442\u0438\u0442. \u0414\u043b\u044f \u043d\u0430\u0441 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 &#8212; \u043e\u0442\u043f\u0440\u0430\u0432\u044c \u0432\u043e\u0442 \u044d\u0442\u0438 \u0431\u0430\u0439\u0442\u044b (\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 100 \u0437\u0430 \u0440\u0430\u0437) \u0432\u043e\u043d \u0442\u043e\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443.<\/p>\n<\/li>\n<li>\n<p><strong>ZigBee Network (NWK) Layer<\/strong> \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u0442\u044c ZigBee &#8212; \u0440\u0430\u0437\u0434\u0430\u0435\u0442 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c, \u0441\u0442\u0440\u043e\u0438\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0443\u0437\u043b\u0430\u043c\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 (unicast \u0438\u043b\u0438 broadcast). \u0421\u044e\u0434\u0430 \u043c\u044b \u0442\u043e\u0436\u0435 \u043e\u0441\u043e\u0431\u043e \u043b\u0435\u0437\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043d\u043e \u043d\u0430\u043c \u0431\u0443\u0434\u0443\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043d\u0430 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043d\u0430c \u0441\u0430\u043c\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f &#8212; <strong>Application Layer (APL)<\/strong>. \u042d\u0442\u043e\u0442 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441 \u0441\u0435\u0442\u044c\u044e Zigbee, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u0446\u0435\u043b\u043e\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0418\u043c\u0435\u043d\u043d\u043e \u0441 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043e\u043f\u0438\u0441\u0430\u0442\u044c Application Layer \u0438 \u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438.<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0436\u0438\u0432\u0443\u0442 \u0432 \u0431\u043b\u043e\u043a\u0435 <strong>Application Framework (AF)<\/strong>, \u0438 \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0435\u0435, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0448\u0442\u0443\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 (<strong>End Point<\/strong>). \u041a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 &#8212; \u044d\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u043c\u0435\u043d\u0438\u0439, \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043e\u0434\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u041f\u043e\u043a\u0430 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u0440\u0430\u0432\u0434\u0430?<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445<\/p>\n<ul>\n<li>\n<p>\u0412\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u043c\u043d\u043e\u0433\u043e\u043a\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u043b\u0435 \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u043e ZigBee. \u0422\u0430\u043a \u0432\u043e\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u043d\u0430\u043b \u0432 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c end point\u2019\u043e\u043c &#8212; \u043a\u0430\u0436\u0434\u043e\u0435 \u0440\u0435\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u043c\u0435\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e, \u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0438\u0437\u043c\u0435\u0440\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0432\u0440\u043e\u0434\u0435 \u0442\u043e\u043a\u0430 \u0438\u043b\u0438 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438. \u0410 \u0432\u0441\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0443\u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0446\u0435\u043b\u0438\u043a\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043b\u0438 \u0432\u043e\u0442 \u043d\u043e\u0447\u043d\u0438\u043a \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0442\u0435\u0440\u043c\u043e\u043c\u0435\u0442\u0440\u0430. \u041d\u043e\u0447\u043d\u0438\u043a \u0438 \u0442\u0435\u0440\u043c\u043e\u043c\u0435\u0442\u0440 &#8212; \u044d\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0432\u0443\u0445\u043a\u043b\u0430\u0432\u0438\u0448\u043d\u044b\u0439 \u0443\u043c\u043d\u044b\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0432\u0443\u043c\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0435\u0439 \u043a\u043b\u0430\u0432\u0438\u0448\u0435\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u043e\u0438\u043c \u0440\u0435\u043b\u0435 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u0430\u043a\u0430\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0447\u0430\u0441\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0431\u044b\u043b\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u0438\u043b\u0438 \u043a\u0430\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0430\u0434\u0440\u0435\u0441\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430.&nbsp;<\/p>\n<p>\u0410 \u0435\u0449\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c (bind) \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u0422\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043a\u043b\u0430\u0432\u0438\u0448 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0440\u0435\u043b\u044e\u0448\u043a\u0443 \u0432 \u043c\u043d\u043e\u0433\u043e\u043a\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u043b\u0435 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435. \u0418 \u0432\u0441\u0435 \u044d\u0442\u043e \u0431\u0435\u0437 \u0443\u0447\u0430\u0441\u0442\u0438\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p>ZigBee \u041a\u043b\u0430\u0441\u0442\u0435\u0440 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0443\u043c\u0435\u043d\u0438\u0439, \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0443. \u041a\u043b\u0430\u0441\u0442\u0435\u0440 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0422\u0430\u043a \u0443 \u0441\u0432\u0435\u0442\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u044f\u0440\u043a\u043e\u0441\u0442\u044c, \u0446\u0432\u0435\u0442\u043e\u0432\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430, \u0438\u043b\u0438 RGB \u0446\u0432\u0435\u0442, \u0430 \u0443 \u043a\u043b\u0438\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u0431\u0443\u0434\u0443\u0442 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430, \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u041a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u0443 \u0441\u0432\u0435\u0442\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u0431\u0443\u0434\u0443\u0442 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c\/\u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u0440\u0435\u0436\u0438\u043c, \u0430 \u0443 \u043a\u043b\u0438\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0432\u0441\u0435 &#8212; \u043e\u043d \u0436\u0435 \u0434\u0430\u0442\u0447\u0438\u043a, \u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e.<\/p>\n<p>\u041e\u0434\u0438\u043d End Point \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432, \u043d\u043e \u044d\u0442\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u0432 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438, \u0442\u043e \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043d\u0435\u0441\u0442\u0438 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0442\u043e\u0447\u043a\u0430\u043c (\u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0432\u0443\u0445\u043a\u043b\u0430\u0432\u0438\u0448\u043d\u044b\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0432\u0443\u043c\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438)<\/p>\n<p>\u0418 \u0445\u043e\u0442\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0443\u0433\u043e\u0434\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 ZigBee \u043f\u043e\u0434\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0438\u0434\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441\u0445\u043e\u0436\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041c\u043d\u043e\u0433\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0447\u0442\u043e \u043d\u0438\u0431\u0443\u0434\u044c \u0432\u0440\u043e\u0434\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f, \u0442\u0435\u0440\u043c\u043e\u043c\u0435\u0442\u0440\u0430, \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u0435\u043b\u044f \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438, \u0441\u0432\u0435\u0442\u0438\u043b\u044c\u043d\u0438\u043a\u0430, \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u0442\u0435\u0440\u043c\u043e\u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u0430, \u0438\u043b\u0438 \u0447\u0435\u0433\u043e \u043d\u0438\u0431\u0443\u0434\u044c \u0435\u0449\u0435. \u041a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0432\u0438\u0434\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0437\u0432\u0430\u043b\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0438 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.&nbsp;<\/p>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 ZigBee \u0441\u0442\u0435\u043a\u0430 \u043f\u043e\u0448\u043b\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0434\u043b\u044f \u043d\u0430\u0441 \u0446\u0435\u043b\u044b\u0439 API \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c, \u0438 \u043d\u0430\u0440\u0435\u043a\u043b\u0438 \u044d\u0442\u043e <strong>ZigBee Cluster Library<\/strong>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0430\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438, \u043e\u0442\u0441\u044b\u043b\u0430\u044e\u0449\u0438\u043c\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0438\u043b\u0438 \u044f\u0440\u043a\u043e\u0441\u0442\u044c \u0441\u0432\u0435\u0447\u0435\u043d\u0438\u044f \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0438. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0435 API.<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 (\u0438\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445). \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 On\/Off &#8212; \u0443 \u043d\u0435\u0435 \u043d\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0438 \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u0433\u043d\u0430\u043b \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043a\u043d\u043e\u043f\u043a\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c ZigBee \u0440\u0435\u043b\u0435 \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c On\/Off \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c &#8212; \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043d\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u044d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f \u0431\u044b\u0432\u0430\u044e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c Xiaomi, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0438 \u043a\u043b\u0430\u0432\u0438\u0448\u0438, \u0438 \u0440\u0435\u043b\u0435)<\/p>\n<\/li>\n<li>\n<p><strong>ZigBee Device Object (ZDO)<\/strong>, <strong>Base Class Behavior (BDB), \u0438 Application Support Sublayer (APS)<\/strong> &#8212; \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u043a\u043e\u0434\u0430 \u044f \u043d\u0435 \u0441\u043c\u043e\u0433 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0447\u0435\u0442\u043a\u043e \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u0442\u044c \u0447\u0435\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u044d\u0442\u043e \u043d\u0430\u043c \u0438 \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0432\u0442\u0440\u043e\u0435\u043c \u043e\u043d\u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u0430\u043a \u0443\u0437\u043b\u0430 \u0441\u0435\u0442\u0438 ZigBee. \u042d\u0442\u0438 \u0448\u0442\u0443\u043a\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043a \u0441\u0435\u0442\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0442\u0435\u0440\u0438 \u0441\u0432\u044f\u0437\u0438. \u0422\u0443\u0442 \u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u0430\u043a \u0440\u043e\u0443\u0442\u0435\u0440\u0430, \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0438\u043b\u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0430. \u0422\u0443\u0442 \u0442\u0430\u043a\u0436\u0435 \u0436\u0438\u0432\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 (binding).<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438 \u0432 \u0441\u0435\u0442\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u0441\u043f\u0438\u0441\u043e\u043a \u0443\u043c\u0435\u043d\u0438\u0439 \u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a), \u0434\u043b\u044f ZDO \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043d\u043e\u043c\u0435\u0440 0, \u0438 \u0442\u0430\u043a\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0432 \u0441\u0435\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c. \u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043f\u043e\u0439\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435, \u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u0435\u0449\u0435 \u043e\u0431 \u043e\u0434\u043d\u043e\u0439 \u0432\u0430\u0436\u043d\u043e\u0439 \u0432\u0435\u0449\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 &#8212; \u0432\u0441\u0435 \u044d\u0442\u043e \u0436\u0443\u0442\u043a\u043e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435, \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043b\u0438\u0446\u0430\u043c\u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412 \u0448\u043a\u043e\u043b\u0435 \u043d\u0430\u0441 \u0443\u0447\u0438\u043b\u0438, \u0447\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u044d\u0442\u043e \u0447\u0435\u0442\u043a\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f. \u0418 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0434\u0430\u0436\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c) \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043d\u0435\u043a\u0438\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439: \u0441\u0434\u0435\u043b\u0430\u0439 \u0410, \u0441\u0434\u0435\u043b\u0430\u0439 \u0411, \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u043d\u043e \u0412 &#8212; \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0435\u0449\u0435 \u0440\u0430\u0437.&nbsp;<\/p>\n<p>\u0412 ZigBee \u0432\u0441\u0435 \u043d\u0435 \u0442\u0430\u043a. \u0423\u0437\u043b\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u043c\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438. \u0415\u0441\u043b\u0438 \u0443\u0437\u0435\u043b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432. \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0430\u043a\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 IEEE 802.15.4 MAC. \u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c, \u0433\u0434\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0430\u043a\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c\u0441\u044f. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a \u044d\u0442\u043e\u043c\u0443 \u0442\u043e, \u0447\u0442\u043e \u0440\u0430\u0434\u0438\u043e\u044d\u0444\u0438\u0440 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0430\u043a\u0435\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043d\u0435 \u0434\u043e\u0439\u0442\u0438. \u0422\u043e\u0433\u0434\u0430 \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443, \u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u043f\u043e\u0438\u0441\u043a \u043d\u043e\u0432\u043e\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430. \u0410 \u043f\u043e\u043a\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u044c \u0436\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u0435\u0449\u0435 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0435\u0449\u0435\u0439 \u0432 \u0441\u0435\u0442\u0438 &#8212; \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0443\u0437\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0443\u0437\u0435\u043b \u0437\u0430\u0445\u043e\u0447\u0435\u0442 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0442\u0438, \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0439\u0442\u0438 \u0441 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u0438\u043b\u0438 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0441\u043d\u0435\u0442\u0441\u044f \u0438 \u0431\u0443\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. \u0412 \u043e\u0431\u0449\u0435\u043c \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u201c\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e\u201d \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u0432\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0436\u0443\u0442\u043a\u0438\u0439 \u0445\u0430\u043e\u0441.&nbsp;<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/070\/786\/cac\/070786cac56fd998a8646c61c934a324.png\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 ZigBee \u0441\u0435\u0442\u0438. \u0427\u0435\u0440\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d \u043f\u0443\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430. \u0421\u0435\u0440\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 ZigBee \u0441\u0435\u0442\u0438. \u0427\u0435\u0440\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d \u043f\u0443\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430. \u0421\u0435\u0440\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443\" width=\"822\" height=\"577\"><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 ZigBee \u0441\u0435\u0442\u0438. \u0427\u0435\u0440\u043d\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d \u043f\u0443\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430. \u0421\u0435\u0440\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0435\u0441\u044f \u043a \u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443<\/figcaption><\/figure>\n<p>\u041d\u043e \u043d\u0435 \u0432\u0441\u0435 \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e. NXP \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0446\u0435\u043b\u0443\u044e \u043a\u0443\u0447\u0443 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0435 \u044d\u0442\u043e \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0438\u0442 \u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442 \u0432 \u043d\u0435\u043a\u0438\u0439 \u043f\u043e\u0442\u043e\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438. \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 &#8212; \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438, \u043e\u0442\u0432\u0430\u043b\u0438\u043b\u0430\u0441\u044c \u0441\u0435\u0442\u044c &#8212; \u043f\u0435\u0440\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438\u0441\u044c, \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0432\u0430\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; \u0432\u044b\u043f\u043b\u044e\u043d\u0443\u043b\u0438 \u0438\u0445 \u0432 \u0441\u0435\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0442\u0430\u0439\u043c\u0435\u0440 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430.&nbsp;<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043b\u0438\u043a\u0431\u0435\u0437\u0430 &#8212; \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u0442\u0440\u043e\u044f\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0435\u043b\u043e \u0432\u043e\u0442 \u0432 \u0447\u0435\u043c. \u0415\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0431\u0430\u0439\u0442\u044b \u043f\u043e \u0441\u0435\u0442\u0438, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438\u0445 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u0440\u0430\u0434\u0438\u043e\u043a\u0430\u043d\u0430\u043b &#8212; \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u0438 \u043d\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043f\u0435\u043a\u0435\u0442, \u043a\u043e\u043c\u0443 \u043e\u043d \u0430\u0434\u0440\u0435\u0441\u043e\u0432\u0430\u043d, \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c, \u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u0443-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u043c\u043d\u044b\u0435 \u043b\u044e\u0434\u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c OSI \u0438 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0443\u0440\u043e\u0432\u043d\u044e \u0434\u0430\u043b\u0438 \u0441\u0432\u043e\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041a\u0430\u0436\u0434\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u0430\u043a\u0435\u0442\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a \u043f\u0430\u043a\u0435\u0442\u0443 \u0441\u0432\u043e\u0438 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2e5\/fd6\/ab5\/2e5fd6ab53a19d7b2d590e340295af66.png\" alt=\"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 JN51xx Core Utilities User Guide JN-UG-3116\" title=\"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 JN51xx Core Utilities User Guide JN-UG-3116\" width=\"1036\" height=\"719\"><figcaption>\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 JN51xx Core Utilities User Guide JN-UG-3116<\/figcaption><\/figure>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0445\u043e\u0447\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0431\u043b\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 (\u0441\u0435\u0442\u0435\u0432\u043e\u043c\u0443) \u0443\u0440\u043e\u0432\u043d\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a \u043f\u0430\u043a\u0435\u0442\u0443 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u043e\u0442 \u043a\u0430\u043a\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0435\u0442\u0438 ZigBee \u0438 \u043a\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443\u0435\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442. \u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u043c \u0443\u0437\u043b\u043e\u043c \u0441\u0435\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043f\u0430\u043a\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 MAC \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0449\u0435 \u0441\u0432\u043e\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a. PHY \u0441\u043b\u043e\u0439 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. \u0422.\u043e. \u043d\u0430\u0448\u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0431\u0430\u0439\u0442\u0438\u043a\u0438 \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044b \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0435\u0440\u0442\u043e\u043a, \u043a\u0430\u0436\u0434\u0430\u044f \u0441\u043e \u0441\u0432\u043e\u0438\u043c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u041f\u0440\u0438 \u043f\u0440\u0438\u0435\u043c\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c &#8212; \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u043b\u043e\u0439 \u043e\u0442\u0440\u0435\u0437\u0430\u0435\u0442 \u0441\u0432\u043e\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438 \u0445\u0432\u043e\u0441\u0442\u0438\u043a\u0438, \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0441\u043b\u043e\u044e. \u041a \u0441\u043b\u043e\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0445\u043e\u0434\u044f\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0431\u0430\u0439\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0435\u0437 \u0432\u0441\u0435\u0445 \u043e\u0431\u0435\u0440\u0442\u043e\u043a.&nbsp;<\/p>\n<p>\u041a \u0447\u0435\u043c\u0443 \u044f \u044d\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e. \u0410 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043c\u0430\u043b\u043e, \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0442\u0443\u0434\u0430-\u0441\u044e\u0434\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438 \u0445\u0432\u043e\u0441\u0442\u044b \u043d\u0435\u0440\u0430\u0437\u0443\u043c\u043d\u043e. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0432\u0441\u0435\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0434 \u043d\u0438\u0445, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443. \u0417\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0435\u0434, \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438\u043c \u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043a\u0430\u043a Protocol Data Unit Manager (PDUM).<\/p>\n<h2>\u041e\u0442 \u0442\u0435\u043e\u0440\u0438\u0438 \u043a \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435. \u041a\u0430\u0440\u043a\u0430\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.  <\/h2>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 ZigBee \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441 \u043a\u0430\u043a\u0438\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c. \u041d\u0443 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0443\u0441\u0442\u044c \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043c\u043d\u044b\u043c \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435\u043c \u0441 \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u043e\u0439. \u041f\u0440\u0438\u0447\u0435\u043c \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e, \u0434\u0430 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043b\u0430\u0442\u044c \u0432 \u0441\u0435\u0442\u044c \u0441\u0432\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435.<\/p>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0441\u0430\u043c\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 &#8212; \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0441\u043a\u0435\u043b\u0435\u0442, \u0438 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0431\u0443\u0434\u0435\u043c \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0441\u0442\u0430\u0442\u044c \u043c\u044f\u0441\u0446\u043e\u043c \u0438 \u0436\u0438\u0440\u043a\u043e\u043c. \u041e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0443\u0434\u0435\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440 JN-AN-1219-Zigbee-3-0-Controller-and-Switch (\u0435\u0441\u043b\u0438 \u0442\u043e\u0447\u043d\u0435\u0435, \u0442\u043e \u043d\u0430 <a href=\"https:\/\/github.com\/actg\/JN5169-for-xiaomi-wireless-switch.git\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/actg\/JN5169-for-xiaomi-wireless-switch.git<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0434\u0435\u043b\u0430\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430) \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0436\u0435 \u0447\u0430\u0441\u0442\u0438 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b. \u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u043d\u0430 <s>\u0442\u0435\u0445 \u0436\u0435 \u0441\u0430\u043c\u044b\u0445 \u0441\u043e\u043f\u043b\u044f\u0445 <\/s>\u0442\u043e\u0439 \u0436\u0435 \u0441\u0430\u043c\u043e\u0439 \u0436\u0435\u043b\u0435\u0437\u043a\u0435. \u041d\u0443 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f, \u043a\u0430\u043a \u0436\u0435 \u0431\u0435\u0437 \u043d\u0435\u0435.<\/p>\n<p>\u042f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043e\u0442 \u043a\u043e\u0440\u043a\u0438 \u0434\u043e \u043a\u043e\u0440\u043a\u0438. \u041a\u043e\u0433\u0434\u0430 \u043c\u043d\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u043e\u0441\u044c \u0441\u043a\u0443\u0447\u043d\u043e &#8212; \u044f \u0447\u0438\u0442\u0430\u043b \u043a\u043e\u0434. \u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u0442\u044b\u043a\u0430\u043b\u0441\u044f \u043d\u0430 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u044f \u043b\u0435\u0437 \u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e \u043d\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e. \u041a\u043e\u0433\u0434\u0430 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0447\u0442\u043e-\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e \u044f \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b \u043a \u043c\u044b\u0441\u043b\u0438, \u0447\u0442\u043e \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u044d\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u043d\u0435\u0435 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c \u0432\u0441\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430. \u0412 \u0438\u0442\u043e\u0433\u0435 \u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 ZigBee 3.0 Stack User Guide JN-UG-3113 \u0438 \u0431\u041e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430 \u0443 \u043c\u0435\u043d\u044f \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0436\u0435 \u044d\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>\u041a \u043a\u043e\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043e\u0442 NXP \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0437\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0440\u0435\u0431\u044f\u0442\u0430 \u043f\u044b\u0442\u0430\u043b\u0438\u0441\u044c \u0437\u0430\u0442\u043e\u043b\u043a\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0432 \u043e\u0434\u0438\u043d, \u0438 \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u043a\u0443\u0441\u043a\u0438 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043a\u043e\u0434 \u0441\u0442\u0430\u043b \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u043c, \u0447\u0435\u043c \u043c\u043e\u0433 \u0431\u044b.&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043c\u043d\u043e\u0433\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0434\u0435\u0444\u0430\u0439\u043d\u0430\u043c\u0438, \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e \u043c\u043d\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u044f\u043c \u0449\u0430\u0441, \u0430 \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430.&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u0418\u043c\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0434\u0435\u043b\u0430\u043d\u044b \u0432 \u0432\u0435\u043d\u0433\u0435\u0440\u0441\u043a\u043e\u0439 \u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0438 \u043d\u0430\u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u0430\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440. \u0410\u0431\u0431\u0440\u0435\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0442\u0441\u044f \u0432 ZigBee 3.0 Stack User Guide JN-UG-3113 \u043d\u0430 \u0441\u0442\u0440 60, \u0430 \u0432\u043e\u0442 \u043a \u0432\u0435\u043d\u0433\u0435\u0440\u0441\u043a\u043e\u0439 \u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u044b\u043a\u0430\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0438\u0434\u0435\u0442 \u0432 \u043f\u0440\u0435\u0434\u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0430 \u0447\u0430\u0441\u0442\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043e\u0442 NXP \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043a\u043e\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0442\u043e, \u0447\u0442\u043e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b &#8212; \u043e\u043d\u0438 \u0434\u0430\u0436\u0435 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u043d\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0442\u0441\u044f!!!<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u0432\u0443\u043c\u044f \u0442\u0443\u043b\u0437\u0430\u043c\u0438 \u0438\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0442\u043e\u0440\u0430 \u0441 \u0432\u0435\u0441\u044c\u043c\u0430 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c UI\/UX, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u043e\u0432\u0438\u0447\u043e\u043a \u0438 \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442. \u041a\u0441\u0442\u0430\u0442\u0438, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u0435\u043d.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u0440\u043e\u0447\u0435, \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u0432\u044b\u0441\u043e\u043a, \u043d\u043e \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0436\u043d\u043e. \u0412 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e NXP \u043c\u043e\u0433\u0443 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u0438\u0437\u0432\u0430\u043d\u0430 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u0437 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0430 \u0432 \u043a\u043e\u043c\u043f\u0430\u0439\u043b \u0442\u0430\u0439\u043c. \u041f\u043e \u0442\u043e\u0439 \u0436\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0432\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c, \u0430 \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0447\u0435\u0433\u043e-\u0442\u043e \u0441\u043b\u0435\u043f\u0438\u0442\u044c \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u043d\u0438\u0439. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043c\u0443\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043a\u0430\u043a \u044f \u043f\u043e \u043c\u0438\u043b\u043b\u0438\u043c\u0435\u0442\u0440\u0443 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043d\u0435\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0434\u0432\u0438\u0433\u0430\u043b\u0441\u044f \u043a \u0447\u0435\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u043c\u0443. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0448\u0443 \u043a\u0430\u043a \u0431\u044b \u044f \u0434\u0435\u043b\u0430\u043b \u0442\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u044f \u0443\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u043a\u0430\u043a \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043e\u0431\u0449\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u0430\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043e 471 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \ud83d\ude42<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9bc\/830\/c00\/9bc830c001da413f34526dd8a93e62d6.png\" alt=\"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 ZigBee 3.0 Stack User Guide JN-UG-3113\" title=\"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 ZigBee 3.0 Stack User Guide JN-UG-3113\" width=\"1027\" height=\"695\"><figcaption>\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 ZigBee 3.0 Stack User Guide JN-UG-3113<\/figcaption><\/figure>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0432 Zigbee3ConfigEditor, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 SDK. \u042d\u0442\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443\u043b\u0438\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b ZigBee \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u041f\u0440\u0438\u0447\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0432 \u0441\u0435\u0442\u0438, \u0438 \u0434\u0430\u0436\u0435 \u043a\u0442\u043e \u0441 \u043a\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u044f\u0437\u0430\u043d \u0438 \u043a\u0430\u043a \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0435\u0437 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f ZigBee \u0432 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0447\u0435\u0433\u043e &#8212; \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041f\u0440\u0438\u0447\u0435\u043c \u0442\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0448\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043d\u0430\u043a\u0438\u0434\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e, \u0447\u0442\u043e \u0442\u0435\u0431\u0435 \u043d\u0443\u0436\u043d\u043e &#8212; \u043f\u043e \u043b\u044e\u0431\u043e\u043c\u0443 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0448\u044c \u043d\u0435 \u0442\u0430\u043a, \u0438\u043b\u0438 \u0437\u0430\u0431\u0443\u0434\u0435\u0448\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e). \u0412 \u043e\u0431\u0449\u0435\u043c, \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u043e\u0439 <s>\u043a\u043e\u043f\u0438-\u043f\u0430\u0441\u0442\u044b <\/s>\u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u0430 app.zpscfg, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a95\/b38\/5a8\/a95b385a881bfb279f8e7a315b6fffaf.png\" width=\"1600\" height=\"753\"><figcaption><\/figcaption><\/figure>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b Zigbee3ConfigEditor \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u0438\u043a \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .<a href=\"https:\/\/github.com\/grafalex82\/hellozigbee\/blob\/main\/HelloZigbee.zpscfg\" rel=\"noopener noreferrer nofollow\">zpscfg<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430 \u0434\u0435\u043b\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e XML \u0444\u043e\u0440\u043c\u043e\u0439 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043f\u043e\u0442\u0440\u043e\u0445\u0430 ZigBee \u0441\u0442\u0435\u043a\u0430 &#8212; \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0431\u0443\u0444\u0435\u0440\u0430, \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445, \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0438 \u0435\u0449\u0435 \u043a\u0443\u0447\u0443 \u0432\u0441\u0435\u0433\u043e. \u0412 \u043e\u0431\u0449\u0435\u043c \u043e\u043a\u043e\u043b\u043e <a href=\"https:\/\/github.com\/grafalex82\/hellozigbee\/blob\/main\/zps_gen.c\" rel=\"noopener noreferrer nofollow\">1500 \u0441\u0442\u0440\u043e\u043a \u0441\u0438\u0448\u043d\u043e\u0433\u043e<\/a> \u0438 <a href=\"https:\/\/github.com\/grafalex82\/hellozigbee\/blob\/main\/pdum_apdu.S\" rel=\"noopener noreferrer nofollow\">\u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u0433\u043e<\/a> \u043a\u043e\u0434\u0430, \u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e (\u043d\u0443 \u0445\u043e\u0440\u043e\u0448\u043e, \u0447\u0438\u0442\u0430\u0442\u044c-\u0442\u043e \u043c\u043e\u0436\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e).&nbsp;<\/p>\n<pre><code>C:\\NXP\\bstudio_nxp\\sdk\\JN-SW-4170\\Tools\\PDUMConfig\\bin\\PDUMConfig.exe -z HelloZigbee -f HelloZigbee.zpscfg&nbsp; -o .  C:\\NXP\\bstudio_nxp\\sdk\\JN-SW-4170\\Tools\\ZPSConfig\\bin\\ZPSConfig.exe -n HelloZigbee -f HelloZigBee.zpscfg -o . -t JN516x -l D:\\Projects\\NXP\\JN5169-for-xiaomi-wireless-switch\\sdk\\JN-SW-4170\\Components\\Library\\libZPSNWK_JN516x.a -a D:\\Projects\\NXP\\JN5169-for-xiaomi-wireless-switch\\sdk\\JN-SW-4170\\Components\\Library\\libZPSAPL_JN516x.a -c C:\\NXP\\bstudio_nxp\\sdk\\Tools\\ba-elf-ba2-r36379<\/code><\/pre>\n<p>\u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u043b, \u0432 \u043e\u0434\u043d\u043e\u043c HelloZigbee.zpscfg \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u044d\u0442\u0438\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0444\u0430\u0439\u043b\u0438\u043a\u0438 (HelloZigbee). \u0418\u043c\u044f \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435, \u0442.\u043a. \u043d\u0430 \u043d\u0438\u0445 \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 ZigBee \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b &#8212; zcl_options.h. \u041d\u0430 \u043d\u0435\u0433\u043e \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0440\u0430\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 ZigBee \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430. \u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0434\u0435\u0444\u0430\u0439\u043d\u0430\u043c\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b ZigBee, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043d\u0434 \u043f\u043e\u0438\u043d\u0442\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430. \u042f \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 DimmerSwitch, \u043f\u043e\u0443\u0431\u0438\u0440\u0430\u0432 \u043b\u0438\u0448\u043d\u0438\u0435 (\u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434) \u0432\u0435\u0449\u0438. \u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0431\u044b\u043b\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c 1 \u044d\u043d\u0434 \u043f\u043e\u0438\u043d\u0442, \u043a\u043b\u0430\u0441\u0442\u0435\u0440 On\/Off, \u0435\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u0437 ZDO \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a<\/p>\n<details class=\"spoiler\">\n<summary>zcl_options.h<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>\/****************************************************************************\/ \/***        Macro Definitions                                             ***\/ \/****************************************************************************\/ \/****************************************************************************\/ \/*                      ZCL Specific initialization                         *\/ \/****************************************************************************\/ \/* This is the NXP manufacturer code.If creating new a manufacturer         *\/ \/* specific command apply to the Zigbee alliance for an Id for your company *\/ \/* Also update the manufacturer code in .zpscfg: Node Descriptor-&gt;misc      *\/ #define ZCL_MANUFACTURER_CODE                                0x1037  \/* Sets the number of endpoints that will be created by the ZCL library *\/ #define ZCL_NUMBER_OF_ENDPOINTS                             1  #define ZCL_ATTRIBUTE_READ_SERVER_SUPPORTED #define ZCL_ATTRIBUTE_READ_CLIENT_SUPPORTED #define ZCL_ATTRIBUTE_WRITE_SERVER_SUPPORTED   #define ZCL_NUMBER_OF_REPORTS     1 #define ZLO_MIN_REPORT_INTERVAL   1 #define ZLO_MAX_REPORT_INTERVAL   15  \/* Enable wild card profile *\/ #define ZCL_ALLOW_WILD_CARD_PROFILE \/****************************************************************************\/ \/*                             Enable Cluster                               *\/ \/*                                                                          *\/ \/* Add the following #define's to your zcl_options.h file to enable         *\/ \/* cluster and their client or server instances                             *\/ \/****************************************************************************\/ #define CLD_BASIC #define BASIC_SERVER #define BASIC_CLIENT  #define CLD_SCENES #define SCENES_CLIENT  #define CLD_IDENTIFY #define IDENTIFY_CLIENT #define IDENTIFY_SERVER  #define CLD_ONOFF #define ONOFF_CLIENT #define ONOFF_SERVER  \/****************************************************************************\/ \/*             Basic Cluster - Optional Attributes                          *\/ \/*                                                                          *\/ \/* Add the following #define's to your zcl_options.h file to add optional   *\/ \/* attributes to the basic cluster.                                         *\/ \/****************************************************************************\/ #define   CLD_BAS_ATTR_APPLICATION_VERSION #define   CLD_BAS_ATTR_STACK_VERSION #define   CLD_BAS_ATTR_HARDWARE_VERSION #define   CLD_BAS_ATTR_MANUFACTURER_NAME #define   CLD_BAS_ATTR_MODEL_IDENTIFIER #define   CLD_BAS_ATTR_DATE_CODE #define   CLD_BAS_ATTR_SW_BUILD_ID #define   CLD_BAS_ATTR_GENERIC_DEVICE_CLASS #define   CLD_BAS_ATTR_GENERIC_DEVICE_TYPE   #define CLD_BAS_APP_VERSION         (1) #define CLD_BAS_STACK_VERSION       (2) #define CLD_BAS_HARDWARE_VERSION    (1) #define CLD_BAS_MANUF_NAME_STR      \"NXP\" #define CLD_BAS_MANUF_NAME_SIZE     3 #define CLD_BAS_MODEL_ID_STR        \"Hello Zigbee Switch\" #define CLD_BAS_MODEL_ID_SIZE       19 #define CLD_BAS_DATE_STR            \"20210331\" #define CLD_BAS_DATE_SIZE           8 #define CLD_BAS_POWER_SOURCE        E_CLD_BAS_PS_SINGLE_PHASE_MAINS #define CLD_BAS_SW_BUILD_STR        \"v0.1\" #define CLD_BAS_SW_BUILD_SIZE       4 #define CLD_BAS_DEVICE_CLASS        (0)   \/****************************************************************************\/ \/*             Basic Cluster - Optional Commands                            *\/ \/*                                                                          *\/ \/* Add the following #define's to your zcl_options.h file to add optional   *\/ \/* commands to the basic cluster.                                           *\/ \/****************************************************************************\/ #define   CLD_BAS_CMD_RESET_TO_FACTORY_DEFAULTS<\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u0444\u0430\u0439\u043b\u0435 <a href=\"https:\/\/github.com\/grafalex82\/hellozigbee\/blob\/main\/bdb_options.h\" rel=\"noopener noreferrer nofollow\">bdb_options.h<\/a>. \u0412 \u043d\u0435\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0442\u043e\u043d\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u0441\u0435\u0442\u0438 ZigBee, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f \u043c\u0430\u043b\u043e \u0447\u0442\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u043b \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043a\u0430\u043a \u0435\u0441\u0442\u044c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u043a\u043e\u0434\u043e\u043c, \u043d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e. \u0420\u0430\u0437\u0434\u0435\u043b 5.1 Forming and Joining a Network \u043d\u0430\u043c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6c9\/fe8\/4ee\/6c9fe84eee45f53b7e856d96547415ea.png\" alt=\"\u0421\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 ZigBee 3.0 Stack User Guide JN-UG-3113\" title=\"\u0421\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 ZigBee 3.0 Stack User Guide JN-UG-3113\" width=\"975\" height=\"958\"><figcaption>\u0421\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 ZigBee 3.0 Stack User Guide JN-UG-3113<\/figcaption><\/figure>\n<p>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0440\u0430\u0437\u043c\u0430\u0437\u0430\u043d\u0430 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0444\u0430\u0439\u043b\u0430\u043c \u0438 \u0434\u0435\u0441\u044f\u0442\u043a\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u043d\u0435\u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0441\u0438\u043b\u0438\u0439 \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u044d\u0442\u0438 \u0447\u0430\u0441\u0442\u0438 \u043d\u0430\u0439\u0442\u0438. \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u0430\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0435\u0440\u0435\u0432\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0438 \u0432 \u043a\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u041f\u0440\u0438\u0447\u0435\u043c \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432 ZigBee \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435, \u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043a\u043e\u0434 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<details class=\"spoiler\">\n<summary>\u0414\u0435\u0440\u0435\u0432\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code>vAppMain \tAPP_vSetUpHardware(); \t\tTARGET_INITIALISE \tAPP_vInitResources(); \t\tZTIMER_eOpen \t\tZQ_vQueueCreate \tAPP_vInitialise(); \t\tPWRM_vInit(E_AHI_SLEEP_OSCON_RAMON); \t\tPDM_eInitialise(63); \t\tPDUM_vInit(); \t\tAPP_vInitialiseNode() \t\t\tPDM_eReadDataFromRecord(PDM_ID_APP_ZLO_SWITCH) tsDeviceDesc \t\t\tPDM_eReadDataFromRecord(PDM_ID_APP_CONVERT) tsConvertR21toR22 \t\t\tAPP_vConvertR21_PdmToR22_Records() \t\t\tPDM_eSaveRecordData(PDM_ID_APP_CONVERT) \t\t\tZPS_eAplAfInit() \t\t\tAPP_ZCL_vInitialise() \t\t\t\teZCL_Initialise \t\t\t\teApp_ZCL_RegisterEndpoint \t\t\t\tvAPP_ZCL_DeviceSpecific_Init \t\t\tZPS_bAplAfSetEndDeviceTimeout(ZED_TIMEOUT_16384_MIN); \t\t\t- app_vRestartNode(); \t\t\t\tZPS_vSaveAllZpsRecords \t\t\t- app_vStartNodeFactoryNew(); \t\t\tBDB_vInit() \t\t\tZTIMER_eStart(u8TimerSecondStep) delay 50ms \tBDB_vStart() \t\tAPP_vBdbCallback \t\t\t- vAppHandleAfEvent \t\t\t\t- APP_ZCL_vEventHandler \t\t\t\t- vAppHandleZdoEvents \t\t\t\t\tvHandleRunningStackEvent \t\t\t\t\t\t- APP_vFactoryResetRecords \t\t\t\t\t\t\tZPS_vDefaultStack \t\t\t\t\t\t\tZPS_vSetKeys \t\t\t\t\t\t\tZPS_eAplAibSetApsUseExtendedPanId \t\t\t\t\t\t\tPDM_eSaveRecordData(PDM_ID_APP_ZLO_SWITCH) \t\t\t\t\t\t- vAHI_SwReset(); \t\t\t\t\t\t- vHandleMatchDescriptor \t\t\t- vHandleJoinAndRejoin() \t\t\t\tvSetIndividualLightInformation \t\t\t\tZPS_vSaveAllZpsRecords \t\t\t\tvStartFastPolling \t\t\t- vSetIndividualLightInformation(); \t\t\t- eCLD_IdentifyCommandIdentifyRequestSend() \t\t\t- BDB_vFbExitAsInitiator \tAPP_vMainLoop \t\tzps_taskZPS(); \t\tbdb_taskBDB(); \t\t\tAPP_vBdbCallback \t\tZTIMER_vTask(); \t\tAPP_taskSwitch(); \t\t\t- eCLD_ScenesCommandRecallSceneRequestSend \t\t\t- BDB_eNsStartNwkSteering \t\tvAHI_WatchdogRestart(); \t\tPWRM_vManagePower(); <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u0440\u0438\u0433\u043b\u044f\u0434\u0435\u0442\u044c\u0441\u044f, \u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0438\u0434\u0443\u0442 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0432 \u0442\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u041d\u043e \u0440\u0430\u0437 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u043e, \u0432\u0438\u0434\u0438\u043c\u043e, \u044d\u0442\u043e\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043d\u0435 \u0442\u0430\u043a \u0441\u0438\u043b\u044c\u043d\u043e \u0432\u0430\u0436\u0435\u043d. \u0412 \u0441\u0432\u043e\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044f \u0431\u0443\u0434\u0443 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u043d\u043e \u0447\u0430\u0441\u0442\u0435\u043d\u044c\u043a\u043e \u0437\u0430\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430.<\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0432 \u044d\u0442\u043e\u043c \u0434\u0443\u0445\u0435. \u041d\u043e \u0432\u044b \u0434\u0443\u043c\u0430\u0435\u0442\u0435 \u0432\u043e\u0442 \u0442\u0430\u043a \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u043b\u0438 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0447\u0435\u0442\u043a\u0443\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c? \u041a\u0430\u043a \u0431\u044b \u043d\u0435 \u0442\u0430\u043a! \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u044f\u0441\u044c \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u043e\u0442\u0432\u0435\u0442\u0430 \u043a\u0430\u043a \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 &#8212; ZigBee 3.0 Devices User Guide JN-UG-3114. \u0412 \u043d\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043f\u0440\u0438\u0447\u0435\u043c \u0432 \u0444\u043e\u0440\u043c\u0435 \u0437\u0430\u043c\u0435\u0442\u043e\u043a, \u0432\u0440\u043e\u0434\u0435 \u201c\u0430 \u0432\u043e\u0442 \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0432\u043e\u0442 \u044d\u0442\u043e\u201d.<\/p>\n<p>\u041a\u043e\u0440\u043e\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0441\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0431\u0430\u0433\u0430\u0436\u043e\u043c \u0437\u043d\u0430\u043d\u0438\u0439 \u0432\u0437\u043b\u0435\u0442\u0435\u0442\u044c. \u0410 \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b&nbsp; \u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432 \u043b\u044e\u0431\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u0410 \u0432\u043e\u0442 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u0442\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0443\u0436\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, UART \u0438 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 (DBG), \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u0435\u043c \u0438 \u0440\u0435\u0436\u0438\u043c\u0430\u043c\u0438 \u0441\u043d\u0430 (PWRM),&nbsp; GPIO, \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 EEPROM (Persistent Data Manager, PDM). \u0422\u0443\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e &#8212; \u044f \u043f\u0440\u043e \u044d\u0442\u043e \u0432\u0441\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<pre><code class=\"cpp\">extern \"C\" PUBLIC void vAppMain(void) {    \/\/ Initialize the hardware    TARGET_INITIALISE();    SET_IPL(0);    portENABLE_INTERRUPTS();     \/\/ Initialize UART    DBG_vUartInit(DBG_E_UART_0, DBG_E_UART_BAUD_RATE_115200);     \/\/ Restore blink mode from EEPROM    DBG_vPrintf(TRUE, \"vAppMain(): init PDM...\\n\");    PDM_eInitialise(0);    restoreBlinkMode();     \/\/ Initialize hardware    DBG_vPrintf(TRUE, \"vAppMain(): init GPIO...\\n\");    vAHI_DioSetDirection(BOARD_BTN_PIN, BOARD_LED_PIN);    vAHI_DioSetPullup(BOARD_BTN_PIN, 0);     \/\/ Initialize power manager and sleep mode    DBG_vPrintf(TRUE, \"vAppMain(): init PWRM...\\n\");    PWRM_vInit(E_AHI_SLEEP_DEEP); <\/code><\/pre>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e Protocol Data Unit Manager, PDUM. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430 \u0434\u043b\u044f ZigBee \u0441\u0442\u0435\u043a\u0430 &#8212; \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u0431\u0430\u0439\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u043b\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0435\u0440\u0435\u0437 PDUM. \u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e.<\/p>\n<pre><code class=\"cpp\">   \/\/ PDU Manager initialization    DBG_vPrintf(TRUE, \"vAppMain(): init PDUM...\\n\");    PDUM_vInit();<\/code><\/pre>\n<p>\u041a\u043e\u0434 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <a href=\"https:\/\/github.com\/grafalex82\/hellozigbee\/blob\/main\/pdum_gen.c\" rel=\"noopener noreferrer nofollow\">pdum_gen.c<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0438\u0437 zpscfg \u0444\u0430\u0439\u043b\u0430. \u0422\u0430\u043c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 PDU \u0431\u0443\u0444\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0435\u043a\u043e\u043c \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0418\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 \u0444\u0430\u0439\u043b\u0430 \u0442\u043e\u0440\u0447\u0430\u0442 2 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 apduZDP \u0438 apduZCL, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 2 \u043f\u0443\u043b\u0430 \u0431\u0443\u0444\u0435\u0440\u043e\u0432. \u0427\u0435\u043c \u043e\u043d\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u044f \u043f\u043e\u043a\u0430 \u0441\u043b\u0430\u0431\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u043d\u043e \u044d\u0442\u0438 \u0448\u0442\u0443\u043a\u0438 \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c.<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0447\u0442\u043e \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c ZigBee Cluster Library (ZCL) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0437\u043e\u0432\u0430 eZCL_Initialise(). \u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0434\u043b\u044f \u043d\u0430\u0441 \u0432 \u044d\u0442\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u044d\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 APP_ZCL_cbGeneralCallback() &#8212; \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 ZCL \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u0440\u0433\u0430\u0442\u044c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043d\u0430\u0448\u0435\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435.&nbsp;<\/p>\n<pre><code class=\"cpp\">   DBG_vPrintf(TRUE, \"vAppMain(): init Zigbee Class Library (ZCL)...  \");    status = eZCL_Initialise(&amp;APP_ZCL_cbGeneralCallback, apduZCL);    DBG_vPrintf(TRUE, \"eZCL_Initialise() status %d\\n\", status);<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 ZCL \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e&nbsp; eZCL_Register() \u0438\u043b\u0438 \u0435\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438. \u0427\u0442\u043e \u0442\u0443\u0442 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0443 \u043f\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0430\u043c\u0438? \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438. \u041d\u043e \u0437\u0430\u0447\u0435\u043c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435, \u0435\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d ZigBee \u0430\u043b\u044c\u044f\u043d\u0441\u043e\u043c \u0438 \u0437\u0430 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d NXP \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 OnOffLightSwitch (\u044d\u0442\u043e \u043d\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0446\u0435\u043b\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0442\u0438\u043f\u043e\u0432).  <\/p>\n<pre><code class=\"cpp\">tsZLO_OnOffLightSwitchDevice sSwitch;  extern \"C\" PUBLIC void vAppMain(void) { ...    DBG_vPrintf(TRUE, \"vAppMain(): register On\/Off endpoint...  \");    status = eZLO_RegisterOnOffLightSwitchEndPoint(HELLOZIGBEE_SWITCH_ENDPOINT, &amp;APP_ZCL_cbEndpointCallback, &amp;sSwitch);    DBG_vPrintf(TRUE, \"eApp_ZCL_RegisterEndpoint() status %d\\n\", status); <\/code><\/pre>\n<p>\u0412\u044b\u0437\u043e\u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0435\u0435 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c sSwitch \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c APP_ZCL_cbEndpointCallback() &#8212; \u0432 \u043d\u0435\u0433\u043e \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0432\u0441\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u044d\u0442\u043e\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439. \u0415\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0434\u0432\u0443\u0445\u043a\u043b\u0430\u0432\u0438\u0448\u043d\u044b\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c, \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438, \u0442\u043e \u044d\u0442\u043e\u0442 \u0432\u044b\u0437\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (Application Framework) \u0432\u044b\u0437\u043e\u0432\u043e\u043c ZPS_eAplAfInit(). \u041d\u0438\u0447\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u043d\u0435\u0442.<\/p>\n<pre><code class=\"cpp\">   DBG_vPrintf(TRUE, \"vAppMain(): init Application Framework (AF)...\\n\");    ZPS_teStatus status = ZPS_eAplAfInit();    DBG_vPrintf(TRUE, \"ZPS_eAplAfInit() status %d\\n\", status);<\/code><\/pre>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0443\u043d\u043a\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b &#8212; \u0432\u044b\u0437\u043e\u0432 BDB_vInit(). \u0422\u0443\u0442 \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043f\u043e\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435, \u0442.\u043a. \u044d\u0442\u043e\u0442 \u0432\u044b\u0437\u043e\u0432 \u043d\u0435 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442. \u0412\u043e\u0442 \u0447\u0442\u043e \u043f\u0438\u0448\u0435\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 ZigBee 3.0 Devices User Guide JN-UG-3114.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bd1\/084\/4d3\/bd10844d3cf04a35f40b4c3ba431e2cf.png\" width=\"830\" height=\"720\"><figcaption><\/figcaption><\/figure>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043a\u0443\u0441\u043e\u0447\u043a\u0430 \u043c\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0432\u044b\u0437\u043e\u0432\u044b BDB_vInit() \u0438 BDB_vStart() \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b &#8212; \u043e\u043d\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Base Device Behavior (BDB), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0431\u0449\u0435\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u0430\u043a \u0443\u0437\u043b\u0430 \u0441\u0435\u0442\u0438. \u041f\u0440\u0438\u0447\u0435\u043c \u0435\u0441\u043b\u0438 \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0432\u0430\u0436\u043d\u043e\u0435, \u0442\u043e \u043d\u0430\u0441 \u043e\u043f\u043e\u0432\u0435\u0441\u0442\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 APP_vBdbCallback().&nbsp;<\/p>\n<p>\u0410 \u0432\u0430\u0436\u0435\u043d \u0442\u0443\u0442 Note 2, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u043b\u0430\u0441\u0438\u0442, \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 BDB \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0435 \u0442\u0430\u0439\u043c\u0435\u0440\u044b. \u041f\u0440\u0438\u0447\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0431\u044f\u0437\u0430\u043d \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e\u0434 \u043d\u0438\u0445 \u043c\u0435\u0441\u0442\u043e \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 BDB_ZTIMER_STORAGE \u0448\u0442\u0443\u043a \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043f\u0438\u0441\u043a\u0435 \u0442\u0430\u0439\u043c\u0435\u0440\u043e\u0432 (\u043f\u043e\u043c\u0438\u043c\u043e \u043d\u0430\u0448\u0438\u0445 \u0434\u0432\u0443\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 &#8212; \u043e\u043d\u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u044e\u0442 \u043a\u043d\u043e\u043f\u043a\u0443 \u0438 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434).<\/p>\n<pre><code class=\"cpp\">ZTIMER_tsTimer timers[2 + BDB_ZTIMER_STORAGE];  extern \"C\" PUBLIC void vAppMain(void) { ...    \/\/ Init and start timers    DBG_vPrintf(TRUE, \"vAppMain(): init software timers...\\n\");    ZTIMER_eInit(timers, sizeof(timers) \/ sizeof(ZTIMER_tsTimer));<\/code><\/pre>\n<p>\u041d\u043e \u0438 \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435. \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442 ZigBee 3.0 Stack User Guide JN-UG-3113 \u043a\u0430\u043a \u0431\u044b \u043d\u0435\u0432\u0437\u043d\u0430\u0447\u0430\u0439 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 5.9.1.2 (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0440\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439) \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0435\u0449\u0435 \u043f\u0440\u043e \u0442\u043e, \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0435 ZigBee \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0435\u0449\u0435 3 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u043b\u044f \u043d\u0443\u0436\u0434 ZigBee \u0441\u0442\u0435\u043a\u0430. \u041f\u0440\u0438\u0447\u0435\u043c \u0441\u0443\u0442\u044c \u044d\u0442\u0438\u0445 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u043e. \u041d\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0441\u044f\u0442 \u0441\u043a\u043e\u043f\u0438-\u043f\u0430\u0441\u0442\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a \u0441\u0435\u0431\u0435 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/707\/daa\/a4f\/707daaa4fb7a1f8984aeb053142684d0.png\" width=\"1062\" height=\"932\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0443 \u0438 \u043b\u0430\u0434\u043d\u043e, \u043f\u0440\u043e\u0441\u044f\u0442, \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0430\u0434\u043e. \u0412\u043e\u0442 \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u043f\u043e\u043d\u044f\u043b \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0441\u0442\u0435\u043a\u0435. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0443\u0434\u0430 \u043e\u043d\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0432\u0438\u0434\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 void, \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0445 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 zsp_gen.c, \u0430 \u043e\u0442\u0442\u0443\u0434\u0430, \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c void * \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u0441\u0442\u0435\u043a. \u0418\u0437 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435\u0440\u0435\u0430\u043b\u044c\u043d\u043e. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0432 zsp_gen.c \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u044e\u0442 4 \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u0430 \u043d\u0435 3, \u0434\u0430 \u0438 \u043a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 4 \u043e\u0447\u0435\u0440\u0435\u0434\u0438. \u041d\u0443 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 &#8212; \u0441\u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u043c \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0441\u0430\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f BDB_vInit() \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u0434\u043d\u043e \u0438\u0437 \u043f\u043e\u043b\u0435\u0439 &#8212; \u0445\u0435\u043d\u0434\u043b \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0439 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0433\u043e BDB. \u0418\u0442\u043e\u0433\u043e 5 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439.<\/p>\n<pre><code class=\"cpp\">#define BDB_QUEUE_SIZE              3 #define MLME_QUEUE_SIZE             10 #define MCPS_QUEUE_SIZE             24 #define TIMER_QUEUE_SIZE            8 #define MCPS_DCFM_QUEUE_SIZE        5  extern PUBLIC tszQueue zps_msgMlmeDcfmInd; extern PUBLIC tszQueue zps_msgMcpsDcfmInd; extern PUBLIC tszQueue zps_TimeEvents; extern PUBLIC tszQueue zps_msgMcpsDcfm;  PRIVATE MAC_tsMlmeVsDcfmInd asMacMlmeVsDcfmInd[MLME_QUEUE_SIZE]; PRIVATE MAC_tsMcpsVsDcfmInd asMacMcpsDcfmInd[MCPS_QUEUE_SIZE]; PRIVATE MAC_tsMcpsVsCfmData asMacMcpsDcfm[MCPS_DCFM_QUEUE_SIZE]; PRIVATE zps_tsTimeEvent asTimeEvent[TIMER_QUEUE_SIZE]; PRIVATE BDB_tsZpsAfEvent asBdbEvent[BDB_QUEUE_SIZE];  PRIVATE tszQueue APP_msgBdbEvents;  extern \"C\" PUBLIC void vAppMain(void) { ...    \/\/ Initialize ZigBee stack queues    ZQ_vQueueCreate(&amp;zps_msgMlmeDcfmInd, MLME_QUEUE_SIZE, sizeof(MAC_tsMlmeVsDcfmInd), (uint8*)asMacMlmeVsDcfmInd);    ZQ_vQueueCreate(&amp;zps_msgMcpsDcfmInd, MCPS_QUEUE_SIZE, sizeof(MAC_tsMcpsVsDcfmInd), (uint8*)asMacMcpsDcfmInd);    ZQ_vQueueCreate(&amp;zps_TimeEvents, TIMER_QUEUE_SIZE, sizeof(zps_tsTimeEvent), (uint8*)asTimeEvent);    ZQ_vQueueCreate(&amp;zps_msgMcpsDcfm, MCPS_DCFM_QUEUE_SIZE, sizeof(MAC_tsMcpsVsCfmData), (uint8*)asMacMcpsDcfm);    ZQ_vQueueCreate(&amp;APP_msgBdbEvents, BDB_QUEUE_SIZE, sizeof(BDB_tsZpsAfEvent), (uint8*)asBdbEvent); <\/code><\/pre>\n<p>\u0423 \u043c\u0435\u043d\u044f \u043d\u0435\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043a\u0430\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u044d\u0442\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u0438 \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u0434\u0440\u0443\u0433\u0438\u043c\u0438. \u0411\u0443\u0434\u0443 \u043a\u0440\u0430\u0439\u043d\u0435 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0440\u0430\u0437\u044a\u044f\u0441\u043d\u0438\u0442 \u044d\u0442\u043e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u041d\u0443 \u0438 \u0441\u0430\u043c \u0432\u044b\u0437\u043e\u0432 BDB_vInit()<\/p>\n<pre><code class=\"cpp\">   \/\/ Initialize Base Class Behavior    DBG_vPrintf(TRUE, \"vAppMain(): initialize base device behavior...\\n\");    BDB_tsInitArgs sInitArgs;    sInitArgs.hBdbEventsMsgQ = &amp;APP_msgBdbEvents;    BDB_vInit(&amp;sInitArgs);<\/code><\/pre>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c (\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c, \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u044f\u043a\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0438) \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c zps_eAplZdoStartStack(). \u041d\u043e \u0442\u0443\u0442 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u043e\u0441\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 &#8212; \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430. \u0412\u043e\u043e\u0431\u0449\u0435! \u0418 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u0442\u043e\u0436\u0435. \u0418 \u0432\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0442\u043e\u0436\u0435 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442.&nbsp;<\/p>\n<p>\u0421\u0443\u0434\u044f \u043f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c ZigBee \u0441\u0442\u0435\u043a, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u0447\u043d\u0435\u0442 \u043b\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0435\u0442\u044c \u0438 \u043a \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043f\u0440\u0435\u0434\u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u0435\u0442\u044c, \u043d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c Xiaomi \u0441 \u0437\u0430\u0432\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435\u043c, \u043f\u043e\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0436\u043c\u0435\u0442 \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430 5-10 \u0441\u0435\u043a\u0443\u043d\u0434. \u0418 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u043e zps_eAplZdoStartStack() \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f BDB_vStart(), \u0438 \u044d\u0442\u043e \u0441\u043e\u0433\u043b\u0430\u0441\u0443\u0435\u0442\u0441\u044f \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043c ZigBee 3.0 Devices User Guide JN-UG-3114, \u0440\u0430\u0437\u0434\u0435\u043b 1.4 Device Initialisation. \u041d\u0443 \u043f\u0443\u0441\u043a\u0430\u0439 \u0431\u0443\u0434\u0435\u0442 BDB_vStart().<\/p>\n<pre><code class=\"cpp\">   DBG_vPrintf(TRUE, \"vAppMain(): Starting base device behavior...\\n\");    BDB_vStart();<\/code><\/pre>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0448\u0442\u0440\u0438\u0445 &#8212; \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f. \u041c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441\u0430\u043c \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0440\u0430\u0434\u0438\u043e\u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u043e\u043c, \u0438 \u0435\u0441\u043b\u0438 \u0431\u044b\u043b \u043f\u0440\u0438\u043d\u044f\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043f\u0430\u043a\u0435\u0442 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435. \u041a\u043e\u0434 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f &#8212; \u043e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0430\u0445 ZigBee \u0441\u0442\u0435\u043a\u0430, \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0441\u043e\u0431\u0440\u0430\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u041d\u043e \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u0432 \u0444\u0430\u0439\u043b\u0435 irq_JN516x.S.<\/p>\n<pre><code class=\"cpp\">.globl  PIC_SwVectTable     .section .text,\"ax\"     .extern zps_isrMAC     .extern ISR_vTickTimer     .extern vISR_SystemController     .align 4     .type   PIC_SwVectTable, @object     .size   PIC_SwVectTable, 64 PIC_SwVectTable:     .word vUnclaimedInterrupt               # 0     .word vISR_SystemController             # 1     .word vUnclaimedInterrupt               # 2     .word vUnclaimedInterrupt               # 3     .word vUnclaimedInterrupt               # 4     .word vUnclaimedInterrupt               # 5     .word vUnclaimedInterrupt               # 6     .word zps_isrMAC                        # 7     .word vUnclaimedInterrupt               # 8     .word vUnclaimedInterrupt               # 9     .word vUnclaimedInterrupt               # 10     .word vUnclaimedInterrupt               # 11     .word vUnclaimedInterrupt               # 12     .word vUnclaimedInterrupt               # 13     .word vUnclaimedInterrupt               # 14     .word ISR_vTickTimer                    # 15<\/code><\/pre>\n<p>\u0410\u0445 \u0434\u0430, \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b. \u041f\u043e\u043a\u0430 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0443\u0441\u0442\u044b\u0435 &#8212; \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u043e \u043c\u0435\u0440\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043a\u0430\u043a \u0432\u0441\u0435 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<pre><code class=\"cpp\">PRIVATE void APP_ZCL_cbGeneralCallback(tsZCL_CallBackEvent *psEvent) {    DBG_vPrintf(TRUE, \"APP_ZCL_cbGeneralCallback(): Processing event %d\\n\", psEvent-&gt;eEventType);     switch (psEvent-&gt;eEventType)    {        case E_ZCL_CBET_UNHANDLED_EVENT:            DBG_vPrintf(TRACE_ZCL, \"EVT: Unhandled Event\\r\\n\");            break;         case E_ZCL_CBET_READ_ATTRIBUTES_RESPONSE:            DBG_vPrintf(TRACE_ZCL, \"EVT: Read attributes response\\r\\n\");            break;         case E_ZCL_CBET_READ_REQUEST:            DBG_vPrintf(TRACE_ZCL, \"EVT: Read request\\r\\n\");            break;         case E_ZCL_CBET_DEFAULT_RESPONSE:            DBG_vPrintf(TRACE_ZCL, \"EVT: Default response\\r\\n\");            break;         case E_ZCL_CBET_ERROR:            DBG_vPrintf(TRACE_ZCL, \"EVT: Error\\r\\n\");            break;         case E_ZCL_CBET_TIMER:            break;         case E_ZCL_CBET_ZIGBEE_EVENT:            DBG_vPrintf(TRACE_ZCL, \"EVT: ZigBee\\r\\n\");            break;         case E_ZCL_CBET_CLUSTER_CUSTOM:            DBG_vPrintf(TRACE_ZCL, \"EP EVT: Custom\\r\\n\");            break;         default:            DBG_vPrintf(TRACE_ZCL, \"Invalid event type (%d) in APP_ZCL_cbGeneralCallback\\r\\n\", psEvent-&gt;eEventType);            break;    } }  PRIVATE void APP_ZCL_cbEndpointCallback(tsZCL_CallBackEvent *psEvent) {    DBG_vPrintf(TRUE, \"APP_ZCL_cbEndpointCallback(): Processing event %d\\n\", psEvent-&gt;eEventType);     switch (psEvent-&gt;eEventType)    {        case E_ZCL_CBET_UNHANDLED_EVENT:         case E_ZCL_CBET_READ_ATTRIBUTES_RESPONSE:         case E_ZCL_CBET_READ_REQUEST:         case E_ZCL_CBET_DEFAULT_RESPONSE:         case E_ZCL_CBET_ERROR:         case E_ZCL_CBET_TIMER:         case E_ZCL_CBET_ZIGBEE_EVENT:            DBG_vPrintf(TRACE_ZCL, \"EP EVT:No action (evt type %d)\\r\\n\", psEvent-&gt;eEventType);            break;         case E_ZCL_CBET_READ_INDIVIDUAL_ATTRIBUTE_RESPONSE:            DBG_vPrintf(TRACE_ZCL, \" Read Attrib Rsp %d %02x\\n\", psEvent-&gt;uMessage.sIndividualAttributeResponse.eAttributeStatus,                *((uint8*)psEvent-&gt;uMessage.sIndividualAttributeResponse.pvAttributeData));            break;         case E_ZCL_CBET_CLUSTER_CUSTOM:            DBG_vPrintf(TRACE_ZCL, \"EP EVT: Custom %04x\\r\\n\", psEvent-&gt;uMessage.sClusterCustomMessage.u16ClusterId);            break;         default:            DBG_vPrintf(TRACE_ZCL, \"EP EVT: Invalid event type (%d) in APP_ZCL_cbEndpointCallback\\r\\n\", psEvent-&gt;eEventType);            break;    } }  void vfExtendedStatusCallBack (ZPS_teExtendedStatus eExtendedStatus) {    DBG_vPrintf(TRUE,\"ERROR: Extended status %x\\n\", eExtendedStatus); }  PUBLIC void APP_vBdbCallback(BDB_tsBdbEvent *psBdbEvent) {    switch(psBdbEvent-&gt;eEventType)    {        case BDB_EVENT_INIT_SUCCESS:            DBG_vPrintf(TRUE, \"BDB event callback: : BdbInitSuccessful\\n\");            break;         default:            DBG_vPrintf(1, \"BDB event callback: evt %d\\n\", psBdbEvent-&gt;eEventType);            break;    } } <\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u044d\u0442\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0446\u0438\u043a\u043b.<\/p>\n<pre><code class=\"cpp\">   DBG_vPrintf(TRUE, \"vAppMain(): Starting the main loop\\n\");    while(1)    {        zps_taskZPS();         bdb_taskBDB();         ZTIMER_vTask();         vAHI_WatchdogRestart();    }<\/code><\/pre>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u044f zps_taskZPS() \u043d\u0438\u0433\u0434\u0435 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0430, \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u0435\u0435 \u043d\u0435\u0442, \u043d\u043e \u043e\u043d\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432. \u041f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u0442\u043e\u043b\u0441\u0442\u0435\u0435\u0442 \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043d\u0430 15 \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442 &#8212; \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0442\u0430\u043c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e \u043e\u043d\u0430 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0432\u0430\u0436\u043d\u0430! \u0417\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0435\u0434, \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0443\u0431\u0440\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u044b\u0437\u043e\u0432 \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u043e\u0442.<\/p>\n<p>\u0421\u043e \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f. \u041d\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u0442\u0443\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438 \u0432\u0438\u0434\u0438\u043c<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/87b\/e52\/41f\/87be5241f93d9042b515c08dac8b8693.png\" width=\"825\" height=\"521\"><figcaption><\/figcaption><\/figure>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u043e\u0441\u044c \u0438 \u043c\u043e\u0440\u0433\u0430\u0435\u0442 \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u043e\u0439 (\u044d\u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u044f \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043b \u0441 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438). \u0412 \u043b\u043e\u0433\u0430\u0445 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e.&nbsp;<\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0441\u044f \u0432 \u0441\u0435\u0442\u044c<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u0430\u0440\u043a\u0430\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u043e \u043f\u043e\u043a\u0430 \u043d\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0435\u0449\u044c\u044e \u0432 \u0441\u0435\u0431\u0435. \u0425\u043e\u0442\u044c \u0442\u0430\u043c \u0438 \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f ZigBee \u0441\u0442\u0435\u043a, \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 \u0441\u0435\u0442\u044c\u044e. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0442\u0438. \u041f\u043e\u043c\u043d\u0438\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e zps_eAplZdoStartStack(), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043c\u0430\u043d\u0443\u0430\u043b\u043e\u043c, \u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445? \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043d\u0430 \u043d\u0435\u0435 \u0433\u043b\u0430\u0441\u0438\u0442, \u0447\u0442\u043e \u043e\u043d\u0430 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 ZigBee \u0441\u0442\u0435\u043a \u0438 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043a \u0441\u0435\u0442\u0438. \u041b\u0438\u0447\u043d\u043e \u043c\u043d\u0435 \u043f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.&nbsp;<\/p>\n<p>\u041a\u0430\u043a \u043c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u043c\u0435\u0442\u043e\u0434 \u0442\u044b\u043a\u0430 &#8212; \u044d\u0442\u043e \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435\u043f\u043b\u043e\u0445\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u043e\u0432\u043e\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432 zps_eAplZdoStartStack() \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/p>\n<pre><code class=\"cpp\">   \/\/ Start ZigBee stack    DBG_vPrintf(TRUE, \"vAppMain(): Starting ZigBee stack... \");    status = ZPS_eAplZdoStartStack();    DBG_vPrintf(TRUE, \"ZPS_eAplZdoStartStack() status %d\\n\", status);<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438 \u0432\u0438\u0434\u0438\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.<\/p>\n<pre><code>... vAppMain(): Starting base device behavior... BDB event callback: BDB Init Successful vAppMain(): Starting ZigBee stack... ZPS_eAplZdoStartStack() status 0 vAppMain(): Starting the main loop BDB event callback: evt 1<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043f\u043e\u0441\u043b\u0435 \u0441\u0442\u0430\u0440\u0442\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430. \u0422.\u0435. \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0447\u0442\u043e-\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e APP_vBdbCallback(). \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 BDB \u0432 \u0444\u0430\u0439\u043b\u0435 bdb_api.h \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u043e\u0434 \u043d\u043e\u043c\u0435\u0440\u043e\u043c 1 \u044d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 BDB_EVENT_ZPSAF. \u0422.\u0435. \u043d\u0430\u043c \u0445\u043e\u0442\u044f\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0447\u0442\u043e-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 Application Framework.<\/p>\n<p>\u0418\u0437 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u044f \u0432\u0437\u044f\u043b \u0438\u0434\u0435\u044e \u0432\u044b\u043d\u043e\u0441\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.  \u0414\u0430, \u0443 \u043c\u0435\u043d\u044f \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u0443\u0447\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0442\u044b \u044d\u0442\u043e \u043f\u0438\u0448\u0435\u0448\u044c \u0441\u0430\u043c, \u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0448\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"cpp\">PUBLIC void APP_vBdbCallback(BDB_tsBdbEvent *psBdbEvent) {    switch(psBdbEvent-&gt;eEventType)    {        case BDB_EVENT_ZPSAF:            vAppHandleAfEvent(&amp;psBdbEvent-&gt;uEventData.sZpsAfEvent);            break; ...<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0439 AF \u044f \u0432\u0437\u044f\u043b \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0443\u0441\u043e\u0447\u0435\u043a \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b (\u043d\u043e \u043c\u044b \u043a \u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f).  <\/p>\n<pre><code class=\"cpp\">PRIVATE void vAppHandleAfEvent(BDB_tsZpsAfEvent *psZpsAfEvent) {    DBG_vPrintf(TRUE, \"AF event callback: endpoint %d, event %d\\n\", psZpsAfEvent-&gt;u8EndPoint, psZpsAfEvent-&gt;sStackEvent.eType);   \/\/    if(psZpsAfEvent-&gt;u8EndPoint == app_u8GetDeviceEndpoint()) \/\/    { \/\/        if(psZpsAfEvent-&gt;sStackEvent.eType == ZPS_EVENT_APS_DATA_INDICATION) \/\/        { \/\/            DBG_vPrintf(TRACE_SWITCH_NODE, \"Pass to ZCL\\n\"); \/\/            APP_ZCL_vEventHandler(&amp;psZpsAfEvent-&gt;sStackEvent); \/\/        } \/\/    } \/\/    else    if(psZpsAfEvent-&gt;u8EndPoint == HELLOZIGBEE_ZDO_ENDPOINT)    {        \/\/ events for ep 0        vAppHandleZdoEvents(psZpsAfEvent);    }     \/\/ Ensure Freeing of Apdus    if(psZpsAfEvent-&gt;sStackEvent.eType == ZPS_EVENT_APS_DATA_INDICATION)    {        DBG_vPrintf(TRUE, \"AF event callback: freeing up data event APDU\\n\");        PDUM_eAPduFreeAPduInstance(psZpsAfEvent-&gt;sStackEvent.uEvent.sApsDataIndEvent.hAPduInst);    } } <\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0421\u043e\u0431\u044b\u0442\u0438\u0435 AF \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435. \u0417\u0430\u0431\u0435\u0433\u0430\u044f \u0447\u0443\u0442\u043e\u0447\u043a\u0443 \u0432\u043f\u0435\u0440\u0435\u0434, \u044f \u0443\u0436\u0435 \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u0447\u0442\u043e \u044d\u0442\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0434\u043b\u044f Zigbee Device Object (ZDO), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0438\u0434\u0438\u0442 \u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 (\u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0432\u044b\u0439 if \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d). \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u043a \u043d\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0442\u044c \u0431\u0443\u0444\u0435\u0440 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PDUM_eAPduFreeAPduInstance(). \u041e\u0441\u0442\u0430\u0432\u043b\u044e \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c \u043a\u0430\u043a \u0435\u0441\u0442\u044c.<\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 vAppHandleZdoEvents(). \u042f \u043f\u043e\u0434\u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u0447\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u044d\u0442\u043e ZPS_EVENT_NWK_DISCOVERY_COMPLETE.<\/p>\n<pre><code class=\"cpp\">PRIVATE void vAppHandleZdoEvents(BDB_tsZpsAfEvent *psZpsAfEvent) {    DBG_vPrintf(TRUE, \"Handle ZDO event: event type %d\\n\", psStackEvent-&gt;eType);     switch(psStackEvent-&gt;eType)    {        case ZPS_EVENT_NWK_DISCOVERY_COMPLETE:            vHandleDiscoveryComplete(&amp;psStackEvent-&gt;uEvent.sNwkDiscoveryEvent);            break;        default:            break;    }  }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0447\u0443\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435 \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0424\u0443\u043d\u043a\u0446\u0438\u044f zps_eAplZdoStartStack() \u043f\u0440\u043e\u0431\u0443\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0437\u043d\u0430\u0435\u0442. \u0410 \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0441\u0435\u0442\u0438, \u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 network discovery. \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0432 \u044d\u0444\u0438\u0440 \u0448\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u201c\u043a\u0442\u043e \u0437\u0434\u0435\u0441\u044c?\u201d \u0438 \u0436\u0434\u0435\u0442 \u043f\u043e\u043a\u0430 \u0441\u0435\u0442\u0438 \u0432 \u043e\u043a\u0440\u0443\u0433\u0435 \u043e\u0442\u0432\u0435\u0442\u044f\u0442 \u043d\u0430\u0448\u0435\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \u201c\u042f \u0437\u0434\u0435\u0441\u044c!\u201d. \u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u043a\u0443\u043d\u0434\u0443 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0434\u0438\u0441\u043a\u0430\u0432\u0435\u0440\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f, \u0438 ZigBee \u0441\u0442\u0435\u043a \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u043d\u0430\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 ZPS_EVENT_NWK_DISCOVERY_COMPLETE \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435.  <\/p>\n<pre><code class=\"cpp\">PRIVATE void vHandleDiscoveryComplete(ZPS_tsAfNwkDiscoveryEvent * pEvent) {    DBG_vPrintf(TRUE, \"Network Discovery Complete: status %d\\n\", pEvent-&gt;eStatus);    DBG_vPrintf(TRUE, \"    Network count: %d\\n\", pEvent-&gt;u8NetworkCount);    DBG_vPrintf(TRUE, \"    Selected network: %d\\n\", pEvent-&gt;u8SelectedNetwork);    DBG_vPrintf(TRUE, \"    Unscanned channels: %4x\\n\", pEvent-&gt;u32UnscannedChannels);     for(uint8 i = 0; i &lt; pEvent-&gt;u8NetworkCount; i++)    {        DBG_vPrintf(TRUE, \"    Network %d\\n\", i);         ZPS_tsNwkNetworkDescr * pNetwork = pEvent-&gt;psNwkDescriptors + i;         DBG_vPrintf(TRUE, \"        Extended PAN ID : %016llx\\n\", pNetwork-&gt;u64ExtPanId);        DBG_vPrintf(TRUE, \"        Logical channel : %d\\n\", pNetwork-&gt;u8LogicalChan);        DBG_vPrintf(TRUE, \"        Stack Profile: %d\\n\", pNetwork-&gt;u8StackProfile);        DBG_vPrintf(TRUE, \"        ZigBee version: %d\\n\", pNetwork-&gt;u8ZigBeeVersion);        DBG_vPrintf(TRUE, \"        Permit Joining: %d\\n\", pNetwork-&gt;u8PermitJoining);        DBG_vPrintf(TRUE, \"        Router capacity: %d\\n\", pNetwork-&gt;u8RouterCapacity);        DBG_vPrintf(TRUE, \"        End device capacity: %d\\n\", pNetwork-&gt;u8EndDeviceCapacity);    } }<\/code><\/pre>\n<p>\u0412\u043a\u0440\u0430\u0442\u0446\u0435 \u0440\u0435\u0437\u044e\u043c\u0438\u0440\u0443\u044e \u0441\u0443\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u0443\u0441\u043e\u0447\u043a\u043e\u0432 \u043a\u043e\u0434\u0430 (\u044f \u0437\u043d\u0430\u044e, \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u0430 \u0434\u0430\u0436\u0435 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043a\u0443\u0441\u043a\u0438 \u043d\u0430 \u0433\u043e\u043b\u043e\u0432\u0443 \u043d\u0430\u0442\u044f\u043d\u0443\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e). \u041a \u043d\u0430\u043c \u043f\u0440\u0438\u0448\u043b\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0442 BDB \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a APP_vBdbCallback(). \u041c\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a Application Framework \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u0435\u0433\u043e \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a vAppHandleAfEvent(). \u0422\u0430\u043c \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 (\u0442.\u0435. ZDO) \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u0435\u0433\u043e \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432 vAppHandleZdoEvents(). \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0442\u0443\u0442 \u043c\u044b \u043f\u043e\u043d\u044f\u043b\u0438 \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0437\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043f\u043b\u044b\u043b\u043e (ZPS_EVENT_NWK_DISCOVERY_COMPLETE), \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u044b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 vHandleDiscoveryComplete().<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u044f \u044d\u0442\u043e \u0432 \u0436\u0435\u043b\u0435\u0437\u0435 \u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3ce\/f1f\/5fd\/3cef1f5fdf410e80d3c0dbb19ae31284.png\" width=\"825\" height=\"842\"><figcaption><\/figcaption><\/figure>\n<p>\u042f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u043f\u043e\u043c\u0438\u043c\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0435\u0449\u0435 \u0448\u0430\u0439\u0431\u0443 \u043e\u0442 Xiaomi, \u0438 \u043d\u0430\u0448\u0430 \u0436\u0435\u043b\u0435\u0437\u044f\u043a\u0430 \u0431\u0435\u0437 \u0442\u0440\u0443\u0434\u0430 \u043d\u0430\u0448\u043b\u0430 \u043e\u0431\u0435 \u0441\u0435\u0442\u0438. \u0418 \u0434\u0430\u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (\u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u043d\u0430\u043b\u0430, \u0438 PAN ID) \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c\u0438  <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/19d\/d31\/b2f\/19dd31b2f2f273ee49e6a0a347e0497d.png\" alt=\"\u041a\u0443\u0441\u043e\u0447\u0435\u043a \u043a\u0430\u0440\u0442\u044b \u043c\u043e\u0435\u0439 ZigBee \u0441\u0435\u0442\u0438\" title=\"\u041a\u0443\u0441\u043e\u0447\u0435\u043a \u043a\u0430\u0440\u0442\u044b \u043c\u043e\u0435\u0439 ZigBee \u0441\u0435\u0442\u0438\" width=\"371\" height=\"247\"><figcaption>\u041a\u0443\u0441\u043e\u0447\u0435\u043a \u043a\u0430\u0440\u0442\u044b \u043c\u043e\u0435\u0439 ZigBee \u0441\u0435\u0442\u0438<\/figcaption><\/figure>\n<p>\u0427\u0442\u043e \u0435\u0449\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u043e \u043d\u0430\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 DiscoveryComplete? \u0410 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u043d\u0430\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 Selected Networks. \u0422.\u0435. ZigBee \u0441\u0442\u0435\u043a \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u043e\u0431\u0435 \u0441\u0435\u0442\u0438, \u0438 \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u043d\u0438 \u043a \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u0417\u0430\u0442\u043e \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0447\u0443\u0434\u0435\u0441\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441\u0435\u0442\u0438 (\u043d\u043e\u043c\u0435\u0440 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0441\u0435\u0442\u0435\u0439), \u0435\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c Permit Join \u043d\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0435. \u0422.\u043e. \u043c\u044b \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0435\u0442\u0438, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u043e\u043c ZPS_eAplZdoJoinNetwork().<\/p>\n<pre><code class=\"cpp\">PRIVATE void vHandleDiscoveryComplete(ZPS_tsAfNwkDiscoveryEvent * pEvent) { ...    \/\/ Check if there is a suitable network to join    if(pEvent-&gt;u8SelectedNetwork == 0xff)    {        DBG_vPrintf(TRUE, \"    No good network to join\\n\");        return;    }     \/\/ Join the network    ZPS_tsNwkNetworkDescr * pNetwork = pEvent-&gt;psNwkDescriptors + pEvent-&gt;u8SelectedNetwork;    DBG_vPrintf(TRUE, \"Network Discovery Complete: Joining network %016llx\\n\", pNetwork-&gt;u64ExtPanId);    ZPS_teStatus status = ZPS_eAplZdoJoinNetwork(pNetwork);    DBG_vPrintf(TRUE, \"Network Discovery Complete: ZPS_eAplZdoJoinNetwork() status %d\", status); } <\/code><\/pre>\n<p>\u0412 \u0441\u0432\u043e\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0443\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0430 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e USB \u0441\u0442\u0438\u043a CC2538 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 zigbee2mqtt (Z2M). \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u0432 \u043b\u043e\u0433\u0438 \u0443\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0430.<\/p>\n<pre><code>grafalex@SmartHome:~\/SmartHome\/zigbee2mqtt\/log\/2021-03-25.23-48-31$ cat log.txt | grep 0x00158d0002b501a7 info  2021-03-28 22:00:41: Device '0x00158d0002b501a7' joined info  2021-03-28 22:00:41: MQTT publish: topic 'zigbee2mqtt\/bridge\/event', payload '{\"data\":{\"friendly_name\":\"0x00158d0002b501a7\",\"ieee_address\":\"0x00158d0002b501a7\"},\"type\":\"device_joined\"}' info  2021-03-28 22:00:41: Starting interview of '0x00158d0002b501a7' info  2021-03-28 22:00:41: MQTT publish: topic 'zigbee2mqtt\/bridge\/event', payload '{\"data\":{\"friendly_name\":\"0x00158d0002b501a7\",\"ieee_address\":\"0x00158d0002b501a7\",\"status\":\"started\"},\"type\":\"device_interview\"}' info  2021-03-28 22:00:41: MQTT publish: topic 'zigbee2mqtt\/bridge\/log', payload '{\"message\":{\"friendly_name\":\"0x00158d0002b501a7\"},\"type\":\"device_connected\"}' info  2021-03-28 22:00:41: MQTT publish: topic 'zigbee2mqtt\/bridge\/log', payload '{\"message\":\"interview_started\",\"meta\":{\"friendly_name\":\"0x00158d0002b501a7\"},\"type\":\"pairing\"}' info  2021-03-28 22:00:42: MQTT publish: topic 'zigbee2mqtt\/bridge\/event', payload '{\"data\":{\"friendly_name\":\"0x00158d0002b501a7\",\"ieee_address\":\"0x00158d0002b501a7\"},\"type\":\"device_announce\"}' info  2021-03-28 22:00:42: MQTT publish: topic 'zigbee2mqtt\/bridge\/log', payload '{\"message\":\"announce\",\"meta\":{\"friendly_name\":\"0x00158d0002b501a7\"},\"type\":\"device_announced\"}' info  2021-03-28 22:04:16: Successfully interviewed '0x00158d0002b501a7', device has successfully been paired warn  2021-03-28 22:04:16: Device '0x00158d0002b501a7' with Zigbee model 'undefined' and manufacturer name 'undefined' is NOT supported, please follow https:\/\/www.zigbee2mqtt.io\/how_tos\/how_to_support_new_devices.html info  2021-03-28 22:04:16: MQTT publish: topic 'zigbee2mqtt\/bridge\/event', payload '{\"data\":{\"definition\":null,\"friendly_name\":\"0x00158d0002b501a7\",\"ieee_address\":\"0x00158d0002b501a7\",\"status\":\"successful\",\"supported\":false},\"type\":\"device_interview\"}' info  2021-03-28 22:04:16: MQTT publish: topic 'zigbee2mqtt\/bridge\/log', payload '{\"message\":\"interview_successful\",\"meta\":{\"friendly_name\":\"0x00158d0002b501a7\",\"supported\":false},\"type\":\"pairing\"}'<\/code><\/pre>\n<p>Zigbee2mqtt \u0443\u0432\u0438\u0434\u0435\u043b\u043e \u043d\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b\u043e \u0441 \u043d\u0438\u043c \u043f\u043e\u0431\u043e\u043b\u0442\u0430\u0442\u044c. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e. Z2M \u0441\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0436\u0438\u0432\u043e\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a \u0441 \u043d\u0438\u043c \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u043e\u043d\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442. \u041d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u044d\u0442\u043e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 (\u043f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430 \u043a\u0440\u0438\u0432\u043e \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044b \u0441\u0442\u0440\u043e\u043a).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7e6\/f61\/25a\/7e6f6125ad3a4856c38f1e95ad0d7e1e.png\" width=\"827\" height=\"802\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0442 \u043d\u0430\u0441 \u0445\u043e\u0442\u044f\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 2, 3, 5, \u0438 13, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 ZPS_EVENT_APS_DATA_CONFIRM, ZPS_EVENT_APS_DATA_ACK, ZPS_EVENT_NWK_JOINED_AS_ROUTER, \u0438 ZPS_EVENT_NWK_STATUS_INDICATION. \u0422\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0435\u0449\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 BDB \u043d\u043e\u043c\u0435\u0440 3 (BDB_EVENT_REJOIN_SUCCESS). \u041f\u043e\u0435\u0445\u0430\u043b\u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u042f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u043d\u0430 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<\/p>\n<pre><code>PRIVATE void vHandleDataConfirm(ZPS_tsAfDataConfEvent * pEvent) {    DBG_vPrintf(TRUE, \"ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=%d DstEP=%d DstAddr=%04x Status=%d\\n\",            pEvent-&gt;u8SrcEndpoint,            pEvent-&gt;u8DstEndpoint,            pEvent-&gt;uDstAddr.u16Addr,            pEvent-&gt;u8Status); }  PRIVATE void vHandleDataAck(ZPS_tsAfDataAckEvent * pEvent) {    DBG_vPrintf(TRUE, \"ZPS_EVENT_APS_DATA_ACK: SrcEP=%d DrcEP=%d DstAddr=%04x Profile=%04x Cluster=%04x\\n\",                pEvent-&gt;u8SrcEndpoint,                pEvent-&gt;u8DstEndpoint,                pEvent-&gt;u16DstAddr,                pEvent-&gt;u16ProfileId,                pEvent-&gt;u16ClusterId); }  PRIVATE void vHandleJoinedAsRouter(ZPS_tsAfNwkJoinedEvent * pEvent) {    DBG_vPrintf(TRUE, \"ZPS_EVENT_NWK_JOINED_AS_ROUTER: Addr=%04x, rejoin=%d, secured rejoin=%d\\n\",                pEvent-&gt;u16Addr,                pEvent-&gt;bRejoin,                pEvent-&gt;bSecuredRejoin); }  PRIVATE void vHandleNwkStatusIndication(ZPS_tsAfNwkStatusIndEvent * pEvent) {    DBG_vPrintf(TRUE, \"ZPS_EVENT_NWK_STATUS_INDICATION: Addr:%04x Status:%02x\\n\",        pEvent-&gt;u16NwkAddr,        pEvent-&gt;u8Status); }  PRIVATE void vAppHandleZdoEvents(ZPS_tsAfEvent* psStackEvent) {    switch(psStackEvent-&gt;eType)    {        case ZPS_EVENT_APS_DATA_CONFIRM:            vHandleDataConfirm(&amp;psStackEvent-&gt;uEvent.sApsDataConfirmEvent);            break;    case ZPS_EVENT_APS_DATA_ACK:        vHandleDataAck(&amp;amp;psStackEvent-&amp;gt;uEvent.sApsDataAckEvent);        break;     case ZPS_EVENT_NWK_JOINED_AS_ROUTER:        vHandleJoinedAsRouter(&amp;amp;psStackEvent-&amp;gt;uEvent.sNwkJoinedEvent);        break;     case ZPS_EVENT_NWK_STATUS_INDICATION:        vHandleNwkStatusIndication(&amp;amp;psStackEvent-&amp;gt;uEvent.sNwkStatusIndicationEvent);        break;     case ZPS_EVENT_NWK_DISCOVERY_COMPLETE:        vHandleDiscoveryComplete(&amp;amp;psStackEvent-&amp;gt;uEvent.sNwkDiscoveryEvent);        break;     default:        DBG_vPrintf(TRUE, \"Handle ZDO event: event type %d\\n\", psStackEvent-&amp;gt;eType);        break;     } }  PUBLIC void APP_vBdbCallback(BDB_tsBdbEvent *psBdbEvent) {    switch(psBdbEvent-&gt;eEventType)    { ...    case BDB_EVENT_REJOIN_SUCCESS:        DBG_vPrintf(TRUE, \"BDB event callback: Network Join Successful\\n\");        break; ...    } } <\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c, \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0432\u0437\u043b\u0435\u0442\u0435\u0442\u044c \u0438&#8230;. \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u0410 \u0434\u0435\u043b\u043e \u0432\u043e\u0442 \u0432 \u0447\u0435\u043c. \u041c\u044b \u0443\u0436\u0435 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438\u0441\u044c \u043a \u0441\u0435\u0442\u0438, \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f ZPS_eAplZdoStartStack() \u044d\u0442\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0430 \u0432 EEPROM. \u041f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0441\u0442\u0430\u0440\u0442\u0435 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u0443\u043c\u0430\u0435\u0442, \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0443\u0436\u0435 \u0432 \u0441\u0435\u0442\u0438 \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c ZPS_eAplZdoStartStack() \u043a\u0430\u043a-\u0442\u043e \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0437\u043d\u0430\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043e \u043d\u0430\u0448\u0435\u0439 \u0441\u0435\u0442\u0438. \u041a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u0430\u043a.<\/p>\n<pre><code class=\"cpp\">   \/\/ Reset Zigbee stack to a very default state    ZPS_vDefaultStack();    ZPS_vSetKeys();    ZPS_eAplAibSetApsUseExtendedPanId(0);<\/code><\/pre>\n<p>\u0414\u0430, \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0442\u0438 \u0437\u0430\u043d\u043e\u0432\u043e, \u043d\u043e \u043c\u044b \u0441 \u044d\u0442\u0438\u043c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u043f\u043e\u0437\u0436\u0435. \u041a\u0441\u0442\u0430\u0442\u0438 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 zigbee2mqtt \u043d\u0443\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0443\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u0442\u043e\u043f\u0438\u043a zigbee2mqtt\/bridge\/request\/device\/remote \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c <code>{\u201cid\u201d:\u201d0x00158d0002b501a7\u201d, \u201cforce\u201d:true}<\/code> (\u043d\u0443 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0447\u0435\u0440\u0435\u0437 \u0434\u0430\u0448\u0431\u043e\u0440\u0434 Z2M)<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043f\u0440\u0438\u0447\u0435\u0441\u044b\u0432\u0430\u043d\u0438\u044f \u043b\u043e\u0433\u043e\u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0442\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/407\/d29\/bef\/407d29befbb48f08336a414762580190.png\" width=\"826\" height=\"522\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u0442\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e.&nbsp;<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0430\u043c \u0433\u043e\u0432\u043e\u0440\u044f\u0442, \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u043e\u0441\u044c \u043a \u0441\u0435\u0442\u0438. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0438\u0434\u0435\u0442 \u0441\u0435\u0440\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 DATA_CONFIRM \u0438 DATA_ACK. \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e<\/p>\n<ul>\n<li>\n<p>DATA_CONFIRM \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043f\u0430\u043a\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u044d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442 \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0443\u0437\u043b\u0443 \u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0435 (\u0443\u0437\u0435\u043b \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b \u043f\u0440\u0438\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u0430)<\/p>\n<\/li>\n<li>\n<p>\u0434\u0430\u043b\u0435\u0435 \u043f\u0430\u043a\u0435\u0442 \u0431\u044b\u043b \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044e (\u043d\u0435 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u043d\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0440\u044f\u0434\u043e\u043c \u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u0435\u043c. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0430\u043a\u0435\u0442\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u043a\u0430\u043a\u0430\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430).&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u0410 \u0432\u043e\u0442 \u043a\u043e\u0433\u0434\u0430 \u043f\u0430\u043a\u0435\u0442 \u0434\u043e\u0448\u0435\u043b \u0434\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f, \u0442\u043e\u0442 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u043b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c DATA_ACK (\u044d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442 \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u043c \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432)<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u0442\u0441\u044b\u043b\u043a\u0438 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 (\u043d\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0448\u043b\u0435\u0442 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435), \u043d\u043e \u043d\u0435 \u0432\u0438\u0434\u0438\u043c \u0441\u0430\u043c\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043c\u044b \u043d\u0435 \u0432\u0438\u0434\u0438\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0441\u0430\u043c\u0438\u043c \u0441\u0442\u0435\u043a\u043e\u043c ZigBee \u0442.\u043a. \u043e\u043d\u0438 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0434\u043e\u0448\u043b\u0438 \u0434\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f &#8212; \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0442\u043e\u0432.&nbsp;<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0447\u0435\u0445\u043b\u044f\u0442\u044c \u0441\u043d\u0438\u0444\u0444\u0435\u0440. \u042f \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0441\u0442\u0430\u0440\u0435\u043d\u044c\u043a\u0438\u043c \u0434\u043e\u043d\u0433\u043b\u043e\u043c \u043d\u0430 \u0431\u0430\u0437\u0435 CC2531, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443\u043b\u0438\u043d\u043e\u0439 <a href=\"https:\/\/github.com\/homewsn\/whsniff\" rel=\"noopener noreferrer nofollow\">whsniff <\/a>\u0434\u043b\u044f \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0438 wireshark \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9c7\/458\/ab1\/9c7458ab1766a11683986000c0461442.png\" width=\"1469\" height=\"584\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441 Beacon Request \u0438 \u0435\u043c\u0443 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432-\u0440\u043e\u0443\u0442\u0435\u0440\u043e\u0432 \u043d\u0435\u043f\u043e\u0434\u0430\u043b\u0435\u043a\u0443 (\u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u044d\u0442\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0438 Xiaomi \u043d\u0430 \u0431\u0430\u0437\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0436\u0435 JN5169). \u0422\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e, \u0447\u0442\u043e \u0442\u0432\u043e\u0440\u0438\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043a\u0430\u043d\u0430\u043b\u0435 \u043c\u043e\u0435\u0439 ZigBee \u0441\u0435\u0442\u0438. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 Beacon Request \u0431\u044b\u043b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u0430\u043d\u0430\u043b\u044b, \u0438 \u0442\u0430\u043c \u0442\u043e\u0436\u0435 \u0431\u044b\u043b\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442 \u0448\u043b\u044e\u0437\u0430 Xiaomi). \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 network discovery, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0434\u0435\u043b\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f ZPS_eAplZdoStartStack(). \u0412 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u044b \u043e\u0442 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u043d\u0430\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 ZPS_EVENT_NWK_DISCOVERY_COMPLETE (\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0432\u044b\u0437\u043e\u0432\u0443 vHandleDiscoveryComplete()).<\/p>\n<p>\u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0434\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e ZPS_eAplZdoJoinNetwork(). \u0412 \u0441\u043d\u0438\u0444\u0444\u0435\u0440\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f3b\/eae\/3ed\/f3beae3ed29bb3baa5aa558c045e1ede.png\" width=\"1591\" height=\"1100\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0443\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0432\u0435\u0449\u0435\u0439<\/p>\n<ul>\n<li>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 (Association request).&nbsp;<\/p>\n<ul>\n<li>\n<p>\u041a \u044d\u0442\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0435\u0449\u0435 \u043d\u0435\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0432 \u0441\u0435\u0442\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u044b\u043c MAC \u0430\u0434\u0440\u0435\u0441\u043e\u043c.&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0435 \u043a \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0443, \u0430 \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u0440\u043e\u0443\u0442\u0435\u0440\u043e\u0432 \u0441\u0435\u0442\u0438 (0x2528)<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0420\u043e\u0443\u0442\u0435\u0440 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c Association Response, \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043d\u0430\u0448\u0435\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \u0430\u0434\u0440\u0435\u0441 0xcfc2<\/p>\n<\/li>\n<li>\n<p>\u0420\u043e\u0443\u0442\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/p>\n<ul>\n<li>\n<p>\u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u043a \u043d\u043e\u0432\u043e\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 0xcfc2<\/p>\n<\/li>\n<li>\n<p>\u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e 0xcfc2 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043b\u043e\u0441\u044c \u043a \u0441\u0435\u0442\u0438<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041a \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u0435\u0449\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u043e\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0441\u0435\u0442\u0438. \u041f\u0440\u0438\u0447\u0435\u043c \u044d\u0442\u0430 \u043f\u043e\u0441\u044b\u043b\u043a\u0430 \u043d\u0435 \u043f\u0440\u044f\u043c\u0430\u044f, \u0430 \u0447\u0435\u0440\u0435\u0437 2 \u043f\u0440\u044b\u0436\u043a\u0430 &#8212; 0x0000-&gt;0x2528-&gt;0xcfc2&nbsp; (\u0441\u043d\u0438\u0444\u0444\u0435\u0440 \u0432\u0438\u0434\u0438\u0442 \u043e\u0431\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f)<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u043b\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0432\u0441\u0435\u043c\u0438 \u0440\u043e\u0443\u0442\u0435\u0440\u0430\u043c\u0438 \u0432 \u0441\u0435\u0442\u0438 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043d\u043e\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 (\u044d\u0442\u0438\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0431\u044b\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e, \u044f \u043d\u0435 \u0441\u0442\u0430\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442)<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0432\u043e\u043b\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043e \u0442\u043e\u043c \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0437\u0430\u044f\u0432\u0438\u043b\u043e \u043e \u0441\u0435\u0431\u0435 (Device Announcement) \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u043a\u0430\u043a\u0438\u0435 \u0443 \u043d\u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0442\u043e \u044d\u0442\u043e Full Functional Device \u0441 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u0435\u043c)<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4fe\/718\/797\/4fe718797494da497fa8523dcb03b127.png\" width=\"1590\" height=\"1100\"><figcaption><\/figcaption><\/figure>\n<p>\u0421 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 zigbee2mqtt \u0443\u0437\u043d\u0430\u0435\u0442 \u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e. \u042d\u0442\u043e \u0441\u0435\u0440\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a \u043d\u043e\u0432\u043e\u043c\u0443 \u0443\u0437\u043b\u0443 \u0441\u0435\u0442\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/171\/9a2\/629\/1719a2629a494b21f8e910ca3094e8c9.png\" width=\"1591\" height=\"1100\"><figcaption><\/figcaption><\/figure>\n<p>\u0410 \u0442\u0443\u0442 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0442\u0435 \u0441\u0430\u043c\u044b\u0435 3 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0438 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 &#8212; Node Descriptor, Active Endpoint, \u0438 Simple Descriptor. \u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0438\u0445 \u0447\u0443\u0442\u043e\u0447\u043a\u0443 \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>\u0421 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u043c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u043c \u0441\u0435\u0442\u0438. \u0412 \u043b\u043e\u0433\u0430\u0445 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u0438, \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0432\u044f\u0437\u0438. \u041d\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043a \u0441\u0435\u0442\u0438, \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a, \u0432\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e.<\/p>\n<h2>\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/h2>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043a \u0441\u0435\u0442\u0438 \u043c\u044b, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438. \u0422\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0435 zigbee2mqtt \u043f\u043e\u043a\u0430 \u043d\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8e4\/091\/377\/8e4091377a0e7d2e179f7c749074cac2.png\" width=\"662\" height=\"554\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u043a\u043b\u0430\u0434\u043a\u0430 Exposes \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0443\u0441\u0442\u0430. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0432\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c Xiaomi. \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u0435\u0431\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432 \u0446\u0435\u043b\u043e\u043c \u0440\u044f\u0434\u0443 \u043f\u043e\u043b\u0435\u0439. \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u0438 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c\/\u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u0430\u043d\u0430\u043b \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f.  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5a6\/c55\/1ad\/5a6c551ad1022691af2e7b560883f925.png\" width=\"769\" height=\"712\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1de\/ee0\/b2d\/1deee0b2df0b3666ed52744e375f2b5c.png\" width=\"708\" height=\"652\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0432 \u0441\u0435\u0442\u044c ZigBee, \u0438 \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0432 zigbee2mqtt. \u041a\u043e\u0433\u0434\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0441\u0435\u0442\u0438, \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440 (\u0438\u043b\u0438 z2m? \u044f \u0442\u043e\u0447\u043d\u043e \u043d\u0435 \u0437\u043d\u0430\u044e) \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u044c\u044e. \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \u043f\u043e\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043e\u0442\u0432\u0435\u0447\u0430\u044f \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u0435\u0431\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c.&nbsp;<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c \u0433\u0434\u0435, \u043a\u0430\u043a, \u0438 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0432 zigbee2mqtt \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b Z2M. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0441\u043d\u0438\u0444\u0444\u0435\u0440\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f Xiaomi. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c Z2M \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 Node Descriptor. \u042d\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u0430\u043a \u0443\u0437\u0435\u043b \u0441\u0435\u0442\u0438 ZigBee &#8212; \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0438 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0431\u0443\u0444\u0435\u0440\u043e\u0432, \u0432\u0435\u0440\u0441\u0438\u044e ZigBee \u0441\u0442\u0435\u043a\u0430. \u041a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043e\u0431\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u044b\u0434\u0430\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 Node Descriptor (\u0441 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043e MAC \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432).<\/p>\n<pre><code>ZigBee Device Profile, Node Descriptor Response, Rev: 22, Nwk Addr: 0x183c, Status: Success     Sequence Number: 52     Status: Success (0)     Nwk Addr of Interest: 0x183c     Node Descriptor         .... .... .... .001 = Type: 1 (Router)         .... .... .... 0... = Complex Descriptor: False         .... .... ...0 .... = User Descriptor: False         .... 0... .... .... = 868MHz BPSK Band: False         ..0. .... .... .... = 902MHz BPSK Band: False         .1.. .... .... .... = 2.4GHz OQPSK Band: True         0... .... .... .... = EU Sub-GHz FSK Band: False         Capability Information: 0x8e             .... ...0 = Alternate Coordinator: False             .... ..1. = Full-Function Device: True             .... .1.. = AC Power: True             .... 1... = Rx On When Idle: True             .0.. .... = Security Capability: False             1... .... = Allocate Short Address: True         Manufacturer Code: 0x1037         Max Buffer Size: 127         Max Incoming Transfer Size: 100         Server Flags: 0x2c00             .... .... .... ...0 = Primary Trust Center: False             .... .... .... ..0. = Backup Trust Center: False             .... .... .... .0.. = Primary Binding Table Cache: False             .... .... .... 0... = Backup Binding Table Cache: False             .... .... ...0 .... = Primary Discovery Cache: False             .... .... ..0. .... = Backup Discovery Cache: False             .... .... .0.. .... = Network Manager: False             0010 110. .... .... = Stack Compliance Revision: 22         Max Outgoing Transfer Size: 100         Descriptor Capability Field: 0x00             .... ...0 = Extended Active Endpoint List Available: False             .... ..0. = Extended Simple Descriptor List Available: False<\/code><\/pre>\n<p>\u0414\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u044b \u0443 \u043c\u0435\u043d\u044f \u0438 \u0443 Xiaomi \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0434\u0432\u0443\u0445 \u043f\u043e\u043b\u044f\u0445<\/p>\n<ul>\n<li>\n<p>Manufacturer Code, \u0447\u0442\u043e \u0432 \u0446\u0435\u043b\u043e\u043c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e &#8212; \u0443 \u043d\u0438\u0445 Xiaomi, \u0443 \u043c\u0435\u043d\u044f NXP (\u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430). \u0412\u043f\u0440\u043e\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0438 \u043d\u0430 \u0447\u0442\u043e \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u043b\u0438\u044f\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>Stack Compliance Revision: 22 (\u0443 Xiaomi 0). \u041d\u043e \u0441\u0443\u0434\u044f \u043f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 22 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043d\u043e\u0432\u0443\u044e \u0440\u0435\u0432\u0438\u0437\u0438\u044e \u0441\u0442\u0435\u043a\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Active Endpoint Request, \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0432\u043e\u0438\u0445 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a.<\/p>\n<pre><code>ZigBee Device Profile, Active Endpoint Response, Nwk Addr: 0x183c, Status: Success     Sequence Number: 53     Status: Success (0)     Nwk Addr of Interest: 0x183c     Endpoint Count: 1     Active Endpoint List         Endpoint: 1<\/code><\/pre>\n<p>\u0416\u0435\u043b\u0435\u0437\u044f\u043a\u0430 \u043e\u0442 Xiaomi \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0430\u0436 \u0446\u0435\u043b\u044b\u0445 7 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a. \u0423 \u043d\u0430\u0441 \u043f\u043e\u043a\u0430, \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e, \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u043d\u0430.<\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, Simple Descriptor \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0438 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432. \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440 \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 (\u0442.\u0435. \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 Xiaomi \u0446\u0435\u043b\u044b\u0445 7 \u0448\u0442\u0443\u043a). \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u0443 \u043a\u0438\u0442\u0430\u0439\u0446\u0435\u0432.<\/p>\n<pre><code>ZigBee Device Profile, Simple Descriptor Response, Nwk Addr: 0xb006, Status: Success     Sequence Number: 224     Status: Success (0)     Nwk Addr of Interest: 0xb006     Simple Descriptor Length: 30     Simple Descriptor         Endpoint: 1         Profile: Home Automation (0x0104)         Application Device: Unknown (0x0051)         Application Version: 0x0001         Input Cluster Count: 9         Input Cluster List             Input Cluster: Basic (0x0000)             Input Cluster: Groups (0x0004)             Input Cluster: Identify (0x0003)             Input Cluster: On\/Off (0x0006)             Input Cluster: Binary Output (Basic) (0x0010)             Input Cluster: Scenes (0x0005)             Input Cluster: Time (0x000a)             Input Cluster: Power Configuration (0x0001)             Input Cluster: Device Temperature Configuration (0x0002)         Output Cluster Count: 2         Output Cluster List             Output Cluster: OTA Upgrade (0x0019)             Output Cluster: Time (0x000a)<\/code><\/pre>\n<p>\u0410 \u0432\u043e\u0442 \u0442\u0430\u043a \u0443 \u043d\u0430\u0441<\/p>\n<pre><code>ZigBee Device Profile, Simple Descriptor Response, Nwk Addr: 0x183c, Status: Success     Sequence Number: 54     Status: Success (0)     Nwk Addr of Interest: 0x183c     Simple Descriptor Length: 20     Simple Descriptor         Endpoint: 1         Profile: ZigBee Device Profile (0x0000)         Application Device: 0x0000         Application Version: 0x0000         Input Cluster Count: 3         Input Cluster List             Input Cluster: Basic (0x0000)             Input Cluster: Identify (0x0003)             Input Cluster: On\/Off (0x0006)         Output Cluster Count: 3         Output Cluster List             Output Cluster: Basic (0x0000)             Output Cluster: Identify (0x0003)             Output Cluster: On\/Off (0x0006)<\/code><\/pre>\n<p>\u0423 \u043d\u0430\u0441, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u043e\u0441\u043a\u0440\u043e\u043c\u043d\u0435\u0435, \u043d\u043e \u0432\u0440\u043e\u0434\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0430 \u0441\u0432\u0435\u0442\u0435. \u0422\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0442 \u044d\u0442\u0438 3 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p>\u0421\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u044f \u043d\u0430\u0448\u0435\u043b \u043e\u0434\u043d\u043e \u0432\u0430\u0436\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 &#8212; Profile: Home Automation (0x0104) (\u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 0). \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e Z2M \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c \u0447\u0442\u043e \u0436\u0435 \u0437\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0435\u043c\u0443 \u043f\u043e\u0434\u0441\u0443\u043d\u0443\u043b\u0438. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 HelloZigbee.zpscfg (\u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043b\u0438\u0431\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 XML). \u041d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ZPSConfig.exe.&nbsp;<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438 \u0432\u0438\u0434\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 &#8212; \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440 \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435, \u043d\u043e \u043f\u043e\u043a\u0430 \u0432 \u043b\u043e\u0433\u0435 \u0432\u0438\u0434\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u043e\u0435.<\/p>\n<pre><code>AF event callback: endpoint 1, event 1 AF event callback: freeing up data event APDU<\/code><\/pre>\n<p>\u041d\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0443\u0436\u0435 \u043d\u0430\u043b\u0430\u0436\u0435\u043d, \u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432 vAppHandleAfEvent() \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0434\u0443\u0442 \u0432 ZDO (\u043d\u0443\u043b\u0435\u0432\u0430\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430) \u043e\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0435\u0440\u0432\u043e\u0439). \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043b\u0438\u0431\u043e \u0432&nbsp; vAppHandleZdoEvents() \u043b\u0438\u0431\u043e vAppHandleZclEvents().<\/p>\n<pre><code class=\"cpp\">PRIVATE void vAppHandleAfEvent(BDB_tsZpsAfEvent *psZpsAfEvent) {    \/\/ Dump the event for debug purposes    vDumpAfEvent(&amp;psZpsAfEvent-&gt;sStackEvent);     if(psZpsAfEvent-&gt;u8EndPoint == HELLOZIGBEE_ZDO_ENDPOINT)    {        \/\/ events for ep 0        vAppHandleZdoEvents(&amp;psZpsAfEvent-&gt;sStackEvent);    }    else if(psZpsAfEvent-&gt;u8EndPoint == HELLOZIGBEE_SWITCH_ENDPOINT &amp;&amp;            psZpsAfEvent-&gt;sStackEvent.eType == ZPS_EVENT_APS_DATA_INDICATION)    {        vAppHandleZclEvents(&amp;psZpsAfEvent-&gt;sStackEvent);    }    else if (psZpsAfEvent-&gt;sStackEvent.eType != ZPS_EVENT_APS_DATA_CONFIRM &amp;&amp;             psZpsAfEvent-&gt;sStackEvent.eType != ZPS_EVENT_APS_DATA_ACK)    {        DBG_vPrintf(TRUE, \"AF event callback: endpoint %d, event %d\\n\", psZpsAfEvent-&gt;u8EndPoint, psZpsAfEvent-&gt;sStackEvent.eType);    }     \/\/ Ensure Freeing of APDUs    if(psZpsAfEvent-&gt;sStackEvent.eType == ZPS_EVENT_APS_DATA_INDICATION)        PDUM_eAPduFreeAPduInstance(psZpsAfEvent-&gt;sStackEvent.uEvent.sApsDataIndEvent.hAPduInst); }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u044f \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b \u0432 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438, \u0431\u041e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438 \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Zigbee Cluster Library (ZCL). \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c, \u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 ZCL. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0441\u0443\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 vAppHandleZclEvents() \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a ZCL (\u043b\u0443\u0447\u0438 \u043a\u0440\u043e\u0432\u0430\u0432\u043e\u0433\u043e \u043f\u043e\u043d\u043e\u0441\u0430 \u0442\u043e\u043c\u0443 \u0447\u0443\u0434\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0432 \u043e\u0431\u0435\u0440\u0442\u043a\u0443, \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0434\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b\u043e\u0441\u044c \u0432\u043d\u0443\u0442\u0440\u0438 vZCL_EventHandler() \u0438 \u043f\u043e\u0448\u043b\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0432\u0438\u0434\u0435).<\/p>\n<pre><code class=\"cpp\">PRIVATE void vAppHandleZclEvents(ZPS_tsAfEvent* psStackEvent) {    tsZCL_CallBackEvent sCallBackEvent;    sCallBackEvent.pZPSevent = psStackEvent;    sCallBackEvent.eEventType = E_ZCL_CBET_ZIGBEE_EVENT;    vZCL_EventHandler(&amp;sCallBackEvent); }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438 \u0432\u044b\u044f\u0441\u043d\u044f\u0435\u043c, \u0447\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 ZCL \u0438 \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u044e\u0442 \u043a \u043d\u0430\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c\u0438 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438 \u0432 APP_ZCL_cbEndpointCallback(). \u041d\u0443\u0436\u043d\u043e \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0449\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u0442\u0443\u0434\u0430.<\/p>\n<pre><code class=\"cpp\">PRIVATE void APP_ZCL_cbEndpointCallback(tsZCL_CallBackEvent *psEvent) {    switch (psEvent-&gt;eEventType)    {        case E_ZCL_CBET_READ_REQUEST:            vDumpZclReadRequest(psEvent);            break; ...<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0441\u044f \u043e\u0434\u0438\u043d \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. ZCL \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 <em>\u043f\u0435\u0440\u0435\u0434<\/em> \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u043e \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a ZCL \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442 \u044d\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0438\u0445 \u0432\u043e\u043f\u0440\u043e\u0448\u0430\u044e\u0449\u0435\u043c\u0443. \u0422.\u0435. \u0435\u0449\u0435 \u0440\u0430\u0437\u043e\u043a, \u043d\u0430\u0448 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u0442\u043e\u0432\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u043d\u0438 \u0432 \u043d\u0435\u0434\u0440\u0430\u0445 ZCL.&nbsp;<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043b\u043e\u0433\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441, \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u043c \u043f\u043e\u043a\u0430 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u043d\u0430\u043c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0443 \u043d\u0430\u0441 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0432\u044b\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u043e \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<pre><code class=\"cpp\">PRIVATE void vDumpZclReadRequest(tsZCL_CallBackEvent *psEvent) {    \/\/ Read command header    tsZCL_HeaderParams headerParams;    uint16 inputOffset = u16ZCL_ReadCommandHeader(psEvent-&gt;pZPSevent-&gt;uEvent.sApsDataIndEvent.hAPduInst,                                              &amp;headerParams);     \/\/ read input attribute Id    uint16 attributeId;    inputOffset += u16ZCL_APduInstanceReadNBO(psEvent-&gt;pZPSevent-&gt;uEvent.sApsDataIndEvent.hAPduInst,                                              inputOffset,                                              E_ZCL_ATTRIBUTE_ID,                                              &amp;attributeId);      DBG_vPrintf(TRUE, \"ZCL Read Attribute: EP=%d Cluster=%04x Command=%02x Attr=%04x\\n\",                psEvent-&gt;u8EndPoint,                psEvent-&gt;pZPSevent-&gt;uEvent.sApsDataIndEvent.u16ClusterId,                headerParams.u8CommandIdentifier,                attributeId); } <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0432\u0437\u043b\u0435\u0442\u0435\u0442\u044c.<\/p>\n<pre><code class=\"cpp\">BDB event callback: Network Join Successful ZPS_EVENT_NWK_JOINED_AS_ROUTER: Addr=d9fa, rejoin=0, secured rejoin=0 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=0 DstEP=0 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=0 DrcEP=0 DstAddr=0000 Profile=0000 Cluster=8002 ZPS_EVENT_NWK_STATUS_INDICATION: Addr:0000 Status:11 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=0 DstEP=0 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=0 DrcEP=0 DstAddr=0000 Profile=0000 Cluster=8005 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=0 DstEP=0 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=0 DrcEP=0 DstAddr=0000 Profile=0000 Cluster=8004 ZPS_EVENT_NWK_STATUS_INDICATION: Addr:0000 Status:11 ZPS_EVENT_NWK_STATUS_INDICATION: Addr:0000 Status:11  ZPS_EVENT_APS_DATA_INDICATION: SrcEP=1 DstEP=1 SrcAddr=0000 Cluster=0000 Status=0 ZCL Read Attribute: EP=1 Cluster=0000 Command=00 Attr=0005 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=1 DstEP=1 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=1 DrcEP=1 DstAddr=0000 Profile=0104 Cluster=0000  ZPS_EVENT_APS_DATA_INDICATION: SrcEP=1 DstEP=1 SrcAddr=0000 Cluster=0000 Status=0 ZCL Read Attribute: EP=1 Cluster=0000 Command=00 Attr=0004 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=1 DstEP=1 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=1 DrcEP=1 DstAddr=0000 Profile=0104 Cluster=0000  ZPS_EVENT_APS_DATA_INDICATION: SrcEP=1 DstEP=1 SrcAddr=0000 Cluster=0000 Status=0 ZCL Read Attribute: EP=1 Cluster=0000 Command=00 Attr=0007 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=1 DstEP=1 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=1 DrcEP=1 DstAddr=0000 Profile=0104 Cluster=0000  ZPS_EVENT_APS_DATA_INDICATION: SrcEP=1 DstEP=1 SrcAddr=0000 Cluster=0000 Status=0 ZCL Read Attribute: EP=1 Cluster=0000 Command=00 Attr=0000 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=1 DstEP=1 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=1 DrcEP=1 DstAddr=0000 Profile=0104 Cluster=0000  ZPS_EVENT_APS_DATA_INDICATION: SrcEP=1 DstEP=1 SrcAddr=0000 Cluster=0000 Status=0 ZCL Read Attribute: EP=1 Cluster=0000 Command=00 Attr=0001 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=1 DstEP=1 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=1 DrcEP=1 DstAddr=0000 Profile=0104 Cluster=0000 ZPS_EVENT_NWK_STATUS_INDICATION: Addr:0000 Status:11  ZPS_EVENT_APS_DATA_INDICATION: SrcEP=1 DstEP=1 SrcAddr=0000 Cluster=0000 Status=0 ZCL Read Attribute: EP=1 Cluster=0000 Command=00 Attr=0002 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=1 DstEP=1 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=1 DrcEP=1 DstAddr=0000 Profile=0104 Cluster=0000  ZPS_EVENT_APS_DATA_INDICATION: SrcEP=1 DstEP=1 SrcAddr=0000 Cluster=0000 Status=0 ZCL Read Attribute: EP=1 Cluster=0000 Command=00 Attr=0003 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=1 DstEP=1 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=1 DrcEP=1 DstAddr=0000 Profile=0104 Cluster=0000  ZPS_EVENT_APS_DATA_INDICATION: SrcEP=1 DstEP=1 SrcAddr=0000 Cluster=0000 Status=0 ZCL Read Attribute: EP=1 Cluster=0000 Command=00 Attr=0006 ZPS_EVENT_NWK_STATUS_INDICATION: Addr:0000 Status:11 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=1 DstEP=1 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=1 DrcEP=1 DstAddr=0000 Profile=0104 Cluster=0000  ZPS_EVENT_APS_DATA_INDICATION: SrcEP=1 DstEP=1 SrcAddr=0000 Cluster=0000 Status=0 ZCL Read Attribute: EP=1 Cluster=0000 Command=00 Attr=4000 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=1 DstEP=1 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=1 DrcEP=1 DstAddr=0000 Profile=0104 Cluster=0000<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u044f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043f\u0430\u043a\u0435\u0442\u044b (DATA_INDICATION), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u0430\u0440\u0435\u043d\u044b ZCL \u0432 \u0437\u0430\u043f\u0440\u043e\u0441 ZCL Read Attribute. \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0441\u043a\u0430\u0437\u0430\u043b, ZCL \u0441\u0430\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0447\u0442\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 \u043f\u043e \u0441\u0435\u0442\u0438 (\u043d\u0430\u0448\u0435 \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043b\u043e\u0433\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u043a\u0442\u0430). \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0439 DATA_CONFIRM \u0438 DATA_ACK.<\/p>\n<p>\u041d\u043e \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0434\u0430\u043d\u043d\u044b\u043c. \u041c\u044b \u0432\u0438\u0434\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 0000 (Basic Cluster) \u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0441 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438 0-7. \u042d\u0442\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0438\u043c\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0438\u043c\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0432\u0435\u0440\u0441\u0438\u044e \u0436\u0435\u043b\u0435\u0437\u0430 \u0438 \u0441\u043e\u0444\u0442\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0438\u0442\u0430\u043d\u0438\u044f. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u044b\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b, \u0432 zigbee2mqtt \u044d\u0442\u043e \u0434\u043e\u0435\u0445\u0430\u043b\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/706\/e9d\/4c5\/706e9d4c5f2b6013023b6acd0b0bab25.png\" width=\"681\" height=\"634\"><figcaption><\/figcaption><\/figure>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043d\u0438\u0444\u0444\u0435\u0440\u043e\u043c, \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0431\u0430\u0439\u0442\u044b. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f. \u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0438\u0441\u043a\u043e\u0432 \u044f \u043f\u0440\u0438\u0448\u0435\u043b \u0432 \u0444\u0430\u0439\u043b zcl_options.h \u0433\u0434\u0435 \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c (\u044f \u0432\u043a\u043b\u044e\u0447\u0438\u043b \u0432\u0441\u0435 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043b\u0438\u0441\u044c zigbee2mqtt, \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u043b \u0434\u0440\u0443\u0433\u0438\u0435), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u044d\u0442\u0438\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 (\u043e\u0431 \u044d\u0442\u043e\u043c \u043d\u0438\u0436\u0435).<\/p>\n<pre><code class=\"cpp\">#define   CLD_BAS_ATTR_APPLICATION_VERSION #define   CLD_BAS_ATTR_STACK_VERSION #define   CLD_BAS_ATTR_HARDWARE_VERSION #define   CLD_BAS_ATTR_MANUFACTURER_NAME #define   CLD_BAS_ATTR_MODEL_IDENTIFIER #define   CLD_BAS_ATTR_DATE_CODE #define   CLD_BAS_ATTR_SW_BUILD_ID #define   CLD_BAS_ATTR_GENERIC_DEVICE_CLASS #define   CLD_BAS_ATTR_GENERIC_DEVICE_TYPE  #define CLD_BAS_APP_VERSION         (1) #define CLD_BAS_STACK_VERSION       (2) #define CLD_BAS_HARDWARE_VERSION    (1) #define CLD_BAS_MANUF_NAME_STR      \"NXP\" #define CLD_BAS_MANUF_NAME_SIZE     3 #define CLD_BAS_MODEL_ID_STR        \"Hello Zigbee Switch\" #define CLD_BAS_MODEL_ID_SIZE       19 #define CLD_BAS_DATE_STR            \"20210331\" #define CLD_BAS_DATE_SIZE           8 #define CLD_BAS_POWER_SOURCE        E_CLD_BAS_PS_SINGLE_PHASE_MAINS #define CLD_BAS_SW_BUILD_STR        \"v0.1\" #define CLD_BAS_SW_BUILD_SIZE       4 #define CLD_BAS_DEVICE_CLASS        (0)<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0436\u0435 \u044f \u201c\u043b\u044e\u0431\u043b\u044e\u201d \u044f\u0437\u044b\u043a \u0421, \u0433\u0434\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0443\u043a\u0430\u043c\u0438 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a. strlen() \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0443\u0442 \u043d\u0435\u043b\u044c\u0437\u044f, \u0442.\u043a. \u044d\u0442\u043e\u0442 \u0445\u0435\u0434\u0435\u0440 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u044b \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u0438 \u0442\u0430\u043c \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e #include.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0433\u0434\u0435-\u0442\u043e \u0432 vAppMain() \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0441\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<pre><code class=\"cpp\">   \/\/Fill Basic cluster attributes    memcpy(sSwitch.sBasicServerCluster.au8ManufacturerName, CLD_BAS_MANUF_NAME_STR, CLD_BAS_MANUF_NAME_SIZE);    memcpy(sSwitch.sBasicServerCluster.au8ModelIdentifier, CLD_BAS_MODEL_ID_STR, CLD_BAS_MODEL_ID_SIZE);    memcpy(sSwitch.sBasicServerCluster.au8DateCode, CLD_BAS_DATE_STR, CLD_BAS_DATE_SIZE);    memcpy(sSwitch.sBasicServerCluster.au8SWBuildID, CLD_BAS_SW_BUILD_STR, CLD_BAS_SW_BUILD_SIZE);    sSwitch.sBasicServerCluster.eGenericDeviceType = E_CLD_BAS_GENERIC_DEVICE_TYPE_WALL_SWITCH;<\/code><\/pre>\n<p>\u0412\u0443\u0430\u043b\u044f, \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432 zigbee2mqtt. \u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0442\u044f\u043d\u0443\u043b\u0438\u0441\u044c \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f. \u0421\u0442\u0430\u0442\u0443\u0441 unsupported \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e zigbee2mqtt \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442 \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c, \u043d\u043e \u0432\u043e \u0432\u0441\u044f\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043e\u0442\u0432\u0435\u0442\u044b \u043e\u0442 \u0436\u0435\u043b\u0435\u0437\u043a\u0438 \u043e\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/144\/99b\/19c\/14499b19cbfd0e02d36a73e2e1f6f3b9.png\" width=\"655\" height=\"634\"><figcaption><\/figcaption><\/figure>\n<h2>\u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0443\u043c\u0435\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0442\u0438, \u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u0435\u0431\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c. \u041d\u043e \u0432\u043e\u0442 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435\u043c \u043e\u043d\u043e \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0441\u0442\u0430\u043b\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>\u041f\u043e \u043f\u0440\u0430\u0432\u0434\u0435 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u044f \u0437\u0430\u043b\u0438\u043f \u043d\u0430 \u043d\u0435\u0434\u0435\u043b\u044e. \u0421\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0442\u0441\u044b\u043b\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043a\u043d\u043e\u043f\u043a\u0438, \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0438. \u041d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u044f\u0441\u043d\u043e \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c. \u0414\u0435\u043b\u043e \u0432\u043e\u0442 \u0432 \u0447\u0435\u043c.<\/p>\n<p>\u041a\u0430\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u043f\u0440\u0438\u043c\u0435\u0440 JN-AN-1219-Zigbee-3-0-Controller-and-Switch \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u0430\u043a \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043c\u0435\u044e\u0442 \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f <strong>\u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c<\/strong>. \u0422.\u0435. \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u043a\u043b\/\u0432\u044b\u043a\u043b, \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 \u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438, \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433 \u0443 \u0434\u0440\u0443\u0433\u0430 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435.&nbsp;<\/p>\n<p>\u041d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Xiaomi) \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u0442\u0430\u043a. \u041e\u043d\u0438 \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f <strong>\u043d\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u0430 \u0441 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u043e\u043c<\/strong> \u043a\u0430\u043a \u0441 \u043c\u043e\u0437\u0433\u043e\u043c \u0441\u0435\u0442\u0438, \u043e\u0442\u0441\u044b\u043b\u0430\u044f \u0435\u043c\u0443 \u043e\u0442\u0447\u0435\u0442\u044b \u043e \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043a\u043b\u0430\u0432\u0438\u0448, \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u0448\u043b\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u201c\u0432\u043a\u043b\u044e\u0447\u0438\u0441\u044c\u201d (\u0445\u043e\u0442\u044f \u0431\u044b \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043a\u0430\u043a\u043e\u0439 \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043b\u0430\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443). \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043e\u043d \u0448\u043b\u0435\u0442 \u043e\u0442\u0447\u0435\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u201c\u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0412\u041a\u041b\u042e\u0427\u0415\u041d\u041e\u201d, \u0430 \u0443\u0436\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440 \u0434\u0443\u043c\u0430\u0435\u0442 \u0447\u0442\u043e \u0441 \u044d\u0442\u0438\u043c \u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e \u0432 \u043a\u043e\u0434\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 Zigbee Class Library \u0435\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u201c\u0432\u043a\u043b\u044e\u0447\u0438 \u0441\u0432\u0435\u0442 \u0432\u043e\u043d \u0443 \u0442\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u201d, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043d\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0440\u043e\u0434\u0435 \u201c\u0432\u043a\u043b\u044e\u0447\u0438 \u0441\u0432\u0435\u0442 \u0443 \u0441\u0435\u0431\u044f\u201d \u0438 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. (\u043a\u0441\u0442\u0430\u0442\u0438 \u0433\u043e\u0432\u043e\u0440\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0442\u043e \u0435\u0441\u0442\u044c &#8212; eCLD_OnOffSetState. \u0422\u043e\u043b\u044c\u043a\u043e \u043e\u043d\u0430 \u043d\u0435 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u0430 \u0432 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438).<\/p>\n<p>\u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0441\u043f\u0430\u0441 \u043f\u0440\u0438\u043c\u0435\u0440 JN-AN-1220-Zigbee-3-0-Sensors \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0434\u0440\u0443\u0433\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e ZigBee \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u041c\u0430\u043b\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 \u043d\u0435\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u0438\u0441\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u043e\u0442\u0441\u044b\u043b\u043a\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u0432, \u0442\u0430\u043a \u0438 \u043a\u043e\u0434 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439, \u0447\u0435\u043c \u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0435\u043c. \u042f \u0441\u043c\u0435\u043b\u043e \u043c\u043e\u0433\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u0441\u0435\u043d\u0441\u043e\u0440\u0430\u043c\u0438 \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f ZigBee \u043e\u0442 NXP &#8212; \u043a\u043e\u0434\u0430 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435, \u043e\u043d \u043b\u0443\u0447\u0448\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d, \u0440\u0430\u0437\u0431\u0438\u0442 \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0447\u0438\u043a\u0438, \u0438 \u0432 \u0446\u0435\u043b\u043e\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u0447.&nbsp;<\/p>\n<p>\u0418 \u0445\u043e\u0442\u044f \u0438\u0437 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u043a\u0430\u043a\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440. \u0410 \u0434\u0435\u043b\u043e \u0431\u044b\u043b\u043e \u0432\u043e\u0442 \u0432 \u0447\u0435\u043c.&nbsp;<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f ZigBee Cluster Library \u043e\u0442 NXP \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 &#8212; \u043b\u0430\u043c\u043f\u043e\u0447\u0435\u043a, \u0442\u0435\u0440\u043c\u043e\u043c\u0435\u0442\u0440\u043e\u0432, \u0441\u0435\u043d\u0441\u043e\u0440\u043e\u0432, \u0438 \u043f\u0440\u043e\u0447\u0435\u0433\u043e. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044f \u0434\u0435\u043b\u0430\u044e \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c, \u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u044b \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u044f \u0432\u044b\u0431\u0440\u0430\u043b OnOffLightSwitchDevice. \u0422\u0430\u043a \u0432\u043e\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u0431\u044b\u043b\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f ZCL \u044d\u0442\u043e <em>\u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0435<\/em> \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. \u0412\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f (\u0432\u043e \u0432\u0441\u044f\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 OnOff) \u0443 \u043d\u0435\u0433\u043e \u043d\u0435\u0442. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u044d\u0442\u043e OnOffLightDevice (\u043d\u0435 Switch) &#8212; \u044d\u0442\u043e <em>\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0435 <\/em>\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u043c\u0435\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 On\/Off. \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u0435\u0441\u043b\u0438 \u043e\u043d \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\/\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u0440\u0430\u0442\u043a\u043e\u0439 \u044d\u043a\u0441\u043a\u0443\u0440\u0441\u0438\u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u043e\u0434 \u043e\u043f\u0440\u043e\u0441\u0430 \u043a\u043d\u043e\u043f\u043e\u043a \u0438 \u043c\u043e\u0440\u0433\u0430\u043d\u0438\u044f \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0438. \u041a\u043d\u043e\u043f\u043a\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437 \u0432 10\u043c\u0441 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f 2 \u0432\u0438\u0434\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 &#8212; \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0438 \u0434\u043b\u0438\u043d\u043d\u043e\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u0435.<\/p>\n<pre><code class=\"cpp\">PUBLIC void buttonScanFunc(void *pvParam) {    static int duration = 0;     uint32 input = u32AHI_DioReadInput();    bool btnState = (input &amp; BOARD_BTN_PIN) == 0;     if(btnState)    {        duration++;        DBG_vPrintf(TRUE, \"Button still pressed for %d ticks\\n\", duration);    }    else    {        \/\/ detect long press        if(duration &gt; 200)        {            DBG_vPrintf(TRUE, \"Button released. Long press detected\\n\");            ButtonPressType value = BUTTON_LONG_PRESS;            ZQ_bQueueSend(&amp;buttonQueueHandle, (uint8*)&amp;value);        }         \/\/ detect short press        else if(duration &gt; 5)        {            DBG_vPrintf(TRUE, \"Button released. Short press detected\\n\");            ButtonPressType value = BUTTON_SHORT_PRESS;            ZQ_bQueueSend(&amp;buttonQueueHandle, &amp;value);        }         duration = 0;    }     ZTIMER_eStart(buttonScanTimerHandle, ZTIMER_TIME_MSEC(10)); }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434. \u0418 \u0445\u043e\u0442\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043b\u0438\u0431\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043b\u0438\u0431\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0443, \u043c\u043e\u0439 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043c\u043e\u0440\u0433\u0430\u0442\u044c. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043c\u043d\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043d\u0435 \u043f\u043e\u0432\u0438\u0441\u043b\u043e \u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0438 \u0435\u0441\u0442\u044c \u043b\u0438 \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0441\u0442\u0438 (\u0430 \u043e\u043d\u0438, \u043a\u0441\u0442\u0430\u0442\u0438 \u0433\u043e\u0432\u043e\u0440\u044f, \u0435\u0441\u0442\u044c). \u0412 \u043e\u0431\u0449\u0435\u043c, \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u201c\u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e\u201d \u043c\u043e\u0439 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043c\u043e\u0440\u0433\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u043e, \u0430 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u201c\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043e\u201d &#8212; \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e.<\/p>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435: \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0440\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f? \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 ZCL \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 sSwitch.sOnOffServerCluster.bOnOff)<\/p>\n<pre><code class=\"cpp\">PUBLIC void blinkFunc(void *pvParam) {    \/\/ Toggle LED    uint32 currentState = u32AHI_DioReadInput();    vAHI_DioSetOutput(currentState^BOARD_LED_PIN, currentState&amp;BOARD_LED_PIN);     \/\/ restart blink timer    ZTIMER_eStart(blinkTimerHandle, sSwitch.sOnOffServerCluster.bOnOff ? ZTIMER_TIME_MSEC(200) : ZTIMER_TIME_MSEC(1000)); }<\/code><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 \u0431\u0443\u0434\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f APP_vTaskSwitch(), \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430. \u0412 \u043d\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f sSwitch.sOnOffServerCluster.bOnOff, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440.<\/p>\n<pre><code class=\"cpp\">PRIVATE void APP_vTaskSwitch() {    ButtonPressType value;    if(ZQ_bQueueReceive(&amp;buttonQueueHandle, (uint8*)&amp;value))    {        DBG_vPrintf(TRUE, \"Processing button message %d\\n\", value);         if(value == BUTTON_SHORT_PRESS)        {            \/\/ Toggle the value            sSwitch.sOnOffServerCluster.bOnOff = sSwitch.sOnOffServerCluster.bOnOff ? FALSE : TRUE;             \/\/ Destination address - 0x0000 (coordinator)            tsZCL_Address addr;            addr.uAddress.u16DestinationAddress = 0x0000;            addr.eAddressMode = E_ZCL_AM_SHORT;             DBG_vPrintf(TRUE, \"Reporing attribute... \", value);            PDUM_thAPduInstance myPDUM_thAPduInstance = hZCL_AllocateAPduInstance();            teZCL_Status status = eZCL_ReportAttribute(&amp;addr,                                                       GENERAL_CLUSTER_ID_ONOFF,                                                       E_CLD_ONOFF_ATTR_ID_ONOFF,                                                       HELLOZIGBEE_SWITCH_ENDPOINT,                                                       1,                                                       myPDUM_thAPduInstance);            PDUM_eAPduFreeAPduInstance(myPDUM_thAPduInstance);            DBG_vPrintf(TRUE, \"status: %02x\\n\", status);        }         if(value == BUTTON_LONG_PRESS)        {            \/\/ TODO: add network join here        }    } }<\/code><\/pre>\n<p>\u042f \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u043d\u043e \u043c\u043d\u0435 \u043d\u0435 \u044f\u0441\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0443 \u043d\u0443\u0436\u043d\u043e \u0441\u043b\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u21161. \u041f\u043e\u0445\u043e\u0436\u0435, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0438\u0437 \u043f\u0440\u043e\u0444\u0438\u043b\u044f Home Automation (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445). \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u044d\u0442\u043e Home Automation. \u0411\u0443\u0434\u0443 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u043c\u043d\u0435 \u044d\u0442\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440 \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043d\u0430 \u044d\u0442\u043e\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435, \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a Profile-wide (\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443).<\/p>\n<p>\u0417\u0430\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0443 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u0438 \u0434\u0430\u0436\u0435 \u043e\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<pre><code>Button released. Short press detected Processing button message 0 Reporing attribute... status: 00 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=1 DstEP=1 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=1 DrcEP=1 DstAddr=0000 Profile=0104 Cluster=0006 ZPS_EVENT_APS_DATA_INDICATION: SrcEP=1 DstEP=1 SrcAddr=0000 Cluster=0006 Status=0 ZCL Endpoint Callback: DEFAULT_RESPONSE received. No action<\/code><\/pre>\n<p>\u0412 wireshark\u2019\u0435 \u0432\u0438\u0434\u0438\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0430 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4f9\/db1\/817\/4f9db18176d5a02daa30119f6b251621.png\" width=\"662\" height=\"415\"><figcaption><\/figcaption><\/figure>\n<p>Zigbee2mqtt \u0442\u043e\u0436\u0435 \u0432\u0438\u0434\u0438\u0442 \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043d\u0438\u043c \u043e\u043d\u043e \u043f\u043e\u043a\u0430 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442. \u041d\u043e \u0432\u043e \u0432\u0441\u044f\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043c \u0441\u043a\u0430\u0437\u0430\u043b\u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c.  <\/p>\n<pre><code>zigbee2mqtt      | Zigbee2MQTT:debug 2021-04-04 10:55:00: Received Zigbee message from '0x00158d0002b501a7', type 'attributeReport', cluster 'genOnOff', data '{\"onOff\":0}' from endpoint 1 with groupID 0 zigbee2mqtt      | Zigbee2MQTT:warn  2021-04-03 23:26:36: Received message from unsupported device with Zigbee model 'Hello Zigbee Switch' and manufacturer name 'NXP' zigbee2mqtt      | Zigbee2MQTT:warn  2021-04-03 23:26:36: Please see: https:\/\/www.zigbee2mqtt.io\/how_tos\/how_to_support_new_devices.html.<\/code><\/pre>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u044f \u043d\u0430\u0448\u0435\u043b <a href=\"https:\/\/sprut.ai\/client\/blog\/2911\" rel=\"noopener noreferrer nofollow\">\u0442\u043e\u043b\u043a\u043e\u0432\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e<\/a> \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c. \u041e\u0441\u043e\u0431\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0431\u044b\u043b\u043e \u0437\u043d\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043b\u0435\u0437\u0442\u044c \u0432 \u043a\u043e\u0434 \u0441\u0430\u043c\u043e\u0433\u043e zigbee2mqtt (\u0447\u0442\u043e \u0432\u0435\u0441\u044c\u043c\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043a\u0435\u0440 \u043e\u0431\u0440\u0430\u0437) &#8212; \u0441 \u043d\u0435\u0434\u0430\u0432\u043d\u0438\u0445 \u043f\u043e\u0440 \u043a zigbee2mqtt \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u044b. \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b zigbee2mqtt \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b\u0438\u043a myswitch.js \u0440\u044f\u0434\u043e\u043c \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 Z2M.<\/p>\n<pre><code class=\"javascript\">const fz = require('zigbee-herdsman-converters\/converters\/fromZigbee'); const tz = require('zigbee-herdsman-converters\/converters\/toZigbee'); const exposes = require('zigbee-herdsman-converters\/lib\/exposes'); const reporting = require('zigbee-herdsman-converters\/lib\/reporting'); const e = exposes.presets;  const device = {     zigbeeModel: ['Hello Zigbee Switch'],     model: 'Hello Zigbee Switch',     vendor: 'NXP',     description: 'Hello Zigbee Switch',     fromZigbee: [fz.on_off],     toZigbee: [tz.on_off],     exposes: [e.switch()], };  module.exports = device;<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u043b\u0438 Z2M \u0432\u0438\u0434\u0438\u0442, \u0447\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u043e\u0441\u044c \u043d\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0433\u0430\u043d\u044f\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0435\u0440\u044b fz.on_off \u0438 tz.on_off, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u044b <a href=\"https:\/\/github.com\/Koenkk\/zigbee-herdsman-converters\/blob\/master\/converters\/fromZigbee.js\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a> \u0438 <a href=\"https:\/\/github.com\/Koenkk\/zigbee-herdsman-converters\/blob\/master\/converters\/toZigbee.js\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442 <\/a>\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>\u0421\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 Z2M \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0440\u0443\u0433\u0430\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e unsupported, \u0430 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0430 Exposes \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043c \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7ae\/3ac\/e49\/7ae3ace490d45337e8dcffa3ba346b53.png\" width=\"630\" height=\"184\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0430\u043a\u043b\u0430\u0434\u043a\u0430 State \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/99c\/670\/6c2\/99c6706c2bd36195fcd5044c8f906375.png\" width=\"650\" height=\"257\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0442\u043e\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0415\u0441\u043b\u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 Z2M, \u0442\u043e \u0440\u0435\u0436\u0438\u043c \u043c\u0438\u0433\u0430\u043d\u0438\u044f \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0438 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0442\u0430\u043a\u0436\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f ZigBee Cluster Library \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 sSwitch.sOnOffServerCluster.bOnOff, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0430 \u0437\u0430\u043c\u0438\u0433\u0430\u0435\u0442 \u043f\u043e \u043d\u043e\u0432\u043e\u043c\u0443.<\/p>\n<p>\u0410 \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0430? \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0441\u043b\u0430\u043d\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 &#8212; E_ZCL_CBET_CLUSTER_CUSTOM \u0438 E_ZCL_CBET_CLUSTER_UPDATE. \u0414\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0438\u0445 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0435, \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e \u044d\u0442\u0438 2 \u0432\u044b\u0437\u043e\u0432\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0432 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u0445 ZCL. \u041c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u0439.<\/p>\n<pre><code class=\"cpp\"> PRIVATE void APP_ZCL_cbEndpointCallback(tsZCL_CallBackEvent *psEvent) {    switch (psEvent-&gt;eEventType)    { ...        case E_ZCL_CBET_CLUSTER_UPDATE:            vHandleClusterUpdateMessage(psEvent);            break;    PRIVATE void vHandleClusterUpdateMessage(tsZCL_CallBackEvent *psEvent) {    uint16 u16ClusterId = psEvent-&gt;uMessage.sClusterCustomMessage.u16ClusterId;    tsCLD_OnOffCallBackMessage * msg = (tsCLD_OnOffCallBackMessage *)psEvent-&gt;uMessage.sClusterCustomMessage.pvCustomData;    uint8 u8CommandId = msg-&gt;u8CommandId;     DBG_vPrintf(TRUE, \"ZCL Endpoint Callback: Cluster update message EP=%d ClusterID=%04x Cmd=%02x\\n\", psEvent-&gt;u8EndPoint, u16ClusterId, u8CommandId); } <\/code><\/pre>\n<p>\u041f\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u044f \u0434\u0435\u043b\u0430\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u044e\u0434\u0430 \u043a\u043e\u0434 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u043b\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440. \u0412\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 \u043d\u0430\u0441 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c &#8212; \u043d\u043e\u043c\u0435\u0440 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438, \u043d\u043e\u043c\u0435\u0440 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0438 \u043d\u043e\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<p>\u0412 \u043b\u043e\u0433\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a. \u042f \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u043b\/\u0432\u043a\u043b\u044e\u0447\u0438\u043b \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0435 Z2M.<\/p>\n<pre><code>ZPS_EVENT_APS_DATA_INDICATION: SrcEP=1 DstEP=1 SrcAddr=0000 Cluster=0006 Status=0 ZCL Endpoint Callback: Custom cluster message EP=1 ClusterID=0006 Cmd=00 ZCL Endpoint Callback: Cluster update message EP=1 ClusterID=0006 Cmd=00 ZPS_EVENT_APS_DATA_CONFIRM: SrcEP=1 DstEP=1 DstAddr=0000 Status=0 ZPS_EVENT_APS_DATA_ACK: SrcEP=1 DrcEP=1 DstAddr=0000 Profile=0104 Cluster=0006 ZPS_EVENT_APS_DATA_INDICATION: SrcEP=1 DstEP=1 SrcAddr=0000 Cluster=0006 Status=0 ZCL Endpoint Callback: Custom cluster message EP=1 ClusterID=0006 Cmd=01 ZCL Endpoint Callback: Cluster update message EP=1 ClusterID=0006 Cmd=01<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u044b\u043c. \u041e\u043d\u043e \u0443\u0436\u0435 \u0443\u043c\u0435\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0442\u0438, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\/\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0414\u0430\u043b\u0435\u0435 \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043b\u044e\u0431\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0430 \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e. \u041c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u0432\u0435\u0442 \u0432 \u043a\u043e\u043c\u043d\u0430\u0442\u0435. \u0412 Home Assistant \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<pre><code class=\"cs\">- id: '1617533042952'   alias: Test   description: Test   trigger:   - platform: state     entity_id: switch.0x00158d0002b501a7     attribute: state   condition: []   action:   - type: toggle     device_id: 3effcfbd5022447213791dc054d043ec     entity_id: switch.living_room_light_right     domain: switch   mode: single<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0439 \u0443\u043c\u043d\u044b\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0443\u043c\u0435\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u0432\u0435\u0442 \u0432 \u0433\u043e\u0441\u0442\u0438\u043d\u043d\u043e\u0439.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 <\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u043c\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438 \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e ZigBee, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0443\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f. \u0421 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0437\u0433\u043b\u044f\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u043e \u0438 \u043c\u043d\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434\u0430, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u0442\u043e \u0442\u0430\u043c \u0441\u0442\u0440\u043e\u0447\u0435\u043a 300 \u0432 \u0441\u0443\u0445\u043e\u043c \u043e\u0441\u0442\u0430\u0442\u043a\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0414\u0440\u0443\u0433\u043e\u0435 \u0434\u0435\u043b\u043e, \u0447\u0442\u043e \u0441\u043c\u044b\u0441\u043b \u044d\u0442\u0438\u0445 300 \u0441\u0442\u0440\u043e\u043a \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u0433\u043e\u043b\u043e\u0432\u0443 \u043d\u0430\u0442\u044f\u043d\u0443\u0442\u044c &#8212; \u043a\u0443\u0447\u0430 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u0430\u043a-\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430. \u041d\u043e \u0442\u0443\u0442 \u0442\u043e\u0436\u0435 \u0432\u0441\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e. \u042d\u0442\u043e \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442 NXP \u043d\u0430\u0441 \u0437\u0430\u043f\u0443\u0442\u0430\u043b, \u043d\u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u044d\u0442\u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u044f \u0435\u0449\u0435 \u0440\u0430\u0437\u043e\u043a \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0441 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 ZigBee \u0441\u0442\u0435\u043a\u0430 \u0438 \u043d\u0430 \u043d\u0435\u0439 \u0432\u0441\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d55\/c8e\/6dc\/d55c8e6dcb6e8ad0025d4553d8be2fad.png\" width=\"670\" height=\"687\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u043e \u0441\u0435\u0442\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0430\u043a\u0435\u0442 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\n<p>\u0423\u0440\u043e\u0432\u0435\u043d\u044c PHY \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u0440\u0430\u0434\u0438\u043e\u044d\u0444\u0438\u0440 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u043a\u0435\u0442 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0431\u0443\u0444\u0435\u0440<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u0430\u043a\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u0438\u043d\u044f\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 zps_isrMAC \u0438 \u043f\u0430\u043a\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f MAC \u0443\u0440\u043e\u0432\u043d\u0435\u043c<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u043d\u0430\u0448\u0435\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443, \u043e\u043d \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0441\u043b\u043e\u0439 ZigBee (NWK) \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u0430\u0440\u0438\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u043a\u0435\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 ZigBee Base Device (Base Device Behavior, BDB) \u0433\u0434\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0414\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0441, \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0432 \u044d\u0442\u043e\u043c \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442.<\/p>\n<\/li>\n<li>\n<p>APP_vBdbCallback() \u044d\u0442\u043e \u0442\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0422\u0443\u0442 \u043d\u0430\u043c \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445 \u0441\u0430\u043c\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u0446\u0435\u043b\u043e\u043c (\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u043e\u0441\u044c, \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043b\u043e\u0441\u044c \u043a \u0441\u0435\u0442\u0438, \u043e\u0442\u0432\u0430\u043b\u0438\u043b\u043e\u0441\u044c \u043e\u0442 \u0441\u0435\u0442\u0438), \u0438 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0441\u043b\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0441 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u043a\u0435\u0442 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 vAppHandleAfEvent(). \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0435\u0445\u0430\u0442\u044c \u043b\u0438\u0431\u043e \u0447\u0430\u0441\u0442\u0438 Zigbee Device Object (ZDO), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u0441\u0435\u0442\u0438, \u043b\u0438\u0431\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0438 \u0435\u0433\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0442\u043e\u0447\u043a\u0430\u043c. \u041f\u043e \u0441\u0443\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u043d\u0430 \u043d\u043e\u043c\u0435\u0440 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043b\u0438\u0431\u043e \u0442\u0443\u0434\u0430 \u043b\u0438\u0431\u043e \u0442\u0443\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f vAppHandleZdoEvents() \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a ZDO (\u043d\u0443\u043b\u0435\u0432\u0430\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430). \u0420\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043a \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0442\u0430\u043a \u0438 \u0432\u0441\u0435\u0439 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u0438 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 &#8212; \u0432\u0441\u044f\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0434\u0440\u0443\u0433\u0438\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c, \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435, \u043f\u043e\u0438\u0441\u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u0441\u044f\u043a\u0438\u0445 \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f vAppHandleZclEvents() \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u043e \u0432\u0441\u0435\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0442\u043e\u0447\u043a\u0430\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u041d\u0430 \u0434\u0435\u043b\u0435 \u0432\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0435\u0437\u0436\u0430\u0435\u0442 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438\u0437 Zigbee Cluster Library.&nbsp;<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u043e\u0442\u0442\u0443\u0434\u0430 \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u044e\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e APP_ZCL_cbEndpointCallback() \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 &#8212; \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u043b\u0438 \u0447\u0442\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u043f\u0440\u0438\u0448\u0435\u043b \u0437\u0430\u043f\u0440\u043e\u0441 \u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u043e\u0442 \u043f\u043e \u0441\u0443\u0442\u0438 \u0438 \u0432\u0435\u0441\u044c \u0441\u0442\u0435\u043a ZigBee.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 300 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0443\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0434\u043b\u044f \u0443\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f, \u0442\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442? \u0410 \u0432\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443<\/p>\n<ul>\n<li>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u043c\u043d\u043e\u0433\u043e \u043b\u0438\u0448\u043d\u0435\u0433\u043e. \u0422\u0430\u043c \u0437\u0430\u0434\u0430\u0447\u0430 \u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u043f\u043e\u043d\u044f\u0442\u044c \u201c\u0430 \u0432\u043e\u0442 \u043c\u044b \u0435\u0449\u0435 \u0432\u043e\u0442 \u0442\u0430\u043a \u0443\u043c\u0435\u0435\u043c\u201d<\/p>\n<\/li>\n<li>\n<p>\u041c\u043d\u043e\u0433\u043e\u0435 \u0434\u0430\u0436\u0435 \u0438\u0437 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e &#8212; \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0435, \u043f\u0435\u0440\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u0438\u0437 \u0441\u0435\u0442\u0438, \u043f\u0440\u044f\u043c\u044b\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 (binding)<\/p>\n<\/li>\n<li>\n<p>\u0443 \u043c\u0435\u043d\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a. \u041d\u0430 \u0434\u0435\u043b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u0449\u0443\u0442\u0438\u043c\u043e \u0433\u043b\u044e\u0447\u0438\u0442: \u0432 50% \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0442\u0438, \u0438\u043d\u043e\u0433\u0434\u0430 \u0443 \u0441\u0442\u0435\u043a\u0430 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u043c\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043d\u0435 \u0434\u043e\u0445\u043e\u0434\u044f\u0442. \u0412 \u043e\u0431\u0449\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0430\u043c \u043a\u043e\u0434 \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0436\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0433\u043e &#8212; \u0432\u0441\u0435 \u0441\u0432\u0430\u043b\u0435\u043d\u043e \u0432 \u043a\u0443\u0447\u0443, \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b.<\/p>\n<\/li>\n<\/ul>\n<p>\u0417\u0430\u0447\u0435\u043c \u044f \u0432\u0430\u043c \u0442\u043e\u0433\u0434\u0430 \u0432 \u0442\u0430\u043a\u043e\u043c \u043d\u0435\u0434\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e? \u042d\u0442\u043e \u0443\u0447\u0435\u0431\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442. \u0426\u0435\u043b\u044c &#8212; \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438, \u043a\u0430\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430 \u0447\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442, \u043a\u0430\u043a\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0431\u044b\u0432\u0430\u044e\u0442 \u0438 \u043a\u0430\u043a \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c. \u041f\u043e \u0441\u0443\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0418\u043c\u0435\u043d\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0438 \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u041f\u043b\u0430\u043d\u044b \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435<\/p>\n<ul>\n<li>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0441\u0435\u0442\u0438 \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0432\u044b\u0445\u043e\u0434\u043e\u043c \u0438\u0437 \u0441\u0435\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u043f\u043e \u0432\u043e\u0437\u0434\u0443\u0445\u0443 (OTA)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u043c\u0438 \u0433\u043b\u044e\u043a\u0430\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u044b\u043c \u043c\u043e\u0440\u0433\u0430\u043d\u0438\u0435\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 (\u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u043f\u0440\u043e\u0446 \u043a\u0442\u043e-\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442)<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u043a\u043e\u0434 \u043f\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u0421++ \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0438 \u0441 \u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u0443\u044e RTOS, \u0442.\u043a. \u0440\u0430\u0431\u043e\u0442\u0430 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u0445 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u043e\u0439<\/p>\n<\/li>\n<\/ul>\n<p>\u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0432\u0430\u0448\u0435\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u0440\u0438\u0442\u0438\u043a\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u0442\u044c \u043c\u043e\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u044b \u0432 \u0441\u0442\u0430\u0442\u044c\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430, \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041a\u043e\u0434:&nbsp;<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/grafalex82\/hellozigbee\/tree\/hello_zigbee_part_1\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/grafalex82\/hellozigbee\/tree\/hello_zigbee_part_1<\/a> (\u041a\u043e\u0434 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0436\u0438\u0442\u044c \u0432 \u0432\u0435\u0442\u043a\u0435 hello_zigbee_part_1, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a main \u043f\u043e\u0431\u0435\u0436\u0438\u0442 \u0434\u0430\u043b\u044c\u0448\u0435) <\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b<\/p>\n<ul>\n<li>\n<p>JN-AN-1219-Zigbee-3-0-Controller-and-Switch<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/actg\/JN5169-for-xiaomi-wireless-switch.git\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/actg\/JN5169-for-xiaomi-wireless-switch.git<\/u><\/a><\/p>\n<\/li>\n<li>\n<p>JN-AN-1220-Zigbee-3-0-Sensors      &lt;&#8212;&#8212; \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.nxp.com\/docs\/en\/user-guide\/JN-UG-3113.pdf\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/www.nxp.com\/docs\/en\/user-guide\/JN-UG-3113.pdf<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.nxp.com\/docs\/en\/user-guide\/JN-UG-3114.pdf\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/www.nxp.com\/docs\/en\/user-guide\/JN-UG-3114.pdf<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.nxp.com\/docs\/en\/user-guide\/JN-UG-3115.pdf\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/www.nxp.com\/docs\/en\/user-guide\/JN-UG-3115.pdf<\/u><\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/550660\/\"> https:\/\/habr.com\/ru\/post\/550660\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0418 \u0441\u043d\u043e\u0432\u0430 \u0437\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435. \u042d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c<a href=\"https:\/\/habr.com\/ru\/post\/547374\/\" rel=\"noopener noreferrer nofollow\"> \u0441\u0442\u0430\u0442\u044c\u0438 Hello NXP JN5169 World<\/a>. \u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u043c\u044b \u043f\u043e\u0441\u0442\u0438\u0433\u0430\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u044b \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 JN5169, \u0435\u0433\u043e \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u044e, \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u044b, \u0442\u043e \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0441\u0442\u0438\u0433\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0444\u0438\u0448\u043a\u0443 \u044d\u0442\u043e\u0433\u043e \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 &#8212; \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 ZigBee \u0441\u0435\u0442\u044f\u0445. \u0421\u0442\u0430\u0442\u044c\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0434\u0443\u043c\u0447\u0438\u0432\u044b\u043c \u043f\u0435\u0440\u0435\u0432\u0430\u0440\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043e\u0442 NXP, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 NXP ZigBee SDK.<\/p>\n<p>\u041a\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u044f \u0431\u0443\u0434\u0443 \u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043d\u0443\u043b\u044f, \u043f\u043e\u043d\u0435\u043c\u043d\u043e\u0433\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u0432 \u043d\u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b (\u0430 \u0437\u0430\u043e\u0434\u043d\u043e \u0438 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044f\u0441\u044c \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435). \u0426\u0435\u043b\u044c &#8212; \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043e\u0434\u043d\u043e\u043a\u043b\u0430\u0432\u0438\u0448\u043d\u044b\u0439 \u0443\u043c\u043d\u044b\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u043e ZigBee.<\/p>\n<p>\u0413\u043e\u0442\u043e\u0432\u044b \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u043c\u0438\u0440 ZigBee?<\/p>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438<\/h2>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0448\u044c\u0441\u044f \u0441 ZigBee \u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0448\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0437\u043d\u0430\u043d\u0438\u0439<\/p>\n<ul>\n<li>\n<p>\u0412 \u0441\u0435\u0442\u0438 ZigBee \u0435\u0441\u0442\u044c 3 \u0442\u0438\u043f\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 &#8212; \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440, \u0440\u043e\u0443\u0442\u0435\u0440\u044b, \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430<\/p>\n<ul>\n<li>\n<p>\u0412 \u0441\u0435\u0442\u0438 ZigBee \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u043e\u0433\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043b\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\/\u043e\u0442 \u0440\u043e\u0443\u0442\u0435\u0440\u043e\u0432, \u043d\u0435 \u044f\u0432\u043b\u044f\u044f\u0441\u044c \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u044b\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0420\u043e\u0443\u0442\u0435\u0440\u044b \u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u0442\u0440\u0430\u043d\u0437\u0438\u0442\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438 \u0441\u0435\u0442\u0438<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u043e\u0443\u0442\u0435\u0440\u0430\u043c\u0438, \u0430 \u0431\u0430\u0442\u0430\u0440\u0435\u0439\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 &#8212; \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0442\u044c ZigBee \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c mesh \u0441\u0435\u0442\u044c\u044e, \u0433\u0434\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043c\u0438\u043d\u0443\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0421\u0435\u0442\u044c ZigBee \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430.&nbsp;<\/p>\n<ul>\n<li>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 (zigbee2mqtt, SLS, sprut), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439 \u0432 \u043e\u0434\u043d\u0443 \u0441\u0435\u0442\u044c<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043a\u0440\u044b\u0442\u0443\u044e \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0433\u0434\u0435 \u043d\u0438\u043a\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0442\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f (\u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043a\u043b\u044e\u0447 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f)<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u043e \u0441\u0445\u043e\u0436\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c (\u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u0438, \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0438, \u0442\u0435\u0440\u043c\u043e\u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u044b) \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0443 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0438 \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u044e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0423 ZigBee \u043d\u0435\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043a\u0430\u043a \u0443 Z-Wave. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0442\u043e\u044f\u0442 \u0434\u0435\u0448\u0435\u0432\u043b\u0435, \u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043d\u0435\u0440\u043e\u0434\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 (\u0432 \u0440\u043e\u0434\u043d\u044b\u0445, \u0432\u043f\u0440\u043e\u0447\u0435\u043c, \u0442\u043e\u0436\u0435)<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption>\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 ZigBee 3.0 Stack User Guide JN-UG-3113 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 ZigBee \u0441\u0435\u0442\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432.<\/figcaption><\/figure>\n<p>\u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0437\u043d\u0430\u043d\u0438\u0439 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0440\u044f\u0434\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u044f, \u0432 \u0442.\u0447. \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u043e\u0433\u043e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0430\u043c \u0441\u0435\u0431\u0435 \u0441\u0442\u0440\u043e\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0443\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0430. \u041d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0431\u0430\u0437\u0430 \u0437\u043d\u0430\u043d\u0438\u0439 \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u0445, \u043d\u044e\u0430\u043d\u0441\u0430\u0445, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445, \u0438 \u0433\u043b\u044e\u043a\u0430\u0445 \u0442\u0435\u0445 \u0438\u043b\u0438 \u0438\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u043e. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0441\u043e\u043a &#8212; \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u0430\u0442\u044c \u0446\u0435\u043b\u0443\u044e \u043a\u0443\u0447\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0448\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c.<\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.&nbsp;<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u044d\u0442\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0441\u043d\u0438\u0437\u0443 \u0432\u0432\u0435\u0440\u0445.&nbsp;<\/p>\n<ul>\n<li>\n<p>ZigBee \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0430 \u0431\u0430\u0437\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 <strong>IEEE 802.15.4<\/strong>. \u0427\u0430\u0441\u0442\u044c <strong>PHY <\/strong>\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u0435\u0442\u0438 &#8212; \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0431\u0438\u0442\u044b \u0438 \u0431\u0430\u0439\u0442\u044b \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0434\u0438\u043e\u043a\u0430\u043d\u0430\u043b. \u041c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0441\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u043e\u043c \u0440\u0430\u0434\u0438\u043e \u0441\u0440\u0435\u0434\u044b, \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0434\u0438\u043e\u043a\u0430\u043d\u0430\u043b \u0441\u0432\u043e\u0431\u043e\u0434\u0435\u043d. \u0412\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0431\u0435\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>IEEE 802.15.4 MAC<\/strong> \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u044b\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438 \u0441\u0435\u0442\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043d\u0430\u043c \u043b\u0435\u0437\u0442\u044c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f, \u0440\u0430\u0437\u0432\u0435 \u0447\u0442\u043e \u043a\u0430\u043a\u0430\u044f \u043d\u0438\u0431\u0443\u0434\u044c \u043e\u0448\u0438\u0431\u043a\u0430 \u043e\u0442\u0442\u0443\u0434\u0430 \u043f\u0440\u0438\u043b\u0435\u0442\u0438\u0442. \u0414\u043b\u044f \u043d\u0430\u0441 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 &#8212; \u043e\u0442\u043f\u0440\u0430\u0432\u044c \u0432\u043e\u0442 \u044d\u0442\u0438 \u0431\u0430\u0439\u0442\u044b (\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 100 \u0437\u0430 \u0440\u0430\u0437) \u0432\u043e\u043d \u0442\u043e\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443.<\/p>\n<\/li>\n<li>\n<p><strong>ZigBee Network (NWK) Layer<\/strong> \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u0442\u044c ZigBee &#8212; \u0440\u0430\u0437\u0434\u0430\u0435\u0442 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c, \u0441\u0442\u0440\u043e\u0438\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0443\u0437\u043b\u0430\u043c\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 (unicast \u0438\u043b\u0438 broadcast). \u0421\u044e\u0434\u0430 \u043c\u044b \u0442\u043e\u0436\u0435 \u043e\u0441\u043e\u0431\u043e \u043b\u0435\u0437\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043d\u043e \u043d\u0430\u043c \u0431\u0443\u0434\u0443\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043d\u0430 \u044d\u0442\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043d\u0430c \u0441\u0430\u043c\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f &#8212; <strong>Application Layer (APL)<\/strong>. \u042d\u0442\u043e\u0442 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441 \u0441\u0435\u0442\u044c\u044e Zigbee, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432 \u0446\u0435\u043b\u043e\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0418\u043c\u0435\u043d\u043d\u043e \u0441 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043e\u043f\u0438\u0441\u0430\u0442\u044c Application Layer \u0438 \u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438.<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0436\u0438\u0432\u0443\u0442 \u0432 \u0431\u043b\u043e\u043a\u0435 <strong>Application Framework (AF)<\/strong>, \u0438 \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0435\u0435, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0448\u0442\u0443\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 (<strong>End Point<\/strong>). \u041a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 &#8212; \u044d\u0442\u043e \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u043c\u0435\u043d\u0438\u0439, \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043e\u0434\u043d\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u041f\u043e\u043a\u0430 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u0440\u0430\u0432\u0434\u0430?<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445<\/p>\n<ul>\n<li>\n<p>\u0412\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u043c\u043d\u043e\u0433\u043e\u043a\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u043b\u0435 \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u043e ZigBee. \u0422\u0430\u043a \u0432\u043e\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u0430\u043d\u0430\u043b \u0432 \u044d\u0442\u043e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c end point\u2019\u043e\u043c &#8212; \u043a\u0430\u0436\u0434\u043e\u0435 \u0440\u0435\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u043c\u0435\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e, \u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0438\u0437\u043c\u0435\u0440\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0432\u0440\u043e\u0434\u0435 \u0442\u043e\u043a\u0430 \u0438\u043b\u0438 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438. \u0410 \u0432\u0441\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0443\u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0446\u0435\u043b\u0438\u043a\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043b\u0438 \u0432\u043e\u0442 \u043d\u043e\u0447\u043d\u0438\u043a \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0442\u0435\u0440\u043c\u043e\u043c\u0435\u0442\u0440\u0430. \u041d\u043e\u0447\u043d\u0438\u043a \u0438 \u0442\u0435\u0440\u043c\u043e\u043c\u0435\u0442\u0440 &#8212; \u044d\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0432\u0443\u0445\u043a\u043b\u0430\u0432\u0438\u0448\u043d\u044b\u0439 \u0443\u043c\u043d\u044b\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0432\u0443\u043c\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438, \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0432\u043e\u0435\u0439 \u043a\u043b\u0430\u0432\u0438\u0448\u0435\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u043e\u0438\u043c \u0440\u0435\u043b\u0435 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043a\u0430\u043a\u0430\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0447\u0430\u0441\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0431\u044b\u043b\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u0438\u043b\u0438 \u043a\u0430\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0430\u0434\u0440\u0435\u0441\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430.&nbsp;<\/p>\n<p>\u0410 \u0435\u0449\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043c\u043e\u0436\u043d\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c (bind) \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u0422\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043a\u043b\u0430\u0432\u0438\u0448 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0440\u0435\u043b\u044e\u0448\u043a\u0443 \u0432 \u043c\u043d\u043e\u0433\u043e\u043a\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u043b\u0435 \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435. \u0418 \u0432\u0441\u0435 \u044d\u0442\u043e \u0431\u0435\u0437 \u0443\u0447\u0430\u0441\u0442\u0438\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p>ZigBee \u041a\u043b\u0430\u0441\u0442\u0435\u0440 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0443\u043c\u0435\u043d\u0438\u0439, \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0443. \u041a\u043b\u0430\u0441\u0442\u0435\u0440 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0422\u0430\u043a \u0443 \u0441\u0432\u0435\u0442\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u044f\u0440\u043a\u043e\u0441\u0442\u044c, \u0446\u0432\u0435\u0442\u043e\u0432\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430, \u0438\u043b\u0438 RGB \u0446\u0432\u0435\u0442, \u0430 \u0443 \u043a\u043b\u0438\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u0431\u0443\u0434\u0443\u0442 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430, \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0438 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u041a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 \u0443 \u0441\u0432\u0435\u0442\u0438\u043b\u044c\u043d\u0438\u043a\u0430 \u0431\u0443\u0434\u0443\u0442 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c\/\u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u0438\u043b\u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u0440\u0435\u0436\u0438\u043c, \u0430 \u0443 \u043a\u043b\u0438\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0432\u0441\u0435 &#8212; \u043e\u043d \u0436\u0435 \u0434\u0430\u0442\u0447\u0438\u043a, \u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e.<\/p>\n<p>\u041e\u0434\u0438\u043d End Point \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432, \u043d\u043e \u044d\u0442\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u0432 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438, \u0442\u043e \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043d\u0435\u0441\u0442\u0438 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0442\u043e\u0447\u043a\u0430\u043c (\u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0432\u0443\u0445\u043a\u043b\u0430\u0432\u0438\u0448\u043d\u044b\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0432\u0443\u043c\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c\u0438 \u0442\u043e\u0447\u043a\u0430\u043c\u0438)<\/p>\n<p>\u0418 \u0445\u043e\u0442\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0443\u0433\u043e\u0434\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 ZigBee \u043f\u043e\u0434\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0438\u0434\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441\u0445\u043e\u0436\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041c\u043d\u043e\u0433\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0447\u0442\u043e \u043d\u0438\u0431\u0443\u0434\u044c \u0432\u0440\u043e\u0434\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f, \u0442\u0435\u0440\u043c\u043e\u043c\u0435\u0442\u0440\u0430, \u0438\u0437\u043c\u0435\u0440\u0438\u0442\u0435\u043b\u044f \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438, \u0441\u0432\u0435\u0442\u0438\u043b\u044c\u043d\u0438\u043a\u0430, \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u0442\u0435\u0440\u043c\u043e\u0440\u0435\u0433\u0443\u043b\u044f\u0442\u043e\u0440\u0430, \u0438\u043b\u0438 \u0447\u0435\u0433\u043e \u043d\u0438\u0431\u0443\u0434\u044c \u0435\u0449\u0435. \u041a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0432\u0438\u0434\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0437\u0432\u0430\u043b\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438, \u0438 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438.&nbsp;<\/p>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 ZigBee \u0441\u0442\u0435\u043a\u0430 \u043f\u043e\u0448\u043b\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0434\u043b\u044f \u043d\u0430\u0441 \u0446\u0435\u043b\u044b\u0439 API \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u043c, \u0438 \u043d\u0430\u0440\u0435\u043a\u043b\u0438 \u044d\u0442\u043e <strong>ZigBee Cluster Library<\/strong>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0430\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u043c\u0438 \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438, \u043e\u0442\u0441\u044b\u043b\u0430\u044e\u0449\u0438\u043c\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u0438\u043b\u0438 \u044f\u0440\u043a\u043e\u0441\u0442\u044c \u0441\u0432\u0435\u0447\u0435\u043d\u0438\u044f \u043b\u0430\u043c\u043f\u043e\u0447\u043a\u0438. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0435 API.<\/p>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 (\u0438\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445). \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 On\/Off &#8212; \u0443 \u043d\u0435\u0435 \u043d\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0438 \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u0433\u043d\u0430\u043b \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043a\u043d\u043e\u043f\u043a\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c ZigBee \u0440\u0435\u043b\u0435 \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c On\/Off \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c &#8212; \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u043d\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u044d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f \u0431\u044b\u0432\u0430\u044e\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c Xiaomi, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0438 \u043a\u043b\u0430\u0432\u0438\u0448\u0438, \u0438 \u0440\u0435\u043b\u0435)<\/p>\n<\/li>\n<li>\n<p><strong>ZigBee Device Object (ZDO)<\/strong>, <strong>Base Class Behavior (BDB), \u0438 Application Support Sublayer (APS)<\/strong> &#8212; \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0438 \u043a\u043e\u0434\u0430 \u044f \u043d\u0435 \u0441\u043c\u043e\u0433 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0447\u0435\u0442\u043a\u043e \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u0442\u044c \u0447\u0435\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u044d\u0442\u043e \u043d\u0430\u043c \u0438 \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0432\u0442\u0440\u043e\u0435\u043c \u043e\u043d\u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u0430\u043a \u0443\u0437\u043b\u0430 \u0441\u0435\u0442\u0438 ZigBee. \u042d\u0442\u0438 \u0448\u0442\u0443\u043a\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0442 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043a \u0441\u0435\u0442\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0442\u0435\u0440\u0438 \u0441\u0432\u044f\u0437\u0438. \u0422\u0443\u0442 \u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u0430\u043a \u0440\u043e\u0443\u0442\u0435\u0440\u0430, \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0438\u043b\u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440\u0430. \u0422\u0443\u0442 \u0442\u0430\u043a\u0436\u0435 \u0436\u0438\u0432\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 (binding).<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438 \u0432 \u0441\u0435\u0442\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u0441\u043f\u0438\u0441\u043e\u043a \u0443\u043c\u0435\u043d\u0438\u0439 \u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a), \u0434\u043b\u044f ZDO \u0432\u044b\u0434\u0435\u043b\u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043d\u043e\u043c\u0435\u0440 0, \u0438 \u0442\u0430\u043a\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0432 \u0441\u0435\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c. \u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043f\u043e\u0439\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435, \u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c \u0435\u0449\u0435 \u043e\u0431 \u043e\u0434\u043d\u043e\u0439 \u0432\u0430\u0436\u043d\u043e\u0439 \u0432\u0435\u0449\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 &#8212; \u0432\u0441\u0435 \u044d\u0442\u043e \u0436\u0443\u0442\u043a\u043e \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0435, \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043b\u0438\u0446\u0430\u043c\u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412 \u0448\u043a\u043e\u043b\u0435 \u043d\u0430\u0441 \u0443\u0447\u0438\u043b\u0438, \u0447\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u044d\u0442\u043e \u0447\u0435\u0442\u043a\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f. \u0418 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0434\u0430\u0436\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c) \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043d\u0435\u043a\u0438\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439: \u0441\u0434\u0435\u043b\u0430\u0439 \u0410, \u0441\u0434\u0435\u043b\u0430\u0439 \u0411, \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u043d\u043e \u0412 &#8212; \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0435\u0449\u0435 \u0440\u0430\u0437.&nbsp;<\/p>\n<p>\u0412 ZigBee \u0432\u0441\u0435 \u043d\u0435 \u0442\u0430\u043a. \u0423\u0437\u043b\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u043c\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438. \u0415\u0441\u043b\u0438 \u0443\u0437\u0435\u043b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432. \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0430\u043a\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 IEEE 802.15.4 MAC. \u041a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c, \u0433\u0434\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0430\u043a\u0435\u0442 \u0442\u0430\u043a\u0436\u0435<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-320990","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320990","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=320990"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320990\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}