1.四个包先拉到/usr/local下并解压 tar -zxvf ~.gz
gnokii-0.6.31.tar.gz
intltool-0.40.6.tar.gz
XML-Parser-2.34.tar.gz
glib-2.20.1.tar.gz
所需包链接即可下载(https://pan.baidu.com/s/1xS95VN9Mgo7W1jy5Nl961g 提取码:fqvk)
2.
执行命令:
apt-get install gcc
apt-get install make
sudo apt-get install gettext
apt-get install libglib2.0-dev
apt-get install pkg-config
(1)进glib-2.20.1
./configure
make
make install
(2)进XML-Parser-2.34
#perl -MCPAN -e shell
sudo apt-get install libexpat1-dev
perl Makefile.PL
make
make test
make install
(3)进intltool-0.40.6
./configure
make
make install
(4)进gnokii-0.6.31
./configure
make
make install 或者 make&&install
切记更新
apt-get update
完全成功后
将源码包里的:
Docs/sample目录下的gnokiirc 文件(这个配置文件是gnokii的配置文件)拷贝到/root下.
mkdir -p /root/.config/gnokii
cp /usr/local/gnokii-0.6.31/Docs/sample/gnokiirc /root/.config/gnokii/config
修改文件:nano /root/.config/gnokii/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 will need something like:
# port = /dev/cu.USA28X1P1.1
#
# For Win32 and ports from 1 to 9 you want to use:
# port = com1:
# or similiar. For ports greater than 9 you want to use:
# port = \\.\COM10
# or similiar.
#
# FreeBSD (probably NetBSD and OpenBSD too) use:
# port = /dev/cuaa0
#
# With Linux-IrDA you will want to use
# port = /dev/ircomm0
# or similiar.
#
# Use this setting also for the Bluetooth connection:
# port = aa:bb:cc:dd:ee:ff
# when using it with AT driver set it to:
# port = /dev/rfcomm0
# or similiar.
#
# For the Linux USB cables you will need one of the following settings (or
# similiar)
# port = /dev/ttyUSB0
# port = /dev/tts/USB0
# port = /dev/ttyACM0
# the last one will work only with AT driver. The correct setting should be
# given in the dmesg output.
#
# If you use connection type dku2libusb use it to denote which use endpoi