Skip to content

CPSockets Updates #30

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

Closed
wants to merge 2 commits into from
Closed

CPSockets Updates #30

wants to merge 2 commits into from

Conversation

askpatrickw
Copy link
Contributor

will fix #24 (hopefully, someday...)

All the IoT Hub Examples are working.

The IoT Central examples all fail and are unable to connect.
You can see that the device registration works, it gets back iot central's hub.
But when connecting, it fails with OSError: 23 within the try in _get_connect_socket

20914.2: INFO - Establishing a SECURE SSL connection to iotc-snip-snip-snip-snip-snip.azure-devices.net:8883
Traceback (most recent call last):
  File "code.py", line 122, in <module>
  File "/lib/adafruit_azureiot/iotcentral_device.py", line 163, in connect
  File "/lib/adafruit_azureiot/iot_mqtt.py", line 387, in connect
  File "/lib/adafruit_azureiot/iot_mqtt.py", line 133, in _create_mqtt_client
  File "/lib/adafruit_minimqtt/adafruit_minimqtt.py", line 439, in connect
  File "/lib/adafruit_minimqtt/adafruit_minimqtt.py", line 273, in _get_connect_socket
RuntimeError: Repeated socket failures

I'm now wondering if the IoT Central API changed...

@askpatrickw
Copy link
Contributor Author

@jimbobbennett I'm wondering if you know of a change in IoT Central that we need to sync-up to, or some other such change I'm just not aware of. tx!

@jimbobbennett
Copy link
Collaborator

I've done some digging, but have no idea why it's not working, and I can't see anything we're doing different to the unofficial MS Python IoT Central SDK. I'll follow up with the SDK team here to see if anything has changed.

@jimbobbennett
Copy link
Collaborator

I'm getting nowhere with this. It looks like something is different between the IoT Hubs created by IoT Central, and a standard IoT Hub created in the Azure Portal.

I tried generating the MQTT settings for the IoT Central hub using the official Azure Python SDK, and the CircuitPython library can't connect using the same settings.

I've asked around here so will update if I get more info.

@askpatrickw
Copy link
Contributor Author

Thanks @jimbobbennett. Although frustrating, at least we both reproduced the same issue.

@askpatrickw
Copy link
Contributor Author

Closing this PR which is now being fixed in PR #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CPython sockets compatibility
2 participants