I'm using above for my Raspberry PI to connect to Azure IoT central SaaS. It has a expiration for SAS token, which can be managed as device.setTokenExpiration(totalSeconds). However, in case of token expired, the program will exit, and the re-connection won't work since the token has expired does not accept any more commands(e.g iotc.disconnect() ). How to make sure the device can always connect? Can we set token to No expiration? if not, is there a way to renew the token or recycle the old client instance so the device can reconnect?
iotc - Azure IoT Central - Python (light) device SDK https://pypi.org/project/iotc/
I'm using above for my Raspberry PI to connect to Azure IoT central SaaS. It has a expiration for SAS token, which can be managed as device.setTokenExpiration(totalSeconds). However, in case of token expired, the program will exit, and the re-connection won't work since the token has expired does not accept any more commands(e.g iotc.disconnect() ). How to make sure the device can always connect? Can we set token to No expiration? if not, is there a way to renew the token or recycle the old client instance so the device can reconnect?