A Python script to easily program the EEPROM of CM108B devices (such as my ham radio interface) and set device name, serial number and audio options.
It can be used to:
- Read and dump the EEPROM contents in a file.
- Write configuration to the EEPROM, using either a:
- A configuration file from which the program will generate EEPROM content. (default example given in config.ini)
- A file containing raw EEPROM content.
- Wipe the EEPROM.
hidapi library for Python (https://github.com/trezor/cython-hidapi/) Note: Even if I use Windows, this should work on Linux and MacOS.
python CM108B_EEPROM_manager.py --erase
python CM108B_EEPROM_manager.py --burn_config config.ini
python CM108B_EEPROM_manager.py --burn_hex contents.hex
python CM108B_EEPROM_manager.py --read contents.hex
ℹ️ Windows may not take into account the changes, even if you unplug and reconnect the device. A reboot is advised.
ℹ️ The CM108B documentation is, on a lot of points, conflicting at best and not telling anything at worst. A lot of the intricacies are undocumented at the moment, I'll do my best to document what i can in the example .ini file.
Un programme Python afin de facilement programmer l'EEPROM d'une carte CM108B (telle que mon interface radio-PC) et personnaliser son nom, son numéro de série et ses options audio.
Ce programme peut être utilisé pour:
- Lire et enregistrer le contenu de l'EEPROM dans un fichier.
- Écrire une configuration dans l'EEPROM, à partir d'un:
- Fichier de configuration à partir duquel le programme générera le contenu brut de l'EEPROM. (config.ini donne un exemple)
- Fichier contenu brut de l'EEPROM.
- Effacer l'EEPROM.
La bibliothéque hidapi pour Python (https://github.com/trezor/cython-hidapi/) Note: Même si j'utilise Windows, cela devrait marcher sur Linux et MacOS.
python .\CM108B_EEPROM_manager.py --erase
python CM108B_EEPROM_manager.py --burn_config config.ini
python CM108B_EEPROM_manager.py --burn_hex contents.hex
python CM108B_EEPROM_manager.py --read contents.hex
ℹ️ Windows risque de ne pas prendre en compte les changements, même en déconnectant et reconnectant la carte. Il est conseillé de redémarrer.
ℹ️ La documentation du CM108B est au mieux contradictoire, au pire complètement silencieuse sur beaucoup de sujets. Pas mal de détails sont juste non-documentés pour le moment, je ferai de mon mieux afin de documenter ce que je trouve dans le fichier .ini d'exemple.