Download Print this page

Realtek AmebaPro2 RTL8735B Getting Started Manual

Amazon freertos-lts

Advertisement

Quick Links

AmebaPro2 Amazon FreeRTOS-LTS
- Getting Started Guide
Getting Started Guide
Realtek Semiconductor Corp.
No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
Tel.: +886-3-578-0211. Fax: +886-3-577-6047
www.realtek.com
All information provided in this document is subject to legal disclaimers.
1
AmebaPro2 Getting Started Guide
© REALTEK 2020. All rights reserved.

Advertisement

loading

Summary of Contents for Realtek AmebaPro2 RTL8735B

  • Page 1 - Getting Started Guide Realtek Semiconductor Corp. No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan Tel.: +886-3-578-0211. Fax: +886-3-577-6047 www.realtek.com Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 2 Use of Realtek Resources may require a license from a third party under the patents or other intellectual property of the third party, or a license from Realtek under the patents or other Realtek’s intellectual property.
  • Page 3 Customers’ own risk. Customers are solely responsible for compliance with all legal and regulatory requirements in connection with such selection. Customer will fully indemnify Realtek and its representatives against any damages, costs, losses, and/or liabilities arising out of Designer’s non- compliance with the terms and provisions of this Notice.
  • Page 4 AmebaPro2 Getting Started Guide AmebaPro2 RTL8735B Board AmebaPro2 Demo EVB Ameba Demo board home page: https://www.amebaiot.com/en/amebapro2/ Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 5 Fig 1-1 Demo board − PCB layout (2D) Log UART The USB Type-C log UART is shown in Fig 1-2. Fig 1-2 Demo board – log UART Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 6: Create A New Device

    Create a New Device To create a new device, navigate to Manage -> Things in the left-hand navigation menu. Then click “Create things”. Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 7 AmebaPro2 Getting Started Guide Then, name the new device. This example uses the name TestDevice. Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 8 AmebaPro2 Getting Started Guide Skip this part and “Create thing”, we will attach the policies to certificate later. Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 9 Download the certificate, public key, and private key for the device by clicking Download. Next, download the root CA for AWS IoT by clicking to the Download link. Once all the certificate and keys have been downloaded, click Done Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 10: Create A Policy

    Identify the permission policies that best meet your business and security requirements. For sample policies, refer to https://docs.aws.amazon.com/iot/latest/developerguide/example-iot-policies.html. Also refer to https://docs.aws.amazon.com/iot/latest/developerguide/security-best-practices.html Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 11 The last step to configuring the device is attaching a policy. To attach a policy to new device, navigate to Manage -> Things. Then click on the device which was created. Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 12 AmebaPro2 Getting Started Guide Click Certificate, then choose the certificate create in previous step. Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 13 AmebaPro2 Getting Started Guide Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 14 $ cd project/realtek_amebapro2_v0_example/src $ git clone --recurse-submodules -b amebaPro2-9.x-202107.00-LTS https://github.com/ambiot/amazon-freertos.git aws_iot_freertos_lts Get Broker Endpoint by AWS IoT Core Broker Endpoint Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 15 Get Thing Name Thing Name Setup IoT Core Information with AmebaPro2 Amazon FreeRTOS Setup BROKER_ENDPOINT, THING_NAME, WIFI_SSID, PASSWORD in “project/realtek_amebapro2_v0_example/src/aws_iot_freertos_lts/demos/include/aws_clientcredential.h” Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 16 It can be done by the script PEM-to-C-string.py provided by AWS. It can be downloaded from https://github.com/aws/amazon- freertos/tree/main/tools/certificate_configuration. Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 17 For example, if you would like to run MQTT mutual authentication demo, please find aws_demo_config.h in “project/realtek_amebapro2_v0_example/src/aws_iot_freertos_lts/vendors/realtek/boards/amebaPro2/aws_demos/config_files/” and enable CONFIG_CORE_MQTT_MUTUAL_AUTH_DEMO_ENABLED Now you can start to compile AmebaPro2 Amazon FreeRTOS project ! Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 18 $ cmake --build . --target flash -j4 After successfully build, there should be an image file flash_ntz.bin located in “build/” directory. Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 19: Environment Setup

    After firmware image downloaded, press the reset button (beside the LED) to reboot the device and open terminal console to check the log. Note: If using windows, replace uartfwburn.linux with uartfwburn.exe and replace /dev/ttyUSB? with COM? Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 20 Default setting of SDK are enable MQTT demo. Once the AmebaPro2 EVB has rebooted, the application will automatically start run MQTT demo and communicate to IoT Core. … … Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 21 2. In the navigation pane, choose Test to open the MQTT client. 3. In Subscription topic, enter “+/example/topic”, and then choose Subscribe to topic. Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 22 AmebaPro2 Getting Started Guide Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 23 Add certificate pem(ecdsa-sha256-signer.crt.pem) into project\realtek_amebapro2_v0_example\src\aws_iot_freertos_lts\vendors\ realtek\boards\amebaPro2\aws_demos\config_files\ota_demo_config.h Set the App Version to Image File The app number in “ota_demo_config.h” decide the version of application code: Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 24 Go to AWS IoT Core https://console.aws.amazon.com/iot/home. Then, follow the following steps to create an AWS OTA task for AmebaPro2: Step 1. Click on 'Create OTA update job', select your job type and then click next. Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 25 AmebaPro2 Getting Started Guide … … Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 26 For Job properties, give a unique name to your OTA job, then click next. Step 3. In the following page, choose your device to update and select the protocol for file transfer Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 27 Choose your custom signed firmware binary that was generated by the python script from S3 bucket. In "Pathname of file on device", enter '/' Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 28 Choose the IAM role for OTA update job. (This is the same IAM role as any OTA update job) Step 8. Click next, and create your OTA job. … Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 29 In the beginning, we can check the app version of this running firmware, and the OTA process by the job ID: Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 30 After receiving the final block, the signature will be checked if valid or not. If signature is valid, the OTA process is successful! Then, the device will reboot with new firmware automatically. Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 31 We can see that the version now is 0.9.2, which is bigger than old one 0.9.3. In the final, the log imply that OTA success! Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.
  • Page 32: Troubleshooting

    Failed to establish new MQTT connection Please check clientcredentialMQTT_BROKER_ENDPOINT in “project/realtek_amebapro2_v0_example/src/aws_iot_freertos_lts/demos/include/aws_clientcredential.h” TLS_Connect fail Please check keyCLIENT_CERTIFICATE_PEM and keyCLIENT_PRIVATE_KEY_PEM in “project/realtek_amebapro2_v0_example/src/aws_iot_freertos_lts/demos/include/aws_clientcredential_keys.h” Getting Started Guide All information provided in this document is subject to legal disclaimers. © REALTEK 2020. All rights reserved.