Mouscap,
We use a python script to change the modes. Check out this blog post: https://ubld.it/how-to-use-truerngpro-with-python-in-windows-10-and-linux/
If you scroll down a bit to the example script the mode change is happening around here:
print('================== Debug Mode ====================')
# Put the TrueRNGpro in Debug Mode
# Knock Sequence
ser.baudrate = 110
time.sleep(0.1)
ser.baudrate = 300
time.sleep(0.1)
ser.baudrate = 110
time.sleep(0.1)
# Set Mode
ser.baudrate = 2400 # debug mode
time.sleep(0.1)
# This clears the receive buffer so we don't print binary data
ser.flushInput()
ser.flushInput()
returnline = ser.readline()
ser.flushInput()
# This labels our columns for readability
print("RNG1 RNG2")
print("_____ _____\n")
# Loop
for _ in range(debugloops):
try:
returnline = ser.readline() # Read a Line from the TrueRNGpro
print(returnline) # Print the result to the console
except:
print('Read Failed!!!')
break
print('================== Normal Mode ====================\n')
# Return back to Normal Mode
# Knock Sequence
ser.baudrate = 110
time.sleep(0.1)
ser.baudrate = 300
time.sleep(0.1)
ser.baudrate = 110
time.sleep(0.1)
# Set Mode
ser.baudrate = 300 # normal mode
time.sleep(0.1)
ser.flushInput()
# Set Data Terminal Ready to start flow
ser.setDTR(True)
# This clears the receive buffer so we aren't using buffered data
ser.flushInput()
Ubld.it