-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add a src/platform/Darwin and get it to link with the iOS demo app #1497
Add a src/platform/Darwin and get it to link with the iOS demo app #1497
Conversation
I we ever did that I may need some help from @pan-apple about the Mbedtls thing. In order to get the code to link I add to force 2 files to go into the build that were normally ignored if CONFIG_DEVICE_LAYER is set. I think we may need to some sort of special config files for Mbedtls but it is not crystal clear to me which flags to set/unset. |
be56b90
to
303c645
Compare
Pushed an updated version since there was an error initializing the configuration manager. |
} // namespace DeviceEventType | ||
|
||
/** | ||
* Represents platform-specific event information for Linux platforms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Darwin * platforms
|
||
void ConfigurationManagerImpl::_InitiateFactoryReset() | ||
{ | ||
PlatformMgr().ScheduleWork(DoFactoryReset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these APIs are only useful for an accessory. We are not planning for Darwin based accessories. A "Factory" reset has no meaning on a Controller. Maybe we'll have to go stub out some of this.
} | ||
|
||
#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION | ||
CHIP_ERROR ConfigurationManagerImpl::GetWiFiStationSecurityType(Profiles::NetworkProvisioning::WiFiSecurityType & secType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to support this on darwin at all right? :)
…supported for 917 NCP Merge in WMN_TOOLS/matter from Disabling_LCD_for_917_NCP to RC_2.3.0-1.3 Squashed commit of the following: commit f5bf7a9f5b12f9299526e739e1ebc78a285c4621 Author: chbansal <chirag.bansal@silabs.com> Date: Wed Jan 17 20:36:15 2024 +0530 removing the comment of todo commit 4b65f3694bcb402c34608643b5518ad4141e6a6d Author: chbansal <chirag.bansal@silabs.com> Date: Wed Jan 17 20:34:59 2024 +0530 moving the disable lcd from shell script to silabs_board.gni commit 4c60edf53cc0fcef095d1e6662cffb88ab225255 Author: bhmanda-silabs <bhavani.manda@silabs.com> Date: Wed Jan 17 16:27:17 2024 +0530 Added disable_lcd=true as LCD is not supported for 917 NCP
Problem
With the current setup a lot of logic code will lives into the Darwin Framework. An other approach would be to add a new Darwin platform under src/platform and use it for the underlying logic, such as the event loop control, the bluetooth implementation, ...
Then this code could be glued to the iOS app which will then call InitChipStack at some point.
As an example this approach will contradict #1460 where the BLEPlatformDelegate code lives into the Framework.
Here it will lives into src/platform/Darwin/BleManagerImpl.cpp
Also, in #1401 I removed the service events code from the Darwin Framework to use the one from CHIPDeviceController. One of the thing I have not added back yet is the lock/unlock mechanism that was used in order to not keep the lock for the whole duration of the
select
. The logical followup for this, if this PR ever lands, would be to use DeviceLayer::PlatformMgr().LockChipStack(); and DeviceLayer::PlatformMgr().UnlockChipStack(); in ChipDeviceController::ServiceEvents() to add it back.So basically the idea is to move some of the logic from src/darwin/Framework to src/platform/Darwin