Skip to content

Commit

Permalink
Fix esp32 wifi and add RPC support on linux (project-chip#19260)
Browse files Browse the repository at this point in the history
* Chef - Extended Pigweed RPC support (project-chip#17781)

* Build flash_script package for ESP32

Change-Id: I4e0375c9b9837b3b9f8a3d2570635536e7e34e42
Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1419520
Reviewed-by: Doug Ferraz <rochaferraz@google.com>

* new: Wifi and Descriptor clusters on ESP32

Change-Id: I37b61425a55d8210c2286becce47917fddf54a3f
Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1418359
Reviewed-by: Rob Oliver <rgoliver@google.com>
Reviewed-by: Kevin Cheung <kkmcheun@google.com>
Reviewed-by: Jerry Lee <jerrymhlee@google.com>

* new: added stub file. Included callbacks for successful operation of lock/unlock commands

Change-Id: I9f4d601feb3b043d3c6689775bcaf40a8c5564d2
Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1420959
Reviewed-by: Michael Spang <spang@google.com>
Reviewed-by: Jerry Lee <jerrymhlee@google.com>

* Enable PW RPC server on chef-built virtual device app

Change-Id: I878955e9df26e893c136650654019a8fa14e2a8b
Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1417979
Reviewed-by: Doug Ferraz <rochaferraz@google.com>

* cosmetic change

Change-Id: Ia2063a395a8d3f16965356d4a76b0d9df0834e57

* changes to linux pigweed dependencies. Still has issues building Pigweed

Change-Id: I2be4e81f6c2e14112e31a0803813ef56d012b206

* Fix nrfconnect compilation errors (project-chip#17713)

* Fix nrfconnect compilation errors

* Chef: fix arguments for clean build

* Build flash_script package for ESP32

Change-Id: I4e0375c9b9837b3b9f8a3d2570635536e7e34e42
Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1419520
Reviewed-by: Doug Ferraz <rochaferraz@google.com>

* new: Wifi and Descriptor clusters on ESP32

Change-Id: I37b61425a55d8210c2286becce47917fddf54a3f
Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1418359
Reviewed-by: Rob Oliver <rgoliver@google.com>
Reviewed-by: Kevin Cheung <kkmcheun@google.com>
Reviewed-by: Jerry Lee <jerrymhlee@google.com>

* new: added stub file. Included callbacks for successful operation of lock/unlock commands

Change-Id: I9f4d601feb3b043d3c6689775bcaf40a8c5564d2
Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1420959
Reviewed-by: Michael Spang <spang@google.com>
Reviewed-by: Jerry Lee <jerrymhlee@google.com>

* Enable PW RPC server on chef-built virtual device app

Change-Id: I878955e9df26e893c136650654019a8fa14e2a8b
Reviewed-on: https://team-review.git.corp.google.com/c/npe-tse-chip-sdk/third_party/connectedhomeip/+/1417979
Reviewed-by: Doug Ferraz <rochaferraz@google.com>

* cosmetic change

Change-Id: Ia2063a395a8d3f16965356d4a76b0d9df0834e57

* changes to linux pigweed dependencies. Still has issues building Pigweed

Change-Id: I2be4e81f6c2e14112e31a0803813ef56d012b206

* Restyled by gn

* Restyled by autopep8

* Restyled by gn

Co-authored-by: Sebastian Mauer <mauimauer@google.com>
Co-authored-by: MT Tsai <mttsai@google.com>
Co-authored-by: vinitg1 <62729931+vinitg1@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Change-Id: I827aa39ea41b8084d6fdca202e5a87e0f29cb4f3

* fix: added initialization to platform wifi network commissioning instance (project-chip#17983)

Change-Id: I03b6b523d4c4557ab6cc432216e48b6d6b2b6964

* Chef - Revert changes on lighting-app that separate wifi and thread

Co-authored-by: Douglas Rocha Ferraz <rochaferraz@google.com>
Co-authored-by: Sebastian Mauer <mauimauer@google.com>
Co-authored-by: MT Tsai <mttsai@google.com>
Co-authored-by: vinitg1 <62729931+vinitg1@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
6 people committed Jun 25, 2022
1 parent 157cc9a commit ee777df
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
10 changes: 9 additions & 1 deletion examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,11 @@ def main(argv: Sequence[str]) -> None:
shell.run_cmd(f"rm -rf {_CHEF_SCRIPT_PATH}/esp32/build")
shell.run_cmd("idf.py fullclean")
shell.run_cmd("idf.py build")
shell.run_cmd("idf.py build flashing_script")
shell.run_cmd(
f"(cd build/ && tar cJvf $(git rev-parse HEAD)-{options.sample_device_type_name}.tar.xz --files-from=chip-shell.flashbundle.txt)")
shell.run_cmd(
f"cp build/$(git rev-parse HEAD)-{options.sample_device_type_name}.tar.xz {_CHEF_SCRIPT_PATH}")
elif options.build_target == "nrfconnect":
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/nrfconnect")
nrf_build_cmds = ["west build -b nrf52840dk_nrf52840"]
Expand All @@ -567,6 +572,8 @@ def main(argv: Sequence[str]) -> None:
import("//build_overrides/chip.gni")
import("${{chip_root}}/config/standalone/args.gni")
chip_shell_cmd_server = false
chip_build_libshell = true
chip_config_network_layer_ble = false
target_defines = ["CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID={options.vid}", "CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID={options.pid}", "CONFIG_ENABLE_PW_RPC={'1' if options.do_rpc else '0'}"]
"""))
with open(f"{_CHEF_SCRIPT_PATH}/linux/sample.gni", "w") as f:
Expand All @@ -577,7 +584,8 @@ def main(argv: Sequence[str]) -> None:
if options.do_clean:
shell.run_cmd(f"rm -rf out")
if options.do_rpc:
shell.run_cmd("gn gen out --args='import(\"//with_pw_rpc.gni\")'")
shell.run_cmd(
"gn gen out --args='import(\"//with_pw_rpc.gni\")'")
else:
shell.run_cmd("gn gen out --args=''")
shell.run_cmd("ninja -C out")
Expand Down
6 changes: 4 additions & 2 deletions examples/chef/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ project_dir = "./.."

chip_data_model("chef-data-model") {
zap_file = "${project_dir}/devices/${sample_zap_file}"

zap_pregenerated_dir =
"${chip_root}/examples/chef/out/${sample_name}/zap-generated/"
is_server = true
}

executable("${sample_name}") {
sources = [ "${project_dir}/linux/main.cpp" ]
sources = [
"${project_dir}/common/stubs.cpp",
"${project_dir}/linux/main.cpp",
]

deps = [
":chef-data-model",
Expand Down
9 changes: 5 additions & 4 deletions examples/chef/nrfconnect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ if(CONFIG_ENABLE_CHIP_SHELL)
endif(CONFIG_ENABLE_CHIP_SHELL)

target_sources(app PRIVATE
${CHEF}/nrfconnect/main.cpp
${GEN_DIR}/callback-stub.cpp
${GEN_DIR}/IMClusterCommandHandler.cpp
${NRFCONNECT_COMMON}/util/ThreadUtil.cpp
${CHEF}/nrfconnect/main.cpp
${CHEF}/common/stubs.cpp
${GEN_DIR}/callback-stub.cpp
${GEN_DIR}/IMClusterCommandHandler.cpp
${NRFCONNECT_COMMON}/util/ThreadUtil.cpp
)

message(STATUS ${CHEF}/devices/${SAMPLE_NAME}.zap)
Expand Down

0 comments on commit ee777df

Please sign in to comment.