On my Digi Connect EZ Mini, I’m attempting to access the serial port on the device with a Python script. I’ve replaced the usual script I use with a basic one that connects to the port and reads/writes data in a loop every second. On the 24.6.16.64 firmware, this works just fine, but after upgrading to 24.9.79.151, no data is being sent or received even though the initial opening of the port appears to be successful. I’ve ensured that all relevant configuration options are the same on both versions, and the firmware versions come with the exact same version of Python installed (3.10.13). Anyone else having similar issues?
Here is the script I’m using which works on 24.6 but not on 24.9. Both versions print the “Serial connection successful” message, but data only appears on 24.6.
#!/usr/bin/env python
import serial
import sys
import timetry:
serial_connection = serial.Serial(‘/dev/serial/port1’, (9600), timeout=0.5)
print(‘Serial connection successful’)
except:
print(‘Failed to create serial connection’)
sys.exit()while True:
try:
data = serial_connection.read(512).decode(‘unicode-escape’)
serial_connection.write(b’write test\r\n’)
if data != ‘’:
print(str(data))
except:
print(‘Failed to read from serial port’)
sys.exit()
time.sleep(1)
The 24.9 firmware for EZ Mini had a bug with the serial port. use the latest firmware to fix it, or at least 24.9.79.162, but don’t use 24.9.59.151!
@grant.goode , did you end up getting this one working?
Also wanted to mention that at Digi Connect EZ Mini version 24.12.153.120, Python within the DAL OS is updated to ver. 3.13: https://hub.digi.com/dp/path=/support/asset/digi-im-dal-os-25.5.52.25.pdf
We have a Professional Development Services group available if you’d like contracted assistance with your Python app development as well.