gnokii

From Gentoo Wiki
Jump to: navigation, search

External resources

gnokii is a modem and fax driver for mobile phones.

Contents

Installation

Install app-mobilephone/gnokii

→ Information about USE flags
USE flag Default Recommended Description
X Yes Adds support for X11
bluetooth No Enables Bluetooth Support
debug No No Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml
ical No Enable support for dev-libs/libical
irda No Enable infrared support
mysql No Adds mySQL Database support
nls Yes Adds Native Language Support (using gettext - GNU locale utilities)
postgres No Adds support for the postgresql database
sms No Yes Enable SMS support (build smsd)
usb Yes Adds USB support to applications that have optional USB support (e.g. cups)
root # emerge --ask gnokii

Configuration

Edit the /etc/gnokiirc file:

File/etc/gnokiirc

[global]
port = /dev/ttyUSB0
model = AT
initlength = default
connection = serial
use_locking = yes
serial_baudrate = 19200
smsc_timeout = 10

[gnokiid]
bindir = /usr/sbin/

[connect_script]
TELEPHONE = 12345678

[disconnect_script]

[logging]
debug = on

rlpdebug = off
xdebug = off

Setup save the password for PIN login

File/etc/sms-pin

ABORT BUSY
ABORT ERROR
ABORT 'NO CARRIER'
REPORT CONNECT
TIMEOUT 10
# Set your pin here
"" "AT+CPIN=0000

Usage

Set PIN to work with gnokii

/usr/sbin/chat is part of net-dialup/ppp.

root # /usr/sbin/chat -V -f /etc/sms-pin >> /dev/ttyUSB0 < /dev/ttyUSB0

An other way is just using gnokii:

user $ gnokii --entersecuritycode PIN

Show the PIN status:

user $ gnokii --getsecuritycodestatus | grep PIN

Sending SMS

user $ echo "test" | gnokii --sendsms +land_and_telephonenumber

Write calendar notes

Filegnokii-import.sh

#!/bin/bash
#########################################################
# gnokii ical import script to fix buggy write mode     #
# don't forget to use "irattach irda0 -s" if using ira  #
#########################################################
read -p "Please give path and file name: " file

declare -i a
a=$(grep -ir "SUMMARY:" $file | wc -l) # count the entries


for i in `seq 1 $a`;do
echo $i
gnokii --writecalendarnote $file $i
sleep 1 # wait a second before the next entry is written
done
Filecal.ical

BEGIN:VCALENDAR
VERSION:1.0
BEGIN:VEVENT
CATEGORIES:MISCELLANEOUS
SUMMARY:09:00-18:00h New calendar entry
DTSTART:20080415T210000
DTEND:20080415T210000
DALARM:20080414T210000
END:VEVENT
END:VCALENDAR
user $ gnokii-import.sh
user $ cal.ica
Personal tools
Namespaces

Variants
Actions
Gentoo Websites logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Navigation
Toolbox
Categories