Connecting a KMP project to AWS IoT Core (Illegal base64 character 2d) #78
-
Hi! I've been at this grind for about 6 months now with not much success unfortunately. All I want to do is send a message to the AWS IoT core "MQTT test client". Nothing has worked yet. I've created a test file to run these tests. I will now explain in meticulous detail every single thing I've done and hopefully a good soul out there can fill in the blanks! 🙏
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() https://docs.aws.amazon.com/iot/latest/developerguide/iot-action-resources.html The documentation gives this format for action resources
Otherwise it's also found by clicking on your region in the top right corner: You can easily find your account ID by clicking on your username in the top right corner Be sure to use YOUR account ID. My AWS-account-ID I have replaced with X's
IMPORTANT NOTE: I renamed my files to PART 2: KMP
![]()
![]()
Here is what your file should roughly end up looking like:
![]()
![]()
![]()
![]()
class MqttTest {
}`
![]()
The address is a12offtehlmcn0-ats.iot.us-east-1.amazonaws.com which can be found on AWS IoT Core by clicking on the Mqtt Test Client and viewing the connection details. The clientId should the be name of my thing (esp32) since that is what I set up in the policy steps. So with all of this said, when I run the code I get the error: But no change. I still get the same error. Perhaps there's something I'm doing wrong on the AWS side? Maybe the KMP side? I'm really quite lost and would appreciate any help I can get! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
I got it working! I was successful at sending and receiving a message from AWS IoT Core.
Here is the code: