Hi, I have a question to all who can help….
The context of the question:
I am developing an application module in Python that is based on pySerial. The application purpose is to connect, read and write data from an electrical meter (the meter is using DLMS protocol) that is connected to my computer (my computer runs on Win7 Ultimate x64) via a USB connection.
My application module is basically trying to emulate an existing commercial application called CosemClient that implements the DLMS protocol.
Attached to this post is data obtained by sniffing the COM port data flow between the CosemClient and meter, My Application and meter.
I sniffed the communication between a working client and the meter, and I am trying to send exactly the same data, to replicate the functionality.
While attempting to implement the Hand Shake connection between my application and the meter, first 3 out of 4 steps of this protocol are performed successfully, but at step 4, the meter will not return the last ACK that signifies a successful connection.
By studying the sniffed data in both cases I have confirmed that the bytes I send are the same as the bytes sent by the working application. The only differences I noticed are:
Given that I’ve double-checked everything else, my current assumption is that the culprit is in these settings. To verify that, I need a way to specifically set up these parameters for the COM port I open in my application.
1. How can I explicitly specify the values for those parameters?
2. Is there any other suggestion to what may be the problem that leads to such behavior? Common sense dictates that if you simply send the same bytes – it should work, but apparently I am missing something.
THX to all willing to help!
Log in to post a comment.