Comments (3)
A few more details...
I did try changing the data type of the QRCode to MutableCharSpan and copying the returned string as QRCode.data()
, which compiles. The problem I am seeing now is when calling GetQRCode() it returns CHIP_ERROR_BUFFER_TOO_SMALL (0x19).
I am assuming this is due to declaring QRCode simply as MutableCharSpan QRCode;
. How do you provide storage when declaring the variable? ...or after?
from esp32-arduino-matter.
ok, it wasn't easy/obvious, but I got it working. Here's the code
.
.
.
ESP_LOGE(TAG, "Calling esp_matter::start()\n");
// Start Matter device
esp_matter::start(on_device_event);
// Get QR Code
std::string QRCode = " "; // 33 chars
CHIP_ERROR err;
ESP_LOGE(TAG, "Calling PrintOnboardingCodes()\n");
// Print codes needed to setup Matter device
#if 0
PrintOnboardingCodes(RendezvousInformationFlags(RendezvousInformationFlag::kOnNetwork));
#else
err = GetQRCode((MutableCharSpan &)QRCode, RendezvousInformationFlag::kOnNetwork);
if (err == CHIP_NO_ERROR)
{
// strcpy (OperatingParameters.MatterQR, QRCode.data());
strcpy (OperatingParameters.MatterQR, QRCode.c_str());
ESP_LOGE(TAG, "QR Pairing Code: '%s'\n", OperatingParameters.MatterQR);
} else {
ESP_LOGE(TAG, "Failed to GetQRCode() -- Error: %d\n", err.AsInteger());
}
#endif
from esp32-arduino-matter.
Thanks for sharing it ;)
Btw. there should be possibility to set these codes, however I haven't tested it:
https://github.com/espressif/esp-matter/blob/4707b88ceb5e6328f7b571b652487507429c1891/docs/en/developing.rst (2.5 Factory Data Providers section)
from esp32-arduino-matter.
Related Issues (20)
- How to add custom data on endpoint
- Arduino IDE update 2.2.1 breaks esp-arduino-matter HOT 3
- Default examples not working HOT 4
- Turning off Log messages HOT 1
- publish to platformio registry
- Is there a new release on the horizon? HOT 2
- The example uses 128% of the program memory HOT 1
- How to generate device-specific settings
- Support for ESP32-C6 HOT 2
- Device shows as offline in Google Home
- UnknownPackageError: Could not find the package with 'espressif32 @ 2.0.14' requirements for your system 'linux_x86_64'
- Sleep Mode Compatibility HOT 2
- Unable to Connect the ESP32 to Google home/Apple Mobile Device HOT 1
- Linking problem in platformio
- How to restore default (factory reset) to be able to repair the device
- Help with thermostat type devices, alexa disabling use outside 35-95F HOT 2
- Arduino IDE Update broke the library? HOT 1
- device working but not using the wifi?
- Question to Versions HOT 3
- Issue on default execution of "Light" -- wifi: invalid magic number 7 error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp32-arduino-matter.