Repository navigation
[SL-ONLY] Porting the MQTTs and HTTPs features on the newer release #1206
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
Draft
Rohan Sahay (rosahay-silabs)
wants to merge
4
commits into
release_2.10-1.6.1
Choose a base branch
from
feature/port-matter-services
base: release_2.10-1.6.1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a956cb1
[SL-ONLY] MATTER-6537: Adds NWP HTTPs service demo (#1146)
rosahay-silabs 44324be
[SL-ONLY] MATTER-6525: Adds PAHO MQTTs support (#1141)
rosahay-silabs 7cf82dc
[SL-ONLY] MATTER-7023: Changes as per feedback on Alpha1 (#1165)
rosahay-silabs 92dfa7b
[SL-ONLY] Make MQTT Subscribe/Publish QoS configurable via MqttClient…
chirag-silabs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /* | ||
| * | ||
| * Copyright (c) 2026 Project CHIP Authors | ||
| * All rights reserved. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| /** | ||
| * @file cacert.h | ||
| * @brief Sample (generated) CA certificate for HTTPs and MQTTs clients | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| const unsigned char kCaCertExample[] = ""; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: |
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
examples/thermostat/silabs/include/https_offload_example.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| /* | ||
| * | ||
| * Copyright (c) 2026 Project CHIP Authors | ||
| * All rights reserved. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include "sl_status.h" | ||
|
|
||
| #ifndef HTTP_SERVER_IP // IP address of the HTTP server | ||
| #error "HTTP_SERVER_IP is not defined" | ||
| #endif | ||
|
|
||
| #ifndef HTTP_HOSTNAME // used for SNI validation | ||
| #error "HTTP_HOSTNAME is not defined" | ||
| #endif | ||
|
|
||
| #ifndef HTTP_PORT // port of the HTTP server | ||
| #error "HTTP_PORT is not defined" | ||
| #endif | ||
|
|
||
| #ifndef HTTP_URL | ||
| #define HTTP_URL "/index.html" // URL of the resource on the HTTP server | ||
| #endif | ||
|
|
||
| #ifndef HTTP_USER | ||
| #define HTTP_USER "john" // username for the HTTP server | ||
| #endif | ||
|
|
||
| #ifndef HTTP_PASS | ||
| #define HTTP_PASS "doe" // password for the HTTP server | ||
| #endif | ||
|
|
||
| #ifndef HTTP_POST_DATA | ||
| #define HTTP_POST_DATA \ | ||
| "employee_name=MR.REDDY&employee_id=RSXYZ123&designation=Engineer&company=SILABS&location=Hyderabad" // POST data for the HTTP | ||
| // // server | ||
| #endif | ||
|
|
||
| /** Load config + start HTTPS offload client demo. */ | ||
| sl_status_t https_client_demo_start(void); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| /* | ||
| * | ||
| * Copyright (c) 2026 Project CHIP Authors | ||
| * All rights reserved. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| * @brief Host LwIP Paho MQTT/MQTTS demo entry point | ||
| * 1. Init the MqttClient | ||
| * 2. Connect to the MQTT broker | ||
| * 3. Subscribe to the topic | ||
| * 4. Publish the message | ||
| * 5. Disconnect from the MQTT broker (optional) | ||
| * 6. Deinit the MqttClient (optional) | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include "sl_status.h" | ||
|
|
||
| #ifndef MQTT_BROKER_IP | ||
| #error "MQTT_BROKER_IP is not defined" | ||
| #endif | ||
|
|
||
| #ifndef MQTT_TLS_HOSTNAME // The TLS hostname of your MQTT broker | ||
| #error "MQTT_TLS_HOSTNAME is not defined" | ||
| #endif | ||
|
|
||
| #ifndef MQTT_BROKER_PORT // The port of your MQTT broker | ||
| #error "MQTT_BROKER_PORT is not defined" | ||
| #endif | ||
|
|
||
| #ifndef MQTT_CLIENT_PORT // The port of your MQTT client | ||
| #define MQTT_CLIENT_PORT 5003 | ||
| #endif | ||
|
|
||
| #ifndef MQTT_CLIENT_ID // The ID of your MQTT client | ||
| #define MQTT_CLIENT_ID "WISECONNECT_SDK_TOPIC" | ||
| #endif | ||
|
|
||
| #ifndef MQTT_USERNAME // The username of your MQTT client | ||
| #define MQTT_USERNAME "john" | ||
| #endif | ||
|
|
||
| #ifndef MQTT_PASSWORD // The password of your MQTT client | ||
| #define MQTT_PASSWORD "doe" | ||
| #endif | ||
|
|
||
| #ifndef MQTT_TOPIC // The topic of your MQTT client | ||
| #define MQTT_TOPIC "THERMOSTAT-DATA" | ||
| #endif | ||
|
|
||
| #ifndef MQTT_PUBLISH_MESSAGE // The message to publish to the MQTT broker | ||
| #define MQTT_PUBLISH_MESSAGE "THIS IS MQTT CLIENT DEMO FROM APPLICATION" | ||
| #endif | ||
|
|
||
| /** Load config + run MQTT demo on the MqttClient service thread (idempotent). */ | ||
| sl_status_t mqtt_client_demo_start(void); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /* | ||
| * | ||
| * Copyright (c) 2026 Project CHIP Authors | ||
| * All rights reserved. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| /* | ||
| * @file index_html.h | ||
| * @brief HTTP page for the HTTPs offload client application, | ||
| * this page is uploaded to the server. | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| const unsigned char sl_index[] = | ||
| "<html><head><style " | ||
| "type=\"text/css\">body{font-family:Arial;background:#EFF4F3;margin:0;color:#32403f;}#wp{width:600px;margin:0 " | ||
| "auto;}p{display:inline-block;font-weight:bold;text-align:right;margin:9px 30px 9px " | ||
| "0;}p,input{width:200px;}h1{text-align:center;font-size:3em;margin:0;padding:20px 0;color:#d6e4e1;border:1px solid " | ||
| "#7F8D8C;text-shadow:1px 1px 0 #333;}input{height:24px;border:1px solid #ccc;border-radius:4px;padding:2px " | ||
| "5px;margin:0 6px 0 20px;}input:focus{border-color:#32403f;}form{padding-top:20px;border-top:1px solid " | ||
| "#2B3736;}.btn{width:100px;margin:15px 0 15px 250px;font-weight:700;color:#fff;border:1px solid " | ||
| "#000;}h1,.btn{background:#485c5a;background:linear-gradient(#485c5a,#32403f);}.btn:active{background:#32403f;}input[" | ||
| "type=checkbox],input[type=radio]{width:16px;height:14px;}#msg{margin:0 0 10px 0;}</style></head><body><h1>Employee " | ||
| "Details</h1><form id=\"fm\" method=\"post\" action=\"#\" onsubmit=\"return pt()\"><div " | ||
| "id=\"wp\"></div><p>Employee_name:</p><input id=\"emp_name\" name=\"emp_name\"><p>Employee ID:</p><input " | ||
| "id=\"emp_id\" name=\"emp_id\"><p>Designation:</p><input id=\"designation\" " | ||
| "name=\"designation\"><p>Company:</p><input id=\"company\" name=\"company\"><p>Location:</p><input id=\"location\" " | ||
| "name=\"location\">"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
That seems like a huge increase in heap...