INSTALL
上传用户:eo_sii
上传日期:2007-01-05
资源大小:91k
文件大小:5k
- [../images/smslink.gif] [../images/mobile.gif]
- -------------------------------------------------------------------------------
- SMSLink Server Installation Procedure
- 1./ Connect the hardware.
- Assemble and connect the GSM module (power, serial and aerial). Test
- connectivity with Minicom (or any other serial communication program you feel
- comfortable with): the parameters are 9600, N, 8, 1. Type AT<cr>, you should
- get "OK" in return.
- Then test the SIM card recognition and GSM network connectivity:
- AT+CPIN?
- SIM PIN
- AT+CPIN=1234
- OK
- AT+CPIN?
- READY
- AT+CREG?
- CREG: 0,1
- For more on those commands, see the module handbook.
- 2./ Grab, patch, and install libmodem-1.0.0.
- Grab version 1.0.0 of the package from its official location or from here.
- Untar it and first patch it with Angelo's SMS patch and mine (combined in the
- file libmodem-1.0.0.pha.patch provided here in the varia/patch/ directory).
- Then 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 the
- serial line you'll connect the GSM module to. I suggest creating a symlink from
- the original /dev/cua? (/dev/ttyS? recommended if you're on Linux 2.2.x) device
- 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/server, modify the first part of the Makefile to accomodate your
- platform, then type make. 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./ 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).
- 7./ Implement access control (optional).
- Create a file called (by default) /etc/gsmaccess. It will contain a list of the
- IP addresses of the 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.
- 8./ 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).
- 9./ 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.
- 10./ 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: March 13th, 2000. [http://lines0.uwic.ac.uk/cgi-bin/
- philippe_andersson@ste.scitex.com Count.cgi?dd=B|frgb=100;100;100|df=smslink.dat]