This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ti DLMS COSEM library

Other Parts Discussed in Thread: MSP430F6779

Hi,

I want to use ti dlms cosem lib. I design my own electronic card which has msp430f6779 mcu. And I downloaded my code on this card. Then I downloaded Kalkitech client software. But I could not communicate with my card.Is there any one who already tried this. How I should ask requests?

Best Regards..

  • Have you got it working? I am also trying to get it working on the F6779 EVM.... When ever I try to download and debug the sample application the debugger shows that the program is downloaded then it shows error about two missing files and then the it shows "Target Execution Stopped". Has anyone got it working?

  • I guess you should browse these 2 files.Do you know which files are these?

    I ddint get any error when downloading code to target board. But target board dont answer my requests in COSEM protocol.Do you know how I communicate my board?

  • I get the error about IEC62056_46_link.c file. if I skip I get "Target Execution Stopped"....

    <a href="https://www.flickr.com/photos/64034875@N05/14990700630" title="Error 1 by imarshad, on Flickr"><img src="https://farm4.staticflickr.com/3899/14990700630_139846bb58_o.jpg" width="600" height="190" alt="Error 1"></a>

    Here is a snapshot of the file..... Obviously I don't have it.... BTW which version are you using? I have tried both version 4 and 4.0.6.

  • As far as my understanding of the code all the available ports are initialized for DLMS communication... So if you connect Gurux DLMS Director on any port you should receive acknowledgement from the library.... Have you confirmed that the Serial Data is received by the controller?

  • Actually I use not Gurux, I use Kalkitech interface for this. And yes I can see the receive interrupt but there is no response. Did you try it before ? 

  • So you are able to debug this sample? Which version are you using 4.0 or 4.0.6? I have tried both and both give the problem of missing files. The strange thing is that I can Download the compiled r43 file on the controller and there it works fine... I tried to establish a connection from GuruX and I can see that the packet from GuruX is received on the controller and it sends a reply. GuruX tell that the checksum is not correct. I think there is some problem in receiving the data as I am communicating via IR and the data gets corrupted due to non-alignment of the LED's. Tomorrow I will try to do some more testing to find out if the reply is correct or not. But definitely the library replied.....

    So you can debug the application without any problem? I mean by pressing the Download and Debug in IAR studio the program is downloaded and the pointer goes to main? Whenever I try it asks for replacement of some missing files and if I skip or provide any alternate file the execution is always stopped. Are you sure you never encountered this problem? How did you supply the missing files?

    I think we might be able to help each other as we are trying to do the same problem at the same time....

  • Hello,

    First of all thanks for your reply. And yes I think we need to help each other.

    I tried version 4.0.6 and yes I can debug and run the code.There was no problem when I was doing this.I think your problem might be FET430UIF firmware version. Did you try update FW version of it ?

    By the way I downloaded Gurux DLMS software and ı tried it on Landis DLMS meter and the result is positive I could able to read landis meter without any problem.

    I guess I need to some information about TI DLMS device settings. Physical address baudrate and somethings like that. Can you send me your trial configurations list?

    Best Regards

  • I mean this screen, please check this:

  • And last think which USCI that you are using for request. USCIA0 ?

  • Sorry I was wrong, My MCU has not get a receive interrupt when I request from Grux.

  • Sorry that I could not reply to you earlier... as I was very busy in testing the DLMS code.....

    My first problem was that I couldn't debug the (unchanged) code from TI. I tested both the v4.0 and v4.0.6. It always said that "Target Execution Stopped" after downloading the file. So yesterday I downloaded the latest version of IAR embedded studio (6.1) and voila it worked the first time. So now that I was able to debug I started to connect it from client side.

    I downloaded the GuruX DLMS director and tried to connect by creating a new Manufacturer. I could see some communication (via a Serial Port sniffer software) but in the end Gurux DLMSDirector replied in "Connection is permanently Rejected. No reason given." So then I downloaded manufacturers list from gurux and then I selected the following settings.

    (There are two changes in my and your configuration) and they are Address Type and Physical Addrerss.

    Manufacturer: Gurux

    Start Protocol: DLMS

    Media: Serial

    Authentication: None

    Logical Name Referencing (checked)

    Client Address : 10

    Address Type: Default

    Physical Address: 1

    Logical Server: 0

    Serial Port : COM2

    Now when I hit connect in the director I get connected and I can read 5 Obis codes from the meter.

    They are

    0.0.1.0.0.255

    0.0.40.0.0.255

    0.0.40.0.1.255

    0.0.41.0.0.255

    0.0.42.0.0.255

     

    I have tested this on both A0 and A1. I do have the EVM board on which the serial port is connected to A0. In my own board I have connected it on A1. It is working on both the boards. If you are not getting a Serial Receive interrupt on your controller then I think there is some issue in the cabling. First step will be to send some random data via hyper terminal on the serial port and see if you get any interrupt. If there is still no interrupt then check the cables or USB-Serial converter etc.

  • You have said in your opening post that you have downloaded the  Kalkitech client software. Can you share the link with me? I can't seem to find it.....

  • yes I have kalkitech software but it is a demo just for first 7 days after you install it. If you send me your e-mail <ı can shere it with you.

    Now here is my problem. I still couldnt get any answer from my board. I use uscıA0 and I saw that I can get interrupts. I solved my interrupt problem. But My card still does not answer. When I debug step by step after I get uart interrupt, I saw that my program could not find some source files. And my program seeking this file in this directory "D:\Work\Costumer Cods\LnG_DLMS\DLMS\server\.. " which I have not such a directory. Can you tell me what can I do about that?

    I downloaded DLMS installer.exe from TI website and I install it my D:\ directory and thats it.. I am trying to get an answer from V4.6 but still no solution.

    Can you send me your working project which you can got answer?

    Best regards..

     

  • Hey man good news! At least I solved this problem.Now I can communicate my card via Gurux and Kalkitech. The reason was my msp430 mcu. I use msp430f6779 and there is no init cods for this mcu. I just init my mcu uscı and now I can communicate. 

    But there is anoyher problem is when I try to read an object for example 0.0.42.0.0.255 there is an warning and it says "Frame rejected" . Do you know what is the problem?

    Best Regards

  • I also get the same File missing error but I skip it and it works fine... I am using the v4.6 large model. Please insert a breakpoint on the transmit ISR i.e case 4 in the switch statement inside the ISR. Check if it is ever hit.If the receive ISR is hit but the transmit is never hit then there is some problem with the packet received.

    In that case try to send the following from any Serial Port utility.

    7E A0 07 03 21 93 0F 01 7E

    Now if the meter is receiving this code it should reply and you should definitely get the Transmit ISR fired. Try this and reply back. The default code given by TI without any modification definitely reply to this packet. My email address is imarshad@gmail.com

  • Another problem about Gurux I can not add new abis codes. I just can read :

    0.0.1.0.0.255

    0.0.40.0.0.255

    0.0.42.0.0.255

    1.1.21.25.0.255

    Can you add  new obis?

  • Have you got any more success with this? I have tried every thing and I seem to have hit a blind alley and I don't know where to move forward.... I also get the same 5 Obis codes from the controller. These are the 5 that are available to the Public Client. For other codes we need to connect using Low Authentication or High authentication. Have you got any success on that?

  • Actually when I did some changes on config.c I saw that I can get new objects too. There is a struct who calls object-decs_s. And you can add/remove any object and also you can edit objects.

    You know there is 3 different type associations. If you change any MR objects like PC, you can see new objects too.

    Best Regards..

  • Thanks for the reply... Yes I have also checked it and  if I change the association type of any object to PC (Public client)  then I can read it from Gurux. But the problem is that we definitely need to connect using other associations for this library to work as Public Client doesn't have access to write. In the SLAA 614 it is mentioned...

    Supports three associations: No Security (NS), Low Security (LS) and High Security (HS). In the HS
    association, a four step AES128 based authentication mechanism is used. These three associations
    are also referred as Public Client (PC), Meter Reader (MR) and Utility Setting (US) associations,
    respectively.


    So we should be able to connect to this library using Low Security (Meter Reader MR) and  High security (Utility Setting US)  association. But I don't know what the password is for us to connect to this library. Also what will be the client address and Server address for the other associations.... Have you figured it out?

    Also it is mentioned in the SLAA614

    The DLMS library is configured to handle three associations. You do not have access to change the
    properties of these associations, except the passwords.


    Have you found the default password for this library? I tried many variations but I failed.... Each time the library rejects my request with authentication failure messages.

  • One more thing that I want to ask is that how will I add this library to my existing project? I am using the Implementation of a Three-Phase Electronic Watt-Hour Meter Using the MSP430F677x SLAA577 code. I have heavily modified it and now I want to add the DLMS functionality to this code. Have you tried it or tried to add the library to any existing project?

  • Hi,

    About your first question, if you  set client address:20 and password:00000000 you can easily connect Low authentication, for High authentication you need to set client address:30 password is same.

    About your second question, you need to implement iec62056_demo.c to your metering main application. And you need to include all files of DLMS Lib.

    Here is my question, When I try to access in High Authentication, I can connect the device but I could not read objects and I got a frame reject error which says Get Objects failed.Frame Rejected.Can you tell me how can I access?( For example I want to change time zone information. )

    Best Regards

  • Thanks for the reply.... I had been stuck at this for the last 3-4 days. With your help now I  can connect to the library using Low Authentication by using client address as 20 and password 00000000. I am really really grateful to you for this favor.

    When I tried connecting using high authentication at address 30 I get connected but I get the error Access Error: Device Reports scope of access violated. while trying to read. Also note that for High Authentication (Client Address:30) I can connect using any password. It always connects but the same error is produced each time...

    Also I have tried to include all the files of DLMS lib to my project but I get strange errors that I have never ever heard of.

    Here is the first error that I get

    Error[Pe020]: identifier "_C_STD_BEGIN" is undefined C:\Program Files\IAR Systems\Embedded Workbench 6.5\430\inc\dlib\c\inttypes.h 13
    and I get about 80 more errors of similar sort. Do you know anything about these errors?

  • In high authentication I get same error. I think it might because of Gurux so I tried Kalkitech but this demo version of Kalkitech does not include High Authentication. So for now I am trying to solve with Gurux. If you get any solution about this problem please let me know.

    I think your problem about include files path. Did you show the compiler where are your headers in compiler settings?

     

  • Have you got any progress in connecting using high authentication? I am still trying to integrate the DLMS library with the Energy Meter project....

  • Finally I have succeeded in combining the DLMS library with the energy meter library and was able to communicate some live basic parameters(like voltage and current and energy) in Low Authentication mode. So now I am also looking at the problem of high authentication.

  • Have you got any success with high authentication association?

  • Hello,

    I have seen this post, and I have stucked with same problem in HLS association... I'm working with kalkitech client, and I'm able to establish HLS association, but then when I'm reading some objects I'm getting acces violated error...

    In NS and LS I'm able to read that objects without problem, but when i', trying on HLS there is problem... 

    I think that there is maybe problem that TI Library need information that HLS connection is established, but I dont know how to get that information to library... Can someone help me with this???

    I have tried all possible combinations of ACCESS_PCxy_MRxy_USxy, and different association visibility (ASSOC_PC_MR_US) but that is not solving my problems...

    Can someone give me some support on that??

    Thanks....

**Attention** This is a public forum