Skip to content
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

ESP32: Add RPC service to lock-app. #7584

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

sweetymhaiske
Copy link
Contributor

@sweetymhaiske sweetymhaiske commented Jun 14, 2021

Problem

  • Lighting example is not present for esp32.
  • Lighting example in CHIP is equivalent to lock-app example.
  • Lighting example has RPC communication.
  • Hence in order to avoid redundancy by replicating the example, just add RPC communication feature to lock-app esp32.

Change overview

Added the necessary changes for pigweed in lock-app esp32.

Testing

  • Using a pigweed RPC console, perform actions on device_service, locking_service, and button_service.

@todo
Copy link

todo bot commented Jun 14, 2021

auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();

// TODO: auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();
return pw::Status::Unimplemented();
}
pw::Status GetDeviceInfo(ServerContext &, const pw_protobuf_Empty &request,
chip_rpc_DeviceInfo &response) {
response.vendor_id = 1234;
response.product_id = 5678;
response.software_version = 0;
return pw::OkStatus();
}


This comment was generated by todo based on a TODO comment in 9a69f92 in #7584. cc @sweetymhaiske.

@todo
Copy link

todo bot commented Jun 14, 2021

auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();

// TODO: auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();
return pw::Status::Unimplemented();
}
pw::Status GetDeviceInfo(ServerContext &, const pw_protobuf_Empty &request,
chip_rpc_DeviceInfo &response) {
response.vendor_id = 1234;
response.product_id = 5678;
response.software_version = 0;
return pw::OkStatus();
}


This comment was generated by todo based on a TODO comment in ca3f3c6 in #7584. cc @sweetymhaiske.

@todo
Copy link

todo bot commented Jun 14, 2021

auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();

// TODO: auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();
return pw::Status::Unimplemented();
}
pw::Status GetDeviceInfo(ServerContext &, const pw_protobuf_Empty & request, chip_rpc_DeviceInfo & response)
{
response.vendor_id = 1234;
response.product_id = 5678;
response.software_version = 0;
return pw::OkStatus();
}
};


This comment was generated by todo based on a TODO comment in 7513bc9 in #7584. cc @sweetymhaiske.

@todo
Copy link

todo bot commented Jun 14, 2021

auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();

// TODO: auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();
return pw::Status::Unimplemented();
}
pw::Status GetDeviceInfo(ServerContext &, const pw_protobuf_Empty & request, chip_rpc_DeviceInfo & response)
{
response.vendor_id = 1234;
response.product_id = 5678;
response.software_version = 0;
return pw::OkStatus();
}
};


This comment was generated by todo based on a TODO comment in 5e7970a in #7584. cc @sweetymhaiske.

@todo
Copy link

todo bot commented Jun 14, 2021

auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();

// TODO: auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();
return pw::Status::Unimplemented();
}
pw::Status GetDeviceInfo(ServerContext &, const pw_protobuf_Empty & request, chip_rpc_DeviceInfo & response)
{
response.vendor_id = 1234;
response.product_id = 5678;
response.software_version = 0;
return pw::OkStatus();
}
};


This comment was generated by todo based on a TODO comment in 6836c28 in #7584. cc @sweetymhaiske.

@todo
Copy link

todo bot commented Jun 14, 2021

auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();

// TODO: auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();
return pw::Status::Unimplemented();
}
pw::Status GetDeviceInfo(ServerContext &, const pw_protobuf_Empty & request, chip_rpc_DeviceInfo & response)
{
response.vendor_id = 1234;
response.product_id = 5678;
response.software_version = 0;
return pw::OkStatus();
}
};


This comment was generated by todo based on a TODO comment in 78135c5 in #7584. cc @sweetymhaiske.

@todo
Copy link

todo bot commented Jun 14, 2021

auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();

// TODO: auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();
return pw::Status::Unimplemented();
}
pw::Status GetDeviceInfo(ServerContext &, const pw_protobuf_Empty & request, chip_rpc_DeviceInfo & response)
{
response.vendor_id = 1234;
response.product_id = 5678;
response.software_version = 0;
return pw::OkStatus();
}
};


This comment was generated by todo based on a TODO comment in cbddae1 in #7584. cc @sweetymhaiske.

@todo
Copy link

todo bot commented Jun 14, 2021

auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();

// TODO: auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();
return pw::Status::Unimplemented();
}
pw::Status GetDeviceInfo(ServerContext &, const pw_protobuf_Empty & request, chip_rpc_DeviceInfo & response)
{
response.vendor_id = 1234;
response.product_id = 5678;
response.software_version = 0;
return pw::OkStatus();
}
};


This comment was generated by todo based on a TODO comment in 48da9ad in #7584. cc @sweetymhaiske.

@dhrishi
Copy link
Contributor

dhrishi commented Jun 14, 2021

Using a pigweed RPC console, perform actions on device_service, locking_service, and button_service.

@sweetymhaiske Will it be possible to edit the description and actually add the commands/responses you've tested. This will help the users to try it out when the support is merged

examples/lock-app/esp32/CMakeLists.txt Outdated Show resolved Hide resolved
examples/lock-app/esp32/main/CMakeLists.txt Outdated Show resolved Hide resolved
static bool uartInitialised;

extern "C" void __wrap_esp_log_write(esp_log_level_t level, const char * tag, const char * format, ...)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that this is duplicated in multiple examples. Is it possible to move it at a common place?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhrishi These changes are already the part of above PR(#7289). I will modify it accordingly when it gets merged.

examples/lock-app/esp32/main/main.cpp Show resolved Hide resolved
@dhrishi
Copy link
Contributor

dhrishi commented Jun 14, 2021

@sweetymhaiske Do you want to update the lock-app README.md with these changes?

@sweetymhaiske
Copy link
Contributor Author

sweetymhaiske commented Jun 14, 2021

@sweetymhaiske Do you want to update the lock-app README.md with these changes?

@dhrishi I will update README once lock-app console gets added to this example. Once this PR gets merge then Rob will work upon that.

@todo
Copy link

todo bot commented Jun 14, 2021

auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();

// TODO: auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();
return pw::Status::Unimplemented();
}
pw::Status GetDeviceInfo(ServerContext &, const pw_protobuf_Empty & request, chip_rpc_DeviceInfo & response)
{
response.vendor_id = 1234;
response.product_id = 5678;
response.software_version = 0;
return pw::OkStatus();
}
};


This comment was generated by todo based on a TODO comment in a77ed24 in #7584. cc @sweetymhaiske.

@mspang
Copy link
Contributor

mspang commented Jun 14, 2021

@rgoliver

@todo
Copy link

todo bot commented Jun 15, 2021

auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();

// TODO: auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();
return pw::Status::Unimplemented();
}
pw::Status GetDeviceInfo(ServerContext &, const pw_protobuf_Empty & request, chip_rpc_DeviceInfo & response)
{
response.vendor_id = 1234;
response.product_id = 5678;
response.software_version = 0;
return pw::OkStatus();
}
};


This comment was generated by todo based on a TODO comment in 3aa1fc9 in #7584. cc @sweetymhaiske.

@woody-apple
Copy link
Contributor

/rebase

@todo
Copy link

todo bot commented Jun 16, 2021

auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();

// TODO: auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();
return pw::Status::Unimplemented();
}
pw::Status GetDeviceInfo(ServerContext &, const pw_protobuf_Empty & request, chip_rpc_DeviceInfo & response)
{
response.vendor_id = 1234;
response.product_id = 5678;
response.software_version = 0;
return pw::OkStatus();
}
};


This comment was generated by todo based on a TODO comment in 060b6ca in #7584. cc @sweetymhaiske.

@sweetymhaiske
Copy link
Contributor Author

/rebase

Done

@todo
Copy link

todo bot commented Jun 16, 2021

auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();

// TODO: auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();
return pw::Status::Unimplemented();
}
pw::Status GetDeviceInfo(ServerContext &, const pw_protobuf_Empty & request, chip_rpc_DeviceInfo & response)
{
response.vendor_id = 1234;
response.product_id = 5678;
response.software_version = 0;
return pw::OkStatus();
}
};


This comment was generated by todo based on a TODO comment in c330375 in #7584. cc @sweetymhaiske.

@woody-apple
Copy link
Contributor

/rebase

@todo
Copy link

todo bot commented Jun 17, 2021

auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();

// TODO: auto err = DeviceLayer::SoftwareUpdateMgr().CheckNow();
return pw::Status::Unimplemented();
}
pw::Status GetDeviceInfo(ServerContext &, const pw_protobuf_Empty & request, chip_rpc_DeviceInfo & response)
{
response.vendor_id = 1234;
response.product_id = 5678;
response.software_version = 0;
return pw::OkStatus();
}
};


This comment was generated by todo based on a TODO comment in aa1f14e in #7584. cc @sweetymhaiske.

@dhrishi
Copy link
Contributor

dhrishi commented Jun 21, 2021

@sweetymhaiske Is anything pending in this PR?

@sweetymhaiske
Copy link
Contributor Author

@sweetymhaiske Is anything pending in this PR?

Nope.

@dhrishi
Copy link
Contributor

dhrishi commented Jun 21, 2021

@woody-apple @andy31415 Can you guys please help? I think one group is pending to review.

@andy31415
Copy link
Contributor

Pullapprove says @dhrishi rejected. that seems at odds with the comments, so I assume it is actually passing. Will manually merge.

@andy31415 andy31415 requested a review from dhrishi June 22, 2021 13:32
@andy31415 andy31415 merged commit 344fc77 into project-chip:master Jun 22, 2021
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants