On Wed, August 8, 2007 13:17, Jan Kiszka wrote:

>> trying to send data via rtnet without ip on raw socket I have a problem.
>> Using the native API it doesn't work at all, using the posix API it
>> works
>> exactly once.
> If your native example doesn't create a real-time context for the sender
> (rt_task_shadow etc.), that would be expected: -ENOSYS. The POSIX skin
> does so automatically for the main thread, thus sending works in
> principle.

Ah ok, I overlooked that.

>> Since I tried everything I tried to rewrite the raw-ethernet example in
>> my
>> project (my source code is attached). The first call of that program
>> sends
>> the buffer as it should (checking via wireshark). All further calls do
>> not
>> send anything. All functions return without any error, send function
>> returns with 36, the amount of bytes to be sent.
>> I have no more idea where my mistake is.
>> the raw-ethernet example works fine.
>> sorry for chatoical code, it changed a lot of time for testing purpose.
> What is your setup? TDMA or plain RTnet? What happens when you issue
> those frames over rtlo? I only have a virtual box at hand right now, but
> the loopback path works fine for me with your code (with some additions
> to make it compile): on each invocation of the program, RTcap collects
> one frame on rtlo.

It's TDMA...attached my rtnet start script. In rtlo it's exactly the same,
the firt invocation creates a frame on rtlo, the further ones not.
What additions to compile did you do, except includes and constants.

#!/bin/bash

#set -v on
#set -x on

echo Creating rtnet device ...
if test \! -c /dev/rtnet; then
        mknod /dev/rtnet c 10 240
        echo rtnet device created
fi

echo Removing non-realtime driver module ...
ifconfig eth0 down
rmmod e1000
echo non-realtime driver removed

echo Loading realtime driver modules ...
insmod /usr/local/rtnet/modules/rtnet.ko || exit 1
echo rtnet.ko OK
insmod /usr/local/rtnet/modules/rtpacket.ko || exit 1
echo rtpacket.ko OK
insmod /usr/local/rtnet/modules/rt_e1000.ko cards=1,0,0,0 || exit 1
echo rt_e1000.ko OK



###############################################################################
# start of configuration depending on use of loopback and/or captureing
device
###############################################################################
#comment following line if no loopback interface
insmod /usr/local/rtnet/modules/rt_loopback.ko || exit 1
echo rt_loopback.ko OK

#comment following line if no capture interface
insmod /usr/local/rtnet/modules/rtcap.ko || exit 1
echo rtcap.ko OK

#comment following line if no loopback interface
/usr/local/rtnet/sbin/rtifconfig rtlo up
echo rtlo is up

#comment following line if no capture interface
ifconfig rteth0 up
ifconfig rteth0-mac up
#comment following line if no capture interface
#OR capture interface but no loopback interface
ifconfig rtlo up
###############################################################################
# end of configuration depending on use of loopback and/or captureing device
###############################################################################


echo Loading discipline modules ...
insmod /usr/local/rtnet/modules/rtmac.ko
echo rtmac.ko OK
insmod /usr/local/rtnet/modules/tdma.ko
echo tdma.ko OK

/usr/local/rtnet/sbin/rtifconfig rteth0 up
echo rteth0 is up

###############################################################################
# start of TDMA configuration (all values in ms)
###############################################################################
echo Setting up TDMA discipline ...
#put your TDMA cycle time here (last number)
/usr/local/rtnet/sbin/tdmacfg rteth0 master 2000 -c 1 -i 1
echo cycle setup OK
#put your TDMA offset related to scheduled cycle start here (last number)
/usr/local/rtnet/sbin/tdmacfg rteth0 slot 0 250 -l rtnet.log
echo offset setup OK

###############################################################################
# end of TDMA configuration
###############################################################################




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to