loopback sample problem

Grigori Khmyrov Grigori_Khmyrov at uml.edu
Wed Mar 30 21:37:43 UTC 2005


Thanks everybody for pointing me to the right direction.
I found the errors in the loopback's source code.
There is result of comparing files init.c and INIT_ORIG.C

init.c is fixed one, INIT_ORIG.C is original one from the distribution
rtems-4.6.2/c/src/tests/samples/loopback/

May be somebody can submit  changes to the  new RTEMS distribution
because it scare when even simple examples don't work.

1. Strange printf parameters.
***** init.c
    printf("Read %d from server: %s\n", i, cbuf);
***** INIT_ORIG.C
    printf("Read %d from server: %.*s\n", i, i, cbuf);
*****
2. Delete task after client done
***** init.c
    printf("Client task terminating.\n");
    rtems_task_delete(RTEMS_SELF);
}
***** INIT_ORIG.C
    printf("Client task terminating.\n");
}
*****
Let some time to server to run (Server has low priority compare to client)
***** init.c
    spawnTask(serverTask, 150, 0);
    rtems_task_wake_after(20); /* Simulate client delay */

***** INIT_ORIG.C
    spawnTask(serverTask, 150, 0);

*****

Let's make RTEMS better!!!

Grigori Khmyrov wrote:

> Hi all,
> I'm new user of RTEMS. I just installed it first time. I'm trying to 
> run sample programs from
> /opt/build-rtems/i386-rtems/pc386/samples
> It seems to me that the loopback.exe program doesn't work properly on 
> the target computer:
> HSB-657I
> VIA C3 Eden CPU (i386 compatible processor)
> Half-Size CPU Card
> With LCD, Ethernet, PC/104 &
> CompactFlash, USB
>
> I load the sample using network and GRUB utility.
>
> The loopback.exe output looks like:
> ========================================================================
> "Network" initializing!
> "Network" initialized!
> Try running client with no server present.
> Should fail with `connection refused'.
> Connect to server.
> Can't connect to server: Connection refused
> Client closing connection.
>
> Start server.
>
> Try running client with server present.
> Connect to server.
> Can't connect to server: Connection refused
> Client closing connection.
> Client task terminating.
> ========================================================================
> That's it.
> I've tried loopback.exe from all BSP pc386, pc486, pc586, pc686, pck6.
> All of them give me the same output.
> Why is it? Any help appreciated.
> I compiled rtems with options
> /usr/local/src/rtems-4.6.2/configure --target=i386-rtems 
> --disable-posix --disable-itron --enable-tests --prefix=/opt/rtems-4.6
>
> Thank you,
> Grigori
>




More information about the users mailing list