• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » BIOS » BIOS forum » Changing IP address after connection has made
Share
BIOS
  • Forum
  • Announcements
Options
  • Subscribe via RSS

Forums

Changing IP address after connection has made

  • Aviv
    Posted by Aviv
    on Apr 02 2012 04:51 AM
    Intellectual335 points

    Hi

    I have c6678, NDK  2.20.04.26, SYS/BIOS 6.32.05.54,

    I  am trying to change IP address in client example after connection has made. (in dtask_tcp_echo function):

    • I shutdown the socket,
    • set the IP maually as in stackTest function,
    • and then call NC_NetStart

    That doesn't work, how can I do it?

    Thanks

    Aviv

     

     

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steven Connell
    Posted by Steven Connell
    on Apr 02 2012 13:40 PM
    Mastermind20580 points

    Hi Aviv,

    You would need to add the new IP address you want to the NDK's configuration database, save the configuration, reboot the stack and then load the saved configuration.

    For example, to add a static IP to the NDK configuration, the code would look something like the following:

            // Setup manual IP address
            bzero( &NA, sizeof(NA) );
            NA.IPAddr  = IpAddr;
            NA.IPMask  = IpMask;
            strcpy( NA.Domain, Domainname );
            NA.NetType = 0;

            // Add the address to interface 1
            CfgAddEntry( hCfg, CFGTAG_IPNET, 1, 0,
                               sizeof(CI_IPNET), (UINT8 *)&NA, 0 );

    Have you seen the NDK example "cfgdemo"?

    That example shows how to change the IP address of a running application via a web browser interface.  Do you have that example sitting next to your "client" example?

    If not, you can get the cfgdemo application from the evmOMAPL138 NSP.  This is for a different platform, but you can still view the example code or even port it to the 6678 if you like.

    You can find the NSP download here:

        http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ndk/nsp_1_10_00_03/index_FDS.html

    The file you will be interested in is "webpage.c" and the function that handles the new IP address received from the web page is cgiCfgDone().

    Steve

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Aviv
    Posted by Aviv
    on Apr 10 2012 05:32 AM
    Intellectual335 points

    Hi Steve,

    I did My project based on client example, in dtask_tcp_echo  I created a task (with lower  priority than the current task priority) that calls BuildConfig() as in webpage.c in cfgdemo,

    and then  in dtask_tcp_echo function i wrote the following code:

     

    fdClose( )   // Close the socket

    NC_NetStop(1)  // Request stack reboot

    TaskDestroy()  //Destroy the current task

     

    that doesn't work.

    thanks,

    Aviv

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steven Connell
    Posted by Steven Connell
    on Apr 10 2012 20:17 PM
    Mastermind20580 points

    Aviv,

    Can you please zip up and attach your (entire) modified project (preferably built) to this thread so I can see your changes?

    Steve

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use