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.

CCS/LAUNCHXL2-570LC43: TMS570LC43X

Part Number: LAUNCHXL2-570LC43


Tool/software: Code Composer Studio

Hello People,

The command (" dbus-monitor --system." ) is written in PuTTY app ( https://github.com/victronenergy/venus/wiki/dbus#generic-paths ) to monitor the data in a system. ( hope everyone knows it..).

Can anyone suggest the ccs ide code equivalent to" dbus-monitor --system."  

Magizhchi,

Padayappa

  • Hi Padayappa,

    There really is not an out-of-the-box equivalent. What is your main goal? What are you trying to accomplish?

    Thanks

    ki

  • Hi Ki,

     Sorry for the insufficient information

    I am seeking to establish a MODBUS TCP communication with launchxl2-570lc43 and venus gx. The venus gx acts as like a mediator in between TI board and other devices connected to it.

    My aim is to receive the information gathered in the venus gx to the TI board through an ethernet cable. I have tried lwip demo, but that wasn't sufficient to get the data from the venus gx. 

    So I moved to socket programming. This is only my guess. I have very limited knowledge to know whether this is right or wrong step. I need assistance. Pls help.

    Magizhchi,

    Padayappa

  • Hi Padayappa,

    We don't have any experience of using the venus gx. launchxl2-570lc43 has Ethernet transceiver and RJ45 connector, and you can use our LWIP example as a starting point for developing TCP application code for Modbus over TCP/IP.

  • Hello QJ,

    I have tried the LWIP example & the Linking is done. But after that it shows " --- ERROR INITIALIZING HARDWARE --- ". 

    I believe that this message is displayed when the IF statement is detecting ip address as 0. 

    Is there a way to rectify this?

    Magizhchi,

    Padayappa

  • Hello,

    The IP address can be set either as a static address, or as a dynamic address assigned by a DHCP server. The selection of the IP address’s configuration mode is done in the lwipopts.h file:

    ● Set #define LWIP_DHCP to 1 to configure the IP address by DHCP

    ● Set #define LWIP_DHCP to 0 to use the static address

    Note that if you choose to configure the IP address by DHCP and the application does not find a DHCP server on the network to which it is already connected, the IP address is then automatically set to the static address (0.0.0.0).

  • Helo QJ,

    I have made some changes as you said. The changes are listed below :

    1. #define LWIP_DHCP toand loaded it, the output was the same (" --- Error Initializing Hardware --- " )

    2. To ensure that the detected ip address is 0, I made some in the if - else statement in the   lwip_functions.c 

    The corresponding output was DBUG - Getting PHY ID....SUCCESS 

                                                DBUG - Getting PHY Alive Status ID....SUCCESS 

                                                DBUG - Getting PHY Link Status ID....SUCCESS

                                                DBUG - Setting up Link....SUCCESS

                                                Device IP Address: 0.0.0.0

    I think the Venus GX id is not giving access to the TI board to have the ip address. I came to this conclusion because even if I connect the Venus GX as well as Launchxl2-570LC43 to PC ( one at a time ), the status will be " Unknown Device Connected ". 

    Pls suggest solutions for this problem. 

    Many Thanks and Magizhchi,

    Padayappa

  • Hello Padayappa,

    If LWIP_DHCP is 0, you need to provide a static IP address.

    For example:

    uint8 ip_addr[4]   = { 192, 168, x, x };
    uint8 netmask[4] = { 255, 255, x, x };
    uint8 gateway[4] = { 192, 168, x, x };
    ipAddr = lwIPInit(0, macAddress, *((uint32_t *)ip_addr), *((uint32_t *)netmask), *((uint32_t *)gateway), IPADDR_USE_STATIC);

    Please refer to LWIP helps:

     

  • Hello QJ,

    Thank you very much for your support.

    I was able to load the code and got desired output I mean I was able produce the device's  static IP address on my terminal.

    Love,
    Advaith