BW16 OTA

Talking about BW16 cloud upgrade firmware? !谈论下BW16 云端升级固件问题?!

Hi @scream,

Currently, AmebaD Arduino SDK is only supporting OTA via Local Area Network (LAN).
You can refer to the link here for example code and the doc here as a guide.

Note that the link to our SDK is currently in our /dev branch, the new release version v3.1.6 with the OTA feature is still under QC currently.

Thank you for your reply! At present, in order to facilitate the later maintenance of our project, we are very concerned about this cloud upgrade function! I am honored to use your BW16 products, and hope your company will give support!

1 Like

Hi @scream,

Thank you for your support on BW16. I will inform you again once the 3.1.6 official SDK is released.
Do let us know again if you encountered any trouble using the OTA feature.

[Error] :
项目使用了 750332 字节,占用了 (35%) 程序存储空间。最大为 2097152 字节。
上传项目出错
[main] Default input parameters 2 usage: %UserProfile%\Desktop\OTA_All.bin
[Error] Fail to open file %UserProfile%\Desktop\OTA_All.bin

@scream 您好,

[main] Default input parameters 2 usage: %UserProfile%\Desktop\OTA_All.bin
[Error] Fail to open file %UserProfile%\Desktop\OTA_All.bin
两行报错说明在您的电脑桌面上无法找到OTA_All.bin 文件.

但是刚才确认了一下,因为还在开发内测阶段,目前官网文档和最近更新的tool还没有同步。请按照下面的步骤生成OTA固件(这部分没有更新到官网上)后,将新的固件放在新建的 tools/misc 文件夹中。完整路径请参考 Github Pull Request platform.txt 中的高亮部分。

明天会更新一版新的 tool 和文档来解决这个报错。


Generate Cloud OTA Image

Steps to generate a Cloud OTA image are as follows:

  1. Compile user’s sketch. “km0_km4_image2.bin” will be generated upon Arduino’s sketch Verify (compilation) process done in the file path below:
    C:\Users\USERNAME\AppData\Local\Arduino15\packages\realtek\tools\ameba_d_tools\x.x.x. This file will be used as the source binary to be converted to an OTA binary later.

  2. Retrieve the “ImageTool.exe” from GitHub ambd_sdk:
    https://github.com/ambiot/ambd_sdk/tree/dev/tools/AmebaD/Image_Tool, double click to open it.

  3. Select “OTA_All” as Generate Target type (in red).

  4. Input Image Version, the default value is “0xFFFFFFFF”.

  5. Click Browse button to select target images to be converted to an OTA binary. The address can be ignored. The Memory Layout bar will show the relative positions of the two images. If they overlap, the overlapped area is in red colour for warning.

  6. Click Generate button to specify the name and path of the output file. After the operation is done, the cloud image (OTA_All.bin) is generated at your specified folder.

    We recommend placing it in the default tools folder for Arduino Ameba:
    a. Windows
    C:\Users\username\AppData\Local\Arduino15\packages\realtek\tools\ameba_d_tools\x.x.x\
    b. Linux
    /home/username/.arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/
    c. MacOS
    /Users/username/Library/Arduino15/packages/Realtek/tools/ameba_d_tools/x.x.x/

When navigating to the designated tools folder on your target operating system, create a new folder called “misc” and put the OTA image (OTA_All.bin) within it.

依然错误
[main] Default input parameters 2 usage: %UserProfile%\Desktop\OTA_All.bin
[Error] Fail to open file %UserProfile%\Desktop\OTA_All.bin
上传失败: 上传错误:exit status 1

您好,
请提供下面信息,我尝试复现您的问题:

  • 使用 SDK 版本
  • Arduino IDE 窗口的完整报错信息
  • tools/misc 文件夹截图
  • 使用的 OTA_All.bin

从您给出的log信息这边初步怀疑是因为sdk使用的platform.txt 文件和OTA tools mismatch造成的。
在您安装内测版sdk时无比清空已经安装的稳定版sdk。

谢谢

您好 @scream
AmebaD SDK v3.1.6 新版本最近剛剛升級,正式支持 OTA 功能。 您可以試一下。

OTA功能升级只能成功一次 再进行第二次就使得板子无法正常运行:(测试了很多次都一样,只要进行第二次升级就死机—— 3.1.6版本)

@scream

請問您是否有跟著我們的 OTA example guide使用這個範例呢?

您可以在這邊找到文章鏈接

是的 就用的这个教程 第一次都会成功 第二次再来一遍就废了 升级文件保持一样也不行

您好,
您可能誤會我的意思了。
這邊的截圖上解釋了 default bootup 的 flash address.
中間兩個圖片解釋的是,當:

  1. 只有OTA2區間有valid images
  2. OTA1 和 OTA2 區間都有valid images

這兩種情況時,板子默認從OTA2 區間啓動。


所以,按照您的燒錄順序:

  1. 正常燒錄image (到OTA1區域)
  2. OTA燒錄image (到OTA2區域)
  3. 重新燒錄新image

這是兩邊都有image的情況下滿足第三張圖片的情況,所以開發板每次都會默認從OTA2區域啓動。
這時,如果你想嘗試第二遍OTA燒錄,至少應該:

  1. 清空flash. 回到 圖四 狀態
  2. 更改第二步燒錄的image讓它帶有OTA功能。

我的意思是第一次用的串口刷的带OTA的image,第二次通过局域网进行刷入带OTA的image,第三次再次进行局域网刷入带OTA的image,第三次结果系统都运行不了了。 (按道理我刷入的都是带OTA,通过局域网刷入的都存在OTA2区域,但最终系统都没法运行)

好的了解,
按照这种情况

在OTA1 OTA2 都有内容的情况下,第三次烧录带OTA的image应该把默认地址换成OTA1进行替换。我看能不能帮您复现一下问题。需要您提供:

  1. “第三次结果系统都运行不了了”或者之前你说的“死机”现象的错误日志
  2. 方便的话可以提供代码

第三次局域网下载 LOG显示框提示正常,但就是运行不了 你们应该一试就出来了 (代码就用的你们官方的例子OTA_basic)

Sorry if it’s answered somewhere in this thread, but I can’t read chinese.

I’ve followed the tutorial but I’m stuck with the imagetool. I’ve done all the steps, selected the “bin3” browse button, selected the km0_km4… file retrieved from arduino ide compilation, selected the “tick” in the bin3 row and, when I click “Generate”, it opens a windows file selector. I give “OTA_ALL.bin” as filename, and, when I click OK nothing happens (no file is generated) and gets back to the “Generate” tab.

The doc states at step 5 “Click Browse button to select target images to be converted to an OTA binary. The address can be ignored. The Memory Layout bar will show the relative positions of the two images. If they overlap, the overlapped area is in red colour for warning.” The first image is the km0_km4… file, but whats the second image??

Thx in advance
Alejandro

Hi @Chano,

Could you please take a screenshot of your Image Tool so that we could further validate your issue?
Thanks

Finally I solved, It was an stupid mistake on my side, sorry!

Windows 11 in my laptop, by default, aplies 150% zoom to the screen, With that zoom the “Generate” button lies outside the window and there is no scroll bar to get to it. I changed the zoom level to 125% (as it is by default in win W10) and the generate button appears and I was able to create the .bin file.

Thx for you support and sorry for bothering.
Chano

@Chano
Glad that you have solved it!! :smiley: