Ameba FAQ

Please find the Ameba Frequently Asked Questions (FAQ) in this post!

Content


General

General


What is Ameba Arduino?

Answer: It’s third-party Arduino SDK for Ameba development boards.


What is Ameba MicroPython?

Answer: It is an officially supported MicroPython port for Ameba development boards. Please refer to MicroPython official website for more information.


What is the main difference between Ameba Arduino and Ameba MicroPython?

Answer: They used different programming languages. Ameba Arduino uses C++ while Ameba MicroPython uses Python.


What are the official open-source Ameba development boards?

Answer: AMB21/22, AMB23, AMB01, AMB02


Where can I buy the Ameba development boards?

Answer: You can get the Ameba development boards from Buy Ameba Boards – Realtek IoT/Wi-Fi MCU Solutions.


Where can I find the open-source SDK for Ameba development boards?

Answer: You can find the open-source SDK at ambiot · GitHub.


Who should I contact if I encounter an issue while using Ameba development boards?

Answer: You can ask your questions on our forum here: https://forum.amebaiot.com/. Alternatively, you can raise an issue in the corresponding GitHub repositories.


Hardware

Hardware

About boards [AMB01], [AMB21/22], [AMB23], [BW16]


[AMB01, AMB21/22, AMB23, BW16]

Where can I find the pin diagrams for Ameba development boards?

Answer: Navigate to the “Getting started” page for each Ameba development boards to see the pin diagram via Ameba ARDUINO – Realtek IoT/Wi-Fi MCU Solutions.
[AMB21/22] Ameba ARDUINO: Getting Started with RTL8722 – Realtek IoT/Wi-Fi MCU Solutions
[AMB23] Ameba ARDUINO: Getting Started with RTL8722DM MINI​ – Realtek IoT/Wi-Fi MCU Solutions
[BW16] Ameba ARDUINO: Getting Started with BW16/RTL8720DN – Realtek IoT/Wi-Fi MCU Solutions
[AMB01] Ameba ARDUINO: Getting Started with RTL8195 – Realtek IoT/Wi-Fi MCU Solutions


[AMB01, AMB21/22, AMB23, BW16]

What are A0, A1, A2, A3, A4, A5 and A6 and where can I find them on Ameba development boards?

Answer: A0, A1, A2, etc refers to the pins where ADC function is available. For example, on AMB23, connect to D1 to D7 for ADC function.

For other boards, please refer to their pin table respectively.
[AMB21/22] Ameba ARDUINO: Getting Started with RTL8722 – Realtek IoT/Wi-Fi MCU Solutions
[AMB23] Ameba ARDUINO: Getting Started with RTL8722DM MINI​ – Realtek IoT/Wi-Fi MCU Solutions
[BW16] Ameba ARDUINO: Getting Started with BW16/RTL8720DN – Realtek IoT/Wi-Fi MCU Solutions
[AMB01] Ameba ARDUINO: Getting Started with RTL8195 – Realtek IoT/Wi-Fi MCU Solutions


[AMB01, AMB21/22, AMB23, BW16]

Where to find the RX TX pin on Ameba development boards?

Answer: Please refer to the pin table respectively.

[AMB21/22] Ameba ARDUINO: Getting Started with RTL8722 – Realtek IoT/Wi-Fi MCU Solutions
[AMB23] Ameba ARDUINO: Getting Started with RTL8722DM MINI​ – Realtek IoT/Wi-Fi MCU Solutions
[BW16] Ameba ARDUINO: Getting Started with BW16/RTL8720DN – Realtek IoT/Wi-Fi MCU Solutions
[AMB01] Ameba ARDUINO: Getting Started with RTL8195 – Realtek IoT/Wi-Fi MCU Solutions


[AMB01, AMB21/22, AMB23, BW16]

Given that the instructions are all for the Arduino boards, how do I know which pin on the Ameba development boards to connect to for all the basic examples?

Answer: Refer to the respective link for each board.
[AMB23] Ameba ARDUINO: [RTL8722DM MINI] Supported ARDUINO built-in example list – Realtek IoT/Wi-Fi MCU Solutions
[AMB21/22] Ameba ARDUINO: [RTL8722CSM][RTL8722DM] Supported ARDUINO built-in example list – Realtek IoT/Wi-Fi MCU Solutions
[AMB01] Ameba ARDUINO: [RTL8195AM][RTL8710AF][RTL8711AM] Supported ARDUINO built-in example list – Realtek IoT/Wi-Fi MCU Solutions
[BW16] BW16 (RTL8720DN) Supported ARDUINO built-in example table – Realtek IoT/Wi-Fi MCU Solutions

If there are any changes to the pin number or code, it will be noted in the “Remarks”/“Comments” section.


[AMB21/22, AMB23, BW16]

How do I know if my board successfully enters download mode?

Answer: First, open the Serial Monitor and enter download mode. If you successfully enter download mode, you will see “#Flash Download Start” in the Serial Monitor.


[AMB21/22, AMB23, BW16]

What is the difference between upload and download modes?

Answer: They are the same, they burn the bin file into the Ameba development boards.


[AMB21/22, AMB23]

What is the main difference between AMB21/22 and AMB23?

Answer: They uses the same chip; however, the PCB are different in size and offer different number of pins and functions. For more information, please refer to Realtek IoT/Wi-Fi MCU Solutions.


[AMB21/22, AMB23]

Does AMB21/22 and AMB23 have user-configurable push buttons and LEDs?

Answer:
AMB21/22 does not have any user-configurable push buttons and LEDs.
AMB23 has 1 user-configurable push buttons and 2 user-configurable LEDs.


[AMB21/22, AMB23]

Which Bluetooth standards are supported in AMB21/22 and AMB23?

Answer: Both boards support BLE 5.0. Classic Bluetooth (BR/EDR) is not supported.


[AMB21/22, AMB23]

Which BLE roles are supported?

Answer: AMB21/22 and AMB23 can operate as either a BLE Central or BLE Peripheral device.


[AMB21/22, AMB23]

Are all pins on AMB21/22 and AMB23 usable?

Answer: No, those marked “NC” are not connected to any pin and thus unusable.


[AMB21/22, AMB23]

Is XIP (execute in place) supported on AMB21/22 and AMB23?

Answer: Yes, it is supported.


[AMB21/22, AMB23]

Does AMB21/22 and AMB23 support 5G WiFi?

Answer: Answer: AMB21 and AMB23 supports dual band 2.4G + 5G WiFi. AMB22 only supports single band 2.4G WiFi.


[AMB21/22, AMB23]

How to enter the download mode?

Answer: Press and hold the UART DOWNLOAD button. Then Press the RESET button and release both UART DOWNLOAD and RESET buttons.


[AMB21/22, AMB23]

Why boards could not be found as Bluetooth device?

Answer: Please make sure the antenna is connected properly. Check your code for the correct Bluetooth configurations.


[AMB21/22, AMB23]

What if my code is not behaving as what I expected?

Answer: Try to debug your program using printf and Serial.print statements. If the issue persists, you can ask for help at Forums.


[AMB21/22, AMB23]

Why is there no output on my serial terminal after connecting to board UART?

Answer: Boards by default are configured at 115200 baud rate, please check if your serial terminal is configured to 115200.


[AMB21/22, AMB23]

Why is my WiFi signal weak at times?

Answer: The default antenna for AMB21/22 and AMB23 uses the I-Pex Connector. Please change/connect the I-Pex Connector antenna.


[AMB21/22, AMB23]

Why is my board not powering up?

Answer: Please make sure the connector J38 beside resistor R43 is connected. The connector is used to link the power to IC.


[AMB21/22, AMB23]

What if I have driver issue when connecting the boards to my computer?

Answer: Please go to Drivers - FTDI for USB driver.


[AMB21/22]

During download mode, what is the function of the flashing green and red LEDs?

Answer: When the green LED flashes, it indicates that the board is waiting in download mode. When the red LED flashes, it indicates that the sketch’s code is being downloaded to the board.


[BW16]

Do I have to permanently connect D1 ––– D5 and D0 ––– D4 on BW16?

Answer: No. You only have to connect it if you wish to use the onboard USB port to upload sketches into BW16.


[BW16]

Why can't I enter upload mode even after following all of the steps?

image

Answer: Ensure that you have followed all the instructions to enter download mode. If issue still persist, please raise the question in Forums.


[BW16]

Does BW16 have user-configurable push buttons and LEDs?

Answer: BW16 has 1 user-configurable RGB LED.


[BW16]

Does BW16 support 5GHz Network?

Answer: Yes.


[AMB01]

How do I use the NFC function?

Answer: To use the NFC function on AMB01, you need to first weld the NFC antenna on the board. Please refer to one of the NFC examples for more information. Ameba Arduino: [RTL8195AM] NFC – Open a webpage on smartphone using NFC connection – Realtek IoT/Wi-Fi MCU Solutions .


Software

Software

Arduino SDK & Examples [AMB01], [AMB21/22], [AMB23], [BW16]


Is the COM port number different for all boards/computers?

Answer: Yes.


In order to use Ameba development boards, what software do I need to download?

Answer: To determine which software to download, by depending on the SDK and IDE you intend to use, you can visit Realtek IoT/Wi-Fi MCU Solutions and refer to the “Getting Started” page based on the Ameba development board you are using.


Can I use Ameba development boards without using Arduino IDE?

Answer: Yes.


What tools can I use to view the log console?

Answer: Make use of any terminal tools, such as SecureCRT/teraterm/putty etc.


Can I still run Ameba development boards if I am using Windows 11?

Answer: Yes.


I cannot find Ameba development boards in the Arduino IDE “Boards Manager”, what should I do?

Answer: Check that the json link is added to “Preferences” in Arduino IDE (find the respective json link from “Getting Started” page for each Ameba development boards at Realtek IoT/Wi-Fi MCU Solutions ). If you are still unable to find the Ameba development board in the Arduino IDE’s “Boards Manager”, you can download the offline packages from Ameba ARDUINO – Realtek IoT/Wi-Fi MCU Solutions.


What is the baud rate I have to set in Serial Monitor to prevent getting junk symbols?

Answer: To set the serial terminal baud rate value, it should be same as the baud rate set in the ino file. Eg, " Serial.begin(9600);"


Where can I find Serial Monitor in Arduino IDE?

Answer: You can find the Serial Monitor at the top right-hand corner of the Arduino IDE by clicking on
image.


Where can I find Serial Plotter in the Arduino IDE?

Answer: You can find it at “Tool” → “Serial Plotter”.


Do I always have to compile before uploading in Arduino IDE?

Answer: No, because the upload command includes compiling and uploading.


Can I have .cpp and .h file together with .ino files in sketches to run in Arduino IDE?

Answer: Yes.


How to add a file on Arduino IDE?

Answer: Shortcut to add a file is “Ctrl+Shift+N” and rename the file accordingly.


How to install Ameba libraries on Arduino IDE?

Answer: Download libraries from ambiot · GitHub and follow the instruction at https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries to install.


Can I connect my circuit to my board before uploading sketches on Arduino IDE?

Answer: Yes.


On Linux, my serial monitor could not open, how do I solve it?

Answer:
Firstly, please try the instructions on Arduino website at
https://docs.arduino.cc/software/ide-v1/tutorials/Linux

If you still encounter the same issue afterwards, please uninstall the IDE, and then re-install it using terminal in the arduino IDE root directory and type the following command in the terminal,

sudo ./install.sh

This will grant Arduino IDE higher permission thus enable it to access the serial port correctly


What should I do when I get "ERR: Cannot find ameba on mbed driver! Please replug Ameba." while using AMB01?


Answer:
Check that you have updated the DAP firmware. You can refer to How to update DAP Firmware? – Realtek IoT/Wi-Fi MCU Solutions to learn how to update DAP firmware.


What should I do when I am getting "failed to open COM port" error?

image

Answer:

  1. Check that you have correctly selected the board and COM port number on Arduino IDE.
  2. Check if it’s a hardware issue.
  3. If issue still persist, please raise the issue in the forum https://forum.amebaiot.com/.

I have an error when running Cygwin, "The program can't start because cygwin1.dll is missing from your computer. Try reinstalling the program to fix this problem.”.

Answer: Look for cygwin folder in C drive, then look for cygwin1.dll in the bin folder and add cygwin1.dll to “C:\windows” directory.


Why is there an error “RuntimeException: Error opening serial port COM3: port busy“ in processing software?

Answer: At any given time, only 1 Serial Monitor can access 1 particular COM port. There are two Serial Monitors trying to open the same COM port in the above example.


For networking examples, does my SSID and password have to be the same as what my laptop/computer is connecting to?

Answer: It is suggested to connected to the same network as the laptop/computer.


What does D13 refer to?

Answer: D13 refers to Pin 13 on Ameba development board. You can refer to the pin diagram for each board under “Getting Started” via Ameba ARDUINO – Realtek IoT/Wi-Fi MCU Solutions.
image


How do I connect the LED to pin 13?

Answer: Follow the example in “Getting Started” via Ameba ARDUINO – Realtek IoT/Wi-Fi MCU Solutions.


Can I use other Arduino boards other than the mentioned Arduino Uno in examples?

Answer: Yes, however, the wiring connection will be different from using Arduino Uno. Suggest referring to the pin diagram of the Arduino board you will be using.


(Array example) When connecting to D7, why didn't the LED light up on AMB21/22?

Answer: D7 is NC on AMB21/22. NC is “Not Connected”.


(BLEBatteryService example) After scanning, I could not find the device name in the BLE app. What should I do?

Answer: Make sure that your Bluetooth and Location Service are both turned on.


(Tensorflow Lite example) Why can't I get my board compiled?

Answer: Do remember to install the patches from ambd_arduino/Ameba_misc at master · ambiot/ambd_arduino · GitHub and necessary Arduino library in Arduino IDE. Installation instructions can be found in the readme file.


(mDNS example) I could not see the network port even after restarting the Arduino IDE. What should I do?

Answer: Same network should be used on your computer and development board.


MicroPython SDK & Examples [AMB21/22], [AMB23], [BW16]


How can I avoid indentation errors while copying code from examples to Tera Term?

Answer: Please refer to https://ttssh2.osdn.jp/ for more information.


Can I use all Python libraries available online?

Answer: No, MicroPython only support a small section of the classic Python standard library. However, this can be done by porting the classic python library to MicroPython.


Compilation of MicroPython firmware failed.

Answer:
During the building process, some user may encounter error that suspend the process, this is due to missing system environment setup and can be fixed as follows,

  1. Error related to python
    By default, MicroPython use python3 to run building scripts for the MicroPython kernals, if you encounter error related to python, it may be because the path of the Python3 executable is not added to system environment variable.

However, if environment variable is already added but the build could not be completed, you may try,

  1. Re-start your PC
  2. type “python” on your terminal, if the python shown is python3, then please add
    PYTHON = python
    to the second line of the “Makefile” under “port/rtl8722” folder
  1. Error related to MPY-CROSS
    If building process stop when mpy-cross shown as error, there is a step to be done as follows,
  1. navigate to “MicroPython_RTL8722/mpy-cross” folder
  2. Open your Cygwin/Linux terminal and just type
    make
    Wait for make finish building the MicroPython Cross Compiler, then this should fix the error

Why am I constantly getting “syntax error” from REPL?

Answer: Please note that MicroPython only support Python 3 syntax.


How to upload my python script into Ameba?

Answer: There are 3 ways of uploading your python code into Ameba,

  1. via REPL normal mode
    In the normal REPL mode, you can paste your into REPL code line by line and have them executed sequentially, but note that syntax will be automatically indented when using condition checking or loop, like “if” or “while”, incorrect indenting will crash your input script
  2. via REPL paste mode
    When in normal REPL mode, press “Ctrl”+ “e” will enter paste mode, paste mode only allow pasting a large chunk of a complete code, incomplete code or editing after pasting will mess up your syntax and cause error
  3. via mp_frozenmodules
    By placing your python script into the “mp_frozenmodules” folder under “rtl8722” folder, your code will be embedded into the MicroPython firmware and uploaded to Ameba, after that you can use it by simply importing the name of your python script. If you get syntax error using this method, you better check your python code syntax again.

3 Likes