Open dennisbach opened 7 years ago
Hi @dennisbach , I finally get it work. Now it can connect to AWS IoT via MQTT successfully. I only met these Exception 29 or 28 when the connecting process failed. It means that the CA, Cert, Key may be incorrect. Please give us more information to help you solved the problem.
Hi @JimmyTai First, about CA, Cert, Key, I already tested with MQTT.fx apps on PC. It ran successfully. However, when I run on ESP8266, it printout as follow:
WiFi connected
IP address:
192.168.1.30
Mouted file system
Heap: 36112
Success to open cert file
Cert size:862
cert Loaded
Success to open private cert file
Private key size:1191
private key Loaded
Success to open ca
ca Loaded
Heap: 25912
Connect Server Fail
Attempting MQTT connection...please start sntp first !
failed, rc=-2 try again in 5 seconds
Attempting MQTT connection...Fatal exception 9(LoadStoreAlignmentCause):
epc1=0x402250eb, epc2=0x00000000, epc3=0x00000000, excvaddr=0x01cd0215, depc=0x00000000
Exception (9):
epc1=0x402250eb epc2=0x00000000 epc3=0x00000000 excvaddr=0x01cd0215 depc=0x00000000
ctx: cont
sp: 3fff0fd0 end: 3fff1290 offset: 01a0
>>>stack>>>
3fff1170: 00000001 3fff2a34 3fff3514 402250c0
3fff1180: 3fff2a34 3ffe8fd4 3fff0080 40226a8b
3fff1190: 00000000 3fff0080 3fff0270 3fff345c
3fff11a0: 000022b3 00000000 40208fc4 00000000
3fff11b0: 000022b3 00000000 3fff0080 40207b5e
3fff11c0: bd27a436 3fff0080 3fff11ee 40208b39
3fff11d0: 000022b3 3fff0080 3ffe8fd4 40207db1
3fff11e0: 3ffe9270 bd27a436 3ffe9270 bd27a436
3fff11f0: 00000000 3ffeffc4 00000000 402080a5
3fff1200: 00000009 0000001c 3ffe8dac 4020a330
3fff1210: 00000000 3ffe8db0 00000000 3fff025c
3fff1220: 3ffeffc4 3ffeffc4 3fff01a0 3fff025c
3fff1230: 3ffeffc4 3ffeffc4 3fff01a0 402081fc
3fff1240: 00000000 00000000 3fff01a0 40208a60
3fff1250: 3fff1c2c 3ffeffc4 3fff01a0 402067cd
3fff1260: 3ffeffc4 00000000 3fff01a0 4020686e
3fff1270: 3fffdad0 00000000 3fff0254 40209010
3fff1280: feefeffe feefeffe 3fff0270 40100718
<<<stack<<<
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld
ÿ
Connecting to Combros_HW
scandone
f 0, scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 15
cnt
connected with Combros_HW, channel 11
dhcp client start...
.ip:192.168.1.30,mask:255.255.255.0,gw:192.168.1.1
.
WiFi connected
IP address:
192.168.1.30
Mouted file system
Heap: 36416
Success to open cert file
Cert size:862
cert Loaded
Success to open private cert file
Private key size:1191
private key Loaded
Success to open ca
ca Loaded
Heap: 26216
Connect Server Fail
Attempting MQTT connection...please start sntp first !
failed, rc=-2 try again in 5 seconds
Attempting MQTT connection...Fatal exception 29(StoreProhibitedCause):
epc1=0x402250eb, epc2=0x00000000, epc3=0x00000000, excvaddr=0x1e01a900, depc=0x00000000
Exception (29):
epc1=0x402250eb epc2=0x00000000 epc3=0x00000000 excvaddr=0x1e01a900 depc=0x00000000
ctx: cont
sp: 3fff0fd0 end: 3fff1290 offset: 01a0
>>>stack>>>
3fff1170: 00000001 3fff2994 3fff33d4 402250c0
3fff1180: 3fff2994 3ffe8fd4 3fff0080 40226a8b
3fff1190: 00000000 3fff0080 3fff0270 3fff32a4
3fff11a0: 000022b3 00000000 40208fc4 00000000
3fff11b0: 000022b3 00000000 3fff0080 40207b5e
3fff11c0: bd27a436 3fff0080 3fff11ee 40208b39
3fff11d0: 000022b3 3fff0080 3ffe8fd4 40207db1
3fff11e0: 3ffe9270 bd27a436 3ffe9270 bd27a436
3fff11f0: 00000000 3ffeffc4 00000000 402080a5
3fff1200: 00000009 0000001c 3ffe8dac 4020a330
3fff1210: 00000000 3ffe8db0 00000000 3fff025c
3fff1220: 3ffeffc4 3ffeffc4 3fff01a0 3fff025c
3fff1230: 3ffeffc4 3ffeffc4 3fff01a0 402081fc
3fff1240: 00000000 00000000 3fff01a0 40208a60
3fff1250: 3fff2954 3ffeffc4 3fff01a0 402067cd
3fff1260: 3ffeffc4 00000000 3fff01a0 4020686e
3fff1270: 3fffdad0 00000000 3fff0254 40209010
3fff1280: feefeffe feefeffe 3fff0270 40100718
<<<stack<<<
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld
ÿ
Connecting to Combros_HW
Do you have any suggestion base on my printout? Thank you so much.
Hi everyone, Do you have any solution for my problem?
Thank you so much. Dennis
Hi @dennisbach ,
I am sorry for late reply. I already put my whole esp8266 Arduino core on my Github. Also I create a library to help you loading the certification and private key. This is the link: https://github.com/JimmyTai/esp8266-AWSIoT
Jimmy
Hi @JimmyTai Thank you so much. I will try and share my result later.
Regards
Hi Xuan,
I am glad to hear that. Please let me know if there is any problem. By the way, hope you can give my github repo a star and share with other people who need it. Thank you.
Jimmy
From: dennisbach notifications@github.com Sent: Friday, June 2, 2017 7:43:15 PM To: copercini/esp8266-aws_iot Cc: Jimmy Tai; Mention Subject: Re: [copercini/esp8266-aws_iot] ProhibitedCause (#2)
Hi @JimmyTaihttps://github.com/jimmytai Thank you so much. I will try and share my result later.
Regards
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/copercini/esp8266-aws_iot/issues/2#issuecomment-305763618, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ANpGDguCEWAeOY2-RjAys0qH3PspOw7cks5r__VTgaJpZM4MpTI-.
Thank @JimmyTai so much. Your sharing source code ran very well.
Hi Copercini, Thank for your project. However, I programed in my board, it run failed. Fatal exception 29. Fatal exception 28. It means field of memory, it's protected and cannot load or store data into there. Do you have any solution for this? I tried to find the way store cert and key to another field of memory, but I don't know where is suitable.
Thanks