2024-05-27 01:46 AM - edited 2024-05-27 01:55 AM
I follow X-LINUX-AWS Expansion Package guide.
Now 6.2 MQTT subscribe and publish test
but what use ca.pem file?
I use
Board $> cat /opt/greengrass/v2/work/aws.greengrass.clientdevices.Auth/ca.pem
GG_CORE_IP=192.168.7.1
PC cmd)
mosquitto_sub \
-h ${GG_CORE_IP} \
-p 8883 \
--cert device-client-1-certs/device.pem.crt \
--key device-client-1-certs/private.pem.key \
--cafile ca.pem \
-t "+/hello/world" \
-u ClientDevice1 \
-i ClientDevice1
Error: A TLS error occurred.
but error occurred.
thanks, reply.
Solved! Go to Solution.
2024-06-07 08:39 AM
Hello @younghan ,
Thank you for your question.
Can you try with the IP address of the local network (behind router), typically with IP address like 192.168.1.x ?
Otherwise maybe you can try to add some wireshark logs.
To answer the question, "what use ca.pem file?"
/opt/greengrass/v2/work/aws.greengrass.clientdevices.Auth/ca.pem
it is the certificate used by the client devices to authenticate the Greegrass core device.
This certificate can be retrieved by an end device using the greengrass discovery method. (https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-discover-api.html)
Best regards.
2024-06-07 08:39 AM
Hello @younghan ,
Thank you for your question.
Can you try with the IP address of the local network (behind router), typically with IP address like 192.168.1.x ?
Otherwise maybe you can try to add some wireshark logs.
To answer the question, "what use ca.pem file?"
/opt/greengrass/v2/work/aws.greengrass.clientdevices.Auth/ca.pem
it is the certificate used by the client devices to authenticate the Greegrass core device.
This certificate can be retrieved by an end device using the greengrass discovery method. (https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-discover-api.html)
Best regards.
2024-06-10 03:27 AM
Hello @younghan
I tried with IP address 192.168.7.1 (usb-c network interface) and mosquitto_pub is working correctly.
Best regards.