Hi folks.
Im doing a really weird program and i need to use Device::Modem::Gsm, to read the imei and make a ln on /dev.
Ok, the problem is, i need to pass this to the constructor, but i dont wanna to hardcode every modem i want to have, i want to read a dir, parse the modems and try to connect to this modems.
use Device::Gsm;
my $gsm = new Device::Gsm( port => '/dev/ttyS1', pin => 'xxxx' );
if( $gsm->connect() ) {
print "connected!\n";
} else {
print "sorry, no connection with gsm phone on serial port!\n";
}
Where it says '/dev/ttyS1' i need to put a $variable, but it doesnt read the variable, :(
Any workaround or i should mess with the AT commands ?
thanks!