We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I want to use the TCPNet with RTX Kernel, but I have one question about it.
In www.keil.com/.../rlarm_tn_using_withkernel.htm they say that tcp_poll_task is the lowest priority and in this task there is the main_() function. Is it the intention that all my code to check if something came in and control it comes in here???
kind of like this: (but my switch would then be main_() )
void tcp_poll_task (void) __task { /* Main Thread of the TcpNet. This task should have */ /* the lowest priority because it is always READY. */ dhcp_tout = DHCP_TOUT; while (1) { main_TcpNet(); dhcp_check ();
switch (soc_state){ case 0: //nog geen verbinding => socket aanvragen en verbinding maken tcp_soc = tcp_get_socket (TCP_TYPE_CLIENT, 0, 120, tcp_callback); //2 minuten en dan timeout indien kanaal idle soc_state = 999; //niet bestaande soc_state geven zodat er gewacht wordt op callback functie case 1: //verbinding gemaakt en klaar om data te versturen }
os_tsk_pass(); } }
Am I right here, or have I misinterpreted something?
Could someone please post an example of how to use TCPNet with rtx kernel? I've been trying it for a couple of days now, and it won't work. I tried to get some sample code from the HTTP example, but all the code is in cgi files (wich I don't understand).
When I try to make my connection I can see on my board that my socket is in the TCP_STATE_SYN_SENT waiting for an ACK. But when I snif my network for packets coming from my board, I can't seem to find them. When I try this with the LEDClient example I can see the packets passing.
My guess is that I have some processes or inits or stacks wrong.
So if someone could post some sample code for making a client connection to a server with rtx kernel (perhaps from the example file on www.keil.com/.../rlarm_tn_using_withkernel.htm ), I would appreciate this very much.
Thanks in advance