Skip to content
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

Error -4 #9

Open
vivekscorp opened this issue Aug 29, 2018 · 3 comments
Open

Error -4 #9

vivekscorp opened this issue Aug 29, 2018 · 3 comments

Comments

@vivekscorp
Copy link

WiFi connected
IP address:
192.168.0.148
Heap: 45744
Success to open cert file
cert loaded
Success to open private cert file
private key loaded
Heap: 40224
Attempting MQTT connection...pm open,type:2 0
failed, rc=-4 try again in 5 seconds
Attempting MQTT connection...failed, rc=-4 try again in 5 seconds

Cannot Connect to Device....Please guide !!

@izaiasemjr
Copy link

I have take this same error when I try to connect using port 443. Do you have support to connect using this port?

@copercini
Copy link
Owner

@junym there is a note on AWS site for port 443: Clients wishing to connect using MQTT with X.509 Client Certificate authentication on port 443 must implement the Application Layer Protocol Negotiation (ALPN) TLS extension and pass x-amzn-mqtt-ca as the ProtocolName in the ProtocolNameList. Note that ALPN is not required to open connections using MQTT with X.509 Client Certificate authentication on port 8883.

source: https://docs.aws.amazon.com/iot/latest/developerguide/protocols.html

Another alternative is use MQTT + WebSocket on port 443 from here: https://github.com/odelot/aws-mqtt-websockets

@izaiasemjr
Copy link

@copercini Thanks for reply , Valeu :D 👍

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

No branches or pull requests

3 participants