I am a mcu programmer. i have made an single phase meter .
It can measure rms Voltage, rms Current, active power(A+,A-,|A| with rates), reactive power, power factor, frequency and many other parameters.
i want add DLMS/COSEM to it. i like start a topic about it. and question is: where I must start?and what is the first step?
I hope we could do a complete DLMS server by GURUX library for STM32F103.
Hi Mikko,
I created a new project in Keil(mdk arm5) IDE for STM32F103C8T6 mcu. i use C language.
and then i added header files only to it(according server template for nordic mcu):
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
and i dont have any in main() function yet.
after compile i have this error:
.\include\variant.h(189): error: #3092: anonymous unions are only supported in --gnu mode, or when enabled with #pragma anon_unions
Hi Mikko.
i have new question and i created a new topic for it, but i dont get any reply for it.
then i ask my question here.
I have errors about the following functions in the kill compiler:
Undefined symbol svr_connected (referred from dlms.o).
Undefined symbol svr_disconnected (referred from dlms.o).
Undefined symbol svr_isTarget (referred from dlms.o).
1- what is problem?
2- what is usage of those functions? because they dont have any imolementation?
Is it up to the user to implement them?
Hi,
Hi,
There is no ready example for Keil at the moment, but you can use this at the template:
https://github.com/Gurux/GuruxDLMS.c/tree/master/NordicSemiconductor/Gu…
You need only change UART read/write and you can communicate with the meter.
Read also this:
http://www.gurux.fi/Gurux.DLMS.Server
BR,
Mikko
thank you. i will read and
thank you. i will read and check it.
Hi Mikko,
ok
Hi Mikko,
Hi Mikko,
I created a new project in Keil(mdk arm5) IDE for STM32F103C8T6 mcu. i use C language.
and then i added header files only to it(according server template for nordic mcu):
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "dlmssettings.h"
#include "date.h"
#include "variant.h"
#include "cosem.h"
#include "server.h"
#include "notify.h"
#include "gxserializer.h"
#include "gxignore.h"
and i dont have any in main() function yet.
after compile i have this error:
.\include\variant.h(189): error: #3092: anonymous unions are only supported in --gnu mode, or when enabled with #pragma anon_unions
what it say?
BR,
Rama
Hi,
Hi,
i solved it. I must activate GNU mode in Keil compiler.
and i have another problem:
and i have another problem:
../Core/Src/main.c(132): error: #20: identifier "SERIAL_NUMBER" is undefined
i see this error in :
void addLogicalDeviceName(){
char buff[17];
sprintf(buff, "GRX%.13lu", SERIAL_NUMBER);
const unsigned char ln[6] = { 0,0,42,0,0,255 };
cosem_init2((gxObject*)&ldn.base, DLMS_OBJECT_TYPE_DATA, ln);
var_addBytes(&ldn.value, (unsigned char*)buff, 16);
}
wher i can find SERIAL_NUMBER? maybe i must add here my random serial number?
Hi,
Hi,
I'm glad that you solved the first question.
Please, create a new topic if you have a new question, otherwise, it's too easy to answer the wrong question.
SERIAL_NUMBER is defined like this:
uint32_t SERIAL_NUMBER = 123456;
BR,
Mikko
thank you Mikko.
thank you Mikko.
then for new questions i must create a new topics.
ok.
Hi Mikko.
Hi Mikko.
i have new question and i created a new topic for it, but i dont get any reply for it.
then i ask my question here.
I have errors about the following functions in the kill compiler:
Undefined symbol svr_connected (referred from dlms.o).
Undefined symbol svr_disconnected (referred from dlms.o).
Undefined symbol svr_isTarget (referred from dlms.o).
1- what is problem?
2- what is usage of those functions? because they dont have any imolementation?
Is it up to the user to implement them?
Hi,
Hi,
I have answered for your question here:
https://www.gurux.fi/node/20090
BR,
Mikko
Hi, user must implement these
Hi, user must implement these functions. right?
1- svr_isTarget()
2- svr_connected()
3- svr_invalidConnection()
4- svr_disconnected()
5- svr_preGet()
6- svr_postGet()
7- svr_preRead()
8- svr_preWrite()
9- svr_preAction()
10- svr_postRead()
11- svr_postWrite()
righ?
thanks
Hi,
Hi,
That is correct. You need to implement those methods.
BR,
Mikko