Gnokii SMS Cat Chinese installation use document

Source: Internet
Author: User

August to do a dongdong, re-organized a issued up. Use the document after the same day!
Environment:
CentOS 5.2, SMS Cat device: Wave

Install the software address:

http://opensource.hqcodeshop.com/gnokii/RHEL5/

gnokii-0.6.28cvs-20100613.i386.rpm
gnokii-smsd-0.6.28cvs-20100613.i386.rpm
gnokii-smsd-mysql-0.6.28cvs-20100613.i386.rpm

# # # # download Software # # #

#cd/usr/local/webserver/

#wget http://opensource.hqcodeshop.com/gnokii/RHEL5/gnokii-0.6.28cvs-20100613.i386.rpm
#wget http://opensource.hqcodeshop.com/gnokii/RHEL5/gnokii-smsd-0.6.28cvs-20100613.i386.rpm
#wget http://opensource.hqcodeshop.com/gnokii/RHEL5/gnokii-smsd-mysql-0.6.28cvs-20100613.i386.rpm

# # # installation #

# # # #gnokii-smsd-0.6.28cvs-20100613.i386.rpm needs libmysqlclient.so support

#yum Install Mysql-devel

#rpm-IVH gnokii-0.6.28cvs-20100613.i386.rpm gnokii-smsd-0.6.28cvs-20100613.i386.rpm gnokii-smsd-mysql-0.6.28cvs-20100613.i386.rpm

# # # # # configuration #

Configure Gnokii

The Gnokii configuration file is created by default in/etc/gnokiirc. However, each time the Gnokii program reads the secondary configuration file from the user's root directory, such as/ROOT/.GNOKIIRC. So the gnokii configuration can be created in the user directory

#vim/etc/gnokiirc

# This is a sample ~/.gnokiirc file. Copy it into your
# home directory and name it. Gnokiirc.
# See Http://wiki.gnokii.org/index.php/Config for working examples.
#

[Global]

# Set Port to the physical port used to connect to your phone.
# Linux version is:

#短信猫串口设备
Port =/dev/ttys0

#
# for MacOSX you'll need something like:
# port =/dev/cu. usa28x1p1.1
#
# for Win32 and ports from 1 to 9-want to use:
# port = com1:
# or similiar. For ports greater than 9 your want to use:
# port = \\.\COM10
# or similiar.
#
# FreeBSD (probably NetBSD and OpenBSD too) use:
# port =/dev/cuaa0
#
# with Linux-irda you'll want to use
# port =/dev/ircomm0
# or similiar.
#
# setting also for the Bluetooth connection:
# port = aa:bb:cc:dd:ee:ff
# when using the it with at driver set it to:
# port =/dev/rfcomm0
# or similiar.
#
# for the Linux USB cables need one of the following settings (or
# Similiar)
# port =/dev/ttyusb0
# port =/dev/tts/usb0
# port =/dev/ttyacm0
# The last one'll work is only with at driver. The correct setting should be
# given in the DMESG output.
#
# If You use connection type DKU2LIBUSB with it to denote which use endpoint
# you ' d wish to use. It is useful if you had more than one phone connected
# to your computer using DKU2 cable. Numbering goes from 1 upwards.
# Default is 1.
# port = 1

# Set model to the model number of your phone. For the
# Symbian Phones use:
# model = Symbian
# for other Non-nokia phones and if you want
# Mode use:

#通信模式, for non-Symbian phones, use at mode

Model = at

# If You can ' t figure out what to put here read the FAQ.
# If It still doesn ' t help, consult gnokii-ml or #gnokii at freenode.
#model = 6510
# There is few main models that should make use of the certain drivers.
# These are:6110, 7110, 6510, 3110, 2110, 6160.

# Set IrDA device name.
# IF You use IrDA connection want Gnokii to autodetect the IrDA
# device it connects to. This was fine for most of the cases. If you have
# than one device in range want to give manually the device
# name so gnokii correctly reco Gnizes it. Use the name so can see
# in the discovery log when the phone with infrared are in the range of
# your IrDA por T.
# Note the need to set the this for each phone_ section separately. It
# isn ' t nested from the global section.
# irda_string = Nokia 6610i

# Initlength controls the number of characters sent to the
# Phone during initialisation. Can either set it to
# the word "default" or a positive integer.
#
# You can try setting this value if you want to connect
# to the phone quicker. If you ' ve never noticed the
# Connection to be slow, it's suggested that
# Leave this alone. Read the initialisation code in FBUS-XXXX
# to understand, what's this changes if you ' re curious.

Initlength = Default

# The type of the connection, for IR set this to infrared or IrDA.
# for the nk6110 driver only infrared are valid for the IrDA connection.
# See DOCS/GNOKII-IR-HOWTO For more detailes on this.
# If you have 6210/6250/7110 phone and dau9p cable (the one can
# Use with 6100 series and cannot use hardware modems from the phone)
# Want to use ' dau9p ' value to get faster initialization.
# If You use the DLR3 or dlr3p cable for Nokia phones in FBUs mode (ie.
# You don't use the model = at) your may want-use ' dlr3p ' value here.
# Note that it's recommended and currently the best of the
# Cable with nk6510 driver.

#使用端口模式, serial or other
Connection = serial

# with DKU-2 cable use the following setting if you want to Libusb driver
# (recommended):
# connection = Dku2lib USB
# or the following setting if you want to use Linux kernel driver
# connection = DKU2
# with DKU-5 cable use The following setting
# connection = Dku5
# for Bluetooth and @ driver use the following setting
# connection = Serial
# for other Bluetooth settings use
# connection = Bluetooth
# for infrared connection with phones other th A Nokia 6110/6130/6150 use:
# connection = IrDA
# Don ' t forget to run: ' Irattach irda0-s ' or similiar before Runni ng Gnokii
# for connection with a PC/SC compatible Smart Card reader use:
# connection = PCSC

# set this to ' yes ' if you want Gnokii to Set and check the lock file in
#/var/lock directory. It avoids potential conflicts with other serial
# port software (eg. minicom). If you had wrong permissions for the
# directory, a warning would be generated. If you don ' t want a lockfile, set
# it to ' no '.

#是否锁定
Use_locking = yes

# baudrate to use on serial port connections.
# currently used only by models at and BIP/CIMD. Defaults to 19200.

#传输比特率, choose 9600 here, the national conditions decide
Serial_baudrate = 9600

# force waiting through each sent character the specified usec time.
# Value-1 forces the fastest ' block ' writing,
# value 0 writes each character separately without any explicit waiting,
# Other positive values specify the appropriate 1/1000000 sec delaying.
# Siemens M20 requires at least "1″! Fixme:model-driven autodetection
#serial_write_usleep = 10000

# force serial port handshaking mode, useful primarily for ' at ' model.
# gnokii ' at ' model uses software handshake by default.
# Possible Values:hardware (rts/cts–7 wires) or software (xon/xoff–3 wires)
#handshake = Software

# If defined (not commented off by ' # ') it'll quit gnokii anytime
# when DCD line would drop.
#require_dcd = 1

# If You is using a Bluetooth connection, you can specify the Rfcomm
# channel number here. If you don ' t specify the value, it's autodetected
# on connection (it could take a additional second). FBUs Connections Always
# Ignore this value and use channel 14.
#rfcomm_channel = 1

# There may happen various timeouts during the communication with the phone.
# This parameter enables the retransmission policy. Ie. If the phone doesn ' t
# Respond, we send the frame again. This happened mainly with the older
# phones. If you are want to enable it, you see mysterious timeouts.
# is very careful with this option. It's suspected to cause phone breakage
# with the new DCT4 phones (like Nokia 6100). By default it is switched off
# (sm_retry = 0)
#sm_retry = 1

# Run The specified script (s) right after opening and initializing the device
# and before any communication (right before closing for disconnect_script).
# you could find handy to use it to connect your modems to SMS Center
# when using BIP or CIMD protocols
# Non-absolute path is relative to the specific directory where gnokii is run!
#connect_script =/absolute/path/to/gnokii/docs/sample/cimd-connect
#disconnect_script =

# When sending SMS you can experience timeouts. This is the feature of the
# overloaded Smscs. The phones waits for the response from the SMSC confirming
# That's it received the short message. When the SMSC are DoSed with many requests
# It'll take a more time to get the response. Adjust it to your needs. The
# value is given in seconds to wait. Defaults to ten seconds. Set to 0 to wait
# forever.
Smsc_timeout = 10

# Set this to 1 if you want the your phone with xgnokii. Works only
# with few Nokia models and FBUs communication
[Xgnokii]
Allow_breakage = 0

# Set Bindir to the location of the various gnokiid binaries.
# in particular ensure Mgnokiidev
# Permissions 4750, owned by Root, group Gnokii. Ensure
# is in the Gnokii group and that the group exists ...
[GNOKIID]
Bindir =/usr/bin/

# any entries in the following and sections would be set as environment
# variables when running the scripts.
# Handy for the $VAR substitutions in your Chat (8) script.
[Connect_script]
# Don ' t put your phone number here!!!
Telephone = 12345678

[Disconnect_script]

# The following parameters control how Libgnokii handles the debugging messages.
# Currently there is three categories: "Debug" Controls the Libgnokii
# normal debug output, "Rlpdebug" controls the debug output of the RLP
# subsystem, and "Xdebug" is used by the xgnokii or SMSD.

[Logging]

# Where to log the debug output (On:stderr, off:/dev/null)
debug = On

# Where to log the RLP debug output (On:stderr, off:/dev/null)
Rlpdebug = Off

# Where to log X debug output (On:stderr, off:/dev/null)
Xdebug = Off

# fake-phone can used for testing gnokii functionality without
# having a physical phone connected.
# Example Usage:
# Gnokii–config Gnokiirc–phone fake–identify
[Phone_fake]
Port = Foobar
Model = Fake
Connection = serial

###### Test #########

1. Test Gnokii
#gnokii –dialvoice 15800000000## #拨打电话 (preferably using their own phone), test whether can get through, if can get through, prove to use
#gnokii –sendsms 15800000000### Send text messages, enter information and use Ctrl+d to end and send. Here to pay attention to a coding problem, unified use of utf-8, especially in the terminal test, I use the putty

2. Test GNOKII-SMSD

######## Creating a Database ######

mysql> CREATE DATABASE SMSGW;
Mysql> Grant all priveliges the smsgw.* to [e-mail protected] identified by ' password ';
mysql> use SMSGW;
Mysql> Source/usr/share/doc/gnokii-smsd-mysql-0.6.28cvs/sms.tables.mysql.sql;
Mysql>insert into ()

# # # # # # # # # # # # # # # # # # # Installation:/usr/lib/gnokii-smsd/so make a symbolic link

#cd/usr/lib
#ln-S SMSD gnokii-smsd

Otherwise, you will receive the following error message when testing:

[Invalid UTF-8] G_module_open error:/usr/lib/smsd/libsmsd_mysql.so: \xce\xde\xb7\xa8\xb4\xf2\xbf\xaa\xb9\xb2\xcf\ Xed\xb6\xd4\xcf\xf3\xce\xc4\xbc\xfe: \xc3\xbb\xd3\xd0\xc4\xc7\xb8\xf6\xce\xc4\xbc\xfe\xbb\xf2\xc4\xbf\xc2\xbc!
Cannot load database module MySQL in directory/usr/lib/smsd!

# gnokii-smsd-u sms-p password-d smsgw-c localhost-m mysql-b sm## Test SMS Daemon

If an error message appears:

F:gnokii-smsd-usms-p passwd-d smsgw-c localhost-m MySQL
[Invalid UTF-8] G_module_open error:/usr/lib/smsd/libsmsd_mysql.so: \xce\xde\xb7\xa8\xb4\xf2\xbf\xaa\xb9\xb2\xcf\ Xed\xb6\xd4\xcf\xf3\xce\xc4\xbc\xfe: \xc3\xbb\xd3\xd0\xc4\xc7\xb8\xf6\xce\xc4\xbc\xfe\xbb\xf2\xc4\xbf\xc2\xbc!
Cannot load database module MySQL in directory/usr/lib/smsd!
A:centos an installation package will appear after installation:/usr/lib/gnokii-smsd/so to do a symbolic link

#cd/usr/lib
#ln-S SMSD gnokii-smsd

Gnokii SMS Cat Chinese installation use document

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.