
Hi, I'm trying to download an img file from my radio trough chirpc but with no luck. It keeps telling me that the radio is not connected. I tested this in the gui and everything worked fine so it's not a bad cable. I'm on windows python 3.10 and using the latest build from github. Listing radios does work trough chirpc --list-radios.
DELAY = 5.0 MAX_RETRIES = 5 RETRY_BACKOFF = 2
def download_image(radio_model, com_port, mmap_file="backupimage.img"): """ Attempts to download the image from the radio with retry logic. """ delay = DELAY for attempt in range(1, MAX_RETRIES + 1): try: cmd = [ sys.executable, str(CHIRPPATH), '-r', radio_model, f'--serial={com_port}', f'--mmap={mmap_file}', '--download-mmap' ] pprint(cmd) print(f"Attempt {attempt}: Running command: {' '.join(cmd)}") time.sleep(delay) result = subprocess.run(cmd, capture_output=True, text=True, check=True) print("Success:", result.stdout) return True except subprocess.CalledProcessError as e: print(f"Attempt {attempt} failed with code {e.returncode}: {e.stderr.strip()}") if attempt < MAX_RETRIES: print(f"Retrying after {delay} seconds...") delay *= RETRY_BACKOFF # Exponential backoff else: print("Max retries reached. Giving up.") return False
radio_driver_id = 'Baofeng_UV-25' com_port = 'COM4' # double checked this! print(f"\nDownloading image from radio '{radio_driver_id}' on port '{com_port}'...") download_image(radio_driver_id, com_port) ------------------------------------------------------------------------------------------- Attempt 4: Running command: C:\Users...\Desktop\chirptest\venv\Scripts\python.exe C:\Users\joeri\Desktop\chirptest\chirp\chirpc -r Baofeng_UV-25 --serial=COM4 --mmap=backupimage.img --download-mmap Attempt 4 failed with code 1: ERROR: No response from radio. Check connector and cabling! Traceback (most recent call last): File "C:\Users...\Desktop\chirptest\chirp\chirp\cli\main.py", line 380, in main radio.sync_in() File "C:\Users...\Desktop\chirptest\chirp\chirp\drivers\baofeng_uv17Pro.py", line 1166, in sync_in data = self.download_function() File "C:\Users...\Desktop\chirptest\chirp\chirp\drivers\baofeng_uv17Pro.py", line 132, in _download _do_ident(radio) File "C:\Users...\Desktop\chirptest\chirp\chirp\drivers\baofeng_uv17Pro.py", line 115, in _do_ident ack = _sendmagic(radio, radio._magic, len(radio._fingerprint)) File "C:\Users...\Desktop\chirptest\chirp\chirp\drivers\baofeng_uv17Pro.py", line 107, in _sendmagic return bfc._rawrecv(radio, response_len) File "C:\Users...\Desktop\chirptest\chirp\chirp\drivers\baofeng_common.py", line 55, in _rawrecv raise errors.RadioNoContactLikelyK1() chirp.errors.RadioNoContactLikelyK1: No response from radio. Check connector and cabling! Retrying after 40.0 seconds... ------------------------------------------------------------------------------------------- Has anyone successfully used chirpc with a UV-25 radio?" or "What am I missing in my script?