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.

boot_emac_flash - Change TFTP Port

Other Parts Discussed in Thread: UNIFLASH, LMFLASHPROGRAMMER

Hello,

I would like to change the TFTP port (69) on boot_emac_flash bootloader. When I switch to any value from 69 the fw upgrade doesn't proceed, the target is requesting the first bin firwmare packet always anyways it works nicely.

Could you help me to change it from 69? 

  • Sorry for the long wait for a reply. I'm not sure this is the correct forum for your issue. Which board is this? Is this a Linux issue?

    Alan

  • Hello,

    Thank you for your reply. Board: TM4C129EXL. Yes, it s a linux issue, more precisely an Android one. I would like to do the firmware update from an Android device but I can not bind to any port below 1024. ( I dont want to root the device ). I changed the other ports 67 , 68 to 1067 and 1068 and left the TFTP unchanged, this works well from a non Andoid device but when I tried to modified the port 69 the target doesn't send me back ACK for the first Block of firmware data package. Thats why I think, the target code should be changed more not just update the TFTP port.

    Thank you,

  • I'm still unclear about your application. Is this a pure TivaWare application or does it use TI-RTOS? Which stack are you using, LWIP or NDK?

    Are you saying that changing the TFTP port on the Tiva device works if you're uploading firmware to it from a non-android device? But, with the same code running on the Tiva device, you are not able to TFTP to it from an Android device? If this is what you're saying, then I would guess that the TFTP code in the Android stack doesn't like performing TFTP on a non-standard TFTP port.

    Alan
  • Hello,

    " I changed the other ports 67 , 68 to 1067 and 1068 and left the TFTP unchanged, this works well from a non Andoid device but when I tried to modified the port 69 the target doesn't send me back ACK for the first Block of firmware data package."

    Let me explain my previous post a bit more. Other ports like 67 and 68 are referring to BOOTP_SERVER_PORT and BOOTP_CLIENT_PORT. The third port is TFTP_SERVER_PORT with value of 69. I could change the BOOTP_SERVER_PORT and the BOOTP_CLIENT_PORT from their default value to 1067 and 1068 and did not modify the TFTP_SERVER_PORT (both on the target and the host) and I could make the firmware upgrade without any issue. However when I tried to modily the TFTP_SERVER_PORT from 69 to any value the upgrade failed. 

    Yes, you are right the Android does not allow binding to ports below 1024, that's why I want to change the standard ports to any value above 1024.

    So, if we could change the TFTP_SERVER_PORT on the target side and make it works that would be great.

    For the bootloader I am using the TivaWare boot_emac_flash and the user application is written in TI-RTOS. I send a special request to the RTOS that initiates the firmware upgrade over ethernet.

  • That helps clarify things, thank you.

    Which stack are you using? Where are you changing the TFTP_SERVER_PORT value?

    Alan
  • I don't know what stack is being used.

    The boot_emac_flash example project is generated in the following way:

    TI Resource Examples -> TivaWare_C_Series_2.1.3.156 -> dk-tm4c129x-> boot_emac_flash

    In the project under the boot_loader\bl_emac.c starting from line 324

    //*****************************************************************************
    //
    // The UDP ports used by the BOOTP protocol.
    //
    //*****************************************************************************
    #define BOOTP_SERVER_PORT       67
    #define BOOTP_CLIENT_PORT       68
    
    //*****************************************************************************
    //
    // The UDP port for the TFTP server.
    //
    //*****************************************************************************
    #define TFTP_PORT               69

    I changed the above values as I mentioned earlier, that's all.

  • Hi Daniel,

    I've moved this thread to the device forum.

    Todd
  • Hello Daniel

    The TFTP port is defined as port 69. As a result the tools like LMFlashProgrammer and UniFlash use the port 69 for communication. It is not possible to change the port to another custom port.
  • Dear Amit,

    Thank you for your reply. I have my own solution to make the firmware update over ethernet. May I asky why is not possible to change the port from 69? Is there any special code section that uses that value? I do really need a solution that uses other port value above 1024.

    Can you please help me in this situation?

  • Hello Daniel,

    As per the IETF specification TFTP is for port 69. So if you try to send a TFTP packet on another unassigned port, the switch/router may not allow you to do so. Please refer to the following link on Port Assignments.

    en.wikipedia.org/.../List_of_TCP_and_UDP_port_numbers
  • Understood.

    Thank you for your effort. I have to find a workaround.