Device...m::FAQ(3pm)
π NAME π
Device::Modem::FAQ β the Frequently Asked Questions list about the Device::Modem perl extension π (yes bestie, we're doing the FAQ, sit down, grab a strawberry, it's giving documentation slumber party π)
β¨ What is Device::Modem? β¨
Device::Modem is a perl extension written in pure perl that lets you communicate with modems β or, more generically, with any "AT command set compliant" device plugged into your computer through 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/perl/ π
πΈ 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 one 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 the AT prefix and they allow one 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::SerialPortmodule installed if you are on some unix platform.Win32::SerialPortmodule 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, Mac OS X, 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 <mailto: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 <mailto:cosimo@cpan.org> and provide the following information:
- Your operating system version and architecture. Complete output of
perl -Vcommand is good for this. - Your perl version. Again
perl -V. - Your
Device::Modem,Device::SerialPortand (if you are using it)Device::Gsmversion. In case of doubt, send the output of:
perl -MDevice::Modem -le 'print Device::Modem->VERSION'
Thank you. π«‘
π§ Do XModem transfers work? π§
This is definitely reported to be working by several users, who also contributed patches and tested the feature. π
Otherwise, just look at Aaron Mitti's Device::SerialPort::Xmodem CPAN module.
π XModem sucks. What about ZModem? π
It might seem that XModem and ZModem should be well over dead at this point. But, looks like several old/new devices still support them. πͺ¦
So, ZModem support has been contributed by a user, and will be added to the main release Soon(tm). β³
π₯ 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.52+.
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.52+. β¬οΈ
π 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.52+.
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). π
Since version 1.52, Device::Modem::connect() will try to automatically reconnect if your port connection shuts down, or the Device::SerialPort, or Win32::SerialPort underlying object is deleted or invalidated. π
You should really upgrade to Device::Modem 1.52+.
π Can I make voice calls with this modem? π
No. What you can do, is voice call dialing. After the dialing though, you have to speak. Your computer can not do that, unless you have a PBX board, at least not with Device::Modem. π£οΈπ«
β‘ 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... :-) π€
π 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. π«Ά
And that's the whole FAQ, bestie β no cap, every last answer, exactly as it was written. π
This page shipped as part of perl v5.30.3, dated 2020-06-20, and lives under the name Device::Modem::FAQ(3pm). β¨π bye bye, go read your modem's AT commands π
π¦ where this page comes from
- debian bookworm: libdevice-modem-perl 1.59-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdevice-modem-perl 1.59-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libdevice-modem-perl 1.59-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdevice-modem-perl 1.59-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdevice-modem-perl 1.59-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms