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

Stuck while connecting to MQTT #1

Open
nimish21 opened this issue Jun 12, 2020 · 1 comment
Open

Stuck while connecting to MQTT #1

nimish21 opened this issue Jun 12, 2020 · 1 comment

Comments

@nimish21
Copy link

Connecting to wifi...
WiFi connected
IP address:
192.168.1.106
Attempting MQTT connection...
Exception (9):
epc1=0x40204d5d epc2=0x00000000 epc3=0x00000000 excvaddr=0x3430307a depc=0x00000000

ctx: cont
sp: 3ffffd00 end: 3fffffd0 offset: 01a0

stack>>>
3ffffea0: 3fff0b54 00000898 3fff0afc 40204774
3ffffeb0: 3fff1054 3fff0eac 00000014 40205914
3ffffec0: 00003a98 3ffffef0 3ffef3e0 402047c0
3ffffed0: 00000000 00000000 3fff0b54 00000000
3ffffee0: 000022b3 3ffe8c48 3ffef3c8 402049cf
3ffffef0: 00000000 00000000 3ffe8c48 00000000
3fffff00: 000001d1 3ffef3c8 3ffe8c48 40204a75
3fffff10: 40206310 90cbac34 40206310 00000000
3fffff20: 3ffe8c10 3ffef30c 3ffef310 40204e9c
3fffff30: 514d0400 3f045454 3ffef44c 3ffef50c
3fffff40: 3ffe8b7c 3ffe8c3c 00000000 40205324
3fffff50: 3fffdad0 3ffef3f0 3ffef44c 3ffef50c
3fffff60: 3fffdad0 3ffef30c 3ffef44c 40204f34
3fffff70: 00000000 00000000 3ffef44c 40205508
3fffff80: 40206310 3ffef30c 3ffef44c 402026d4
3fffff90: feefeffe 00000000 3ffef30c 4020277f
3fffffa0: 4020258c feefeffe 40205cfc 40205ce4
3fffffb0: feefeffe feefeffe 3ffef504 40205ac0
3fffffc0: feefeffe feefeffe 3ffe85ac 40100739
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
vbb28d4a3
~ld

@HamzaHajeir
Copy link

Add those lines just above setup()

const char trustRoot[] PROGMEM = R"EOF(
-----BEGIN CERTIFICATE-----
MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ
RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD
VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX
DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y
ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy
VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr
mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr
IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK
mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu
XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy
dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye
jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1
BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3
DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92
9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx
jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0
Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz
ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS
R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
-----END CERTIFICATE-----
)EOF";
X509List cert(trustRoot);

and these lines after connecting to WiFi :

    configTime(3 * 3600, 0, "pool.ntp.org", "time.nist.gov");
    espClient.setCACert((const uint8_t*)trustRoot,1262);

I guess you could need to extract a different CACert .. For now just try this.

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

2 participants