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

Magic number and checksum for eeprom #164

Open
kevinjwalters opened this issue Apr 30, 2023 · 1 comment
Open

Magic number and checksum for eeprom #164

kevinjwalters opened this issue Apr 30, 2023 · 1 comment

Comments

@kevinjwalters
Copy link

kevinjwalters commented Apr 30, 2023

The EEPROMs used to identify some Pimoroni displays doesn't currently include any identifiers to indicate the data is valid.

https://github.com/pimoroni/inky/blob/master/library/inky/eeprom.py would benefit from

  1. A magic number to indicate the EEPROM contains Pimoroni data.
  2. An identifier that hardware is a display.
  3. Some sort of checksum for data integrity - this would also catch any rare issues with corruption over the wire (i2c).
  4. A specific error indicating EEPROM has never been written to (do these contain 0xff by default?) to aid diagnosis of rare uninitialised/wiped EEPROMs.

This was highlighted by an issue with a faulty Inky Impression 7.3 in
Pimoroni Forums: Inky Impression 7.3 Auto Detection Not Working (might be github user @caeci11ius).

@Gadgetoid
Copy link
Member

Agreed, though we'd have to find some way to preserve backwards compatibility in addition to rolling out data validation and that introduces something of a problem- if it fails validation and falls back to the old method, it's not- afaik?- meaningfully any different to just using the old method?

I can't conceive of a way to handle this. Though I don't exactly have my best thinking hat on right now.

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

2 participants