Skip to content

Contributed by 爱笑, curated by Ai-Thinker

Preface This article introduces how Ai-M61/Ai-M62 series modules/dev boards connect to AWS.

1. Software and hardware preparation

One Ai-M61/Ai-M62 series module or dev board Ai-M61/Ai-M62 series flashing software, download link: https://pan.baidu.com/s/1jsxZdlo2wm6X8_XTIwXVWw?pwd=1234 Extraction code: 1234 AWS connection demo: source code One USB-to-TTL serial adapter

2. Creating the AWS thing

Operation Steps

1
Register an Amazon account and log in to the AWS IoT console, [registration link](https://aws.amazon.com/cn/) (registration requires a company name and business license, and takes some time to review)

Register an Amazon account and log in to the AWS IoT console, registration link (registration requires a company name and business license, and takes some time to review).

2
After registering and logging in, select Manage in the left menu of the AWS IoT console

After registering and logging in, select Manage in the left menu of the AWS IoT console.

3
Click Things and then select Create things

Click Things and then select Create things.

4
On the Create things page, select Create a single thing, then select Next

On the Create things page, select Create a single thing, then select Next.

5
On the Specify thing properties page, for Thing name, enter the name of the thing

On the Specify thing properties page, for Thing name, enter the name of the thing, e.g., M61_AWS001. (When naming things, choose the name carefully, because you will not be able to change it after the thing is created. To change a thing name, you must create a new thing, give it a new name, and then delete the old thing.) Leave the remaining fields on this page empty. Select Next.

6
On the Configure device certificate - optional page, select Auto-generate a new certificate (recommended)

On the Configure device certificate - optional page, select Auto-generate a new certificate (recommended). Select Next.

7
On the Attach policies to certificate - optional page, select Create policy

On the Attach policies to certificate - optional page, select Create policy. (The device certificate used for connection must have a policy attached; otherwise the device cannot connect to the platform with the generated certificate.)

8
On the Create policy page, fill in the Policy name and Policy document, then click Create

On the Create policy page, fill in the Policy name and Policy document, then click Create.

9
After creating, select the policy just created, then click Create things

After creating, select the policy just created, then click Create things.

10
After creation, save all certificates and keys, then click Done; the AWS thing is now set up

After creation, save all certificates and keys, then click Done. The AWS thing is now set up.

3. Getting and configuring the AWS connection demo

Operation Steps (continued)

1
Download the source code: git clone https://github.com/Ai-Thinker-Open/aithinker_dev_open_sdk.git
2
Follow the readme in the SDK to update submodules and set up the repository environment

Follow the readme in the SDK to update submodules and set up the repository environment.

3
Modify device_cert, private_key, root_ca and BROKER_URI_SSL in application/aws_iot_demo/main.c

Modify device_cert, private_key, root_ca and BROKER_URI_SSL in application/aws_iot_demo/main.c to your own xxx-certificate.pem, xxx.private.key, AmazonRootCA1.pem and xxx-ats.iot.us-east-2.amazonaws.com.

4
For the M61 series run ./build.sh bl618 aws_iot_demo menuconfig; for the M62 series run ./build.sh bl616 aws_iot_demo menuconfig

For the M61 series run ./build.sh bl618 aws_iot_demo menuconfig; for the M62 series run ./build.sh bl616 aws_iot_demo menuconfig to enter the menu configuration. Select application and modify WiFi connect SSID and WiFi connect password to the WiFi account and password you want to connect to.

5
For the M61 series run ./build.sh bl618 aws_iot_demo cn debug; for the M62 series run ./build.sh bl616 aws_iot_demo cn debug to build the firmware

For the M61 series run ./build.sh bl618 aws_iot_demo cn debug; for the M62 series run ./build.sh bl616 aws_iot_demo cn debug to build the firmware. The generated bin files are in \out\<chip model>\aws_iot_demo\bin.

4. Hardware wiring

Ai-M61/Ai-M62 series dev boards only need a USB Type-C connection.

Ai-M61/Ai-M62 series modules are wired according to the table below.

Refer to the Ai-M61-32S and Ai-M62-12F wiring photos.

5. Using the flashing software

Operation Steps (continued)

1
Double-click BLDevCube.exe, as shown below

Double-click BLDevCube.exe, as shown below.

2
Select the BL616/618 chip

Select the BL616/618 chip.

(1) Select the BL616/618 chip

(2) Click OK

3
Select the IoT download method

Select the IoT download method.

4
For detailed descriptions of the flashing software parameters, see the docs directory in the software; here I briefly explain the parameters in the red box

For detailed descriptions of the flashing software parameters, see the docs directory in the software; here I briefly explain the parameters in the red box.

  • Interface: selects the communication interface for download/flash; you can choose Jlink or UART according to your actual physical connection. UART is the default.

  • Port/SN: when downloading via UART, select the COM port connected to the chip here; you can click the Refresh button to refresh the COM list

  • Uart Rate: when downloading via UART, set the baud rate; 921600 is recommended

  • JLink Rate: the flash speed configuration when downloading via JLink; the default is 1000

5
Next, use a bin file to demonstrate how to flash successfully

Next, use a bin file to demonstrate how to flash successfully.

5.1 Place the related flashing files as shown in the screenshot below.

(1) Select /chips/bl616/partition/partition_cfg_4M.toml in the flashing tool

(2) Select /chips/bl616/builtin_imgs/boot2_isp_bl616_v6.5.4/boot2_isp_release.bin in the flashing tool

(3) Select chips/bl616/device_tree/bl_factory_params_IoTKitA_auto.dts in the flashing tool

(4) Select the bin file generated by compiling the demo

5.2 Click the Create&Download button to start flashing. When ========= image get bootinfo ========= appears, for the Ai-M61 series dev board, hold the right BOOT button and briefly press the left RST button to enter flash mode; for the Ai-M62 series dev board, hold the right BOOT button until shake hand success appears, then release.

5.3 Flashing succeeded.

Common flashing problems:

(1) This error means the COM port is occupied by other software; you must close the software occupying the port

6. Connecting to AWS

Operation Steps (continued)

1
After the module connects to AWS in the demo, it automatically publishes a topic; subscribe to "/topic/qos1" in the MQTT test client to receive the module messages

In the demo, after the module connects to AWS, it automatically publishes a topic. After subscribing to the topic “/topic/qos1” in the MQTT test client, you can receive the messages published by the module.

2
Publish to the topic "/topic/qos0" in the MQTT test client

Publish to the topic “/topic/qos0” in the MQTT test client.

3
The module receives the message

The module receives the message.

7. Contact us

That is all for this issue. The goal is to help everyone quickly adapt to developing with new products. More resources are available on our official website.

Official website: https://www.ai-thinker.com

Development resources: https://docs.ai-thinker.com/

Technical support: support@aithinker.com

Have questions?

For other questions, please visit the unified discussion area: Ai-Thinker Discussions

Released under the MIT License. Build Time 2026-09-11 14:52:23