
[images/mobile.gif] [images/smslink.gif]

-------------------------------------------------------------------------------


General                 SMSLink Server Installation Procedure
Introduction
Platforms
Supported_Hardware      1./ Connect the hardware.
Package_Content
                        Assemble and connect the GSM module (power, serial and
                        aerial). Test connectivity with Minicom (or any other
Installation            serial communication program you feel comfortable
Download                with): the parameters are 9600, N, 8, 1. Type AT<cr>,
Server_Install          you should get "OK" in return.
Client_Install          Please note: In order for this to work (as well as the
Gateway_Install         rest of this install procedure), your kernel should be
                        compiled with serial support (CONFIG_SERIAL -- most
                        pre-compiled kernels are). If serial support was
Tech Info               compiled as a module, that module should be loaded.
Changelog               Then test the SIM card recognition and GSM network
FAQ                     connectivity:
Drivers                 AT+CPIN?
Related_Links           SIM PIN
                        AT+CPIN=1234
                        OK
[Jump_to_Vim_Home_Page] AT+CPIN?
                        READY
                        AT+CREG?
                        CREG: 0,1
                        This short dialog provided the SIM card with the PIN
                        code it requested, then verified that the module did
                        attach to the GSM network. For further details on those
                        commands (and the SMS-related AT+ command set in
                        general), see your module handbook or the "GSM Modules
                        Tech Info" section on the Related_Links page.

                        2./ Install libmodem.

                        Either grab libmodem-1.5 or higher (you can get it here
                        or there)
                        - or -
                        grab version 1.0.0 of the package from its official
                        location or from here and apply the provided patch.
                        Untar the source package and then patch it with
                        Angelo's SMS patch and mine (combined in the file
                        libmodem-1.0.0.pha.patch located here in the varia/
                        patch/ directory).
                        Then, whatever the version, proceed to install it as
                        mentionned in this package documentation.

                        3./ Tailor libmodem configuration file.

                        Normally called /etc/modems by default, you should
                        create a line there for each serial line(s) you'll
                        connect the GSM module(s) to. I suggest creating a
                        symlink from the original /dev/cua? device (/dev/ttyS?
                        recommended if you're on Linux kernel 2.2.x or higher)
                        to /dev/gsm (or /dev/gsm? if you plan to connect more
                        then one).
                        The location of the file is controlled by the MDMFILE
                        define, located in dial/modems.h.in, and a template
                        modems file can be found in the etc directory (relative
                        to the base of the libmodem package tree). As an
                        example, here are lines that work for me:
                        gsm0:AT::+++:30:9600:CONNECT:D:::Z:H0:0
                        gsm1:AT::+++:30:9600:CONNECT:D:::Z:H0:0

                        4./ Untar and compile SMSLink.

                        Untar this distribution package (for instance under /
                        usr/src), change directory to smslink-<version>/server,
                        modify the first part of the Makefile to accomodate
                        your platform, then type make. Depending on the
                        platform, a few warnings might be issued during the
                        compile phase, but those can be safely ignored.
                        When compiled successfully, type make install as root.
                        Note that this will install both sms_serv(1) and
                        sms2mailgw(1) (as well as all related man pages). You
                        can choose to compile only the server module by typing
                        make sms_serv, but there is no separate install
                        instructions.

                        5./ Include SMS in the known services.

                        Edit your /etc/services file, and add the following
                        line:
                        sms 6701/tcp # SMS Link Server

                        6./ Copy the "driver database" to /etc.

                        In order for the server program to be able to work with
                        different brands of GSM modules, some primitive form of
                        driver is now provided. The default file is found in
                        the server/ directory, and is called gsmcaps. If this
                        is a first install, or you didn't tinker with the
                        previous version of this file, just copy this file to /
                        etc. If you're using a modified version of the file,
                        please review the diffs and integrate them manually.
                        This file will NOT be installed automatically by the
                        make install procedure, in order to avoid overwriting
                        any customization of yours.
                        Should you indeed have had to customize this file,
                        please keep me posted so that I can distribute your
                        changes with the next release.

                        7./ Tailor the config file to your needs.

                        The config file, by default, is called /etc/gsmdevices.
                        It contains, among others, the PIN code, PUK code, and
                        caller ID of the installed SIM card. You'll obviously
                        need to change those to match your own SIM. A template
                        file is located in this directory, but it will NOT be
                        copied in place by the installation process (to avoid
                        overwriting the existing config when upgrading).
                        WARNING: The format of this file changed between
                        version 0.44b and version 0.46b of the server module,
                        and again between version 0.46b and version 0.48b.
                        Please refer to gsmdevices(5) or the header of the
                        example gsmdevices file provided in the server/ source
                        directory for more details on the file format.

                        8./ Implement access control (optional).

                        Create a file called (by default) /etc/gsmaccess. It
                        will contain a list of the IP addresses of the networks
                        or machines that are allowed to connect to the server.
                        In this file, lines beginning with a '#' are treated as
                        comments. Blank lines are ignored. In case the file is
                        not present, no access control will be implemented. The
                        install process DOES NOT copy the template to /etc by
                        default meaning no access control is put in place
                        unless you copy it yourself.
                        Access control, when enabled, defaults to deny.
                        Anything not specifically allowed is denied. So make
                        sure that the /etc/gsmaccess file is not left empty and
                        that each entry follows the stated format (invalid
                        entries are ignored). See gsmaccess(5) for format
                        details and examples.

                        9./ Create the inbox directory.

                        Create a directory called smslink under /var/spool (see
                        the define called MBOX_FILE in sms_serv.h) and make
                        sure the rights and ownership are consistent with the
                        user the server will run as and the other external
                        applications that will have to access it (root:root,
                        0750, for instance).

                        10./ Arrange for the service to be started at boot
                        time.

                        Edit your init scripts to have the service started at
                        boot time. Normally, it requires root capabilities to
                        successfully start the service, as only root can access
                        the GSM device by default. This is not a problem since
                        it will most likely be started by init. You might
                        consider it even safer to create a special group, grant
                        this group rw access to the serial device the GSM
                        module is attached to, and then setgid the binary to
                        this group.

                        11./ Test your installation.

                        Now that the server is installed, configured and
                        started, try to connect to it. The easiest way is to
                        telnet to it (with a telnet client supporting "line
                        mode" - Linux is perfect). Type :
                        telnet my_server 6701
                        You should be greeted with the SMS> prompt. Reproduce a
                        session similar to the following:
                        SMS> set dest = 12345 (your mobile phone number)
                        Ok
                        SMS> set user = "yourself"
                        Ok
                        SMS> set msg = "Hello GSM World!"
                        Ok
                        SMS> send
                        Now sit back and watch...
                        That's all, Folks...

-------------------------------------------------------------------------------

Last Modified: December 30th, 2000. [SourceForge_Logo]
     philipa@tiscalinet.be

