On Wed, 15 Nov 2006, soniathakur3 wrote:
>
> Hi,
>
> I have TS7200 board, I need to send data to PC from the board after
> every 5 secs. This data is the data i collect from the external
> ADC.Now, i have ADC working ,but dont have any idea of how to display
> it on PC through ethernet port after every 5 secs.
>
> What all do i need to do?
Either write a cgi script in sh and use the web server or write a script
or program that outputs to stdout (someone else has pointed to the sleep
command, or use the sleep function in a program), then make the internet
server - inetd - serve that program when it gets a TCP connection on a
specific TCP port. inetd does all the network connection stuff for your
program script, and it connects the incoming TCP connection input to stdin
on the script/program and likewise connects the TCP output to stdout.
The configuration file inetd is /etc/inetd.conf - but after you make
changes to this you must either restart inetd or send it a HUP signal so
it re-initialises.
see
http://www.aquaphoenix.com/ref/gnu_c_library/libc_221.html
If you want a demo try doing a
telnet franjam.org.uk 10101
from a linux machine with internet access - or use putty from
windoze machine.
It will give 10 readings from 3 ports of an ADC, one reading every 5 secs.
It simply put an entry in inetd.conf to call my adc_logger program with
appropriate command line options.
cheers
Jim
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|