Click to See Complete Forum and Search --> : Port address used by modem?


registering
06-02-2003, 10:44 PM
Hi all,
I have a really basic question. I am new to
socket programming. I have a C program that
can talk to my modem via a serial port connection to "/dev/ttyS0". This just uses a
simple file descriptor and read/write.
However I'd like to be able to speak to any
IP address, not hardcoding "/dev/ttyS0".
Since I don't know how to test this, can I use
an IP address for my modem, rather than
"/dev/ttyS0"?
I know I could use 127.0.0.1, but what port
number would my modem be on? I don't know how to test this, or if I'm even asking a valid question.
Thanks for any help. I know I've got a lot to
learn about sockets programming.
Josh

nowonmai
06-03-2003, 06:25 AM
not really.. individual devices don't have IP addresses, nor can they be accessed through ports on localhost.

you don't have to hardcode /dev/ttyS0, though... put it in a configuration file instead