On 09/14/2011 12:18 PM, Hinko Kocevar wrote:
Hi all,

I'm trying to use smc91111 RT driver provided in RTnet package (git
sources) on my ARM PXA253 board. The modules compiles against linux
2.6.35.9 and Xenomai 2.5.6, but when it is loaded it produces oops.


Success at porting the smc91x kernel driver at last!!

root@xcep:~# /usr/local/rtnet/sbin/rtping 127.0.0.1
Real-time PING 127.0.0.1 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 time=86.0 us
64 bytes from 127.0.0.1: icmp_seq=2 time=87.6 us
64 bytes from 127.0.0.1: icmp_seq=3 time=78.7 us
64 bytes from 127.0.0.1: icmp_seq=4 time=76.5 us

The story continues ..

While rtping does seem to work to 127.0.0.1, I can't seem to persuade the neighboring PC to reply to pings. PC is using e100 eth driver, and is running Linux 2.6.35.9 with Xenomai 2.5.6. I can confirm that on the PC rtping to 127.0.0.1 works, too.

Also when using regular network driver modules on both systems, ping from one to another does work. There are only these two nodes interconnected over the hub on a dedicated subnet. What happens is that the nodes do not seem to discover each other ..

Attached are both rtnet.conf files, and some sh -x output of the rtnet start. In this setup I'm trying to use my embedded target (xcep) as RTnet master, and PC as slave. I've tried the other way around to no avail.

Here are outputs of rtifconfig too.

root@xcep:~# /usr/local/rtnet/sbin/rtifconfig
rteth0    Medium: Ethernet  Hardware address: 00:D0:50:31:11:87
          IP address: 192.168.2.2  Broadcast address: 192.168.2.255
          UP BROADCAST RUNNING  MTU: 1500
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:184100 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 b)  TX bytes:7778916 (7.4 Mb)

rtlo      Medium: Local Loopback
          IP address: 127.0.0.1
          UP LOOPBACK RUNNING  MTU: 1500
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

workshop@workshop-Compaq-EVO:~$ sudo /usr/local/rtnet/sbin/rtifconfig
rteth0    Medium: Ethernet  Hardware address: 00:04:23:34:09:59
          IP address: 192.168.2.1  Broadcast address: 192.168.2.255
          UP BROADCAST RUNNING  MTU: 1500
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

rtlo      Medium: Local Loopback
          IP address: 127.0.0.1
          UP LOOPBACK RUNNING  MTU: 1500
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Thank you!

--
Hinko Kocevar
Technical support software engineer
Instrumentation Technologies d.d.
Velika pot 22, SI-5250 Solkan - Slovenia
T:+386 5 3352600, F:+386 5 3352601
mailto: [email protected]

http://www.i-tech.si - When your users demand stability
workshop@workshop-Compaq-EVO:~$ cat /usr/local/rtnet/etc/rtnet.conf 
# This file is usually located in <PREFIX>/etc/rtnet.conf
# Please adapt it to your system.
# This configuration file is used with the rtnet script.

# RTnet installation path
prefix="/usr/local/rtnet"
exec_prefix="${prefix}"
RTNET_MOD="${exec_prefix}/modules"
RTIFCONFIG="${exec_prefix}/sbin/rtifconfig"
RTCFG="${exec_prefix}/sbin/rtcfg"
TDMACFG="${exec_prefix}/sbin/tdmacfg"

# Module suffix: ".o" for 2.4 kernels, ".ko" for later versions
MODULE_EXT=".ko"



# RT-NIC driver
RT_DRIVER="rt_eepro100"
RT_DRIVER_OPTIONS="cards=1,0,0,0"

# IP address and netmask of this station
#   The TDMA_CONFIG file overrides these parameters for masters and backup
#   masters. Leave blank if you do not use IP addresses or if this station is
#   intended to retrieve its IP from the master based on its MAC address.
IPADDR="192.168.2.1"
NETMASK="255.255.255.0"

# Start realtime loopback device ("yes" or "no")
RT_LOOPBACK="yes"

# Use the following RTnet protocol drivers
RT_PROTOCOLS="udp packet"

# Start capturing interface ("yes" or "no")
RTCAP="no"



# Common RTcfg stage 2 config data (master mode only)
#   The TDMA_CONFIG file overrides this parameter.
STAGE_2_SRC=""

# Stage 2 config data destination file (slave mode only)
STAGE_2_DST=""

# Command to be executed after stage 2 phase (slave mode only)
STAGE_2_CMDS=""



# TDMA mode of the station ("master" or "slave")
#   Start backup masters in slave mode, it will then be switched to master
#   mode automatically during startup.
#TDMA_MODE="master"
TDMA_MODE="slave"


# Master parameters

# Simple setup: List of TDMA slaves
#TDMA_SLAVES="192.168.2.2"
TDMA_SLAVES=""

# Simple setup: Cycle time in microsecond
TDMA_CYCLE="5000"

# Simple setup: Offset in microsecond between TDMA slots
TDMA_OFFSET="200"

# Advanced setup: Config file containing all TDMA station parameters
#   To use this mode, uncomment the following line and disable the
#   three master parameters above (SLAVES, CYCLE, and OFFSET).
#TDMA_CONFIG="${prefix}/etc/tdma.conf"

root@xcep:~# cat /usr/local/rtnet/etc/rtnet.conf 
# This file is usually located in <PREFIX>/etc/rtnet.conf
# Please adapt it to your system.
# This configuration file is used with the rtnet script.

# RTnet installation path
prefix="/usr/local/rtnet"
exec_prefix="${prefix}"
RTNET_MOD="${exec_prefix}/modules"
RTIFCONFIG="${exec_prefix}/sbin/rtifconfig"
RTCFG="${exec_prefix}/sbin/rtcfg"
TDMACFG="${exec_prefix}/sbin/tdmacfg"

# Module suffix: ".o" for 2.4 kernels, ".ko" for later versions
MODULE_EXT=".ko"



# RT-NIC driver
RT_DRIVER="rt_smc91111"
RT_DRIVER_OPTIONS=""

# IP address and netmask of this station
#   The TDMA_CONFIG file overrides these parameters for masters and backup
#   masters. Leave blank if you do not use IP addresses or if this station is
#   intended to retrieve its IP from the master based on its MAC address.
#IPADDR="127.0.0.2"
IPADDR="192.168.2.2"
NETMASK="255.255.255.0"

# Start realtime loopback device ("yes" or "no")
RT_LOOPBACK="yes"

# Use the following RTnet protocol drivers
RT_PROTOCOLS="udp packet"

# Start capturing interface ("yes" or "no")
RTCAP="no"



# Common RTcfg stage 2 config data (master mode only)
#   The TDMA_CONFIG file overrides this parameter.
STAGE_2_SRC=""

# Stage 2 config data destination file (slave mode only)
STAGE_2_DST=""

# Command to be executed after stage 2 phase (slave mode only)
STAGE_2_CMDS=""



# TDMA mode of the station ("master" or "slave")
#   Start backup masters in slave mode, it will then be switched to master
#   mode automatically during startup.
TDMA_MODE="master"
#TDMA_MODE="slave"


# Master parameters

# Simple setup: List of TDMA slaves
#TDMA_SLAVES="127.0.0.1"
TDMA_SLAVES="192.168.2.1"

# Simple setup: Cycle time in microsecond
TDMA_CYCLE="5000"

# Simple setup: Offset in microsecond between TDMA slots
TDMA_OFFSET="200"

# Advanced setup: Config file containing all TDMA station parameters
#   To use this mode, uncomment the following line and disable the
#   three master parameters above (SLAVES, CYCLE, and OFFSET).
#TDMA_CONFIG="${prefix}/etc/tdma.conf"

workshop@workshop-Compaq-EVO:~$ sudo sh -x /usr/local/rtnet/sbin/rtnet stop
+ prefix=/usr/local/rtnet
+ RTNETCFG=/usr/local/rtnet/etc/rtnet.conf
+ [ stop = -cf ]
+ [ -r /usr/local/rtnet/etc/rtnet.conf ]
+ . /usr/local/rtnet/etc/rtnet.conf
+ prefix=/usr/local/rtnet
+ exec_prefix=/usr/local/rtnet
+ RTNET_MOD=/usr/local/rtnet/modules
+ RTIFCONFIG=/usr/local/rtnet/sbin/rtifconfig
+ RTCFG=/usr/local/rtnet/sbin/rtcfg
+ TDMACFG=/usr/local/rtnet/sbin/tdmacfg
+ MODULE_EXT=.ko
+ RT_DRIVER=rt_eepro100
+ RT_DRIVER_OPTIONS=cards=1,0,0,0
+ IPADDR=192.168.2.1
+ NETMASK=255.255.255.0
+ RT_LOOPBACK=yes
+ RT_PROTOCOLS=udp packet
+ RTCAP=no
+ STAGE_2_SRC=
+ STAGE_2_DST=
+ STAGE_2_CMDS=
+ TDMA_MODE=slave
+ TDMA_SLAVES=
+ TDMA_CYCLE=5000
+ TDMA_OFFSET=200
+ [ stop = -v ]
+ [ stop = -c ]
+ NETMASK_OPT=
+ [ ! 255.255.255.0 =  ]
+ NETMASK_OPT=netmask 255.255.255.0
+ ifconfig vnic0 down
+ ifconfig rteth0 down
+ ifconfig rteth0-mac down
+ ifconfig rtlo down
+ /usr/local/rtnet/sbin/rtifconfig rteth0 down
+ /usr/local/rtnet/sbin/rtifconfig rtlo down
+ rmmod tdma rtmac rtcfg rtcap rt_loopback rt_eepro100 rtpacket rtudp rttcp 
rtipv4 rtnet
workshop@workshop-Compaq-EVO:~$ sudo sh -x /usr/local/rtnet/sbin/rtnet start
+ prefix=/usr/local/rtnet
+ RTNETCFG=/usr/local/rtnet/etc/rtnet.conf
+ [ start = -cf ]
+ [ -r /usr/local/rtnet/etc/rtnet.conf ]
+ . /usr/local/rtnet/etc/rtnet.conf
+ prefix=/usr/local/rtnet
+ exec_prefix=/usr/local/rtnet
+ RTNET_MOD=/usr/local/rtnet/modules
+ RTIFCONFIG=/usr/local/rtnet/sbin/rtifconfig
+ RTCFG=/usr/local/rtnet/sbin/rtcfg
+ TDMACFG=/usr/local/rtnet/sbin/tdmacfg
+ MODULE_EXT=.ko
+ RT_DRIVER=rt_eepro100
+ RT_DRIVER_OPTIONS=cards=1,0,0,0
+ IPADDR=192.168.2.1
+ NETMASK=255.255.255.0
+ RT_LOOPBACK=yes
+ RT_PROTOCOLS=udp packet
+ RTCAP=no
+ STAGE_2_SRC=
+ STAGE_2_DST=
+ STAGE_2_CMDS=
+ TDMA_MODE=slave
+ TDMA_SLAVES=
+ TDMA_CYCLE=5000
+ TDMA_OFFSET=200
+ [ start = -v ]
+ [ start = -c ]
+ NETMASK_OPT=
+ [ ! 255.255.255.0 =  ]
+ NETMASK_OPT=netmask 255.255.255.0
+ init_rtnet
+ insmod /usr/local/rtnet/modules/rtnet.ko
+ insmod /usr/local/rtnet/modules/rtipv4.ko
+ insmod /usr/local/rtnet/modules/rt_eepro100.ko cards=1,0,0,0
+ insmod /usr/local/rtnet/modules/rtudp.ko
+ insmod /usr/local/rtnet/modules/rtpacket.ko
+ [ yes = yes ]
+ insmod /usr/local/rtnet/modules/rt_loopback.ko
+ [ no = yes ]
+ [ yes = yes ]
+ /usr/local/rtnet/sbin/rtifconfig rtlo up 127.0.0.1
+ [ no = yes ]
+ insmod /usr/local/rtnet/modules/rtcfg.ko
+ insmod /usr/local/rtnet/modules/rtmac.ko
+ insmod /usr/local/rtnet/modules/tdma.ko
+ [ slave = master ]
+ /usr/local/rtnet/sbin/tdmacfg rteth0 slave
+ /usr/local/rtnet/sbin/rtifconfig rteth0 up 192.168.2.1 netmask 255.255.255.0
+ echo -n Stage 1: searching for master...
Stage 1: searching for master...+ /usr/local/rtnet/sbin/rtcfg rteth0 client -c

root@xcep:~# sh -x /usr/local/rtnet/sbin/rtnet start
+ prefix=/usr/local/rtnet
+ RTNETCFG=/usr/local/rtnet/etc/rtnet.conf
+ '[' start = -cf ']'
+ '[' -r /usr/local/rtnet/etc/rtnet.conf ']'
+ . /usr/local/rtnet/etc/rtnet.conf
++ prefix=/usr/local/rtnet
++ exec_prefix=/usr/local/rtnet
++ RTNET_MOD=/usr/local/rtnet/modules
++ RTIFCONFIG=/usr/local/rtnet/sbin/rtifconfig
++ RTCFG=/usr/local/rtnet/sbin/rtcfg
++ TDMACFG=/usr/local/rtnet/sbin/tdmacfg
++ MODULE_EXT=.ko
++ RT_DRIVER=rt_smc91111
++ RT_DRIVER_OPTIONS=
++ IPADDR=192.168.2.2
++ NETMASK=255.255.255.0
++ RT_LOOPBACK=yes
++ RT_PROTOCOLS=udp packet
++ RTCAP=no
++ STAGE_2_SRC=
++ STAGE_2_DST=
++ STAGE_2_CMDS=
++ TDMA_MODE=master
++ TDMA_SLAVES=192.168.2.1
++ TDMA_CYCLE=5000
++ TDMA_OFFSET=200
+ '[' start = -v ']'
+ '[' start = -c ']'
+ NETMASK_OPT=
+ '[' '!' 255.255.255.0 = '' ']'
+ NETMASK_OPT=netmask 255.255.255.0
+ init_rtnet
+ insmod /usr/local/rtnet/modules/rtnet.ko
[78178.555360] 
[78178.555393] *** RTnet 0.9.12 - built on Sep 20 2011 13:34:58 ***
[78178.555411] 
[78178.564632] RTnet: initialising real-time networking
+ insmod /usr/local/rtnet/modules/rtipv4.ko
+ insmod /usr/local/rtnet/modules/rt_smc91111.ko
[78178.951049] smc91x.c: v1.1-RTnet-2.6.37.6, sep 16 2011 by Hinko Kocevar 
<[email protected]>
[78178.970407] RTnet: registered rteth0
[78178.974177] rteth0: SMC91C11xFD (build ) (rev 2) at c4b98300 IRQ 8 DMA 8 
[nowait]
[78178.981746] rteth0: Ethernet addr: 00:d0:50:31:11:87
+ insmod /usr/local/rtnet/modules/rtudp.ko
+ insmod /usr/local/rtnet/modules/rtpacket.ko
+ '[' yes = yes ']'
+ insmod /usr/local/rtnet/modules/rt_loopback.ko
[78179.254516] initializing loopback...
[78179.259332] RTnet: registered rtlo
+ '[' no = yes ']'
+ '[' yes = yes ']'
+ /usr/local/rtnet/sbin/rtifconfig rtlo up 127.0.0.1
+ '[' no = yes ']'
+ insmod /usr/local/rtnet/modules/rtcfg.ko
[78179.527598] RTcfg: init real-time configuration distribution protocol
+ insmod /usr/local/rtnet/modules/rtmac.ko
[78179.713165] RTmac: init realtime media access control
+ insmod /usr/local/rtnet/modules/tdma.ko
[78179.891353] RTmac/TDMA: init time division multiple access control mechanism
+ '[' master = master ']'
+ start_master
+ /usr/local/rtnet/sbin/rtcfg rteth0 server
[78179.929821] RTcfg: rtcfg_do_main_event() rtdev=1, event=RTCFG_CMD_SERVER, 
state=RTCFG_MAIN_OFF
[78179.938518] RTcfg: next main state=RTCFG_MAIN_SERVER_RUNNING 
+ STAGE_2_OPT=
+ '[' '!' '' = '' ']'
+ '[' '!' 192.168.2.1 = '' ']'
+ /usr/local/rtnet/sbin/rtifconfig rteth0 up 192.168.2.2 netmask 255.255.255.0
+ /usr/local/rtnet/sbin/tdmacfg rteth0 master 5000
+ /usr/local/rtnet/sbin/tdmacfg rteth0 slot 0 0
+ OFFSET=200
+ echo '$TDMACFG rteth0 slot 0 200;ifconfig vnic0 up $IPADDR $NETMASK_OPT'
+ /usr/local/rtnet/sbin/rtcfg rteth0 add 192.168.2.1 -stage1 -
[78180.162184] RTcfg: rtcfg_do_main_event() rtdev=1, event=RTCFG_CMD_ADD, 
state=RTCFG_MAIN_SERVER_RUNNING
+ OFFSET=400
+ ifconfig vnic0 up 192.168.2.2 netmask 255.255.255.0
+ echo -n 'Waiting for all slaves...'
Waiting for all slaves...+ /usr/local/rtnet/sbin/rtcfg rteth0 wait
[78180.227141] RTcfg: rtcfg_do_main_event() rtdev=1, event=RTCFG_CMD_WAIT, 
state=RTCFG_MAIN_SERVER_RUNNING

^C

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
RTnet-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-developers

Reply via email to