Inspect Alinco DX-SR8 firmware
Alinco DX-SR8 firmware updater software
DX-SR8 Flash Writer Ver01.12.zip = DX-SR8 Flash Writer Ver01.12.msi
extract msi (unzip)
extract msi (unzip) Instal01.cab
File named _B2AB... contains compiled code and data section in Motorola S-record format.
Remove lines before and after data section and with some Python scripts clean the data section.
import re
import argparse
import sys
def clean_file(path: str) -> None:
try:
with open(path, 'r', encoding='ansi') as f:
text = f.read()
except FileNotFoundError:
print(f"File not found: {path}", file=sys.stderr)
sys.exit(1)
cleaned = re.sub(r'[^S0-9A-F\r\n]+', '', text)
with open(path, 'w', encoding='ansi', newline='') as f:
f.write(cleaned)
def main() -> None:
parser = argparse.ArgumentParser(
description='Keep characters S,0-9,A-F'
)
parser.add_argument('file', nargs='?', default='srec_section.txt', help='file to fix')
args = parser.parse_args()
clean_file(args.file)
if __name__ == '__main__':
main()
with open('srec_section.txt', 'r', errors='ignore') as file:
fc = file.read()
fc = fc.replace('S', '\nS')
with open('srec_section.s19', 'a') as f:
f.write(fc)
CPU is R8C R8C/Lx/3AA
srec_info:

Comments
Post a Comment