Icom IC 7300 - sync the clock with your computer

Started by VK5KKS, Oct 28, 2026, 06:08 PM

Previous topic - Next topic

VK5KKS

#1
Hello IC-7300 owners. I recently acquired a IC-7300 and wanted to be able to set its clock to my computer (raspberry pi3). The following code does the trick...

#!/usr/bin/python3
''' settime.py                     '''
''' set the time on the IC 7300    '''
''' Kevin Thomas, VK5KKS.          '''

import serial
import time
import struct

ser = serial.Serial("/dev/ttyUSB0", 9600)

t = time.localtime()
h = t.tm_hour
m = t.tm_min
s = t.tm_sec

''' bytes 8 and 9 store the time  '''
cmd = bytearray(b'\xfe\xfe\x94\xe0\x1a\x05\x00\x95\x00\x00\xfd')

''' thanks to Google for this bit...  '''
cmd[8] = int(f"{h:02}",16)
cmd[9] = int(f"{m:02}",16)

try:
   ser.write(cmd)
except:
   print('serial write failed')


If you copy this code to /usr/local/bin and make it executable you should be able to set the clock on the radio easy-peasy. I understand some clocks drift, mine doesn't. Let me know how it goes...