1

I am using MOKOSMART_mkgw1 to collect data and send it to AWS IoT Core. for that, I need to set the following configurations,

  1. endpoint (aws iot endpoint)
  2. topic (any)
  3. device certificate and private key
  4. root ca.

I was able to connect and send data to aws iot core.

now I want to connect it to aws greengrass device instead of iot core directly.

i have greengrass running, on ip 192.196.1.12 on port 8883 (windows machine). i download Group CA using basic discovery api. so i used this mqtt settings for device:

  1. broker endpoint (192.168.1.12:8883)
  2. topic (same as registered in subscription in aws iot GG)
  3. device certificate and private key (the device is registered in aws iot GG)
  4. Group CA (downloaded by basic discovery sample application)

but i am still not able to connect to aws gg?

my understanding is aws GG also has a MQTT broker. so by providing a proper authentication and topic, i should be able to connect to it, whether or not I have aws device SDKs or not. am i wrong? what does "basic discovery example" do extra to be able to connect to aws gg ??


1 Answers1

2

I am so sorry for wasting your time if you brainstorm on this question. the issue was, I was passing a random clientID in MQTT. instead, I passed "Device Name" as the client ID and it worked.

keep this question here if someone else falls in the same hole.

  • May I ask how did you configure mqtt broker to run locally on greengrass core and how were you able to get the broker endpoint ? I also ran greengrass core on my local machine and I tried to configure mqtt broker using this link: https://docs.aws.amazon.com/greengrass/v2/developerguide/configure-greengrass-core-v2.html But still I was unable to run mqtt broker on greengrass core. – Nikhil May 17 '21 at 08:10
  • Do you have any reference material on how to configure and connect to greengrass MQTT broker. – Nikhil May 17 '21 at 08:30