I am trying to communicate DLMS Energy Meter over Serial Port in Linux OS using ANSI C.
My PC is having serial Port and I am also having one Serial to USB Converter.
When checked with USB Converter Energy Meter gets communicate whereas when checked with Actual serial port present on PC It result into error as
SNRMRequest Failed Send Failed
Permissions to /dev/ttyUSB0 and /dev/ttyS0 are same
ls -l /dev/ttyS0
crw-rw---- 1 root dialout
ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout
Set Port Configuration using below command
sudo stty -F /dev/ttyS0 9600 cs8 -cstopb -parenb
sudo stty -F /dev/ttyUSB0 9600 cs8 -cstopb -parenb
It works with USB Converter where as with serial port it fails.
Can anyone help me what I am doing wrong or what else should I check ?
Hi,
Hi,
Can you check where it fails in com_open?
BR,
Mikko