From 81739ac809851f9cb6a9c48ab3026c54961e3a85 Mon Sep 17 00:00:00 2001 From: CleaLCo Date: Thu, 31 Oct 2024 16:44:04 +0100 Subject: [PATCH 01/10] Update 0292-EEPROM-use.md --- design/00292: EEPROM storage.md | 64 +++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 design/00292: EEPROM storage.md diff --git a/design/00292: EEPROM storage.md b/design/00292: EEPROM storage.md new file mode 100644 index 0000000..7be5073 --- /dev/null +++ b/design/00292: EEPROM storage.md @@ -0,0 +1,64 @@ +# Proposal: Use the PlanktoScope HAT EEPROM chip to store hardware configuration + +Author(s): Vallet, Laurent; Le Corre, Cléa Last updated: 30/10/2024 Discussion at https://github.com/PlanktoScope/PlanktoScope/issues/292 + +## Abstract + +The following document proposes to store the PlanktoScope (PS) hardware configuration in the 32 Kbits EEPROM chip of the PlanktoScope HAT in order to : +* automatically save the hardware state of the machine +* easily retrieve the hardware configuration for debugging +* feed the metadata with precise hardware information + +## Background + +A specific HAT was developped to satisfy the PlanktoScope needs. +This PlanktoScope HAT connected to the raspberry pi and all of the external devices (led, motors, pump, camera) contains a 32 Kbit EEPROM chip which is a "type of non-volatile ROM that enables individual bytes of data to be erased and reprogrammed" (Wikipedia). +It is therefore possible to store some data inside this chip and to read it back. + +For now (Sunray version 2024.0.0-beta.2) some of the hardware configuration of the PlanktoScope is entered by the user in the GUI. +We would like to have an hardware configuration specific to each machine in case some specific modification is made. +We would like to store this configuration in a safe place, independent from the software installed on the raspberry pi. + +## Proposal + +We therefore propose to write a python script that allows the storage and the reading of the PlanktoScope hardware information on the EEPROM chip. + +This information stored should contain : +* PlanktoScope reference +* Plantoscope serial number +* PlanktoScope version +* Plantoscope fabrication date +* HAT serial number +* HAT version +* Driver reference +* Pump reference +* Stepper focus reference +* Objective lens reference +* Tube lens reference +* Flowcell thickness +* LED reference + +Those informations could be used to feed the metadata stored in the hardware.json file as described in the issue 290 (https://github.com/PlanktoScope/PlanktoScope/issues/290). + +## Rationale + +The EEPROM chip currently used for the HAT has a capacity of 32Kbits. This provides adequate space for the necessary configuration without redundancy or excessive overhead. +The use of our HAT is relevant as the PlanktoScope HAT is linked to every device of the machine. This allows unique data storage for each PlanktoScope unit, helping track individual hardware changes or updates. +The EEPROM on the HAT is accessible directly through the I2C bus of the Raspberry Pi, simplifying software development. + +This solution is exclusive to the PlanktoScope HAT, limiting compatibility with other configurations (e.g., Adafruit HATs without EEPROM). +Though currently sufficient, 32Kbits could become a constraint if future features or expanded data storage needs arise. + +## Compatibility + +The main compatibility issue concerns the adafruit HAT users. +For those, a simple solution would be to continue selecting their configuration in the GUI, or adapt the script to store informations in the Raspberry pi EEPROM chip in case of not finding the PlanktoScope HAT EEPROM adress. +The PlanktoScope versions V2.5 and V2.6 do not natively support writing data to the EEPROM chip because the write-protect (WP) pin of the EEPROM is enabled. To disable write protection, a solder point must be applied to the WP pin. + +## Implementation +The EEPROM project has reached a functional stage, with all desired actions for writing and reading hardware information now operational. The next phase will focus on integrating this functionality into the broader PlanktoScope software, allowing users to access and manage their device's hardware information throughout its lifecycle. This integration will enhance the user experience, offering consistent hardware management for improved maintenance and lifecycle tracking of each PlanktoScope device. + +## Open issues (if applicable) +One current limitation in this project is the requirement to manually solder a connection on the Write Protect (WP) pin of the EEPROM chip to enable writing operations. This step introduces some complexity and potential error for users or technicians during the assembly or modification process. + +To address this, a planned improvement is to incorporate a bridge between the WP pin and GPIO pin 4 on the Raspberry Pi. By controlling the write protection via software, this enhancement would streamline write operations by allowing the program to enable or disable the WP functionality dynamically. This improvement would enhance flexibility and reduce the need for physical alterations. From 1954f2497f2258f9f51e3dc5cfc4029a46be7609 Mon Sep 17 00:00:00 2001 From: CleaLCo Date: Wed, 6 Nov 2024 09:11:30 +0100 Subject: [PATCH 02/10] Update design/00292: EEPROM storage.md Co-authored-by: Ethan Li --- design/00292: EEPROM storage.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/design/00292: EEPROM storage.md b/design/00292: EEPROM storage.md index 7be5073..df4f20b 100644 --- a/design/00292: EEPROM storage.md +++ b/design/00292: EEPROM storage.md @@ -1,6 +1,10 @@ # Proposal: Use the PlanktoScope HAT EEPROM chip to store hardware configuration -Author(s): Vallet, Laurent; Le Corre, Cléa Last updated: 30/10/2024 Discussion at https://github.com/PlanktoScope/PlanktoScope/issues/292 +Author(s): Vallet, Laurent; Le Corre, Cléa + +Last updated: 2024-10-30 + +Discussion at https://github.com/PlanktoScope/PlanktoScope/issues/292 ## Abstract From 26e58e1665ac6909ff3f6939869d55047ac33728 Mon Sep 17 00:00:00 2001 From: CleaLCo Date: Wed, 6 Nov 2024 09:11:51 +0100 Subject: [PATCH 03/10] Update design/00292: EEPROM storage.md Co-authored-by: Ethan Li --- design/00292: EEPROM storage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/design/00292: EEPROM storage.md b/design/00292: EEPROM storage.md index df4f20b..8bab6c0 100644 --- a/design/00292: EEPROM storage.md +++ b/design/00292: EEPROM storage.md @@ -8,7 +8,7 @@ Discussion at https://github.com/PlanktoScope/PlanktoScope/issues/292 ## Abstract -The following document proposes to store the PlanktoScope (PS) hardware configuration in the 32 Kbits EEPROM chip of the PlanktoScope HAT in order to : +The following document proposes to store PlanktoScope hardware configuration metadata in the 32 Kbit EEPROM chip of the PlanktoScope HAT, in order to: * automatically save the hardware state of the machine * easily retrieve the hardware configuration for debugging * feed the metadata with precise hardware information From 2866849f7707ed725ebbe443a8ed248db26e4f5e Mon Sep 17 00:00:00 2001 From: CleaLCo Date: Wed, 6 Nov 2024 09:12:36 +0100 Subject: [PATCH 04/10] Update design/00292: EEPROM storage.md Co-authored-by: Ethan Li --- design/00292: EEPROM storage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/design/00292: EEPROM storage.md b/design/00292: EEPROM storage.md index 8bab6c0..7ddb8cf 100644 --- a/design/00292: EEPROM storage.md +++ b/design/00292: EEPROM storage.md @@ -11,7 +11,7 @@ Discussion at https://github.com/PlanktoScope/PlanktoScope/issues/292 The following document proposes to store PlanktoScope hardware configuration metadata in the 32 Kbit EEPROM chip of the PlanktoScope HAT, in order to: * automatically save the hardware state of the machine * easily retrieve the hardware configuration for debugging -* feed the metadata with precise hardware information +* provide correct hardware information as part of the metadata which gets exported with datasets generated by PlanktoScopes ## Background From 90ed792e1854673d09a9c27a823c5ac68c46127d Mon Sep 17 00:00:00 2001 From: CleaLCo Date: Wed, 6 Nov 2024 09:13:12 +0100 Subject: [PATCH 05/10] Update design/00292: EEPROM storage.md Co-authored-by: Ethan Li --- design/00292: EEPROM storage.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/design/00292: EEPROM storage.md b/design/00292: EEPROM storage.md index 7ddb8cf..260ca13 100644 --- a/design/00292: EEPROM storage.md +++ b/design/00292: EEPROM storage.md @@ -9,7 +9,8 @@ Discussion at https://github.com/PlanktoScope/PlanktoScope/issues/292 ## Abstract The following document proposes to store PlanktoScope hardware configuration metadata in the 32 Kbit EEPROM chip of the PlanktoScope HAT, in order to: -* automatically save the hardware state of the machine +* pre-populate the machine with hardware-specific metadata as part of manufacturing at FairScope +* persist hardware-specific metadata across re-flashes of the Raspberry Pi's SD card image * easily retrieve the hardware configuration for debugging * provide correct hardware information as part of the metadata which gets exported with datasets generated by PlanktoScopes From a389154bd4a2b5baa556f85b7e4fde0fd39aa503 Mon Sep 17 00:00:00 2001 From: CleaLCo Date: Wed, 6 Nov 2024 09:13:38 +0100 Subject: [PATCH 06/10] Update design/00292: EEPROM storage.md Co-authored-by: Ethan Li --- design/00292: EEPROM storage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/design/00292: EEPROM storage.md b/design/00292: EEPROM storage.md index 260ca13..7cd3dd6 100644 --- a/design/00292: EEPROM storage.md +++ b/design/00292: EEPROM storage.md @@ -20,7 +20,7 @@ A specific HAT was developped to satisfy the PlanktoScope needs. This PlanktoScope HAT connected to the raspberry pi and all of the external devices (led, motors, pump, camera) contains a 32 Kbit EEPROM chip which is a "type of non-volatile ROM that enables individual bytes of data to be erased and reprogrammed" (Wikipedia). It is therefore possible to store some data inside this chip and to read it back. -For now (Sunray version 2024.0.0-beta.2) some of the hardware configuration of the PlanktoScope is entered by the user in the GUI. +Currently (as of PlanktoScope OS v2023.9.0 and v2024.0.0), the hardware configuration of the PlanktoScope is entered by the user in the Node-RED dashboard and is stored in a `hardware.json` file which is lost when the PlanktoScope's SD card is re-flashed with a new SD card image. We would like to have an hardware configuration specific to each machine in case some specific modification is made. We would like to store this configuration in a safe place, independent from the software installed on the raspberry pi. From e2c413534725e76caf0493a8e91364b1d7e337d8 Mon Sep 17 00:00:00 2001 From: CleaLCo Date: Wed, 6 Nov 2024 09:15:41 +0100 Subject: [PATCH 07/10] Update design/00292: EEPROM storage.md Co-authored-by: Ethan Li --- design/00292: EEPROM storage.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/design/00292: EEPROM storage.md b/design/00292: EEPROM storage.md index 7cd3dd6..98b9799 100644 --- a/design/00292: EEPROM storage.md +++ b/design/00292: EEPROM storage.md @@ -61,7 +61,9 @@ For those, a simple solution would be to continue selecting their configuration The PlanktoScope versions V2.5 and V2.6 do not natively support writing data to the EEPROM chip because the write-protect (WP) pin of the EEPROM is enabled. To disable write protection, a solder point must be applied to the WP pin. ## Implementation -The EEPROM project has reached a functional stage, with all desired actions for writing and reading hardware information now operational. The next phase will focus on integrating this functionality into the broader PlanktoScope software, allowing users to access and manage their device's hardware information throughout its lifecycle. This integration will enhance the user experience, offering consistent hardware management for improved maintenance and lifecycle tracking of each PlanktoScope device. +The EEPROM project has reached a functional prototype, with all desired actions for writing and reading hardware information now operational. +The next phase will focus on integrating this functionality into the broader PlanktoScope software, allowing users to access and manage their device's hardware information throughout its lifecycle. +This integration will enhance the user experience, offering consistent hardware management for improved maintenance and lifecycle tracking of each PlanktoScope device. ## Open issues (if applicable) One current limitation in this project is the requirement to manually solder a connection on the Write Protect (WP) pin of the EEPROM chip to enable writing operations. This step introduces some complexity and potential error for users or technicians during the assembly or modification process. From 2fb99b5a229c87bc44bdc75df1673dc21ee01a86 Mon Sep 17 00:00:00 2001 From: CleaLCo Date: Wed, 6 Nov 2024 09:16:12 +0100 Subject: [PATCH 08/10] Update design/00292: EEPROM storage.md Co-authored-by: Ethan Li --- design/00292: EEPROM storage.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/design/00292: EEPROM storage.md b/design/00292: EEPROM storage.md index 98b9799..14b5906 100644 --- a/design/00292: EEPROM storage.md +++ b/design/00292: EEPROM storage.md @@ -69,3 +69,5 @@ This integration will enhance the user experience, offering consistent hardware One current limitation in this project is the requirement to manually solder a connection on the Write Protect (WP) pin of the EEPROM chip to enable writing operations. This step introduces some complexity and potential error for users or technicians during the assembly or modification process. To address this, a planned improvement is to incorporate a bridge between the WP pin and GPIO pin 4 on the Raspberry Pi. By controlling the write protection via software, this enhancement would streamline write operations by allowing the program to enable or disable the WP functionality dynamically. This improvement would enhance flexibility and reduce the need for physical alterations. + +Currently, no design or plan has been proposed for enabling use of a JSON file on the PlanktoScope's SD card as a substitute for EEPROM (see the "Compatibility" section's discussion of backwards-compatibilitly with Adafruit HAT-based PlanktoScopes). That question will be left for future work, maybe as part of this proposal. From fd69ff42fe9377a72155b35d7266bb5c4982e089 Mon Sep 17 00:00:00 2001 From: CleaLCo Date: Wed, 6 Nov 2024 10:14:11 +0100 Subject: [PATCH 09/10] Update 00292-EEPRom-storage proposal --- design/00292: EEPROM storage.md | 55 +++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/design/00292: EEPROM storage.md b/design/00292: EEPROM storage.md index 14b5906..00f94e5 100644 --- a/design/00292: EEPROM storage.md +++ b/design/00292: EEPROM storage.md @@ -26,7 +26,7 @@ We would like to store this configuration in a safe place, independent from the ## Proposal -We therefore propose to write a python script that allows the storage and the reading of the PlanktoScope hardware information on the EEPROM chip. +We therefore propose to add functionality to PlanktoScope OS to store and load the PlanktoScope's hardware metadata onto/from the EEPROM chip. This information stored should contain : * PlanktoScope reference @@ -45,6 +45,26 @@ This information stored should contain : Those informations could be used to feed the metadata stored in the hardware.json file as described in the issue 290 (https://github.com/PlanktoScope/PlanktoScope/issues/290). +Each metadata field will occupy a specific memory segment on the EEPROM, with a unique starting address assigned to each field. Fields will be allocated based on their expected data length, providing adequate space for each. Metadata values will be stored by converting each character to its ASCII byte representation, aligning with the EEPROM’s byte-based storage structure. + +The field-by-field storage method allows individual fields to be updated without affecting other data, providing flexibility in managing hardware metadata. It also keeps the memory layout extendable, allowing new fields to be added by allocating additional address blocks if needed. +However, fixed addresses require careful memory management, as fields must be allocated a length that can accommodate any reasonable data expansion. The ASCII format, though simple, may lead to some inefficiencies in memory usage if fields grow beyond their allocated space. + +As an alternative, all metadata could be stored as a single JSON string, serialized into a byte sequence and written to the EEPROM in a single block. This approach would simplify storage by consolidating data into a unified structure. +Using a single JSON string could simplify retrieval and storage, as all metadata would be read or written in one operation. JSON also allows for a flexible structure. +This would however lack efficiency for selective updates. With JSON serialization, even minor changes to a single field would require rewriting the entire structure, impacting both memory efficiency and operational flexibility. Additionally, the size of the JSON string could become a constraint if future metadata expansion exceeds the EEPROM’s capacity. + +To support seamless interaction between the PlanktoScope OS and the EEPROM chip, we propose the addition of MQTT-based API routes. These routes will manage the reading, writing, and editing of EEPROM data, facilitating hardware configuration updates and retrieval. + +The MQTT routes are organized as follows: + +* `eeprom/#`: A wildcard route that listens to all EEPROM-related actions. This route handles messages for writing, editing, and reading actions based on the specified action in the payload. +* `eeprom/write_eeprom`: Handles requests to write a complete hardware configuration to the EEPROM. This route requires a payload with the relevant metadata fields for storage. +* `eeprom/edit_eeprom`: Allows for selective editing of EEPROM-stored data. Specific fields can be updated based on the provided payload, enabling targeted configuration changes. +* `eeprom/read_eeprom`: Reads the current EEPROM contents and publishes them as a JSON payload containing the stored hardware metadata. + +These routes enable automated handling of hardware metadata, making it accessible for debugging, configuration updates, and consistent metadata integration across PlanktoScope datasets. + ## Rationale The EEPROM chip currently used for the HAT has a capacity of 32Kbits. This provides adequate space for the necessary configuration without redundancy or excessive overhead. @@ -56,18 +76,47 @@ Though currently sufficient, 32Kbits could become a constraint if future feature ## Compatibility -The main compatibility issue concerns the adafruit HAT users. -For those, a simple solution would be to continue selecting their configuration in the GUI, or adapt the script to store informations in the Raspberry pi EEPROM chip in case of not finding the PlanktoScope HAT EEPROM adress. +Hardware Compatibility +The main backwards-compatibility issue concerns users of older Adafruit HAT-based versions of the PlanktoScope design. For those users, a simple solution would be to continue selecting their configuration in the GUI. + +Based on the official Raspberry Pi documentation (https://www.raspberrypi.com/documentation/computers/raspberry-pi.html), the Raspberry Pi’s EEPROM chip may already be reserved for boot-up processes, which limits its use for storing custom data. Therefore, we cannot reliably store hardware configuration data in the Raspberry Pi’s onboard EEPROM chip if the PlanktoScope HAT EEPROM is unavailable. + +To address this, we propose an alternative solution for configurations lacking a PlanktoScope HAT with EEPROM: storing the hardware configuration metadata in a JSON file on the SD card. This JSON file would serve as a substitute for EEPROM storage, ensuring access to essential hardware data without requiring dedicated EEPROM hardware. + +This JSON file could be implemented using the following rules : +* File Location: The JSON file can be stored in a designated directory on the SD card or within the application’s working directory. +* Structure and Schema: The JSON file will mirror the EEPROM data schema, including all configuration fields and the schema version number to maintain compatibility with EEPROM-stored data. +* Read/Write Operations: The PlanktoScope OS will include logic to check for the presence of an EEPROM. If no EEPROM is detected, the system will read from and write to the JSON file instead. +* Data Persistence: While the JSON file provides a flexible and easily accessible storage alternative, it is tied to the SD card. As such, it is vulnerable to being overwritten if the SD card is re-flashed. To address this, users should be informed to back up configuration data separately if they anticipate re-flashing the SD card. + +This fallback solution ensures that PlanktoScope can manage and retrieve hardware configuration data consistently, regardless of the presence of an EEPROM. It also allows compatibility across various hardware configurations, maintaining seamless functionality for users of older Adafruit HAT-based PlanktoScopes or systems without EEPROM. + The PlanktoScope versions V2.5 and V2.6 do not natively support writing data to the EEPROM chip because the write-protect (WP) pin of the EEPROM is enabled. To disable write protection, a solder point must be applied to the WP pin. +Data Schema Compatibility +To ensure compatibility as the metadata schema evolves, we propose including a data schema version number as part of the metadata stored on the EEPROM. This approach will allow future iterations of the PlanktoScope OS to detect the schema version and adjust its handling of the data accordingly, ensuring backward and forward compatibility. When fields are added, removed, or modified (such as by adding new enum values), the schema version number will provide a reference point for determining if adjustments are needed. + +In addition to the schema versioning, the software should include handlers for common compatibility cases: + +* Backward Compatibility: If an older schema version is detected, the software will ignore any fields that are no longer used in the current schema. +* Forward Compatibility: If a newer schema version is detected, the software will try to process known fields and ignore any unrecognized fields to maintain operational consistency. + +MQTT API Compatibility +This proposal does not modify any existing MQTT API routes. Instead, it introduces new MQTT API routes for EEPROM functionality, as described in the Proposal section. These new routes (eeprom/write_eeprom, eeprom/edit_eeprom, and eeprom/read_eeprom) will initially be considered experimental. No guarantees are made for future compatibility of these routes, as their implementation may evolve to meet additional requirements or to address unforeseen limitations. + +This experimental classification provides the flexibility needed to refine the API as usage grows and user feedback is collected, potentially stabilizing the routes in a future release. + ## Implementation The EEPROM project has reached a functional prototype, with all desired actions for writing and reading hardware information now operational. The next phase will focus on integrating this functionality into the broader PlanktoScope software, allowing users to access and manage their device's hardware information throughout its lifecycle. This integration will enhance the user experience, offering consistent hardware management for improved maintenance and lifecycle tracking of each PlanktoScope device. ## Open issues (if applicable) + One current limitation in this project is the requirement to manually solder a connection on the Write Protect (WP) pin of the EEPROM chip to enable writing operations. This step introduces some complexity and potential error for users or technicians during the assembly or modification process. To address this, a planned improvement is to incorporate a bridge between the WP pin and GPIO pin 4 on the Raspberry Pi. By controlling the write protection via software, this enhancement would streamline write operations by allowing the program to enable or disable the WP functionality dynamically. This improvement would enhance flexibility and reduce the need for physical alterations. Currently, no design or plan has been proposed for enabling use of a JSON file on the PlanktoScope's SD card as a substitute for EEPROM (see the "Compatibility" section's discussion of backwards-compatibilitly with Adafruit HAT-based PlanktoScopes). That question will be left for future work, maybe as part of this proposal. + +Currently, no design or plan has been proposed for enabling use of a JSON file on the PlanktoScope's SD card as a substitute for EEPROM (see the "Compatibility" section's discussion of backwards-compatibilitly with Adafruit HAT-based PlanktoScopes). That question will be left for future work, maybe as part of this proposal. \ No newline at end of file From 9b5d881ce046c1f0c70210f282b8aa09bf565ee9 Mon Sep 17 00:00:00 2001 From: CleaLCo Date: Wed, 6 Nov 2024 10:30:43 +0100 Subject: [PATCH 10/10] Update 00292-EEPROM-storage proposal --- design/00292: EEPROM storage.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/design/00292: EEPROM storage.md b/design/00292: EEPROM storage.md index 00f94e5..8f78b07 100644 --- a/design/00292: EEPROM storage.md +++ b/design/00292: EEPROM storage.md @@ -76,10 +76,11 @@ Though currently sufficient, 32Kbits could become a constraint if future feature ## Compatibility -Hardware Compatibility +**Hardware Compatibility** + The main backwards-compatibility issue concerns users of older Adafruit HAT-based versions of the PlanktoScope design. For those users, a simple solution would be to continue selecting their configuration in the GUI. -Based on the official Raspberry Pi documentation (https://www.raspberrypi.com/documentation/computers/raspberry-pi.html), the Raspberry Pi’s EEPROM chip may already be reserved for boot-up processes, which limits its use for storing custom data. Therefore, we cannot reliably store hardware configuration data in the Raspberry Pi’s onboard EEPROM chip if the PlanktoScope HAT EEPROM is unavailable. +Based on the official Raspberry Pi documentation(https://www.raspberrypi.com/documentation/computers/raspberry-pi.html), the Raspberry Pi’s EEPROM chip may already be reserved for boot-up processes, which limits its use for storing custom data. Therefore, we cannot reliably store hardware configuration data in the Raspberry Pi’s onboard EEPROM chip if the PlanktoScope HAT EEPROM is unavailable. To address this, we propose an alternative solution for configurations lacking a PlanktoScope HAT with EEPROM: storing the hardware configuration metadata in a JSON file on the SD card. This JSON file would serve as a substitute for EEPROM storage, ensuring access to essential hardware data without requiring dedicated EEPROM hardware. @@ -93,7 +94,8 @@ This fallback solution ensures that PlanktoScope can manage and retrieve hardwar The PlanktoScope versions V2.5 and V2.6 do not natively support writing data to the EEPROM chip because the write-protect (WP) pin of the EEPROM is enabled. To disable write protection, a solder point must be applied to the WP pin. -Data Schema Compatibility +**Data Schema Compatibility** + To ensure compatibility as the metadata schema evolves, we propose including a data schema version number as part of the metadata stored on the EEPROM. This approach will allow future iterations of the PlanktoScope OS to detect the schema version and adjust its handling of the data accordingly, ensuring backward and forward compatibility. When fields are added, removed, or modified (such as by adding new enum values), the schema version number will provide a reference point for determining if adjustments are needed. In addition to the schema versioning, the software should include handlers for common compatibility cases: @@ -101,12 +103,14 @@ In addition to the schema versioning, the software should include handlers for c * Backward Compatibility: If an older schema version is detected, the software will ignore any fields that are no longer used in the current schema. * Forward Compatibility: If a newer schema version is detected, the software will try to process known fields and ignore any unrecognized fields to maintain operational consistency. -MQTT API Compatibility +**MQTT API Compatibility** + This proposal does not modify any existing MQTT API routes. Instead, it introduces new MQTT API routes for EEPROM functionality, as described in the Proposal section. These new routes (eeprom/write_eeprom, eeprom/edit_eeprom, and eeprom/read_eeprom) will initially be considered experimental. No guarantees are made for future compatibility of these routes, as their implementation may evolve to meet additional requirements or to address unforeseen limitations. This experimental classification provides the flexibility needed to refine the API as usage grows and user feedback is collected, potentially stabilizing the routes in a future release. ## Implementation + The EEPROM project has reached a functional prototype, with all desired actions for writing and reading hardware information now operational. The next phase will focus on integrating this functionality into the broader PlanktoScope software, allowing users to access and manage their device's hardware information throughout its lifecycle. This integration will enhance the user experience, offering consistent hardware management for improved maintenance and lifecycle tracking of each PlanktoScope device. @@ -118,5 +122,3 @@ One current limitation in this project is the requirement to manually solder a c To address this, a planned improvement is to incorporate a bridge between the WP pin and GPIO pin 4 on the Raspberry Pi. By controlling the write protection via software, this enhancement would streamline write operations by allowing the program to enable or disable the WP functionality dynamically. This improvement would enhance flexibility and reduce the need for physical alterations. Currently, no design or plan has been proposed for enabling use of a JSON file on the PlanktoScope's SD card as a substitute for EEPROM (see the "Compatibility" section's discussion of backwards-compatibilitly with Adafruit HAT-based PlanktoScopes). That question will be left for future work, maybe as part of this proposal. - -Currently, no design or plan has been proposed for enabling use of a JSON file on the PlanktoScope's SD card as a substitute for EEPROM (see the "Compatibility" section's discussion of backwards-compatibilitly with Adafruit HAT-based PlanktoScopes). That question will be left for future work, maybe as part of this proposal. \ No newline at end of file