SmartThingsCommunity / st-device-sdk-c

SmartThings SDK for Direct Connected Devices for C
Other
118 stars 126 forks source link

Handling of wifi_init failures #77

Closed toddaustin07 closed 3 years ago

toddaustin07 commented 3 years ago

Hello - I've observed that even if iot_bsp_wifi_init returns an error, the core SDK seems to ignore and continues anyway. If an unrecoverable error is encountered during wifi init (device is not functioning or there is some configuration problem), are you expecting the wifi module to exit? I would think the core SDK should have a chance to clean up and exit, or return the st_conn_start API call back to the application with an error.

stdk-scm commented 3 years ago

Dear toddaustin07

Thanks for your advice to add error-handling during wifi init. We need to add error-handling codes for iot_bsp_wifi_init()

Thanks

Kwang-Hui commented 3 years ago

iot_bsp_wifi_init() error handling patch has been merged https://github.com/SmartThingsCommunity/st-device-sdk-c/commit/b1fd10dfd64ad50536eab147e1e28a7f57877166#diff-a424814a77d283b256630dba916da0315f13c30f82e9cdcefb477278651f77e3