Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

CM108B EEPROM Manager

[EN] (FR below)

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.

⚠️ Do not modify VID, PID and HID if you don't know what you're doing. EEPROM will be hard to rewrite. ⚠️

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.

Required

hidapi library for Python (https://github.com/trezor/cython-hidapi/) Note: Even if I use Windows, this should work on Linux and MacOS.

Erase EEPROM

python CM108B_EEPROM_manager.py --erase

Burn config file to EEPROM

python CM108B_EEPROM_manager.py --burn_config config.ini

Burn hex file to EEPROM

python CM108B_EEPROM_manager.py --burn_hex contents.hex

Read and dump EEPROM content to hex file

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.

[FR]

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.

⚠️ Ne pas modifier le VID, PID ou HID si vous ne savez pas ce que vous faites. Il sera difficile de reprogrammer l'EEPROM. ⚠️

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.

Requis

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.

Effacer l'EEPROM

python .\CM108B_EEPROM_manager.py --erase

Écrire un fichier de config dans l'EEPROM

python CM108B_EEPROM_manager.py --burn_config config.ini

Écrire un fichier hex dans l'EEPROM

python CM108B_EEPROM_manager.py --burn_hex contents.hex

Lire et enregistrer le contenu de l'EEPROM dans un fichier 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.

About

Python script to easily program the EEPROM of CM108B devices and set device name, serial number, audio options...

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages