Copyright ©

Mongoose OS Forum


Switching communication from cloud to local greengrass

sheapsheap Budapest
edited March 12 in Mongoose OS

Hi All,

I've successfully set up the communication with Amazon AWS on my ESP32.
I can publish to a topic and I can update the shadow state of this device.
Now I need to switch the communication to local greengrass.
Someone please write me what needs to be done to do that.

Can I continue to use mqtt communication or I need to swich to greengrass discovery service?

Any help would be appreciated.


  • sheapsheap Budapest

    I've figured out.
    As this described in other discussions we need to get an additional cert from greengrass discovery service.
    It was not clear for me, what cert we need.
    After a little investigation I realized that it is the issuer's cert that's needed to build up the cert chain.
    So you have to get your greengrass core's cert:

    curl --key aws-iot-xxxxx.key.pem --cert aws-iot-xxxxx.crt.pem

  • sheapsheap Budapest

    Now it looks the certs are ok, but right after the connection a broker disconnects:

    mgos_mqtt_ev MQTT TCP connect ok (0)
    ssl_socket_send 0x3ffbe8b0 78 -> 78
    ssl_socket_recv 0x3ffbe8b0 <- 5 ssl_socket_recv 0x3ffbe8b0 <- 28 mgos_mqtt_ev MQTT event: 202 mgos_mqtt_ev MQTT CONNACK 5 ssl_socket_recv 0x3ffbe8b0 <- 5 ssl_socket_recv 0x3ffbe8b0 <- 26 ssl_socket_send 0x3ffbe8b0 31 -> 31
    mgos_mqtt_ev MQTT Disconnect

    And it's repeating endlessly.

    On the GGC I can see this:

    [ERROR]-MQTT message decoding error: unable to decode received MQTT message. read tcp....

    Has anyone idea why this is happening?

  • jazibjazib Islambad

    Hi Bro, Did u implement Greengrass?
    Please let me know, I am also stuck. Thanks

Sign In or Register to comment.