Skip to content

Commit

Permalink
Fix CD, move certs and build
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Oct 24, 2024
1 parent e4f7ea7 commit 0354319
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
3 changes: 3 additions & 0 deletions examples/valve/silabs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,13 @@ silabs_executable("drink-machine") {

sources = [
"${examples_common_plat_dir}/main.cpp",
"include/DrinkMachineCommon.h",
"include/DrinksMachineDeviceDriver.h",
"src/AppTask.cpp",
"src/DrinksMachineDeviceDriver.cpp",
"src/ZclCallbacks.cpp",
"src/dm_dac.cpp",
"src/dm_pai.cpp",
]

deps = [
Expand Down
2 changes: 1 addition & 1 deletion examples/valve/silabs/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#include <lib/core/CHIPError.h>
#include <platform/CHIPDeviceLayer.h>

#include "DrinksMachineDeviceDriver.h"
#include "DrinkMachineCommon.h"
#include "DrinksMachineDeviceDriver.h"

/**********************************************************
* Defines
Expand Down
32 changes: 12 additions & 20 deletions examples/valve/silabs/include/DrinkMachineCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,26 +156,18 @@ class DrinkMachineCredentialsProvider : public chip::Credentials::DeviceAttestat
// credentials/test/certification-declaration/Chip-Test-CD-Signing-Key.pem --out cd.bin -f 1 -V 6006 -p B002 -d 000E -c
// "ZIG0000000000000000" -l 0 -i 0 -n 0001 -t 0
const uint8_t kCdContents[] = {
0x30, 0x3c, 0x38, 0x31, 0x3e, 0xe7, 0x5e, 0x46, 0x20, 0x20, 0x2a, 0x3c, 0x38, 0x36, 0x3e, 0x48, 0x3c, 0x38, 0x36, 0x3e,
0xf7, 0x5e, 0x4d, 0x5e, 0x41, 0x5e, 0x47, 0x5e, 0x42, 0xa0, 0x3c, 0x38, 0x31, 0x3e, 0xd9, 0x30, 0x3c, 0x38, 0x31, 0x3e,
0xd6, 0x5e, 0x42, 0x5e, 0x41, 0x5e, 0x43, 0x31, 0x5e, 0x4d, 0x30, 0x5e, 0x4b, 0x5e, 0x46, 0x20, 0x60, 0x3c, 0x38, 0x36,
0x3e, 0x48, 0x5e, 0x41, 0x65, 0x5e, 0x43, 0x5e, 0x44, 0x5e, 0x42, 0x5e, 0x41, 0x30, 0x43, 0x5e, 0x46, 0x20, 0x2a, 0x3c,
0x38, 0x36, 0x3e, 0x48, 0x3c, 0x38, 0x36, 0x3e, 0xf7, 0x5e, 0x4d, 0x5e, 0x41, 0x5e, 0x47, 0x5e, 0x41, 0xa0, 0x36, 0x5e,
0x44, 0x34, 0x5e, 0x55, 0x24, 0x5e, 0x40, 0x5e, 0x41, 0x25, 0x5e, 0x41, 0x5e, 0x46, 0x60, 0x36, 0x5e, 0x42, 0x5e, 0x45,
0x5e, 0x42, 0xb0, 0x5e, 0x58, 0x24, 0x5e, 0x43, 0x5e, 0x4e, 0x2c, 0x5e, 0x44, 0x5e, 0x53, 0x5a, 0x49, 0x47, 0x30, 0x30,
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x24, 0x5e, 0x45, 0x5e, 0x40, 0x24,
0x5e, 0x46, 0x5e, 0x40, 0x24, 0x5e, 0x47, 0x5e, 0x41, 0x24, 0x5e, 0x48, 0x5e, 0x40, 0x5e, 0x58, 0x31, 0x7d, 0x30, 0x7b,
0x5e, 0x42, 0x5e, 0x41, 0x5e, 0x43, 0x3c, 0x38, 0x30, 0x3e, 0x5e, 0x54, 0x62, 0xfa, 0x3c, 0x38, 0x32, 0x3e, 0x33, 0x59,
0xac, 0xfa, 0xa9, 0x3c, 0x39, 0x36, 0x3e, 0x3e, 0x5e, 0x5c, 0xfa, 0x5e, 0x54, 0x0a, 0xdd, 0xf5, 0x5e, 0x44, 0xf3, 0x71,
0x60, 0x30, 0x5e, 0x4b, 0x5e, 0x46, 0x20, 0x20, 0x60, 0x3c, 0x38, 0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 0x01, 0x30, 0x43,
0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x36, 0x04, 0x34, 0x15, 0x24, 0x00, 0x01, 0x25,
0x01, 0x06, 0x60, 0x36, 0x02, 0x05, 0x02, 0xb0, 0x18, 0x24, 0x03, 0x42, 0x2c, 0x04, 0x13, 0x5a, 0x49, 0x47, 0x30, 0x30,
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x24, 0x05, 0x00, 0x24, 0x06, 0x00,
0x24, 0x07, 0x01, 0x24, 0x08, 0x00, 0x18, 0x31, 0x7e, 0x30, 0x7c, 0x02, 0x01, 0x03, 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33,
0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, 0xf5, 0x04, 0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09,
0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03,
0x02, 0x04, 0x48, 0x30, 0x46, 0x02, 0x21, 0x00, 0x95, 0x30, 0x0b, 0xbb, 0x98, 0x6f, 0xf7, 0x8f, 0xa5, 0x72, 0xd3, 0x82,
0x5c, 0x56, 0x51, 0x2a, 0xf6, 0x5b, 0xee, 0x2f, 0x0b, 0x12, 0x1e, 0x3d, 0x35, 0x6d, 0x01, 0xa2, 0xeb, 0x02, 0xce, 0x1b,
0x02, 0x21, 0x00, 0xd9, 0x8e, 0x6e, 0xc7, 0x2b, 0xb9, 0xf7, 0x84, 0x17, 0x3d, 0xe9, 0xf7, 0x47, 0x69, 0xe6, 0x70, 0x59,
0xbd, 0xf5, 0x5e, 0xbe, 0xe3, 0x9f, 0xf9, 0x4f, 0x69, 0x4e, 0x7a, 0x61, 0x61, 0xdb, 0x5b
};
return chip::CopySpanToMutableSpan(chip::ByteSpan{ kCdContents }, out_cd_buffer);
}
Expand Down
3 changes: 2 additions & 1 deletion examples/valve/silabs/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ CHIP_ERROR AppTask::Init()
SILABS_LOG("BaseApplication::Init() failed");
appError(err);
}
google::matter::DrinkMachineMatterProviders::GetInstance().Init();

return err;
}
Expand All @@ -199,7 +200,7 @@ void AppTask::AppTaskMain(void * pvParameter)
AppEvent event;

osMessageQueueId_t sAppEventQueue = *(static_cast<osMessageQueueId_t *>(pvParameter));
chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(ButtonEventHandler);
chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(AppTask::ButtonEventHandler);

CHIP_ERROR err = sAppTask.Init();
if (err != CHIP_NO_ERROR)
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 0354319

Please sign in to comment.