Tom Panis wrote:
> Hi,
> 
> I'm trying to send raw ethernet packages on Xenomai, I'm also working
> with the trunk version of RTnet. I looked at the example
> "raw-ethernet.c" and I'm wondering why the functions like socket_rt,
> send_rt ,.. aren't used.  Is it still real-time? I tried to use the

It is, but only when you link against Xenomai's POSIX skin (xeno-config
--posix-ldflags). This step will wrap all POSIX calls like socket, send,
bind to RTDM services, finally invoking RTnet if it is installed
(otherwise you will end up in Linux again).

> real-time functions like socket_rt,... but then I can't send or receive
> raw ethernet packages anymore: the function send_rt returns -1.

All _rt services are deprecated now (we should mark them...). They were
replaced by RTDM's rt_dev_XXX. But only the name changed here.

The difference between rt_dev_XXX (or old XXX_rt) services and the true
POSIX calls are the way error codes are returned. For POSIX services you
have to check errno, for the RTDM API you get the error directly via the
return code. Thus, one time -1 only means some error occurred, the other
it means -EPERM (here: RT context required).

> I attached the program code. Running the program (I use rtlo as
> interface) results in the following output:
> 
>    Socket created: socket id: 0
>    Got interface: index: 0
>    Sending frames...
>    Cannot send: Success
>    Length: -1
>    shutting down

How did you compile that program? It doesn't map itself to RT context
unless you compiled it against the POSIX skin (which does so
automatically for main).

> 
> My second problem is the reason why I only can use the loopback: I use a
> Realtek rtl8139 network card. Loading the modules works fine with
> insmod. With dmesg I see rteth0 has been initialized but when I want to
> activate it with "rtifconfig rteth0 up 192.168.1.100" my system freezes
> without any message and the only solution is a hard reboot. Does anyone
> also has this problem, or has any solution?

IRQ conflict with Linux? Xenomai trunk revision (upcoming 2.3) can
detect this, but current 2.2.x version still just locks up (endless IRQ
handler invocations because Linux cannot handle the real source).

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to