Skip to content

Instantly share code, notes, and snippets.

@lukeswitz
Created July 6, 2024 17:58
Show Gist options
  • Save lukeswitz/ce2aa050e40f398eff0674ae06e95e1e to your computer and use it in GitHub Desktop.
Save lukeswitz/ce2aa050e40f398eff0674ae06e95e1e to your computer and use it in GitHub Desktop.

Flashing BW16 AT Firmware

A simple guide to flashing the AT firmware onto BW16-Kit modules.

Factory Firmware Versions

  • USBC BW16-Kit: at version:release/v2.11.2 sdk version:amebad_v6.2C firmware version:release/v4.9.2

  • MicroUSB BW16: version:v2.4.1,amebaD v6.0a(Aug 14 2019)


Instructions for Windows

(VM inside Linux/macOS confirmed working)

1. Prepare Device & Machine

Note: There's two methods to flash the firmware, using a UART adapter or USB. We will be using the USB method here.

- Jump TX > Log RX and RX > Log TX:

sss

- Connect the unit via USB

2. Configure the Ameba Image Tool

- Select the proper chip for RTL8720DN:

ss

- Change flash size to that of the firmware binary, 2048 in this case:

ss2

- Select the AT firmware .bin in the address shown:

ss3

- Enter flash mode: Hold Burn, tap RST, release Burn

- Click the "Erase" button and verify there are no errors:

COM4 is open successfully!
Flash erase is processing...
Falsh erase done!
COM4 is closed successfully!

(You can verify this by observing a singluar # on the boot serial output at 115200 baud if needed)

- Click the "Download" button, ensuring no errors:

COM4 is open successfully!
Uart download server has started...
Erase addr: 0x8000000, size:2048KB
IMG1 image is being sent...
IMG1 image has been sent successfully!
All images are sent successfully!
COM4 is closed successfully!

- Disconnect the jumper wires

Verifying Flash

If all went well, the serial output (115200 baud) on boot will be ASCII art of a "B&W" logo as below:

<SNIP>
                   #    ################    #          #   ##########    #####  #                   #      #
                   #                       #            #                      #                    #      #
                    #######################               #####################                     ########

version:v2.4.1,amebaD v6.0a(Aug 14 2019)

interface 0 is initialized
interface 1 is initialized

Initializing WIFI ...
WIFI initialized

init_thread(54), Available heap 0x27418

AT_UART_CONF: 38400,8,1,0,0

We see UART ready at 38400 baud.

  • Connect via any serial adapter to TX & RX to see the output and test the AT and ATWS commands:

ss34

# 
AT COMMAND READY

# AT
[AT] OK

# ATWS

# 
AP : 1.(ACCESS POINTS LIST)

Disclaimer

The instructions and information provided in this guide are for educational purposes only. By following these instructions, you assume full responsibility for any damage, data loss, or other issues resulting from flashing the firmware onto your BW16-Kit modules, including but not limited to hardware damage, software corruption, and voiding of warranties. While efforts have been made to ensure the accuracy of this guide, no guarantee is provided, and you should refer to official documentation from BW16 and Ameba for the most accurate information. This guide is provided "as is" without any warranties, express or implied, and we do not guarantee the completeness, accuracy, or applicability of the information. This guide does not constitute professional advice, and you should consult a qualified professional or relevant support services for technical issues. We are not responsible for the content or availability of third-party websites linked in this guide, and their inclusion does not imply endorsement. No links to proprietary firmware are provided. By using this guide, you agree to indemnify and hold harmless the authors and contributors from any claims, liabilities, or expenses arising from your use of the information provided.

@Vap0rz
Copy link

Vap0rz commented Aug 30, 2024

Thanks for this Luke!
Am I missing the downgrade firmware location for the USBC? The only version I could find was on IA but it was 2.4.1, amebaD v6,0a.

@lukeswitz
Copy link
Author

No links to proprietary firmware are provided

For dumping firmware from a green board to the black ones, this tool: https://github.com/CoD-Segfault/BW16-Dump

hope that’s of help. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment