> Hi there,
>
> I try to access the /def/rtf??'s via the network (wireless) using nfs
> (standart settings) this seems not to work. :(, means I can't open the
> device.
>
> Is this possible at all, and if so how??? since I need to write to the
> remote rtfs as well someting like netcat isn't enough
>
Hi !
you can't access a device file via nfs mount, atleast I can't imagin that
would be posible...corect me if thats wrong. But to remotly access rtf's you
don't need any highlevel servicess like nfs, it's enough to use netcat ither
directly if you are on a "trusted" network or via ssh if you are on a "normal"
network.
redirecting rtf's with netcat simple examples:
version 1)
the rtlinux boxB sends the data through a local filter and puts it on the
network then , a second box boxA which is running non-rt-linux or rtlinux.
boxA does:
nc -l -p 54321 | cat -
boxB does:
cd /usr/src/rtlinux-3.0/examples/measurements/
insmod rtl
insmod rtl_time
insmod rtl_sched
insmod rtl_posixio
insmod rtl_fifo
insmod rt_process.o
./monitor | nc -w 5 boxA 54321
boxA is launched first and will wait until data comes in from boxB. and if you
kill (CNTRL C) the process on boxA then boxB will terminat after 5 seconds
(-w 5) . The 54321 in the examples are the ports being used.
version 2)
now if you don't want to have the output from monitor but rather
the output from the /dev/rtfN and run it to your local program
as you wrote then you need to shift things a bit, and to make things
complicated we have three processes involved now.
And befor you can write to the local /dev/rtf0 on boxA that your app then
reads from one needs to modify it a bit , since its a char-device and you
cant write to it via netcat and read from it at the same time. The solution
is to make a pipe with the same name on the non-rtlinux or rtlinux box
thats reading the data from the network.
boxA on terminal 1 does:
rm /dev/rtf0
mknod /dev/rtf0 p (now /dev/rtf0 is a pipe on boxA not a rtfifo !)
nc -l -p 54321 | cat - > /dev/rtf0
boxA on terminal 2 does:
./monitor (which is the same as above reading from /dev/rtf0 again ,
also note that a read from a pipe can be launched even if
there is nothing writing to the other side , so you will
never see a "can't open /dev/rtf0" if its a pipe)
boxB does:
insmod rtl
insmod rtl_time
insmod rtl_sched
insmod rtl_posixio
insmod rtl_fifo
insmod rt_process.o
cat /dev/rtf0 | nc -w 5 boxA 54321
This way the /dev/rtf0 from the rtlinux boxB is now available on boxA which
can run a non-rt-linux or rtlinux but still use the unmodified user apps
that you compiled on the rtlinux box .
make shure version 1 works and then it should be easy to use it in version 2.
netcat is to be found on most distributions , if you don't have it grap it of
the web , if you don't know a site that has it then try:
ftp://gd.tuwien.ac.at/pub/linux/redhat.com/contrib/libc6/i386/netcat-*.rpm
hofrat
*------------------------------------------------------------------------*
*THERE {__} FSMLabs *
*IS oo ) The RTLinux Company *
*LIFE O_ `_-------. Mc Guire Nicholas *
*IN (-. ,-\ *
*THE || )---< ) [EMAIL PROTECTED] *
*NET ! ||| | | 1privat: [EMAIL PROTECTED] *
* [EMAIL PROTECTED] *
*------------------------------------------------------------------------*
*ASCII-COW (C) 1996-2001 [EMAIL PROTECTED] *
*------------------------------------------------------------------------*
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/