?? install
字號:
[../images/smslink.gif] [../images/mobile.gif]-------------------------------------------------------------------------------SMSLink Server Installation Procedure1./ Connect the hardware.Assemble and connect the GSM module (power, serial and aerial). Testconnectivity with Minicom (or any other serial communication program you feelcomfortable with): the parameters are 9600, N, 8, 1. Type AT<cr>, you shouldget "OK" in return.Then test the SIM card recognition and GSM network connectivity:AT+CPIN?SIM PINAT+CPIN=1234OKAT+CPIN?READYAT+CREG?CREG: 0,1For 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 thefile 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 theserial line you'll connect the GSM module to. I suggest creating a symlink fromthe original /dev/cua? (/dev/ttyS? recommended if you're on Linux 2.2.x) deviceto /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 arelines that work for me:gsm0:AT::+++:30:9600:CONNECT:D:::Z:H0:0gsm1:AT::+++:30:9600:CONNECT:D:::Z:H0:04./ Untar and compile SMSLink.Untar this distribution package (for instance under /usr/src), change directoryto smslink/server, modify the first part of the Makefile to accomodate yourplatform, then type make. A few warnings might be issued during the compilephase, 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 allrelated man pages). You can choose to compile only the server module by typingmake 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 Server6./ Tailor the config file to your needs.The config file, by default, is called /etc/gsmdevices. It contains, amongothers, the PIN code, PUK code, and caller ID of the installed SIM card. You'llobviously need to change those to match your own SIM. A template file islocated in this directory, but it will NOT be copied in place by theinstallation 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 theIP addresses of the machines that are allowed to connect to the server. In thisfile, lines beginning with a '#' are treated as comments. Blank lines areignored. In case the file is not present, no access control will beimplemented. The install process DOES NOT copy the template to /etc by defaultmeaning 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 calledMBOX_FILE in sms_serv.h) and make sure the rights and ownership are consistentwith the user the server will run as and the other external applications thatwill 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, itrequires root capabilities to successfully start the service, as only root canaccess the GSM device by default. This is not a problem since it will mostlikely be started by init. You might consider it even safer to create a specialgroup, grant this group rw access to the serial device the GSM module isattached 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 6701You should be greeted with the SMS> prompt. Reproduce a session similar to thefollowing:SMS> set dest = 12345 (your mobile phone number)OkSMS> set user = "yourself"OkSMS> set msg = "Hello GSM World!"OkSMS> sendNow 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]
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -