-
Notifications
You must be signed in to change notification settings - Fork 5
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
Preparation for library based QR-Code generation - setup identifier #2
base: master
Are you sure you want to change the base?
Conversation
cduvenhorst
commented
Oct 25, 2020
- Added hap.setupid configuration option.
- Moved display and nfc event emitting functions for transparency to the corresponding platform abstraction layer files
- Added setup identifier loading for hap simple configuration. If none was supplied, generate a unique one.
* Moved for transparency display and nfc event emitting functions to the corresponding platform abtraction layer files * Added setup identifier loading for hap simple configuration
src/mgos_homekit_adk.c
Outdated
|
||
char* err = NULL; | ||
save_cfg(&mgos_sys_config, &err); | ||
printf("Saving configuration: %s\n", err ? err : "no error"); |
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.
Ooops. Will be corrected ..
looks good! |
actually, can you describe the flow of the setup with QR code? starting with a blank device, what will happen? |
Ok! Meanwhile I ran into a problem which seems to be caused by the dynamic buffer allocation or the helper functions in the HAP lib. Have to dig a little deeper to nail it. Pairing fails based on dynamic setup info. |
sounds good. when chasing a memory leak or corruption issue, using "grown up" tools such as address sanitizer is invaluable. on a Ubuntu machine with clang installed (apt install clang), run
in the main source directory, then run the binary:
go to http://localhost:8080/ to access the web interface, pair, etc. if your firmware does something nasty with a pointer, it will crash and you'll get a full trace. |
…d honor the setting of a fixed setup identifier * Added mgos_hap_setup_id_from_string(..) to mgos_hap.h * Fixed persistence of setup identifier for a given config level * Removed a stale „printf“
I will update example-homekit for a POC. |
.bleSupported = (server->transports.ble != NULL) }; | ||
HAPAccessoryCategory category = s_acc->category; | ||
|
||
LOG(LL_INFO, |
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.
Leaking sensitive info ... will be fixed.
Ok. This is caused by memory limitations if building for esp8266. The esp32 platform just runs fine with dynamic setup codes. |
i can take a look, just tell me how to test |
Strange. If you activate the accessory setup info server (set setupDisplay in happlatform) everything works with esp32, but esp8266 will not pair. I suspect memory limitations. I have updated my example-homekit fork on branch "qrcode" for you to test. Simply provision wifi and head over to "http://<ip>/homekit/pairing" and try to pair while having a look at the console. |