Connect to AWS GreenGrass without aws device SDK

0

I have a device, who can connect to MQTT broker. I just need to provide an endpoint of the MQTT broker. I cannot change code on that device. and I have greengrass running, on IP 192.168.1.12 on port 8883 (windows machine). i downloaded Group CA using basic discovery api:https://docs.aws.amazon.com/greengrass/latest/developerguide/gg-discover-api.html so i used this mqtt settings for device:

broker endpoint (192.168.1.12:8883)
topic (same as registered in subscription in aws iot GG)
device certificate and private key (the device is registered in aws iot GG)
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 proper certificates and topic, i should be able to connect to it, whether or not I have aws device SDKs. Am I wrong?

omki12
asked 4 years ago408 views
5 Answers
1

Thanks for explaining your use case.

The mqtt settings you mentioned in the post seem find to me. Just to confirm one thing, did you also pass in the device thing name as client ID?

Also what error messages do you get?

Thanks,
Hui

answered 4 years ago
0

Hi omki12,

Correct me if I understand wrong. You have 2 devices in your setup. One is a windows machine running Greengrass (core device). The core device is able to connect to AWS IoT successfully. The second device is set up to connect to the core device, but it failed to.

I have a few questions based on this assumption.

  1. Were you able to add the second device to the Greengrass group and successfully deploy the group to the core device?
  2. Can you provide the logs from Greengrass core device? You can find the Greengrass logs here https://docs.aws.amazon.com/greengrass/latest/developerguide/greengrass-logs-overview.html#gg-logs-local
  3. How did you initiate the connection from the second device to core device? Can you provide the output of it? Have you tried to use device SDK and what version did you use?
  4. I'm assuming you're running Greengrass in a docker container, because windows is not currently supported. Which version of Greengrass are you running?
answered 4 years ago
0

Hi there,
thank you for your reply.

  1. I added the second device in GG group and deployed the group successfully.
  2. If I use AWS IoT device SDK , I am able to connect to core device (GG).
    I tested the GG using basic Discovery Example provided by amazon: https://github.com/aws/aws-iot-device-sdk-python/blob/master/samples/greengrass/basicDiscovery.py
    But the issue is I cannot use AWS IoT Device sdk on the actual device. let's suppose I am using the MQTT-paho library on actual device. is it possible to connect to AWS GG using an mqtt-paho library, given all the certificates and topic is valid as mentioned in the GG group?
  3. yes, I am using docker on windows and using the latest version of Greengrass. GG is up and running. tested using "Basic Discovery Example" provided by amazon.
omki12
answered 4 years ago
0

Maybe something like

https://vixtera.com/software-appliance/

will translate your payloads to something that AWS GG can understand.

answered 4 years ago
0

yes.. that was the issue. I was passing a random client id.
instead, I passed "Device name" as client id and it worked.
thank you.. :D

omki12
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions