Hello Gurux,
We are trying to communicate to a electric meter (DLMS supported meter) using serial port, handshaking is working fine from my board to meter(which ensures that conenctions are proper), but with Gurux client code, I am facing issue saying sending failed..
I am using comm.open("/dev/ttyUSB0",false) and this is success, with the same comm connection when it calls comm.InitializeConnection() or comm.GetObjects() this fails with error 252 and I get a error message as
InitializeConnection Failed Data Send Failed.
should I do any other configuration in the code to specify that it should use serial port for communication rather than localhost with port address.
Hello Mikko,
Yes, permissions are taken care... We are using Rasbien(Jessy Destro) in raspberry pi as our device... We are able to communicate to device by sending raw data from our simple C application and receive response from the meter...
But when in Gurux, the first handshaking command which gurux generates is 7E A0 08 02 21 C9 93 5C F6 7E for which the device is not responding or the we are getting sending failed error..
InitializeConnection failed Data Send failed.
Hi,
First check that you have enough permissions and USB port name is correct.
ls -l /dev/ttyUSB*
What Linux distro you are using?
BR,
Mikko
Hello Mikko,
Hello Mikko,
Yes, permissions are taken care... We are using Rasbien(Jessy Destro) in raspberry pi as our device... We are able to communicate to device by sending raw data from our simple C application and receive response from the meter...
But when in Gurux, the first handshaking command which gurux generates is 7E A0 08 02 21 C9 93 5C F6 7E for which the device is not responding or the we are getting sending failed error..
But Gurux code is able to open the serial port.
please suggest.
InitializeConnection
Hi,
What meter you try to read? Try to read your meter with GXDLMSDirector first.
What serial port settings you are using (8N1)?
BR,
Mikko