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.

enet_s2e : RTOS based Serial to ethernet converter

Other Parts Discussed in Thread: EK-TM4C1294XL, TIDM-TM4C129XS2E

Hi,

I am using TI RTOS based serial to ethernet converter design http://www.ti.com/tool/TIDM-TM4C129XS2E 

not using updated IP still showing/pinging with old DHCP IP. I even tried to debug the code and found that it is still using DHCP

instead of static IP mode. Can someone help me to guide what changes needs to be done for configuring my kit to use static IP? 

 

PS : Code is working fine for both server and client modes with DHCP addressing.

 

Thanks

 

warm regards,

Amit Deswal

  • Hello Amit,

    Unfortunately, our S2E design expert is currently out of the office and not available for consultation so I am unable to provide much help with this issue.

    My simple guess would be to investigate where in the code the dynamic IP address is obtained and update it to hard code the static IP address. This may be over simplifying your issue or may be more of a hack that has a better, more eloquent, solution.

    I will send this thread to our expert so that they can also respond upon their return next week.
  • Hi Chuck,

    Thanks for reply. I am trying to debug at my end also, will update if get a solution.

    warm regards,
    Amit Deswal
  • Hi Chuck,

    I have made it working. Thanks for help.

    warm regards,
    Amit Deswal
  • Hello,

    I encountered problems with the serial-to-Ethernet code's static IP support as well - it seems to be a bit broken. N.B. The code I used was the latest firmware (as at 22 May 2017) shown as "revision 2.1.1.71 of the EK-TM4C1294XL Firmware Package" in the source file header comments, from www.ti.com/.../TIDM-TM4C129XS2E -> Software -> TIDM-TM4C129XS2E Firmware - N.B. you need to log in to get this file.

    I started investigating in the code, and found what appeared to be a bug in idle_task.c -> vApplicationIdleHook(), that the "bool bFirst = true" variable needs to be declared as static so that it persists between calls. If this change is made then static IP support starts working ***upon changing to static IP settings*** from the browser page, but then stops working after re-starting the firmware. Further fixes would be needed to get this working better.

    However, I only needed static IP support (not DHCP or AutoIP), and was able to get this working as follows:
    - g_sParametersFactory initialisation in config.c: Change ui8Flags field from 0 to CONFIG_FLAG_STATICIP, and change static IP address field to the one which you require
    - In lwIPTaskInit(): Change lwIPInit() call to: lwIPInit(g_ui32SysClock, pui8MAC, <static IP address>, <subnet mask>, <gateway address>, IPADDR_USE_STATIC);
    - Disable DHCP and AutoIP support in lwipopts.h as follows:
    Change #define LWIP_DHCP from 1 to 0
    Change #define LWIP_AUTOIP from 1 to 0

    The above is only a starting-point of course, but it gets static IP support working, then allowing further code mods for your specific application.

    Best wishes,
    Bart
  • By the way, depending on the TivaWare/FreeRTOS library code which you are using, you might also need to apply the code tweaks to the enet_s2e project as specified in the following forum entry (I had to apply these to get my code to build):

    e2e.ti.com/.../522950

    Best wishes,
    Bart