• 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 » NDK Userguide (spru523h): Problems on creating the EchoTcp Task [page 55]
Share
BIOS
  • Forum
  • Announcements
Options
  • Subscribe via RSS

NDK Userguide (spru523h): Problems on creating the EchoTcp Task [page 55]

NDK Userguide (spru523h): Problems on creating the EchoTcp Task [page 55]

This question is answered
Majid Kazemitbaar
Posted by Majid Kazemitbaar
on Jul 23 2012 06:23 AM
Prodigy80 points

Hello,

I am using OMAPL138, on evm board.

After working with NDK/NSP [dsp side] examples, and running all of them ... I then created a simple program which had a static IP address and had the TCP/IP Module. Where I could easily ping using my computer.

Then I was trying to send a buffer of data to a defined IP address, when i saw part 3.3 in the NDK's Userguide (spru523h).

Can someone please help me on testing this code?

these are the steps that i took, but didn't work well for me :

1. I started using the Task Thread in the XCGF file.

2. then i added a new task with the following parameters:

a. Task Function = EchoTcp

b. StackSize = 4096

c. priority = 5

but this doesn't work :( it gives an exception while running on the board!

have i created the Task, right?

And how can i use this code to send a data buffer to a defined IP address?

Thank you very much

NDK OMAPL138 EchoTcp Task Stac spru523h
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Tom Kopriva
    Posted by Tom Kopriva
    on Jul 24 2012 18:53 PM
    Expert6570 points

    Hi Majid,

    It's difficult to debug this sort of problem with the information provided.

    Can you identify which versions of BIOS and NDK/NSP you are using? Also, I'm not sure what exception you may have gotten...

    Thanks,

    Tom

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Majid Kazemitbaar
    Posted by Majid Kazemitbaar
    on Jul 24 2012 19:14 PM
    Prodigy80 points

    Hi Tom,

    I'm using

    BIOS 6.32.05.54

    NDK 2.21.00.32

    NSP 1.10.00.03

    The exception was about that ... my task started to run before initiating any Network or getting IP.

    Sorry that I bother you, I mostly want to know how to run the EchoTcp code?

    Thank you very much.

    NDK OMAPL138 EchoTcp Task Stac spru523h
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Majid Kazemitbaar
    Posted by Majid Kazemitbaar
    on Jul 26 2012 05:09 AM
    Prodigy80 points

    Can someone please help me on this?

    I want to run the simple Socket Programming example in spru524h.

    But I don't know how to add it to my simple project.

    NDK OMAPL138 EchoTcp Task Stac spru523h
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Tom Kopriva
    Posted by Tom Kopriva
    on Jul 26 2012 12:43 PM
    Expert6570 points

    Hi Majid,

    Majid Kazemitbaar
    Then I was trying to send a buffer of data to a defined IP address, when i saw part 3.3 in the NDK's Userguide (spru523h).

    Who is sending the data? The PC or the target?

    Majid Kazemitbaar
    The exception was about that ... my task started to run before initiating any Network or getting IP.

    Is this exception an actual error that prints an error message? From what you said earlier, you've assigned a static IP to your target. So, I don't understand why it wouldn't be "ready". Have you checked ROV to see if it shows any errors?

    Majid Kazemitbaar
    2. then i added a new task with the following parameters:

    a. Task Function = EchoTcp

    b. StackSize = 4096

    c. priority = 5

    How did you create this task? Did you create this task at run-time? Did you use the NDK OSAL's "TaskCreate"?

    Thanks,

    Tom

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Majid Kazemitbaar
    Posted by Majid Kazemitbaar
    on Jul 26 2012 13:18 PM
    Prodigy80 points

    Tom kopriva
    Majid Kazemitbaar
    Then I was trying to send a buffer of data to a defined IP address, when i saw part 3.3 in the NDK's Userguide (spru523h).

    Who is sending the data? The PC or the target?

    It's the EchoTcp code from page 55 of spru523h. Where the task (running on target board) is sending a data buffer.

    Tom kopriva
    Majid Kazemitbaar
    The exception was about that ... my task started to run before initiating any Network or getting IP.

    Is this exception an actual error that prints an error message? From what you said earlier, you've assigned a static IP to your target. So, I don't understand why it wouldn't be "ready". Have you checked ROV to see if it shows any errors?

    the exception was because of a mistake of mine. i fixed it ... but still it doesn't work :(

    Tom kopriva

    Majid Kazemitbaar
    2. then i added a new task with the following parameters:

    a. Task Function = EchoTcp

    b. StackSize = 4096

    c. priority = 5

    How did you create this task? Did you create this task at run-time? Did you use the NDK OSAL's "TaskCreate"?

    I created the task statically, using the .cfg (XCFG) ... and adding a new task using those parameters.

    but the problem is, where should i start this task?! should it be in a while loop, like:

    void EchoTcpTaskProcess()
    {

    while(1)
    {

    Bool b = Semaphore_pend(mySem, BIOS_WAIT_FOREVER);

    printf("-----Running EchoTcp-----\n");

    IPN destIP = 0xC0A80158; //iMajeed's IP

    EchoTcp(destIP);

    }

    }

    the semaphore is posted when an IP address is taken by the target board. in a function that is hooked to "Net IP address Hook".

    am i doing this right? or still going wrong?!

    thank you very much,

    Majeed.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Tom Kopriva
    Posted by Tom Kopriva
    on Jul 31 2012 14:23 PM
    Expert6570 points

    Hi Majid,

    I'm still looking at this. Please bear with me.

    Thanks,

    Tom

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Tom Kopriva
    Posted by Tom Kopriva
    on Aug 03 2012 20:09 PM
    Verified Answer
    Verified by Majid Kazemitbaar
    Expert6570 points

    Hi Majeed,

    1. The task you are trying to create needs EchoTcpTaskProcess as its function pointer.

    2. What do you mean by "not working"?

    Is EchoTcpTaskProcess running before the Semaphore was posted? Does EchoTcpTaskProcess ever run at all? Can you see if "Net IP address Hook" ever getting called by the NDK?

    Otherwise, everything seems to look fine.

    Thanks,

    Tom

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Majid Kazemitbaar
    Posted by Majid Kazemitbaar
    on Aug 08 2012 04:18 AM
    Prodigy80 points

    Hi Tom,

    Yup, I gave the function pointer to the Task module and its working now.

    My problem was with the TCPListener i was using on the server [where the board was trying to connect to]..

    sorry for the delay ...

    Thank you very much for helping :)

    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