Hi, List member:
I really need to set up the RTNET work so that I can use the the socket/UDP
interface in RTAI kernel real time task. (I do not care is hard real time
or soft real time at this moment, the first step is make my hard real
time task can do network IO with the outside - no real time host at this
time, since I only have one PC - I am doing some Qos experiment on the
processor level, not at the IO level at this moment)
My Goal is very simple at this stage:
** I can send/receive packets use UDP socket in RTAI kernel RTtask.
** No real time for now and on a single linux/rtai/rtnet machine.
** I guess in this case, regular linux network is fine as well, right?
!!!! Helps are greatly appreciated !!!!
I tried before, local RT interface is up running, but can not be in the
network.
RTPing outside did not work.
Tonight I tried from the begin again.
Here is the detailed cmd procedure (I did)
Since I only have one RTAI/Rtnet station, I do "rtnet capture", while
the whole system seem become frozen.
My PC (dhcp client) is running inside a linux router which connect to cable
modem.
Details Commands:
==================
1. booted with RTAI kernel. network and network application
is ok. (ping www.yahoo.com ok, dhcp got IP address and ok)
2 Check loaded module.
[root@howard-pc realtime]# lsmod
Module Size Used by Not tainted
tulip 45632 1 (autoclean)
crc32 3592 0 (autoclean) [tulip]
[root@howard-pc realtime]#
3. ifconfig eth0 down
4. rmmod tulip
[root@howard-pc realtime]# ifconfig eth0 down
[root@howard-pc realtime]# lsmod
Module Size Used by Not tainted
tulip 45632 0 (autoclean)
crc32 3592 0 (autoclean) [tulip]
[root@howard-pc realtime]# modprobe -r tulip
[root@howard-pc realtime]# lsmod
Module Size Used by Not tainted
#
#modprobe -l
#modprobe -l
/lib/modules/2.4.25-rthal5/kernel/drivers/net/dummy.o
/lib/modules/2.4.25-rthal5/kernel/drivers/net/eepro100.o
/lib/modules/2.4.25-rthal5/kernel/drivers/net/mii.o
/lib/modules/2.4.25-rthal5/kernel/drivers/net/ppp_async.o
/lib/modules/2.4.25-rthal5/kernel/drivers/net/ppp_generic.o
/lib/modules/2.4.25-rthal5/kernel/drivers/net/ppp_synctty.o
/lib/modules/2.4.25-rthal5/kernel/drivers/net/slhc.o
/lib/modules/2.4.25-rthal5/kernel/drivers/net/slip.o
/lib/modules/2.4.25-rthal5/kernel/drivers/net/tulip/tulip.o
/lib/modules/2.4.25-rthal5/kernel/drivers/sound/ac97_codec.o
/lib/modules/2.4.25-rthal5/kernel/drivers/sound/emu10k1/emu10k1.o
/lib/modules/2.4.25-rthal5/kernel/drivers/sound/es1371.o
/lib/modules/2.4.25-rthal5/kernel/drivers/sound/sonicvibes.o
/lib/modules/2.4.25-rthal5/kernel/drivers/usb/audio.o
/lib/modules/2.4.25-rthal5/kernel/lib/crc32.o
#root@howard-pc realtime]# lsmod
Module Size Used by Not tainted
#
[root@howard-pc realtime]# ps -ef |grep dhcp
root 11532 1 0 22:16 ? 00:00:00 /sbin/dhcpcd -n eth0
root 11573 11333 0 22:33 pts/2 00:00:00 grep dhcp
[root@howard-pc realtime]# kill 11532
[root@howard-pc realtime]# ps -ef |grep dhcp
root 11614 1 0 22:34 ? 00:00:00 /sbin/dhcpcd -n eth0
root 11644 11333 0 22:34 pts/2 00:00:00 grep dhcp
[root@howard-pc realtime]# kill 11614
[root@howard-pc realtime]# ps -ef |grep dhcp
[root@howard-pc realtime]# ps -ef |grep dhcp
root 11648 11333 0 22:34 pts/2 00:00:00 grep dhcp
#
[root@howard-pc modules]# ps -ef |grep dhcp
root 11672 11333 0 22:39 pts/2 00:00:00 grep dhcp
[root@howard-pc modules]# lsmod
Module Size Used by Not tainted
[root@howard-pc modules]#
### Network device is down ############
# load RTAI #
[root@howard-pc realtime]# cd modules
[root@howard-pc modules]# pwd
/usr/realtime/modules
[root@howard-pc modules]# ls -al
total 416
drwxr-xr-x 2 root root 4096 Nov 2 2004 .
drwxr-xr-x 9 root root 4096 Jul 30 2004 ..
-rw-r--r-- 1 root root 7358 Jul 30 2004 rtai_bits.o
-rw-r--r-- 1 root root 22637 Jul 30 2004 rtai_fifos.o
-rw-r--r-- 1 root root 27068 Jul 30 2004 rtai_hal.o
lrwxrwxrwx 1 root root 9 Nov 2 2004 rtai_ksched.o ->
rtai_up.o
-rw-r--r-- 1 root root 3078 Jul 30 2004 rtai_leds.o
-rw-r--r-- 1 root root 68494 Nov 2 2004 rtai_lxrt.o
-rw-r--r-- 1 root root 34910 Jul 30 2004 rtai_math.o
-rw-r--r-- 1 root root 8834 Jul 30 2004 rtai_mbx.o
-rw-r--r-- 1 root root 25184 Jul 30 2004 rtai_mq.o
-rw-r--r-- 1 root root 16679 Jul 30 2004 rtai_msg.o
-rw-r--r-- 1 root root 20625 Jul 30 2004 rtai_netrpc.o
-rw-r--r-- 1 root root 13927 Jul 30 2004 rtai_sem.o
-rw-r--r-- 1 root root 15536 Jul 30 2004 rtai_serial.o
-rw-r--r-- 1 root root 10357 Jul 30 2004 rtai_shm.o
-rw-r--r-- 1 root root 8275 Jul 30 2004 rtai_tasklets.o
-rw-r--r-- 1 root root 15278 Jul 30 2004 rtai_tbx.o
-rw-r--r-- 1 root root 49629 Nov 2 2004 rtai_up.o
-rw-r--r-- 1 root root 5167 Jul 30 2004 rtai_usi.o
-rw-r--r-- 1 root root 15004 Jul 30 2004 rtai_wd.o
[root@howard-pc modules]#
[root@howard-pc modules]# insmod ./rtai_hal.o
[root@howard-pc modules]# lsmod
Module Size Used by Not tainted
rtai_hal 39552 0 (unused)
[root@howard-pc modules]# insmod ./rtai_ksched.o
[root@howard-pc modules]# insmod ./rtai_sem.o
[root@howard-pc modules]# lsmod
Module Size Used by Not tainted
rtai_sem 12160 0 (unused)
rtai_ksched 46197 0 [rtai_sem]
rtai_hal 39552 1 [rtai_sem rtai_ksched]
[root@howard-pc modules]#
# check /dev/rtnet
#ls -la /dev/rtnet
crw-r--r-- 1 root root 10, 240 Sep 30 2004 /dev/rtnet
#
[root@howard-pc rtnet]# cd modules
[root@howard-pc modules]# pwd
/opt/rtnet/modules
[root@howard-pc modules]#
[root@howard-pc modules]# insmod ./rtai_rtdm.o
[root@howard-pc modules]# lsmod
Module Size Used by Not tainted
rtai_rtdm 13044 0 (unused)
rtai_sem 12160 0 (unused)
rtai_ksched 46197 0 [rtai_rtdm rtai_sem]
rtai_hal 39552 1 [rtai_rtdm rtai_sem rtai_ksched]
## RTNET Configureation options ##
[root@howard-pc rtnet-0.7.1]# ./configure --with-rtai=/usr/realtime
--prefix=/opt/rtnet --enable-allpci --enable-proxy --enable-rtcap
--enable-net-routing --enable-router
###
###### /etc/rtnet.conf #####
#!/bin/sh
#
# Copy this file to /etc/rtnet.conf and adapt it to your system.
# This configuration file is used with the rtnet script.
#
# RTnet installation path
RTNET_PATH="/opt/rtnet"
# RT-NIC driver
#RT_DRIVER="eepro100-rt"
RT_DRIVER="tulip-rt"
RT_DRIVER_OPTIONS="cards=1"
# IP address and netmask of this station
IPADDR="192.168.1.101"
NETMASK="255.255.0.0"
# Start realtime loopback device ("yes" or "no")
RT_LOOPBACK="yes"
# Start capturing interface ("yes" or "no")
RTCAP="no"
# Common RTcfg stage 2 config data (master mode only)
STAGE_2_SRC=""
# Stage 2 config data destination file (client mode only)
STAGE_2_DST=""
# Command to be executed after stage 2 phase (client mode only)
STAGE_2_CMDS=""
# TDMA mode of the station ("master" or "client")
TDMA_MODE="master"
#TDMA_MODE="client"
# List of TDMA clients (master mode only)
#TDMA_CLIENTS="10.0.0.2 10.0.0.3 10.0.0.4"
TDMA_CLIENTS=""
# Cycle time in microsecond (master mode only)
TDMA_CYCLE="5000"
# Offset in microsecond between TDMA slots (master mode only)
TDMA_OFFSET="200"
Regards,
Howard.
|