1
votes

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

1 Answers

2
votes

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.