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
질문됨 4년 전437회 조회
5개 답변
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

답변함 4년 전
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?
답변함 4년 전
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
답변함 4년 전
0

Maybe something like

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

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

답변함 4년 전
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
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠