-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ncp] add initial support of NCP #2283
Conversation
@bukepo @zhanglongxia @abtink @superwhd @wgtdkp I think the change is a non-trivial one. The PR is still under development. There are many things to do: adding test, refactoring. But I hope that I can get some feedback on the framework and the direction in early stage. PTAL when you have a moment. |
fc93d3d
to
311bbb6
Compare
607b9e6
to
340be32
Compare
This PR is ready for review now. It seems to be difficult to break
There is still a pending PR in openthread. Without it the CI here |
0233b3f
to
04439b4
Compare
Per discussion, the PR is still too large for review. I'll try to breakdown it. The first breakdown PR is: #2294 Please review the simple one first. Thanks! |
The second breakdown PR is: #2299 |
(cherry picked from commit 21a80e4)
04439b4
to
f1ccb6a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2283 +/- ##
==========================================
- Coverage 55.77% 1.63% -54.15%
==========================================
Files 87 91 +4
Lines 6890 9925 +3035
Branches 0 717 +717
==========================================
- Hits 3843 162 -3681
- Misses 3047 9756 +6709
- Partials 0 7 +7 ☔ View full report in Codecov by Sentry. |
This PR has been breakdown into a few PRs. Close this one. |
This PR adds initial support of NCP in otbr-agent. When otbr-agent
starts, it will detect the Co-processor type. If the Co-processor is
NCP, otbr-agent will still run. But at this moment, it will provide
a dbus API to get the device role of the NCP, which is 'Disabled'
because no other functions are supported now.
This PR implements
NcpSpinel
which is the main class to communicatewith the NCP. Different from
RadioSpinel
in openthread,NcpSpinel
is totally async. There are no blocking operations like
WaitResponse
in
RadioSpinel
.Currently when the Co-processor type is NCP, most modules in otbr-agent
will be initialized and run. These may be added gradually later. And
the dbus server also initiates differently when Co-processor type is NCP.
When it's NCP, the dbus server registers
AsyncGetPropertyHandler
instead of
GetPropertyHandler
used now.Depends-on openthread/openthread#10272