From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4FFBF197.4050203@xenomai.org> Date: Tue, 10 Jul 2012 11:10:47 +0200 From: Philippe Gerum MIME-Version: 1.0 References: <4FFBEA93.5070202@xenomai.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] XDDP and inter-driver API. List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sunetra Sashi Cc: xenomai@xenomai.org On 07/10/2012 11:03 AM, Sunetra Sashi wrote: > > > On Tue, Jul 10, 2012 at 4:40 AM, Philippe Gerum > wrote: > > On 07/10/2012 04:30 AM, Sunetra Sashi wrote: > > Hi, > > I am trying to use the XDDP module in order to achieve > linux-xenomai domain > cross communication. However, when I install my module which > creates a > socket and binds its to the XDDP port, via the > *rtdm_socket(AF_RTIPC, > SOCK_DGRAM, IPCPROTO_XDDP)* call, it fails. Also, when I try to > open the > device on the linux side, via an *rtdm_open("/dev/rtp0", > O_RDWR)*, it also > fails. > > > Please report issues with all details, typically error codes and > return values. "call fails" is not enough. > > > rtdm_socket call fails with error code 97. The rtdm_open fails with > error code 19. > > > Although using rtdm_open() for /dev/rtp0 may work, this Actually, no it won't. What would work is opening a RTDM device via the wrapped open() call routed to the Xenomai system, which is the converse way. > pseudo-device file should be opened using a plain open(2) call, > since we want to open the regular linux-side endpoint for the > communication. > > > I am making these calls from within the kernel, not from user space. > Hence I ended up using rtdm calls instead /dev/rtp0 is a non-real-time user-space endpoint for the communication, between a regular linux application and a real-time component. It does not make sense to open it from kernel space. > > > > Do I need to install any specific xenomai modules for this to work? > > > Obviously, yes. Check IPC drivers in the "Drivers" sub-menu of the > Xenomai configuration. You need to have > CONFIG_XENO_DRIVERS_RTIPC_XDDP enabled. > > > I already checked this in the configuration, It is enabled. Should this > also be set to y? CONFIG_XENO_DRIVERS_RTIPC. In my configuration it is > set to m. Did you load the xeno_rtipc module then? > Should I see any modules loaded in /proc/xenomai/rtdm/protocol_devices? Yes. > > > > Thanks > Shweta > _________________________________________________ > Xenomai mailing list > Xenomai@xenomai.org > http://www.xenomai.org/__mailman/listinfo/xenomai > > > > > -- > Philippe. > > > -- Philippe.