Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - aersek

Pages: [1]
1
µTasker general / TCP ARP resolution issue
« on: March 15, 2011, 02:49:47 PM »
Hello

We were testing our uTasker telnet implementation over internet. As internet gateway is used GPRS modem. After reset of module, on received SYNC from telnet client uTasker had sent ARP resolution to find MAC of gateway. On reception of ARP resolution from gateway uTasker didn't send SYC ACK frame. To fix this situation I have changed tcp.c code:

extern void fnTaskTCP(TTASKTABLE *ptrTaskTable)
{
    QUEUE_HANDLE PortIDInternal = ptrTaskTable->TaskID;                  // queue ID for task input
    unsigned char ucInputMessage[MEDIUM_MESSAGE];                        // reserve space for receiving messages

    while ( fnRead( PortIDInternal, ucInputMessage, HEADER_LENGTH )) {   // check input queue
        switch ( ucInputMessage[ MSG_SOURCE_TASK ] ) {
            case TIMER_EVENT:
                fnPollTCP();                                             // do TCP management on a periodic basis
                uTaskerMonoTimer( OWN_TASK, T_TCP_PERIOD, E_POLL_TCP );  // restart the timer
                break;

            case TASK_ARP:
            {
                TCP_CONTROL *ptr_TCP = tTCP;
                fnRead( PortIDInternal, ucInputMessage, ucInputMessage[MSG_CONTENT_LENGTH]);// read the contents
                switch (ucInputMessage[ 0 ]) {                           // ARP sends us either ARP resolution success or failed
                case ARP_RESOLUTION_SUCCESS:                             // a TCP socket is owner of resolved address
                    ptr_TCP += ucInputMessage[ 1 ];                      // extract the socket reference
                    if (ptr_TCP->ucTCP_state == TCP_STATE_SYN_SENT) {    // ARP resolve on connection establishment    
                        #ifdef ANNOUNCE_MAX_SEGMENT_SIZE                 // TCP socket waiting for connection
                        fnSendSyn(ptr_TCP, TCP_FLAG_SYN);                // send SYN with MSS announcement
                        #else
                        fnSendTCPControl(ptr_TCP);                       // resent because IP address has just been resolved
                        #endif
                    }
                 else if (ptr_TCP->ucTCP_state == TCP_STATE_SYN_RCVD) { // next state is SYN_RCVD where an ACK will establish the connection
                  #ifdef ANNOUNCE_MAX_SEGMENT_SIZE
                        fnSendSyn(ptr_TCP, (TCP_FLAG_SYN | TCP_FLAG_ACK));     // send SYN, ACK with MSS announcement
                  #else
                        ptr_TCP->ucSendFlags = (TCP_FLAG_SYN | TCP_FLAG_ACK);  // prepare flags to be transmitted
                        fnSendTCPControl(ptr_TCP);                             // send SYN, ACK
                  #endif  

                    }

                   else {
.
.
.


Is this correction OK? With this adaptation everything works fine.

2
µTasker general / Unexpected delay in uTasker simulator
« on: April 08, 2010, 12:16:05 PM »
During testing of my application in uTasker simulator I found that data transfer between uTasker server application and client take 5 – 6 more time than same transfer between Windows server and client. I found in Wireshark log that every uTasker response (even on telnet, ping, ftp, web) happens 5 – 15 ms after received request, and that slows down data transfer speed dramatically. When I compile and download code to target processor all delays are around 1ms what is expected. I expected better response time from simulator which is running on XX GHz processor than response of 60MHz ColdFire. I understand that Windows are not real time system, but how then PC server application has immediate response and uTasker simulator has not?

Best regards

Andrija Ersek

3
utFAT / CF card support
« on: January 22, 2010, 11:05:38 AM »
Is in plan to support CF cards in uTasker uFAT project? I'm interested in using uFAT in my project on CF cards because our system has many SPI devices connected and high SPI bus utilization. Processor is MCF52259 or some other ColdFire with parallel bus interface.

Pages: [1]