Alibaba Cloud HaaS100 IoT development board study notes (5) Steps to push js code-based on the updated firmware

Abstract: Alibaba Cloud has updated the firmware of HaaS100. The updated firmware can already be used to directly push the js code through the information serial port. The first version of the firmware needs to add a USB serial port module, and then use complex wiring to operate. This article describes how to check the firmware version and how to push the js code to the HaaS100 development board.

Hardware: HaaS100 development board. Software: win7, amp-win, vscode.

table of Contents

1. Put HaaS100 in wait-to-receive mode

2. Open the amp-win tool

3. Push js code

4. How to check the firmware version number


1. Put HaaS100 in wait-to-receive mode

Press the reset button, and then immediately press and hold the network distribution button, and wait until the LED light flashes intermittently and then release it. The development board is in the wait for receiving mode.

2. Open the amp-win tool

First open the command line by running cmd command

Then use the cd amp-win command to enter the amp-win directory

Why do you do this? Because I unzipped the amp-win tool to this folder

Another way, which may be more convenient, is to use the vscode software to open the menu Terminal----New Terminal.

The effect is the same as using the terminal under windows, and the specific operation method is the same as described above.

3. Push js code

The premise is that the js program has been written. Please note that the encoding format is UTF-8.

First check the list of serial ports and find the one currently in use. Currently I am using COM40.

Then use the command amp serialput app COM40 to push the program. Note that COM is uppercase.

Sometimes there will be errors and the push is not good. There are generally two reasons at this time. The first is that the serial port is occupied. You can check whether there is a serial assistant program that has occupied this port.

How to quit? You can use the Ctrl+C key combination. Otherwise, it will remain stuck there and cannot exit.

The screen of successful push is like this

After pushing, you need to press the reset button once

4. How to check the firmware version number

You can display the current information by entering the following commands under 115200 baud rate through various forms of serial port assistants, such as SSCOM, securecrt, etc.

console.log('system version is: ' + system.version());

 

As shown in the figure below, the version number is: amp-v1.0.0-gceff790-Module_Hardware_version-Module_Software_version

 

Guess you like

Origin blog.csdn.net/youngwah292/article/details/112093397