esp8266-aws_iot
esp8266-aws_iot copied to clipboard
Error -4
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 !!
I have take this same error when I try to connect using port 443. Do you have support to connect using this port?
@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
@copercini Thanks for reply , Valeu :D :+1: