Skip to content

Switch model detection logic from Flash ID to Config Memory Magic #44

Description

@cr

The Flash ID at memory offset 0x100 has so far been the most specific – and official – hardware indicator for model detection. For this purpose, HX radios support a #CFLID command for reading the flash ID from config memory. However, we couldn't get .get_flash_id() to run reliably using #CFLID, potentially due to lack of low-level USB driver control exposed by pyusb, so the workaround was to read the flash ID directly from config memory at 0x100, which so far was constant for all HX style hardware encountered.

However, the GX1400 has its Flash ID at a different address, 0x98, so autodetect logic would have to read a bigger chunk of config memory and look at the various offsets going forward. That's quite ugly design and also not conducive for the ongoing memory layout parametrization project, because model-specific knowledge so far was not and should not be required this far down in the connection logic and we don't want to end up with even more hardcoded offsets.

A short term solution is to switch to the 2-byte Config Memory Magic at offset 0, which has proven to be a stable and reliable ID for model detection.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions