Crate ql_fotainfo
Expand description
Rust implementation of Quectel’s fotainfo library.
§Specification
§Storage
Quectel stores the FOTA state on the rawdata partition of the flash.
The state is stored on three separate valid blocks of the partition,
starting from the 6th block.
The state is a 512-byte struct (FotaInfo). It uses a magic string
FOTA# and a CRC32 to ensure the data is valid.
When reading the state, the library tries the 3 first valid blocks after the 6th. This doesn’t necessarily mean that it’s trying 6, 7, and 8, because it will skip bad and corrupt blocks. In the worst case, it could read all the way to the end of the partition. The first block that contains a valid state (i.e. the correct magic string and a valid CRC32) will be returned.
Similarly, when writing the state, the library will replicate the state to the first 3 valid blocks after the 6th.
Modules§
Structs§
- Fota
Info - Represents FOTA (Firmware Over-The-Air) update information.
- Fota
Partition - FOTA info partition.
Enums§
- Fota
Active - Represents the active partition (A or B) for FOTA updates.
- Fota
State - Represents the state of FOTA (Firmware Over-The-Air) update.
- Fota
Type - Represents the type of FOTA update.