odelot / aws-mqtt-websockets

Implementation of a middleware to use AWS MQTT service through websockets, aiming the ESP8266 plataform
GNU Lesser General Public License v3.0
231 stars 67 forks source link

Receiving exception (3) in console on example #30

Open spanout opened 6 years ago

spanout commented 6 years ago

Hi. I love the look of this library. When I run the example I get Exception (3): epc1=0x4010011d epc2=0x00000000 epc3=0x00000000 excvaddr=0x4002ea20 depc=0x00000000 followed by a stack dump and wdt reset

AWS shows a new connection coming through so it is connecting as I can see it. Before the crash, I see this in the console:

WiFi connected IP address: 192.168.x.xxx xxxxxxxxx.iot.eu-west-2.amazonaws.com 443 POST $aws/things/xxxxx/shadow/update HTTP/1.1 Content-Type: application/json Connection: close Content-Length: 41 Host: xxxxxxxxxxxxxxx.iot.eu-west-2.amazonaws.com x-amz-content-sha256: 7c22939fcab76690cc822fb0628c4a0c03ab562ec24a0b8f9f0486914a543dd5 x-amz-date: 20180103T182433Z Authorization: AWS4-HMAC-SHA256 Credential=AKIAJNCMRQ6E4C7FEPAA/20180103/eu-west-2/iotdata/aws4_request,SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date,Signature=d755361de2df60e71265688cb40970a83d9ddfaf6b3a32d4fec8069554447cf4

{"state":{"reported": {"foobar": "bar"}}}

odelot commented 6 years ago

@spanout were you using paho from git or from the link in the readme? The git version is not as stable as the one from the link.

the status 443 show a problem with permission. or your credentials are wrong or you dont have iot permission for this user.

try migrate from paho to pubsubclient. I've uploaded an example. It is far more stable. Also upgrade the Websocket library and the Arduino/ESP8266 sdk version.