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

Bug: Upgradeable code; Multiple Browser sessions may interfere with each other #237

Open
nielsonm236 opened this issue Oct 8, 2024 · 0 comments

Comments

@nielsonm236
Copy link
Owner

While implementing a new feature "Diagnostic Log" I found that implementation of access to webpages stored in I2C EEPROM, which is only used in the UPG releases, can potentially corrupt transmission of the webpages when multiple Browsers are used. The problem is that a global variable "off_board_eeprom_index", which is used as a pointer into the I2C EEPROM while reading webpage content, is implemented as a single global variable. Thus, parallel access to the I2C EEPROM can cause the value to be corrupted.

The fix is to store the variable "off_board_eeprom_index" as a part of the proto socket struct, so that each connection to the HW-584 tracks access to the I2C EEPROM independently. This will consume a little more RAM (about 8 bytes), but will eliminate the potential conflict/corruption.

From the user perspective this will have appeared as "incomplete Browser display of webpages", but I think it will only have occurred if multiple Browser access was attempted, or if some automation using URL commands was occurring at the same time as manual Browser access. I don't see any conflict with MQTT interactions as MQTT does not access the I2C EEPROM.

The fix will appear in the next major release.

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

No branches or pull requests

1 participant