Difference between revisions of "Xenomai RTNet"
Line 37: | Line 37: | ||
Xenomai provides a script make launching rtnet easier. This will load the appropriate modules and bring up the interface. | Xenomai provides a script make launching rtnet easier. This will load the appropriate modules and bring up the interface. | ||
<syntaxhighlight lang="console"> | <syntaxhighlight lang="console"> | ||
− | root@somimx6-xenomai:/ | + | root@somimx6-xenomai:~# rtnet -cf /etc/rtnet.conf start |
+ | [ 645.330848] initializing loopback... | ||
+ | [ 645.334487] RTnet: registered rtlo[ 645.355662] RTcfg: init real-time configuration distribution protocol | ||
+ | [ 645.375986] RTmac: init realtime media access control[ 645.400419] RTmac/TDMA: init time division multiple access control mechanism | ||
+ | [ 645.499423] rteth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1) | ||
+ | [ 645.551954] rteth0: tx link down!. | ||
... | ... | ||
[ 652.497075] rt_fec 2188000.ethernet (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control rx/tx | [ 652.497075] rt_fec 2188000.ethernet (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control rx/tx | ||
Line 44: | Line 49: | ||
{{mbox | type= | text='''Note:''' The rtnet start will wait for slaves to connect. Press ctrl+c if slaves are not connected. }} | {{mbox | type= | text='''Note:''' The rtnet start will wait for slaves to connect. Press ctrl+c if slaves are not connected. }} | ||
− | The rtnet helper script is configured with /etc/rtnet.conf which determines the IP address of the | + | The rtnet helper script is configured with /etc/rtnet.conf which determines the IP address of the interface and the slave devices. |
− | |||
<!-- /*********************************************************************************************************/ --> | <!-- /*********************************************************************************************************/ --> |
Revision as of 12:08, 7 March 2016
Contents
General Information
Xenomai uses the RTNet stack to provide real-time Ethernet. RTNet provides deterministic versions of various protocols (UDP/IP, IMCP, ARP). Xenomai provides several real-time Ethernet drivers, the stack, and various tools. This document explains how to load a real-time Ethernet driver and perform basic tests. The links below will help augment this information as well as discuss programming using the RTnet stack.
Xenomai RTNet
Loading a RTNet driver
As with the other real-time drivers, the Linux driver must be detached the interface before loading that real-time driver.
For example on IMX6 target the fec device must be unbound from the Linux driver and attached to the real-time driver.
root@somimx6-xenomai:~# echo 2188000.ethernet > /sys/bus/platform/drivers/fec/unbind
root@somimx6-xenomai:~# echo 2188000.ethernet > /sys/bus/platform/drivers/rt_fec/bind
[ 86.762295] libphy: fec_enet_mii_bus: probed
[ 86.766586] RTnet: registered rteth0
Note: The warning posted about the clock when unbinding the Linux fec driver can be ignored. |
Xenomai provides a script make launching rtnet easier. This will load the appropriate modules and bring up the interface.
root@somimx6-xenomai:~# rtnet -cf /etc/rtnet.conf start
[ 645.330848] initializing loopback...
[ 645.334487] RTnet: registered rtlo[ 645.355662] RTcfg: init real-time configuration distribution protocol
[ 645.375986] RTmac: init realtime media access control[ 645.400419] RTmac/TDMA: init time division multiple access control mechanism
[ 645.499423] rteth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)
[ 645.551954] rteth0: tx link down!.
...
[ 652.497075] rt_fec 2188000.ethernet (unnamed net_device) (uninitialized): Link is Up - 1Gbps/Full - flow control rx/tx
Note: The rtnet start will wait for slaves to connect. Press ctrl+c if slaves are not connected. |
The rtnet helper script is configured with /etc/rtnet.conf which determines the IP address of the interface and the slave devices.