- Device::Modem::FAQ

- What is `Device::Modem`?
- Who is the author of this work?
- BTW, what is Perl?
- What is an `AT command set`?
- What is a modem?
- What are the requisites of `Device::Modem`?
- Is it multi-platform?
- Can I use it for my commercial application?
- Why the [insert_you_preferred_feature_here] does not work?
- Why I keep getting ``can't open device: /dev/xxxxx at .../Modem.pm line 468'' errors ?
- Why I get the error ``Can't call method ''purge_all`` on an undefined value at .../Modem.pm line 545'' ?
- This module is pretty slow. What can I do?
- Can I make a [insert_your_preferred_number_here] euro donation to you for this fantastic module?
- I think you are a ?#!x$*z!#(!* and your software sucks

# Device::Modem::FAQ

This is a Frequently Asked Questions list about `Device::Modem` perl extension.

## What is `Device::Modem`?

`Device::Modem` is a perl extension written in pure perl that allows to communicate with modems, or generically with `AT command set compliant` devices connected to your computer via a serial port.

## Who is the author of this work?

Cosimo Streppone (cosimo@cpan.org), an italian guy who works and enjoys writing perl programs and objects. If you want to know more, go to http://www.streppone.it/cosimo/work/

## BTW, what is Perl?

If you are asking that, probably you are in the wrong place.

Perl is a wonderful programming language, that cuts development times, helps developer keep mental health, good life-style, doesn't pollute developer's mind, allows complete freedom of style, and (from perl manual), gives you enough rope to hang yourself.

Some starting points:

http://www.perl.com - Reference site for Perl programmers

http://www.perl.org - Perl Mongers home

http://cpan.perl.org - Comprehensive Perl Archive Network

http://www.perlmonks.org - Higher Perl souls

http://use.perl.org - Large Perl community

## What is an `AT command set`?

It is a set of standard commands, also called `Hayes`, in which (almost) all commands begin with `AT` prefix and they allow to control a modem, router, whatever device. Also cellular phones work with a subset of standard `AT` commands.

## What is a modem?

What the heck are you doing here? http://www.google.com/search?q=Tech+glossary+modem

## What are the requisites of `Device::Modem`?

You must have:

A working computer with a standard RS-232 serial port

An AT-compliant device (a modem will do perfectly here :-)

A working Perl installation

`Device::SerialPort` module installed if you are on some unix platform. `Win32::SerialPort` module installed if you are on Win32 platform.

## Is it multi-platform?

`Device::Modem` works close to the serial port communication layer, which varies on many platforms. It relies on `Device::SerialPort` and `Win32::SerialPort` modules for all low-level communication layer.

It tries to build a platform independent layer above these two low-level modules, so developers don't need to distinguish among different platforms.

It's been reported to work on `Win32`, `Linux`, `FreeBSD`, `NetBSD`, `OpenBSD`, `ARM-Linux` and `Solaris`.

## Can I use it for my commercial application?

Yes, it is allowed by its license, that is the same as Perl language. If you are using it in a commercial package, or plan to do so, please inform the author (Cosimo Streppone, cosimo@cpan.org). Thank you.

## Why the [insert_you_preferred_feature_here] does not work?

This is an open-source software developed in my little home spare time and for my personal interest and amusement. This module has a test suite, but it is not very extensive, so it is possible that some feature X does not work, or it is not implemented yet or I cannot test it.

If you are in this situation, please contact me and provide the following information:

Your operating system version and architecture. Complete output of `perl -V` command is good for this.

Your perl version. Again `perl -V`.

Your `Device::Modem`, `Device::SerialPort` and (if you are using it) `Device::Gsm` version. In case of doubt, send the output of:

            perl -MDevice::Modem -le 'print Device::Modem->VERSION'

Thank you.

## Why I keep getting ``can't open device: /dev/xxxxx at .../Modem.pm line 468'' errors ?

First of all, be sure to use Device::Modem version 1.35+. Probably you don't have the correct permissions to access your modem device (usually /dev/modem, or /dev/ttyS0 on unix and COM1/COM2/... on windows). Or you are trying to use the examples that come with Device::Modem distribution with an older version (Device::Modem <= 1.33). In this case, you should upgrade to Device::Modem 1.35+.

## Why I get the error ``Can't call method ''purge_all`` on an undefined value at .../Modem.pm line 545'' ?

Again, upgrade to Device::Modem version 1.35+. If you get this error, it means that the communication port could not be opened. Most probably you don't have permissions to access your serial port, or you have used a wrong device name (check your device entry in `/dev` folder). Maybe you are trying to use the examples that come with Device::Modem distribution with an older version (Device::Modem <= 1.33). In this case, you should upgrade to Device::Modem 1.35+.

## This module is pretty slow. What can I do?

Make sure you are using that latest version. From version 1.30, the main ``send-command'' / ``wait-answer'' cycle has been sensibly improved for speed, though you now have to specify a timeout if you want the module to wait an answer if modem is not ready.

Probably this is the better compromise...

## Can I make a [insert_your_preferred_number_here] euro donation to you for this fantastic module?

Oh, yes! Please feel free to contact cosimo@cpan.org to decide details about this... :-)

Or, if you have nothing wrong with that, go to my Amazon wishlist.

## I think you are a ?#!x$*z!#(!* and your software sucks

Uh.

Please contact me, so I can improve my software design, ideas and coding, but only if you explain the reasons of your criticism. Thank you.