hi ,
I am using Arduino Mega to run client example in order to read my smart meter via RS485 TTL converter ,
I used Serial 1 to communicate between meter and arduino but when I run the program NOTHING shown on the Serial monitor ..
can you give me some instruction to make it work ? please help.
thanks in advanced :)
First, check your cables. Then check if your converter needs an external power supply. I believe your converter is not connected to the USB port? If you have two converters, plug the other to the PC and check if you are receiving any data to the PC.
First , I used GXDLMSDirector to read my meter and it's work well .
I've copied and paste the src and include files into the sketch file and undefined the server .
then I used the same cable on RS485 TTL converter like in this link
(http://qqtrading.com.my/rs485-to-ttl-serial-converter-module-max485 )
that connected to Arduino mega but I didn't received any data .
I tried to use hyper terminal to communicate with PC with the same converter and every thing were okay , I received the data from the PC and I was also able to send data back and write it to the PC.
my first question is what do yo mean with (native USB port)?
should i communicate with meter only via usb ??
is there something that I have to change in the code ??
I still cant received any data ..
If you run it with -t Verbose parameter you can see all the bytes that you are receiving in the command line console.
We don't have this converter, so we can't test with it.
Can you paste the first line from GXDLMSDirector log here so I can check that your settings are the same.
There are several settings in DLMS and if one of the settings is wrong, the meter doesn't reply.
Run .Net on your PC. Then connect your Arduino to the PC. Now you should see trace on the command prompt. When you are connected directly to the meter you can't see the bytes. Running .Net on your PC you can see is there is any communication between the PC and Arduino. What is the default baud rate that
your converter is using?
Try to check if you can receive any data from the Arduino using RS-485 port. I believe that it's not working and that it the problem. We have ordered same converter what you are using, but it'll take several days before we have it.
Can you see are there any errors when running this with Arduino? Can you see is meter returning anything? What meter (Manufacturer and model) you try to read? Do you own the meter or is this meter of the energy utilizer?
Client application reads data from the client using serial port. It doesn't echo read data to the serial port.
The reason for this is that usually applications are using USB port to connect Arduino to the meter and then using TCP/IP, REST, etc to send data to the server.
You need to echo read values to the serial monitor by your self. That is not implemented at the moment. Application only makes connection to the meter and reads all the data from the meter.
Find com_readAllObjects. That makes a connection to the meter. com_readValues reads all the current values from the meter and com_readProfileGenerics reads historical values.
In com_readAllObjects there is a com_read method that reads value from the meter.
You can use obj_toString method to convert data to a textual format.
Hi,
Hi,
First, check your cables. Then check if your converter needs an external power supply. I believe your converter is not connected to the USB port? If you have two converters, plug the other to the PC and check if you are receiving any data to the PC.
BR,
Mikko
First , I used
First , I used GXDLMSDirector to read my meter and it's work well .
I've copied and paste the src and include files into the sketch file and undefined the server .
then I used the same cable on RS485 TTL converter like in this link
(http://qqtrading.com.my/rs485-to-ttl-serial-converter-module-max485 )
that connected to Arduino mega but I didn't received any data .
I tried to use hyper terminal to communicate with PC with the same converter and every thing were okay , I received the data from the PC and I was also able to send data back and write it to the PC.
my first question is what do yo mean with (native USB port)?
should i communicate with meter only via usb ??
is there something that I have to change in the code ??
I still cant received any data ..
Hi,
Hi,
Can you start Server example in your PC?
https://github.com/Gurux/Gurux.DLMS.Net/tree/master/Gurux.DLMS.Server.E…
If you run it with -t Verbose parameter you can see all the bytes that you are receiving in the command line console.
We don't have this converter, so we can't test with it.
Can you paste the first line from GXDLMSDirector log here so I can check that your settings are the same.
There are several settings in DLMS and if one of the settings is wrong, the meter doesn't reply.
BR,
Mikko
the link you give me below
the link you give me below has .net extension and im running arduino program did you mean i should try server example . ino ??
Hi,
Hi,
Run .Net on your PC. Then connect your Arduino to the PC. Now you should see trace on the command prompt. When you are connected directly to the meter you can't see the bytes. Running .Net on your PC you can see is there is any communication between the PC and Arduino. What is the default baud rate that
your converter is using?
BR,
Mikko
its 9600 bps ,
its 9600 bps ,
and i cant deal with .net file . also i cant find where is the log file .
i think this is what you want
i think this is what you want ?
12:10:51 Initializing serial connection.
12:10:52 PM Send SNRM request.
7E A0 07 03 21 93 0F 01 7E
Hi,
Hi,
Data is correct. Have you add external power to the converter?
BR,
Mikko
yes but nothing changed ,
yes but nothing changed , also i connect the ground meter to the arduino but also nothing changed
Hi,
Hi,
Try to check if you can receive any data from the Arduino using RS-485 port. I believe that it's not working and that it the problem. We have ordered same converter what you are using, but it'll take several days before we have it.
BR,
Mikko
i tried it before and its
i tried it before and its work well so its not the problem
Hi,
Hi,
Can you see are there any errors when running this with Arduino? Can you see is meter returning anything? What meter (Manufacturer and model) you try to read? Do you own the meter or is this meter of the energy utilizer?
BR,
Mikko
BR,
Mikko
its landis+gyr e650 and yes I
its landis+gyr e650 and yes I own it .
there is no error when i upload the code but
nothing appear in the Serial monitor, its just empty
Hi,
Hi,
I hope that I know where the problem is.
Client application reads data from the client using serial port. It doesn't echo read data to the serial port.
The reason for this is that usually applications are using USB port to connect Arduino to the meter and then using TCP/IP, REST, etc to send data to the server.
You need to echo read values to the serial monitor by your self. That is not implemented at the moment. Application only makes connection to the meter and reads all the data from the meter.
BR,
Mikko
is there any steps or
is there any steps or document that could help me out ?
Hi,
Hi,
Find com_readAllObjects. That makes a connection to the meter. com_readValues reads all the current values from the meter and com_readProfileGenerics reads historical values.
In com_readAllObjects there is a com_read method that reads value from the meter.
You can use obj_toString method to convert data to a textual format.
You can get more info from here:
https://github.com/Gurux/GuruxDLMS.c/blob/f53db54d4c0dd82b07db1b80ca371…
BR,
Mikko