xenia27
asked on
Connecting a device...
Hi,
I try to write a program which will connect to a device through an IP address...and get the page data from the device and write it into a file. How can I connect a device through a given IP address?? Any suggestion? By the way, I'm using C to write the program in Red Hat 9...
Xenia
I try to write a program which will connect to a device through an IP address...and get the page data from the device and write it into a file. How can I connect a device through a given IP address?? Any suggestion? By the way, I'm using C to write the program in Red Hat 9...
Xenia
> How can I connect a device through a given IP address??
you first need a server/daemon/program running on the remote host listening on that IP. This program then can access the device and return what you want.
you first need a server/daemon/program running on the remote host listening on that IP. This program then can access the device and return what you want.
xenia27,
Can you tell us what exacly this device is?? Is it local....in that case what you are asking is to 'bind' the device interface to a particular IP address. In case the device is remote, ahoffman is correct.
Manav
Can you tell us what exacly this device is?? Is it local....in that case what you are asking is to 'bind' the device interface to a particular IP address. In case the device is remote, ahoffman is correct.
Manav
ASKER
This device is attached with computer...I mean connected through a network wire...not sure whether I use the correct word for it or not...anyway, I need to get some information from a machine through the network...I suppose it's a local...what's the different between connecting a remove machine and a local machine? How will the program be different???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have a look at this ->
http://www.paulgriffiths.net/program/c/echoclntsrc.html
might help you.
Cheers
Manav
http://www.paulgriffiths.net/program/c/echoclntsrc.html
might help you.
Cheers
Manav
ASKER
OK...I know this might not be in my question now...but I wonder how can I read data via RS232??? Is there any reference I can study?
Thanks for the information you provide...that's excellent~~ Thanks~
Thanks for the information you provide...that's excellent~~ Thanks~
ASKER
Does this code work in Linux?
Any other example???
Any other example???
It must. I havent tried coz I dont have a LINUX machine at my disposal here.
But LINUX supports berkeley sockets. Why dont you try it out??
Manav
But LINUX supports berkeley sockets. Why dont you try it out??
Manav
ASKER
OK...I'm working these codes now...thanks for helping~~~~
ASKER