gnokii
From Gentoo Wiki
gnokii is a modem and fax driver for mobile phones.
Contents |
Installation
Install app-mobilephone/gnokii
| 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 gnokiiConfiguration
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/ttyUSB0An other way is just using gnokii:
user $ gnokii --entersecuritycode PINShow the PIN status:
user $ gnokii --getsecuritycodestatus | grep PINSending SMS
user $ echo "test" | gnokii --sendsms +land_and_telephonenumberWrite 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.shuser $ cal.ica