Subject: | $gsm->manufacturer() do not properly work for Motorola phone |
$gsm->manufacturer() returns empty value for my motorola phone.
This is caused because $gsm->test_command do not properly work
for +CGMI command:
Motorola return ERROR, when I trying to send AT+CGMI=?
command, meanwhile AT+CGMI works well.
So the manufacturer function should be something like this:
sub manufacturer() {
my $self = shift;
my($ok, $man);
$self->atsend( 'AT+CGMI' . Device::Modem::CR );
($ok, $man) =
$self->parse_answer($Device::Modem::STD_RESPONSE);
return undef if $ok ne 'OK';
if ($man =~ /\+CGMI\:\ \"(.*)\"/s ) # Parse result of motorolla
phones: +CGMI: "Motorola CE, Copyright 2004"
{
$man = $1;
}
$self->log->write('info', 'manufacturer of this device appears
to be ['.$man.']');
return $man || $ok
}
Niolay Shaplov.