Skip to content

Commit

Permalink
Merge branch 'project-chip:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinpan1 authored Jan 8, 2023
2 parents 34092eb + b953c0b commit 52d5246
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 30 deletions.
62 changes: 33 additions & 29 deletions examples/lighting-app/tizen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,17 @@ Building tizen-arm-light
ninja -C $PW_PROJECT_ROOT/out/tizen-arm-light
```

## Preparing Tizen SDK certificate
## Preparing Tizen SDK certificate (optional)

For packaging the Tizen APP, there is a need to generate an author certificate
and security profile using the commands described below. Change password and
author data as needed.
When building Matter example application, this step is optional. In case when
author certificate and security profile are not found, they will be created
automatically. Automatically generated dummy certificate will have the following
options: name="Matter Example" email="[email protected]" password="0123456789"

In order to create and use custom author certificate, one can use the commands
described below. Change the certificate password and author data as needed. The
security profile alias should not be changed, as the "CHIP" name is used in the
Matter example build system.

```sh
$TIZEN_SDK_ROOT/tools/ide/bin/tizen certificate \
Expand Down Expand Up @@ -59,11 +65,9 @@ rm -r \
After that, normally call scripts to generate the author certificate and
security profile mentioned previously.

### Important

Regenerating the author certificate and security profile makes it necessary to
remove the previously installed Tizen app. You can't reinstall an application on
the Tizen device with a different certificate.
Please note, that regenerating the author certificate and security profile makes
it necessary to remove the previously installed Tizen app. You can't reinstall
an application on the Tizen device with a different certificate.

```sh
pkgcmd -u -n org.tizen.matter.example.lighting
Expand Down Expand Up @@ -108,37 +112,37 @@ installed.

1. Build app:

```
open the Command Palette (Ctrl+Shift+P) ->
Tasks: Run Task ->
Build LightingApp (Tizen)
```
```text
open the Command Palette (Ctrl+Shift+P) ->
Tasks: Run Task ->
Build LightingApp (Tizen)
```
2. SDB connect to device: required to run Tizen commands below if device is
debugged over network
```
open the Command Palette (Ctrl+Shift+P) ->
Tasks: Run Task -> Connect to device (Tizen) ->
insert IP address and port
```
```text
open the Command Palette (Ctrl+Shift+P) ->
Tasks: Run Task -> Connect to device (Tizen) ->
insert IP address and port
```
3. Install app: it is separated from build app step.
```
open the Command Palette (Ctrl+Shift+P) ->
Tasks: Run Task ->
Install LightingApp (Tizen)
```
```text
open the Command Palette (Ctrl+Shift+P) ->
Tasks: Run Task ->
Install LightingApp (Tizen)
```
4. Launch LightingApp with gdbserver attached: require to install app
previously.
```
open the Command Palette (Ctrl+Shift+P) ->
Tasks: Run Task ->
Launch LightingApp with gdbserver attached (Tizen)
```
```text
open the Command Palette (Ctrl+Shift+P) ->
Tasks: Run Task ->
Launch LightingApp with gdbserver attached (Tizen)
```
### Debug
Expand Down
4 changes: 3 additions & 1 deletion examples/platform/esp32/common/CommonDeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
#include "CommonDeviceCallbacks.h"

#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE
#if CONFIG_BT_ENABLED
#include "esp_bt.h"
#if CONFIG_BT_NIMBLE_ENABLED
Expand All @@ -26,6 +27,7 @@
#include "nimble/nimble_port.h"
#endif // CONFIG_BT_NIMBLE_ENABLED
#endif // CONFIG_BT_ENABLED
#endif // CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE

#include "esp_err.h"
#include "esp_heap_caps.h"
Expand Down Expand Up @@ -78,7 +80,7 @@ void CommonDeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, i

case DeviceEventType::kCommissioningComplete: {
ESP_LOGI(TAG, "Commissioning complete");
#if CONFIG_BT_NIMBLE_ENABLED && CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING
#if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE && CONFIG_BT_NIMBLE_ENABLED && CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING

if (ble_hs_is_enabled())
{
Expand Down

0 comments on commit 52d5246

Please sign in to comment.