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
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
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.
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.
Majid KazemitbaarThen 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 KazemitbaarThe 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 Kazemitbaar2. 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"?
Tom koprivaMajid KazemitbaarThen 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 koprivaMajid KazemitbaarThe 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 Kazemitbaar2. 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.
I'm still looking at this. Please bear with me.
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.
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 :)