Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好,是否支持OTA升级固件 #5

Closed
naja1977 opened this issue Mar 1, 2023 · 6 comments
Closed

您好,是否支持OTA升级固件 #5

naja1977 opened this issue Mar 1, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@naja1977
Copy link

naja1977 commented Mar 1, 2023

没有OTA升级的话,装配好之后极度不方便。串口无法引出外壳。

@SmallPond SmallPond added the enhancement New feature or request label Mar 1, 2023
@SmallPond
Copy link
Owner

是的,当前还没实现这一部分,后续将会加入 OTA 。

@SmallPond
Copy link
Owner

SmallPond commented Mar 1, 2023

实际上在 PlatformIO 下是可以通过 USB 直接烧写程序(无需手动按住 boot 进入下载模式)的,使用以下方法:

C:\Users\${username}\.platformio\platforms\espressif32\builder\main.py 找到下面这一行

"--before", board.get("upload.before_reset", "default_reset"),

替换为:

                "--before", board.get("upload.before_reset", "usb_reset"),

@SmallPond
Copy link
Owner

通过这种方式可以让 X-Knob 自动进入下载模式,下载完成后会自动重启。

这样更加方便,也不用再给程序增加额外的 OTA 逻辑。所以当前不会考虑增加 WiFi OTA 了。

后续还要继续研究如何通过 platformio 传入这个参数,而不用这种 hack 模式。我参考文档试了一下在 platformio.ini 文件中增加参数会报错:

upload_flags = 
	--before usb_reset

@SmallPond SmallPond reopened this Mar 1, 2023
@jwxa
Copy link
Contributor

jwxa commented Mar 1, 2023

测试了一下 失败了
ZQEB}_C)F7LKV{5)0ZZ}ANG
EX1ZY4I ~AK4U`E$PS26RNV
还有就是目前刷了固件后S-Dial选中直接会重启?我按45大佬指导的方式是直接ota(本来是45大佬的固件)刷入你的master分支代码编译后的firmware.bin文件

@SmallPond
Copy link
Owner

我按45大佬指导的方式是直接ota(本来是45大佬的固件)刷入你的master分支代码编译后的firmware.bin文件

不知道你这里的最新master分支是否同步了我最新的 commit fc59180

由于我之前是把 usb 初始化了 cdc 设备,所以没办法通过 usb 直接下载,取消 cdc 的初始化就可以了。

所以,在这种情况下,你可能需要先手动刷入最新的固件,以后就可以通过 usb 下载了。

@jwxa
Copy link
Contributor

jwxa commented Mar 2, 2023

回家试试谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants