-
Notifications
You must be signed in to change notification settings - Fork 57
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 support #182
esp32 support #182
Conversation
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.
Greetings,
I'm working with Insteon and am eagerly awaiting the completion of esp support for the PubNub SDK. Seeing as this port is nearing completion, I have experimented with integrating it into our project have have some feedback as a result of that experiment:
- In
core/pubnub_alloc_static.c
,pubnub_alloc
relies on local static FreeRTOS mutexes, but there is nothing in that file which callspubnub_mutex_init
on them, thus causing an exception at runtime for our project:
pubnub_t *pubnub_alloc(void)
{
size_t i;
for (i = 0; i < PUBNUB_CTX_MAX; ++i) {
// Something like this is needed...
// if (!m_aCtx[i].monitor) {
// pubnub_mutex_init(m_aCtx[i].monitor)
// }
pubnub_mutex_lock(m_aCtx[i].monitor);
if (m_aCtx[i].state == PBS_NULL) {
m_aCtx[i].state = PBS_IDLE;
pubnub_mutex_unlock(m_aCtx[i].monitor);
return m_aCtx + i;
}
pubnub_mutex_unlock(m_aCtx[i].monitor);
}
return NULL;
}
- Would you consider incorporating this into espressif’s Component Registry? Their guide is provided here. This would be a great opportunity for you as it could make your service much more discoverable to those exploring the ESP32 for future projects. For us, it would greatly simplify the process of keeping up-to-date with the latest release of your SDK.
Hello @blake-spangenberg ! We're planning to release it this week but if you will notice any other issues with the code - let us know about it. We want to be sure that our product satisfies our customer needs <3. |
That's a great idea. I will take a look into that and I will try to satisfy all the needs required by the registry. |
@blake-spangenberg Until then you will need to rawly |
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.
LGTM!
There are few small questions.
Co-authored-by: Serhii Mamontov <[email protected]>
@pubnub-release-bot release |
🚀 Release successfully completed 🚀 |
Can confirm publish/subscribe is working on our esp32-based hardware platform. Thanks for the hard work everyone! We'll be in touch if there's any problems or follow-up questions. |
Thank you for the confirmation and have fun with our SDK <3 |
feat: ESP32 platform support
Provided support for ESP32 devices via ESP-IDF framework
feat: MBedTLS support
Provided support for MBedTLS library used within esp32 platform
refactor:
strcpy
instead ofstrncpy
when it is safeReplace
strncpy
withstrcpy
in blocks where it is safer to be used.