You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using ser.write(b'\x7E\xA0\x0A\x00\x02\xFE\xFD\x41\x53\x3C\x94\x7E') to release all the associations from the meter before the first connection because it can refuse a new association if the old one hasn't been released. I mentioned this in #74
The problem im encountering is that I connect as a management client no problem, and I also after that connect as a public client and get my data and finish everything I need as a public client and then when I want to again return to a management client then I encounter a problem. I have tried using just the management.connect() and management.associate() and that basically did nothing.
b'~\xa0\x0f\x03\x00\x02,)\x97\x1bT\x00\x10t?~'` does not seem to be a valid response.
For UnNumberedAcknowledgmentFrame it gives HCS error
For UnnumberedInformationFrame it gives HCS error
So I am not sure what the meter is responding with.
My normal problems when switching between clients is that some meters modems hangs on disconnect. It is usually not a problem to not call .disconnect and reuse the same IO on all clients. So connect the serial port once and just send it to the different transports so that the serial port never closes.
I'm thinking its probably on the side of my code than on the side of the meter because this will happen even if I wait for a few seconds between every operation, and if I just stop the code and run it again it connects to the management client instantly.
Question is what has changed in the code between connecting first time as management and then switching to public that would mess up the communication when coming back to management.
Also I have tried keeping the same IO but then I get the same thing on the Public client. I could maybe rewrite the code to basically release the association and then redefine the management client with a different address(logical_address=16) and then associate again.
For my application I need to switch between a public and management client and something strange happens when I do.
Here is part of my code:
I am using
ser.write(b'\x7E\xA0\x0A\x00\x02\xFE\xFD\x41\x53\x3C\x94\x7E')
to release all the associations from the meter before the first connection because it can refuse a new association if the old one hasn't been released. I mentioned this in #74The problem im encountering is that I connect as a management client no problem, and I also after that connect as a public client and get my data and finish everything I need as a public client and then when I want to again return to a management client then I encounter a problem. I have tried using just the
management.connect() and management.associate()
and that basically did nothing.Here is the console output:
The text was updated successfully, but these errors were encountered: