rtnet code in rtai_24.1.12 (from denx)
wolfgang.grandegger at bluewin.ch
Tue Oct 26 10:54:57 CEST 2004
how about implementing the data acquisition in RTAI (real-time) and the
data transmitter in Linux (non-real-time). Data can be passed from RTAI
to Linux via shared memory of FIFOs.
On 10/26/2004 09:19 AM deepa.vijayaraghavan at mbtech-group.com wrote:
> Hello Paolo,
> Thanks a lot for your reply. LXRT is not supported for power PCs, and
> I use an IBM 440 GP power PC based board.
> I just need a socket interface to send out data to the outside network,
> in my RT task of lesser priority. The higher priority task does some
> kind of data acquisition. I do not really need the features of RTNET, as
> my realtime requirements are not very stringent in terms of data
> routing(sending it out to the outside world, I mean).
> The call to set_fs(KERNEL_DS) is the one that fails, when called from
> the RT task. I do not understand why. Do you have any example code, that
> uses the netrpc.h(that you'd sent) to make socket calls from RT tasks?
> Thanks a lot!
> Best Regards
> *mantegazza at aero.polimi.it*
> 25.10.2004 19:35
> An: deepa.vijayaraghavan at mbtech-group.com
> Thema: Re: rtnet code in rtai_24.1.12 (from denx)
> deepa.vijayaraghavan at mbtech-group.com wrote:
>> Hello Paolo,
>> I tried using the file you had sent, to make socket calls from RTAI.
>> As part of the init_module, I create socket(using ksocket()) and
>> bind(using kbind) the server to the socket. This proceeds without errors.
>> I spawn an idle task using rt_init_task(), also in the init_module().
>> When this task gets scheduled, it checks the socket with the kpoll(),
>> and sends the data out with the ksendto(). A call to kpoll() from the
>> rt_task results in "StartedOops: kernel access of bad area, sig: 11"
>> error. If I replace kpoll with poll, it goes through, but I get the oops
>> for the ksendto call. I am unable to understand this! Any suggestion is
>> of great help.
> YOu cannot use kernel calls in hard real time RTAI kernel tasks For that
> you need to copy a kind of something found in netrpc.h. The best
> solution is to use LXRT and soft kernel threads mixing up RTAI and Linux
> support, but not in real time.
> For real time, or using sockets directly from RTAI tasks, _use_RTNet_
More information about the Rtai