Matter

Matter Kazako ?

Matter est une norme de connectivité de couche d’application unifiée et open source conçue pour permettre aux développeurs et aux fabricants d’appareils de se connecter et de construire des écosystèmes fiables et sécurisés et d’accroître la compatibilité entre les appareils domestiques connectés. Il est construit avec des technologies éprouvées sur le marché utilisant le protocole Internet (IP) et est compatible avec les transports réseau Thread et Wi-Fi. La mamatter a été développé par un groupe de travail au sein de l’Alliance des normes de connectivité (Alliance). Ce groupe de travail développe et promeut l’adoption de la norme Matter, une norme de connectivité libre de droits pour augmenter la compatibilité entre les produits de la maison intelligente, avec la sécurité comme principe fondamental de conception. La vision qui a conduit les principaux acteurs de l’industrie à se réunir pour construire Matter est que la connectivité intelligente devrait être simple, fiable et interopérable.

Matter simplifie le développement pour les fabricants et augmente la compatibilité pour les consommateurs.

La norme a été construite autour d’une conviction commune que les appareils domestiques intelligents devraient être sécurisés, fiables et transparents à utiliser. En s’appuyant sur le protocole Internet (IP), Matter permet la communication entre les appareils domestiques intelligents, les applications mobiles et les services cloud et définit un ensemble spécifique de technologies de réseau basées sur IP pour la certification des appareils.

La spécification Matter détaille tout ce qui est nécessaire pour mettre en œuvre une application Matter et une pile de couches de transport. Il est destiné à être utilisé par les implémenteurs comme spécification complète.

L’Alliance a officiellement ouvert le groupe de travail sur Matter le 17 janvier 2020, et la spécification est disponible pour adoption dès maintenant.

Matter runs on either WiFi or thread and is using the IPv6 network on whatever layer 1.

In order to investisgate Matter, Expressif devices were purchased (i.e. An expressif Openthread border router (S3/H2), two C6/H2 based esp32 Wroom modules and a bunch of cheap ESP32C6/H2 zero/mini)

Openthread border router installed on the S3/H2 module via expressif python’s ide.py

Arduino IDE was used first to fart about with tread.

Now expressif ide is used to implement matter over thread (not yet available on esp32 arduino’s)

First attempt using the light_switch example, this normally controls an external light (matter connected …), which is to be configured, I can see on the console the switch button activation, but nothinf more.

Second attemps using light, in the idf.py menuconfig, the console has been enabled.

ESP32-H2 flashed

in order to pair it, used homekit and QR code on (expressif website)[https://docs.espressif.com/projects/esp-matter/en/latest/esp32/developing.html]

BUT although the H2 received the BLE conmmands, after it stopped (no thread on AppleTV ?)

Issued the command

chip-tool pairing ble-thread 12345 hex:0e08000000000001000000030000124a0300000e35060004001fffe00208014be7ffb4e740a10708fd823dfaeff4a69a05107ff06edd67ede1de0eae341a0faa49a8030f4f70656e5468726561642d32306332010220c20410cd85d1613637a40ea4717dade5ca6f050c0402a0f7f8 20202021 3840

I can see it received on the h2:

Result is:

[1751026195.877] [12899:47523855:main] [DL] KVS will be written to: file:///var/folders/tj/jlxd_2bj6b37gjcsvs5nwqqh0000gn/T//chip_tool_kvs [1751026195.884] [12899:47523855:main] [DL] Initializing BLE Manager [1751026195.884] [12899:47523855:main] [IN] UDP::Init bind&listen port=0 [1751026195.884] [12899:47523855:main] [IN] UDP::Init bound to port=58480 [1751026195.884] [12899:47523855:main] [IN] BLEBase::Init - setting/overriding transport [1751026195.884] [12899:47523855:main] [IN] TransportMgr initialized [1751026195.884] [12899:47523855:main] [FP] Initializing FabricTable from persistent storage [1751026195.884] [12899:47523855:main] [TS] Last Known Good Time: 2023-10-14T01:16:48 [1751026195.885] [12899:47523855:main] [FP] Fabric index 0x1 was retrieved from storage. Compressed FabricId 0xB6DD04653B3FBBBC, FabricId 0x0000000000000001, NodeId 0x000000000001B669, VendorId 0xFFF1 [1751026195.885] [12899:47523855:main] [DMG] Ember attribute persistence requires setting up [1751026195.885] [12899:47523855:main] [ZCL] Using ZAP configuration… [1751026195.885] [12899:47523855:main] [CTL] System State Initialized… [1751026195.886] [12899:47523855:main] [CTL] Setting attestation nonce to random value [1751026195.886] [12899:47523855:main] [CTL] Setting CSR nonce to random value [1751026195.886] [12899:47523857:chip] [DL] _OnPlatformEvent [1751026195.886] [12899:47523857:chip] [CTL] Setting attestation nonce to random value [1751026195.886] [12899:47523857:chip] [CTL] Setting CSR nonce to random value [1751026195.887] [12899:47523857:chip] [CTL] Generating NOC [1751026195.889] [12899:47523857:chip] [FP] Validating NOC chain [1751026195.896] [12899:47523857:chip] [FP] NOC chain validation successful [1751026195.896] [12899:47523857:chip] [FP] Updated fabric at index: 0x1, Node ID: 0x000000000001B669 [1751026195.896] [12899:47523857:chip] [TS] Last Known Good Time: 2023-10-14T01:16:48 [1751026195.896] [12899:47523857:chip] [TS] New proposed Last Known Good Time: 2021-01-01T00:00:00 [1751026195.896] [12899:47523857:chip] [TS] Retaining current Last Known Good Time [1751026195.896] [12899:47523857:chip] [FP] Metadata for Fabric 0x1 persisted to storage. [1751026195.897] [12899:47523857:chip] [TS] Committing Last Known Good Time to storage: 2023-10-14T01:16:48 [1751026195.897] [12899:47523857:chip] [CTL] Joined the fabric at index 1. Fabric ID is 0x0000000000000001 (Compressed Fabric ID: B6DD04653B3FBBBC) [1751026195.902] [12899:47523857:chip] [BLE] ConnectionDelegate NewConnection with long discriminator 3840 (0xf00) [1751026195.902] [12899:47523857:chip] [CTL] Setting thread operational dataset from parameters [1751026195.902] [12899:47523857:chip] [CTL] Setting attestation nonce to random value [1751026195.902] [12899:47523857:chip] [CTL] Setting CSR nonce to random value [1751026195.902] [12899:47523857:chip] [CTL] Commission called for node ID 0x0000000000003039 [1751026195.918] [12899:47523858:chip] [BLE] CBManagerState: ON [1751026208.121] [12899:47523999:chip] [BLE] Connecting to device 0x600002b48000 with discriminator: 3840 [1751026208.998] [12899:47523999:chip] [DIS] Closing all BLE connections [1751026208.999] [12899:47523999:chip] [IN] BleConnectionComplete: endPoint 0x103111cc0 [1751026208.999] [12899:47523999:chip] [BLE] ATT MTU = 256 [1751026208.999] [12899:47523999:chip] [IN] SecureSession[0x14d1041c0]: Allocated Type:1 LSID:26028 [1751026209.000] [12899:47523999:chip] [SC] Assigned local session key ID 26028 [1751026209.000] [12899:47523999:chip] [EM] «< [E:32949i S:0 M:65029855] (U) Msg TX from 6D5F04DC1ACC6768 to 0:0000000000000000 [0000] [BLE] — Type 0000:20 (SecureChannel:PBKDFParamRequest) (B:98) [1751026209.000] [12899:47523999:chip] [IN] Message appended to BLE send queue [1751026209.000] [12899:47523999:chip] [SC] Sent PBKDF param request [II:500ms AI:300ms AT:4000ms) [1751026209.000] [12899:47523999:chip] [BLE] Failed to write characteristic: @ [1751026209.000] [12899:47523999:chip] [IN] Failed to establish BLE connection: src/platform/Darwin/BleConnectionDelegateImpl.mm:489: Ble Error 0x00000407: GATT write characteristic operation failed [1751026209.000] [12899:47523999:chip] [IN] Clearing BLE pending packets. [1751026209.000] [12899:47523999:chip] [BLE] Auto-closing end point’s BLE connection.

Seems to be an Apple problem.

Commissionning

Commissionning using chi-tool

Commissioning the Thread device (ESP32H2)

For ESP32-H2, firstly start OpenThread Border Router, you can either use Raspberry Pi OpenThread Border Router OR ESP32 OpenThread Border Router Get the active operational dataset. $ ot-ctl> dataset active -x Commissioning the Thread device $ ./out/debug/chip-tool pairing ble-thread 12345 hex: 20202021 3840