rtnet code in rtai_24.1.12 (from denx)

deepa.vijayaraghavan at mbtech-group.com deepa.vijayaraghavan at mbtech-group.com
Tue Oct 26 11:12:37 CEST 2004


Hello, Thanks a lot for the idea! Well, I was looking for the fastest 
method to send the data out, without using RTNET(atleast as of now, I 
think I don't need to get into hard real time ethernet). And I thought a 
solution within the kernel space is faster.

Best Regards
Deepa.

  




wolfgang.grandegger at bluewin.ch
26.10.2004 10:54



 
        An:     deepa.vijayaraghavan at mbtech-group.com
        Kopie:  mantegazza at aero.polimi.it, rtai at rtai.org
        Thema:  Re: rtnet code in rtai_24.1.12 (from denx)


Hello,

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.

Wolfgang.

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
> Deepa.
> 
> 
> 
> *
> * 
> 
> 
>                *mantegazza at aero.polimi.it*
> 
> 25.10.2004 19:35
> 
> 
> 
>         An:        deepa.vijayaraghavan at mbtech-group.com
>         Kopie: 
>         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_
> 
> Paolo.
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.rtai.org/pipermail/rtai/attachments/20041026/dbb43c30/attachment.htm 


More information about the Rtai mailing list