I am new to the DLMS and the forum... I have been reading as much as I could but I do not have a clear idea whether it is possible to emulate or simulate a DLMS meter with my PC and then connnect a hardware through the serial port (like a HHU) to read the simulated OBIS objects from the PC DLMS meter.
Do you have any suggestion? Thanks a lot in advanced!!
Download example server and start that -S parameter, ex. -S COM1. It's now using the serial port that you defined and you can connect from your HW. Add also -t Verbose and you can see received and send messages. https://github.com/Gurux/Gurux.DLMS.Net/tree/master/Gurux.DLMS.Server.E…
BR,
Mikko
Thanks a lot for your kind answer! I have cloned and compiled the code you adviced without problems. I have a serial com port COM11 in my device manager/serial ports. When I run the exe with the suggested flags (-S COM11 -t Verbose) it seems that the thread is not launched. If I run only with -t Verbose the thread is launched... please see attached picture. Am I doing something wrong? Is there any additional serial port configuration I am missing? (like baud rate, number of bits, parity, stop bit?)
Hi,
Hi,
Download example server and start that -S parameter, ex. -S COM1. It's now using the serial port that you defined and you can connect from your HW. Add also -t Verbose and you can see received and send messages.
https://github.com/Gurux/Gurux.DLMS.Net/tree/master/Gurux.DLMS.Server.E…
BR,
Mikko
Hi Mikko,
Hi Mikko,
Thanks a lot for your kind answer! I have cloned and compiled the code you adviced without problems. I have a serial com port COM11 in my device manager/serial ports. When I run the exe with the suggested flags (-S COM11 -t Verbose) it seems that the thread is not launched. If I run only with -t Verbose the thread is launched... please see attached picture. Am I doing something wrong? Is there any additional serial port configuration I am missing? (like baud rate, number of bits, parity, stop bit?)
Actually, I am not an expert
Actually, I am not an expert on .Net but reviewing the code I could see that the only options I could add are: -t and -p, right?
while ((opt = getopt(argc, argv, "t:p:")) != -1)
{
switch (opt)
{
case 't':
//Trace.
if (strcmp("Error", optarg) == 0)
trace = GX_TRACE_LEVEL_ERROR;
else if (strcmp("Warning", optarg) == 0)
trace = GX_TRACE_LEVEL_WARNING;
else if (strcmp("Info", optarg) == 0)
trace = GX_TRACE_LEVEL_INFO;
else if (strcmp("Verbose", optarg) == 0)
trace = GX_TRACE_LEVEL_VERBOSE;
else if (strcmp("Off", optarg) == 0)
trace = GX_TRACE_LEVEL_OFF;
else
{
printf("Invalid trace option '%s'. (Error, Warning, Info, Verbose, Off)", optarg);
return 1;
}
break;
case 'p':
//Port.
port = atoi(optarg);
break;
case '?':
{
if (optarg[0] == 'p')
{
printf("Missing mandatory port option.\n");
}
else if (optarg[0] == 't')
{
printf("Missing mandatory trace option.\n");
}
else
{
showHelp();
return 1;
}
}
break;
default:
showHelp();
return 1;
}
}
I think I well might be missing something...
Thanks a lot for the support!
Hi,
Hi,
ANSI C is not support serial port. Try with C# version.
Parameters are:
-S COM11 -t Verbose
BR,
Mikko
Hi Mikko,
Hi Mikko,
I have got the server up and running though serial port. Thanks a lot for your great support!! super!!
BR
Rafa