<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Unable to connect to AwS IoT Core with blinking app]]></title><description><![CDATA[<p dir="auto">Dear all.<br />
I believe I have follow all the steps as described in : <a href="https://edukit.workshop.aws/en/blinky-hello-world/blinking-the-leds.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://edukit.workshop.aws/en/blinky-hello-world/blinking-the-leds.html</a> Unfortunately the blink app is not able to connect to the AWS IoT Core. Please check the table of all the steps I have done. Have I missed something? Did I make a mistake somewhere?  Help is appreciated. Regards<br />
Getting started	<a href="https://edukit.workshop.aws/en/getting-started.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://edukit.workshop.aws/en/getting-started.html</a>	<br />
M5Stack Core 2 AWS	<a href="https://shop.m5stack.com/collections/stack-series/products/m5stack-core2-esp32-iot-development-kit-for-aws-iot-edukit" target="_blank" rel="noopener noreferrer nofollow ugc">https://shop.m5stack.com/collections/stack-series/products/m5stack-core2-esp32-iot-development-kit-for-aws-iot-edukit</a>	Check<br />
Mac OS X Visual studio code	<a href="https://visualstudio.microsoft.com" target="_blank" rel="noopener noreferrer nofollow ugc">https://visualstudio.microsoft.com</a>	Check<br />
ESP Rainmaker for IOS	<a href="https://apps.apple.com/us/app/esp-rainmaker/id1497491540" target="_blank" rel="noopener noreferrer nofollow ugc">https://apps.apple.com/us/app/esp-rainmaker/id1497491540</a>	Check<br />
Silicon Labs USB to UART bridge setup		Check<br />
Cloning the code repository	<a href="https://github.com/m5stack/Core2-for-AWS-IoT-EduKit.git" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/Core2-for-AWS-IoT-EduKit.git</a>	Check<br />
Building and uploading the RainMaker Agent firmware	pio run --environment core2foraws<br />
Check	Check<br />
Compile firmware	pio run --environment core2foraws --target upload<br />
Check<br />
Monitor serial port	pio run --environment core2foraws --target monitor<br />
Check<br />
Claiming and provisioning the device	QR code received, scanned in with rainmaker app	Check<br />
Have an AWS account that is not running production workloads		Check<br />
Downloading and Installing the AWS CLI		Check<br />
Configuring the AWS CLI	Was configure run. IAM user credentials stored. Not sure about region, choose us-west-2 although I am in Europe. Does that matter?	Check<br />
Check CLI	aws --version	Check<br />
Next, you will verify the AWS CLI is configured with your IAM credentials and US West (Oregon) region	aws iot describe-endpoint --endpoint-type iot:Data-ATS<br />
Check<br />
Opening the Blink Hello World project		Check<br />
Retrieving the Device Certificate and Registering your AWS IoT thing	cd utilities/AWS_IoT_registration_helper python3 registration_helper.py -p 2	Check (Port 2 is used)<br />
go back to the Blinky-Hello-World directory	cd ../..<br />
Check<br />
Before you set the configuration, you will first need to retrieve your AWS IoT endpoint.	aws iot describe-endpoint --endpoint-type iot:Data-ATS<br />
Check<br />
Now, you’ll go into the KConfig menu to configure the required symbols, including Wi-Fi and AWS IoT endpoint address. Start by switching to the Blink-Hello-World directory of the repository in the PIO terminal window and enter	pio run --environment core2foraws --target menuconfig</p>
<p dir="auto">Component config –&gt; Amazon Web Services IoT Platform and open AWS IoT Endpoint Hostname to set the string</p>
<p dir="auto">Then select AWS IoT EduKit Configuration from the menu. Set your WiFi SSID and WiFi Password with your Wi-FI credentials	Check<br />
To build the firmware, paste in the command below (it will take several minutes):	pio run --environment core2foraws<br />
Check<br />
With the build successful, it’s time to upload the compiled firmware to the connected device over USB by running the command	pio run --environment core2foraws --target upload<br />
Check<br />
Lastly, monitor the serial output from the device on your host machine via:	pio run --environment core2foraws --target monitor<br />
Check<br />
And this is where the monitor show this error	␛[0;31mE (133448) MAIN: Error(-12) connecting to XXXXXXXXXXXXXXX-ats.iot.us-west-2.amazonaws.com:8883␛[0m<br />
␛[0;32mI (134508) aws_iot: Attempting to use device certificate from ATECC608␛[0m<br />
␛[0;31mE (137328) aws_iot: Failed<br />
! mbedtls_ssl_read returned -0x7880	No connection.<br />
Display shows WiFi symbol<br />
And<br />
Starting Cloud Connected Blinky<br />
Connecting to AWS IoT Core..</p>
]]></description><link>https://community.m5stack.com/topic/3673/unable-to-connect-to-aws-iot-core-with-blinking-app</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 00:10:25 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3673.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 23 Oct 2021 13:17:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Unable to connect to AwS IoT Core with blinking app on Fri, 29 Oct 2021 20:26:27 GMT]]></title><description><![CDATA[<p dir="auto">You should file a ticket with support to get a refund. I don't believe you should've been charged unless you were doing something else or using other features.</p>
]]></description><link>https://community.m5stack.com/post/15294</link><guid isPermaLink="true">https://community.m5stack.com/post/15294</guid><dc:creator><![CDATA[rashedtalukder]]></dc:creator><pubDate>Fri, 29 Oct 2021 20:26:27 GMT</pubDate></item><item><title><![CDATA[Reply to Unable to connect to AwS IoT Core with blinking app on Fri, 29 Oct 2021 20:10:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rashedtalukder" aria-label="Profile: rashedtalukder">@<bdi>rashedtalukder</bdi></a> Neather did I but When I tried to use a region outside the UK (I'm based in the UK) I got charged.<br />
BTW, I managed to jigger my OSX system into working (after a few other hiccups with the getting started guide) and wrote my own guide today.</p>
]]></description><link>https://community.m5stack.com/post/15291</link><guid isPermaLink="true">https://community.m5stack.com/post/15291</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Fri, 29 Oct 2021 20:10:44 GMT</pubDate></item><item><title><![CDATA[Reply to Unable to connect to AwS IoT Core with blinking app on Fri, 29 Oct 2021 18:41:48 GMT]]></title><description><![CDATA[<p dir="auto">I don't see that in our pricing matrix:<br />
<a href="https://aws.amazon.com/iot-core/pricing/" target="_blank" rel="noopener noreferrer nofollow ugc">https://aws.amazon.com/iot-core/pricing/</a></p>
<p dir="auto">Our pricing for simple usage to the message broker is generally connection minutes and messages transferred. We don't have location as part of that pricing.</p>
]]></description><link>https://community.m5stack.com/post/15287</link><guid isPermaLink="true">https://community.m5stack.com/post/15287</guid><dc:creator><![CDATA[rashedtalukder]]></dc:creator><pubDate>Fri, 29 Oct 2021 18:41:48 GMT</pubDate></item><item><title><![CDATA[Reply to Unable to connect to AwS IoT Core with blinking app on Thu, 28 Oct 2021 06:40:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rashedtalukder" aria-label="Profile: rashedtalukder">@<bdi>rashedtalukder</bdi></a> "Using US West 2 when you're in Europe won't charge you any additional fees either. The only effect you should see is additional latency, but within the thresholds of what's allowed before triggering a timeout. We selected us-west-2 for this reason and tested in multiple countries."</p>
<p dir="auto">Really I was charged!</p>
<p dir="auto">BTW welcome to the forum !</p>
]]></description><link>https://community.m5stack.com/post/15265</link><guid isPermaLink="true">https://community.m5stack.com/post/15265</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Thu, 28 Oct 2021 06:40:33 GMT</pubDate></item><item><title><![CDATA[Reply to Unable to connect to AwS IoT Core with blinking app on Wed, 27 Oct 2021 20:26:49 GMT]]></title><description><![CDATA[<p dir="auto">The Core2 for AWS has a pre-provisioned secure element that has a private key and paired public key to be used for registering the device to AWS and establishing a secure TLS connection. This not only prevents anyone from accidentally leaking the private key, but also enables a more systematic registration procedure. The provided script extracts the public key and signs it and sends it to AWS IoT. Ajb2k3's instructions won't apply here.</p>
<p dir="auto">Using US West 2 when you're in Europe won't charge you any additional fees either. The only effect you should see is additional latency, but within the thresholds of what's allowed before triggering a timeout. We selected us-west-2 for this reason and tested in multiple countries.</p>
<p dir="auto">The error code meanings from mbedtls' SSL APIs can be viewed <a href="https://github.com/espressif/mbedtls/blob/6465247f67167518b8813ae2faaf422704e4b1a3/include/mbedtls/ssl.h#L112" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>. So <strong>mbedtls_ssl_read</strong> returning a -0x7880 means <code>/**&lt; The peer notified us that the connection is going to be closed. */</code>. So AWS is closing the connection.</p>
<p dir="auto">Few things to check:</p>
<ol>
<li>Did the registration script say it successfully registered the thing? If you re-run it, you should get an error at the end that says it couldn't register because the thing already exists.</li>
<li>Are you 100% sure you copied the endpoint address correctly? We've seen a few users either miss a character or add the quotation marks.</li>
<li>When you go to your AWS Console to view your things at <a href="https://us-west-2.console.aws.amazon.com/iot/home?region=us-west-2#/thinghub" target="_blank" rel="noopener noreferrer nofollow ugc">https://us-west-2.console.aws.amazon.com/iot/home?region=us-west-2#/thinghub</a>, do you see the device there? If you do and you click the thing name (e.g. 01xxxxxxx), then the <strong>certificates</strong> tab, you should see a long ID for the certificate that belongs to the device. If you click that certificate ID, then the <strong>Policies</strong> tab, you should see a policy that's attached to that certificate called <code>Default</code>.</li>
</ol>
<p dir="auto">If all of that checks out, the device should definitely connect. We know that the device is connected to WiFi because it won't try to connect to AWS IoT over MQTT otherwise. If the port was being blocked by the firewall, you should see a different error code. Let me know what happens there.</p>
<p dir="auto">Sorry for the delayed response. We usually expect people going through the program assets to use the support links and post in the <a href="https://github.com/aws-samples/aws-iot-edukit-tutorials/discussions" target="_blank" rel="noopener noreferrer nofollow ugc">GitHub discussions</a>.</p>
]]></description><link>https://community.m5stack.com/post/15262</link><guid isPermaLink="true">https://community.m5stack.com/post/15262</guid><dc:creator><![CDATA[rashedtalukder]]></dc:creator><pubDate>Wed, 27 Oct 2021 20:26:49 GMT</pubDate></item><item><title><![CDATA[Reply to Unable to connect to AwS IoT Core with blinking app on Mon, 25 Oct 2021 19:00:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> Thank you. After fully erasing the firmware I have executed again all the steps in the AWS getting started section. Again, same error about connection issue. The steps about Private key, Public key and region are not mentioned in the manual for Cloud connected Blinky.<br />
I should point out to that I was able te recreate the getting started example and are able to connect my rainmaker app on my iPhone with the AWS module. So that is at least a small step. I hope anyone can chip in.</p>
]]></description><link>https://community.m5stack.com/post/15244</link><guid isPermaLink="true">https://community.m5stack.com/post/15244</guid><dc:creator><![CDATA[HappyUser]]></dc:creator><pubDate>Mon, 25 Oct 2021 19:00:49 GMT</pubDate></item><item><title><![CDATA[Reply to Unable to connect to AwS IoT Core with blinking app on Mon, 25 Oct 2021 15:54:46 GMT]]></title><description><![CDATA[<p dir="auto">Also you need to rename the keys to private.key, public.key and region.cert long filenames with symbols don't work.</p>
]]></description><link>https://community.m5stack.com/post/15241</link><guid isPermaLink="true">https://community.m5stack.com/post/15241</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 25 Oct 2021 15:54:46 GMT</pubDate></item><item><title><![CDATA[Reply to Unable to connect to AwS IoT Core with blinking app on Mon, 25 Oct 2021 05:34:05 GMT]]></title><description><![CDATA[<p dir="auto">Have you copied<br />
Private Key,<br />
PublicKey,<br />
and the region cert to the core?<br />
Please use an access point in the EU closer to you otherwise you may be charged a stupid fee.<br />
AWS is a PITA to get working. I had it working on an ATOM but forgotten how I did it and been to busy to look into redoing the steps.</p>
]]></description><link>https://community.m5stack.com/post/15237</link><guid isPermaLink="true">https://community.m5stack.com/post/15237</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Mon, 25 Oct 2021 05:34:05 GMT</pubDate></item></channel></rss>