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

Bugfix/stable ota #127

Merged
merged 2 commits into from
Jan 7, 2024
Merged

Bugfix/stable ota #127

merged 2 commits into from
Jan 7, 2024

Conversation

Cabooman
Copy link
Collaborator

@Cabooman Cabooman commented Jan 7, 2024

Bug: Unstable OTA update in live setting

Description

OTA updates work well when not connected to RS485/CAN

Root cause

The CAN functionality is the likely culprit from testing outcomes. Likely, the CAN ISR messes with the OTA routine

Solution

Disabling the CAN peripheral at OTA-start seems to do the trick in a limited testing setup. Disabling the interrupt could also work but this is easy and enough

@@ -316,6 +316,7 @@ String processor(const String& var) {
void onOTAStart() {
// Log when OTA has started
Serial.println("OTA update started!");
ESP32Can.CANStop();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good that Modbus RTU can stay running! The BYD Modbus RTU protocol takes the bms_status value, no other protocol so far is interested in the update status. So this solution is approved! ✅

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dalathegreat dalathegreat merged commit 543deff into main Jan 7, 2024
32 checks passed
@dalathegreat dalathegreat deleted the bugfix/stable-ota branch January 22, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants