Difference between revisions of "Gnokii"

From ArmadeusWiki
Jump to: navigation, search
(Usages)
(Links)
 
(One intermediate revision by one other user not shown)
Line 65: Line 65:
 
To send me a sms you can type somethings like that :
 
To send me a sms you can type somethings like that :
 
<pre class="apf">
 
<pre class="apf">
echo "This evening it's open fryied gnokii!" | gnokii --config /etc/gnokiirc -
+
# echo "This evening it's open fryied gnokii!" | gnokii --config /etc/gnokiirc --phone hilov2 --sendsms 0662903368
-phone hilov2 --sendsms 0662903368
+
 
GNOKII Version 0.6.32git
 
GNOKII Version 0.6.32git
 
Cannot open logfile /root/.cache/gnokii/gnokii-errors
 
Cannot open logfile /root/.cache/gnokii/gnokii-errors
Line 102: Line 101:
  
 
== Links ==
 
== Links ==
 +
* http://gnokii.org/
 +
 +
[[Category:Telephony]]

Latest revision as of 14:39, 14 April 2013

Introduction

gnokii provides tools and a user space driver for use with mobile phones. It can be used with the GSM modules available under various Armadeus platform.

Configuration

Gnokii is available under buildroot menuconfig :

make menuconfig

Select it in menu :

Package Selection for the target  --->
    Hardware handling  --->
        [*] gnokii program

then reflash your rootfs.

target configuration

GSM modules provided by Armadeus are recognized by gnokii as AT phone throught serial port. First things to do is to tel it with a configuration file:

  • create a configuration file /etc/gnokiirc
  • and fill it with somethings like :
[global]
#for apf27 apw
port = /dev/ttySMX1
#for apf51dev
port = /dev/ttyS0
model = AT
initlength = default
connection = serial
use_locking = no
serial_baudrate = 115200
serial_write_usleep = 10000
smsc_timeout = 20
 
[phone_hilov2]
#for apf27 apw
port = /dev/ttySMX1
#for apf51dev
port = /dev/ttyS0
model = AT
connection = serial

Usages

Ping

To ping the «phone» simply type :

# gnokii --config /etc/gnokiirc --phone hilov2 --ping
GNOKII Version 0.6.32git
Cannot open logfile /root/.cache/gnokii/gnokii-errors
WARNING: cannot open logfile, logs will be directed to stderr
Device responded OK.


Send SMS

To send me a sms you can type somethings like that :

# echo "This evening it's open fryied gnokii!" | gnokii --config /etc/gnokiirc --phone hilov2 --sendsms 0662903368
GNOKII Version 0.6.32git
Cannot open logfile /root/.cache/gnokii/gnokii-errors
WARNING: cannot open logfile, logs will be directed to stderr
Send succeeded with reference 10!

Receive SMS

To read SMS 1 to 10, type something like that :

# gnokii --config /etc/gnokiirc --phone hilov2 --getsms SM 1 10
GNOKII Version 0.6.32git
Cannot open logfile /root/.cache/gnokii/gnokii-errors
WARNING: cannot open logfile, logs will be directed to stderr
1. MO Message (Sent)
Date/time: 00/00/2000 00:00:00 
Recipient: XXXXXXXXX Msg Center: XXXXXXXXX
Text:
Yes gnokiiiiiiii !

[…]

8. Inbox Message (Unread)
Date/time: 04/04/2013 14:26:47 +0200
Sender: XXXXXXXXXXX Msg Center: XXXXXXXXXXXXXXX
Text:
Chic j'adore les gnokii !

Getting SMS failed (location 9 from SM memory)! (The given memory location is invalid.)
Getting SMS failed (location 10 from SM memory)! (The given memory location is invalid.)

SM option is for SIM memory.

Links