Hi Folks! On my way learning RTAi + rtnet I tried to run the soundmsg example from the RTAI-showroom. Unfortunately, it did not run out of the box. Here is, what I have done so fare:
The newest version from http://cvs.gna.org/cvsweb/showroom/v3.x/?cvsroot=rtai uses rt_thread_create, which is only available in RTAI-3.2. So I compiled 3.2 and recompiled my rtnet-0.8.3. Like described in the file rtai-3.2/base/ipc/netrpc/README I inserted "#define HARD_RTNET 1" in the file rtai-3.2/base/ipc/netrpc/netrpc.c to tell the compiler to use rtnet. But running run1 from the soundmsg example I get this errors while loading the rtai_netrpc module: --------------------------- /usr/realtime/modules/rtai_netrpc.o: /usr/realtime/modules/rtai_netrpc.o: unresolved symbol rt_recvfrom /usr/realtime/modules/rtai_netrpc.o: /usr/realtime/modules/rtai_netrpc.o: unresolved symbol rt_socket_callback /usr/realtime/modules/rtai_netrpc.o: /usr/realtime/modules/rtai_netrpc.o: unresolved symbol rt_sendto /usr/realtime/modules/rtai_netrpc.o: /usr/realtime/modules/rtai_netrpc.o: unresolved symbol rt_bind /usr/realtime/modules/rtai_netrpc.o: /usr/realtime/modules/rtai_netrpc.o: unresolved symbol rt_close /usr/realtime/modules/rtai_netrpc.o: /usr/realtime/modules/rtai_netrpc.o: unresolved symbol rt_socket ---------------------------- Looking in the netrpc.c and rtnet source I found, that there is a name-mismatch. In rtnet the functions are called recvfrom_rt and so on. (What version of rtnet are the rtai-guys using?!). So I inserted the following code in rtai-3.2/base/ipc/netrpc/netrpc.c: ----------------------------- #define USE_RT_XXX_WRAPPER 1 #include "/usr/local/rtnet/include/rtnet.h" #include "/usr/local/rtnet/include/rtdm.h" ----------------------------- Afterwards, only the error for rt_socket_callback remains :) ! (Should I send them a bugreport, or am I using the wrong versions?) Trying to resolv the remaining error I additionally inserted: ----------------------------- static inline int rt_socket_callback(int sock, int (*func)(int sock, void *arg), void *arg) { struct rtnet_callback callback = { func, arg }; /* set up callback handler */ return ioctl_rt(sock, RTNET_RTIOC_CALLBACK, &callback); } ------------------------------- That resolves the unresolved-symbol error. But running run1 from the soundmsg example player.c oopses. :( I know, "int sock" in the argument list from func is not the same as "struct rtdm_dev_context *" in func of the struct rtnet_callback used in ioctl_rt. But I do not know, how to convert that properly... Perhaps, someone on this list has a better idea. Thank you for listening! Regards Kai ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ RTnet-users mailing list RTnet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rtnet-users