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.
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.