Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Win32::SerialPort server side

by splinky (Hermit)
on Oct 04, 2005 at 14:43 UTC ( #497266=note: print w/replies, xml ) Need Help??

in reply to Win32::SerialPort server side

If I understand your question, you're saying that you have a Windows machine with a modem, and you want to write a program that will interface with the modem on that machine, and when someone dials into the modem, you want your Perl program to initiate a TCP connection to something else and bridge all input and output between the two. Right?

If I got that part right, then I have to assume that you haven't done a lot of socket programming, and you're not sure how to handle listen to two things at once (the modem and the socket) so that you can effectively pass the data back and forth.

If I guessed all that stuff right, then I think the answer you're looking for is in the modules IO::Select and IO::Socket. However, I know there used to be some problems with sockets under Windows, so check on that first. Also, you can check the fine tutorial Reading from more than one socket at once

Replies are listed 'Best First'.
Re^2: Win32::SerialPort server side
by didier (Vicar) on Oct 04, 2005 at 15:25 UTC

    I guess my English is worst than I was thinking ;)

    I have two Win32 machines, each with a modem.
    The first one should dial the phone number of the second machine.
    I know how to use the Win32::Serialport to do that, and I know how to exchange data through a normal phone when you know the protocole at server side.

    I just need to know how the second machine can listen at the serial port and get the line if called.

    This is not "socket programmming". But handle socket and the modem at the same time has been done here before, see

    Anyway, thank for your time splinky

Re^2: Win32::SerialPort server side
by didier (Vicar) on Oct 04, 2005 at 15:29 UTC

    It seeems that the Telephony API of microsoft (TAPI) allows to listen at the serial port and thus take the line on call.
    But that TAPI is a mess of undocumented functions.
    Nobody had tried that before, using Win32::API call?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://497266]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2018-05-22 10:38 GMT
Find Nodes?
    Voting Booth?