javierdelapuente / reeprotocol

IEC-870-5-102 for REE Spanish Electric meters
GNU Affero General Public License v3.0
10 stars 7 forks source link

Connection Serial Cable #2

Closed darkat closed 6 years ago

darkat commented 7 years ago

In my case i have a Spanish Electrical meter using a serial cable (without modem), and when i executed the script: py .\modem_cliente.py --port="COM6" --der=1 --dir_pm=1 --clave_pm=1 I can't connect. I always get:

INFO:reeprotocol:nothing yet...
INFO:reeprotocol:iterate read thread

I mean that: der = Link adress dir_pm = mesaurement point clave_pm = read password is it correct? can i use a serial cable without modem? thanks

ecarreras commented 7 years ago

Have you modified the PhysicalLayer to only use only Serial? because the code you have to pass the number to call and it initializes the modem connection.

Maybe if you put the code we can check it

I've done a PR with IP Physical Layer.

ecarreras commented 7 years ago

Maybe a good implementation will be a Serial object inheriting from PhysicalLayer and Modem object inheriting from Serial

javierdelapuente commented 6 years ago

As ecarreras said, the correct implementation would be to add a Serial object, that will be very similar to the modem one.

I'd rather leave the PhysicalLayer name, because that is the name given in the specification. Although it will probably never be implemented, there are more options than serial point-to-point.