Welcome to IoTForums.com Community
Register now to participate in discussions, ask questions and share your knowledge on internet of things and automation! Feel free to sign up today.
Register Now

Modules [Resources] BW16 Troubleshooting Guide (2)

Dakamaster

Just Hatched
May 10, 2021
13
1
11
Singapore
Note:
Original post in AmebaIoT Forum:
Please, Log in or Register to view URLs content!

Click here for
[Resources] BW16 Troubleshooting Guide (1)

Content

Uploading Solution
Method 1: OTA (Over The Air)
The B&T default factory image can be washed through the OTA method provided by Realtek’s Image Tool that allows users to update the firmware through the Ardunio UART process without fail. The detailed description of the OTA method and definition of common AT Commands are described in B&T “RTL8720D AT Command User Manual” Appendix 6.1, which can be found in the Reference section below.

Step 1 - Download and prepare the Image Tool.
Download ambd_sdk from the link of
Please, Log in or Register to view URLs content!
. The Realtek’s Image Tool can be found under the following file path:

“ambd_sdk\tools\AmbaD\Image_tool\image_tool.exe”

Step 2 – Use the AP command to connect the RTL8720DN Module to the Internet
Open any terminal communication program, Tera Term, etc.
2-3


Connect to AP via the AT Command:

“#ATPN=your-SSID,your-password”

and wait until ATPN responds

“#ATPN OK”

(For more details, please refer to B&T “RTL8720D AT Command User Manual” Section 3.2).

Note that the Wi-Fi connection of both the PC and RTL8720DN Module should connect to the same SSID address.

Step 3 – Generate the OTA.bin file
Use Ameba Image Tools from the link in the ambd_sdk downloaded in Step 1 to generate an OTA.bin that could be uploaded to the board wirelessly:

“ambd_sdk\tools\AmbaD\Image_tool\image_tool.exe”



Please, Log in or Register to view URLs content!



Click the Generate tab, in the Generate Target Section select OTA_All. Then, tick the checkbox on the right side of Bin 3, and the Ardunio binary file can be found in the file path below:

C:%USER%\AppData\Local\Arduino15\packages\realtek\tools\ameba_d_tools\1.0.5\km0_km4_image2.bin”

2-5


Then click Generate, save the generated OTA.bin file under the following file path:

“ambd_sdk\tools\DownloadServer”

2-6


Step 4 – Start the OTA process
  • Open Windows Command Prompt, change the root directory to:
    “ambd_sdk\tools\DownloadServer”.
  • Runs start.bat and waits for the port number displayed, the port number used by my PC is “ 8082 ”.
    2-6
  • Then, key in the ipconfig command in the Command Prompt to obtain your IPv4 address:
    2-8
  • Upon obtaining the ip address and port number, start the server program using the command in Windows Shell:
    .\DownlaoadServer.exe YOUR-PORT-NUMBER ota.bin
    The following information will be shown in the Shell terminal after the OTA server is set up correctly:
    2-9
  • Since previously we have already connected the BW16 module (OTA client) to the same SSID as the PC (OTA server) in step 2. Now, we will use another AT Command “#ATSO=IP-address,port-number” to connect to the OTA server (please refer to B&T “RTL8720D AT Command User Manual” Section 2.9 for more information).
    Upon key in the command, the information of ”Erase is ongoing……” will appear.
    2-10

    You can see that the terminal shows OTA status, wait until the whole uploading process finishes. When OTA finish, press the reset button again.
Step 5 - Download Arduino program via UART
Now we can download the program via UART in Ardunio, but since the RTLDuino USB chip is connected to LP_UART instead of LOG_UART. The pins LOG_UART_TX (GPIOA_7) and LOG_UART_RX (GPIOA_8) are used for program upload. However, the onboard USB-to-UART module is connected to LP_UART_TX (GPIOB_1) and LP_UART_RX (GPIOB_2) and thus cannot be used directly for program upload.

2-11


You can choose to either use an external USB-to-UART module connected to GPIOA_7 and GPIOA_8, or you could short these pins together to use the on-board USB for program upload:

  • PA8 ––– PB2
  • PA7 ––– PB1
If entries UART download process, first hold the burn button and reset button and then release the reset button and burn button.



References
  1. For more information, please visit the following websites:
  2. Since RTL8720DN BW16 is not officially supported by Realtek, alternatively if you want to know more about our AmebaD Family (RTL8722DM & RTL8722DM-MINI) and ambd_arduino opensource SDK, please also visit:
    • AmebaIoT official website:
      Please, Log in or Register to view URLs content!
      for more examples supported;
    • Join our FB Forum (English version) to further discuss with us:
      Please, Log in or Register to view URLs content!
      ;
  3. If you would like to know more about the BW16 development board, please refer to the websites below:
    1. Introduction of RTL8720DN on Instructable:
      Please, Log in or Register to view URLs content!
    2. Load Arduino image into BW16:
      Please, Log in or Register to view URLs content!
    3. RTL8720DN (BW16) IMG2 SIGN Invalid Solution:
      Please, Log in or Register to view URLs content!
    4. B&T “RTL8720D AT Command User Manual”:
      Please, Log in or Register to view URLs content!
    5. FTDI Driver Download from here:
      Please, Log in or Register to view URLs content!
 

Log in

or Log in using