BW16 & micropython

I bought BW16 and tried writing mircopython from below.
https://www.amebaiot.com/en/amebad-micropython-bw16-getting-started/

I used option connection.
The write seems to succeed, but it only runs monitors requesting #AT at 38400bps.
why?

AT

[AT] OK

Hi @Hokoshi,

Glad that you have uploaded the Micro Python firmware to your BW16 dev board successfully.

A kindly reminder that since the original firmware in your BW16 is invented by B&T and they are using AT Command as the user input. Since then the original firmware in your flash memory has been replaced by the Micro Python firmware you have flashed in. The AT command is not available anymore.

Attached the Micro Python firmware here for you as a reference:

Kindly provide the full log upon the board reboot if you are not getting the log as shown above.
Hope this answer could help.

Thank you.

Thank you.
But there is no improvement in the situation.

My steps are shown below.

1.Board Connection (for Firm Upload )

2.FirmUpload (from Release Release Ameba V1.1.0 · ambiot/micropython · GitHub)

3.Board Connection (for micropython)

4.Result fail (instead of AT command @38400bps why?)

Are there any mistakes in the procedure?

@Hokoshiさん,

Thanks for providing detailed logs and screenshots. You can follow the steps provided in the Solution section before doing Step 2~4 to solve your problem.

Root Cause

Basically, your issue is caused by the B&T original firmware being transferred to board flash via Over-The-Air (OTA) method, which causes your micropython firmware unable to be loaded.
If you are interested to explore more, you may refer to the guide here.

Solution

You may erase the B&T original firmware using AmebaD image tool following the steps introduced in another forum article: [Resources] BW16 Troubleshooting Guide.

どうもありがとうございました。

1 Like

Very Very Thanks !

I success start micropython.

image

MicroPython v1.1.0-ameba-2-g062a06da0 on 2023-04-07; BW16 with RTL8720DN
Type "help()" for more information.
>>> import os
>>> fs_stat = os.statvfs('/')
>>> print("Disk size in MiB", fs_stat[0] * fs_stat[2] / 1024 / 1024)
Disk size in MiB 0.4765625
>>> print("Free space in MiB", fs_stat[0] * fs_stat[3] / 1024 / 1024)
Free space in MiB 0.3945313
>>> import gc
>>> print(gc.mem_free() / 1024 / 1024)
0.1029053
>>> 

By the way, doesn’t this merge into mainline code?

@hokoshi さん、

I am glad that the solution works for you. :rofl:

Yes, the current code has been merged into the GitHub main branch in ambiot\micropython repository already.

Download the MicroPython official repository, and check out the ameba branch, then you are able to explore more features on BW16:

Thanks and enjoy coding.

I have already built the BW16 branch.(v1.1.0)

MicroPython v1.1.0-ameba-2-g062a06da0 on 2023-04-07; BW16 with RTL8720DN
Type "help()" for more information.

On the other hand, the main version is v1.19, so I’m worried that it won’t keep up.