I kind of use this as blog to manage the notes about my understanding of the CHIP/Matter project
Introduction
Matter: Start from 0
Notes
Persistent Storage for Python Controller
How exactly the device join the network
2022/07/30
CHIP git hash code 67b4746ad8
What is it
I would like to consider Exchange Context(EC) as a "channel" in each seassion.
Every device/controller would hold a peer's session if they are connected. However, there are many different types of messages would be sent between controller/device, so we need a specified channel to handle each type of message.
In addition, these ECs have been running in a session, so they could use all the resource of the session. That is, EC is not like session which has extreme complicated establishment process. A lot of time, CHIP stack would create a new EC just for one message. Thus, EC is also kind of a temporary channel.
2022/06/05
CHIP git hash code 67b4746ad8
How message goes
Following the calling stack of sending/receiving message word by word shows a very basic idea of how the message being handled.
However, we will have a better understanding of this project if we take a look from structure point of view.
So, I would like to put down some note about these two classes:
Seesion and ExchangeContext(next post).
2022/05/14
CHIP git hash code 67b4746ad8
Setup
Python controller running on MAC
Lock-app running on thunderboard sense 2
OpenThread board router on Raspberry pi 2B
The lock-app example
2022/04/23
CHIP git hash code 67b4746ad8
I would like to follow the calling stack to understand how CHIP stack receives message. Bascially, it's like a reverse calling stack of "Send Message."
Just give you a heads-up, there is an engine to handle CHIP-over-Bluetooth Low Energy (CHIPoBLE) message and I skipped this module because I think it would be easier to understand this kind of code if we got the specification first.
Setup
Python controller running on MAC
2022/04/16
CHIP git hash code 67b4746ad8
I like to learn stuff by taking them apart, so I think a walk through on the message path would be a good idea to undetstand how CHIP works.
Setup
Python controller running on MAC
Lock-app running on thunderboard sense 2
OpenThread(Not going to use this, but still)
2022/03/26
CHIP git hash code 67b4746ad8
In this post, we will try to give you an idea how transport classes look like.
Class diagram
About this diagram:
I tried to follow the UML standard, But not exactly.
2022/03/19
CHIP git hash code 67b4746ad8
In this post, we will check CHIP initialization.
PlatformMgr().InitChipStack();
In most of examples, we can always find this line of code at the beginning of main.cpp. So I think it's a good start.
What is PlatformMgr
You can find the header file at this path include/platform/PlatformManager.h and find its description:
2022/03/12
CHIP git hash code 67b4746ad8
In this note, I will give you a brief idea about the cpp files(mostly main.cpp and ZclCallback.cpp) in lock-app example.
Because we should focus on Matter stack, so I will skip most of the Silicon Lab SDK code.
First step, open the main.cpp
Initialize XXX
First, initialize CHIP stack.
This note will give you a basic idea of the network in the lock-app example. And I assume you knows all steps in this document
How many things we have here
Before the very first step in the example, let's find out how many device we should have
A device running the lock-app example, I will call it matter device in this ntoe.
In this example, the efr32 thunderboard sensor 2
A device running the controller, and I will call it the controller in this note.
I know it's dangerous to store such critical information in a file, but it's way much easier for development stage.
Why I want to do this
The original peresistent storage delegate in the python controller is implemented simply by a std::map. So, all the data would be gone whenever the python controller is closed.
I would like to keep the data even after I close the controller for three reasons:
Don't want to repeat the entire commission process whenever I make some changes.
To observe the keys the CHIP/Matter stack creates.
I just want to do it.
What's this
Well, I heard about this project(Connect Home over IP/Matter) in an interview two years ago and I have followed this project since last year.
As a engineer, I am kind of new to (IoT) embedded system. So, part of the reason I want to study this project is simply to learn how other engineers do their job and how they design the firmware.
Matter is a relative new protocl, so it's really hard to find other resource except the official website/github. That's why I decided to shared what I have learned.
Again, I was a software engineer and just became a firmware engineer recently. So, if you are an experienced firmware engineer, these notes may not help you too much. But if you are also new to embedded system and interested in this project, you will find something helpful here(I hope).
Anyway, this will be a series and it will be more like a blog than a note. You are welcom to leave a comment anytime at any post.