in reply to Device::Modem - When would "connect" be successful and "is_active" fail?

When in doubt, use the source:

# instances (Device|Win32)::SerialPort object and initializes communic +ations sub connect { ... # Connect on serial (use different mod for win32) if( $me->ostype eq 'windoze' ) { $me->port( new Win32::SerialPort($me->{'port'}) ); } else { $me->port( new Device::SerialPort($me->{'port'}) ); } ... # Get the modems attention # Send multiple reset commands looking for a sensible response. # A small number of modems need time to settle down and start resp +onding to the serial port ... my $init_response = $me->send_init_string($init_string) || ''; ... $me-> log -> write('info', 'Ok connected' ); $me-> {'CONNECTED'} = 1; }
So connect creates a (Win32|Device)::SerialPort for the Device::Modem, and connects to and initializes it.
sub is_active { ... # Modem is active if already connected to a line if( $self->flag('CARRIER') ) { $self->log->write('info', 'carrier is '.$self->flag('CARRIER') +.', modem is connected, it should be active'); $lOk = 1; } else { ... # If DSR signal is on, modem is active my %sig = $self->status(); $lOk = $sig{DSR}; undef %sig; # If we have no success, try to reset if( ! $lOk ) { $self->log->write('warning', 'modem not responding... tryi +ng to reset'); $lOk = $self->reset(); } } $self->log->write('info', 'modem reset result = '.$lOk); return $lOk; }
And is_active checks for a line connection or DSR signal, and performs a reset if no DSR.

connect would succeed and is_active would fail when the modem can be initialized (occurs on the TxD/RxD lines) but the SerialPort does not see a DSR signal (DSR line). This could be caused by an unlikely failure of the modem hardware, or much more easily by a bad or incorrectly wired modem cable.