KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Frugalware-Art.org Artwork for Frugalware Linux 
 Arch-Stuff.org Artwork and Stuff for Arch Linux 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    Linux42.org    OpenSkillz.com   
CLI-Apps.org - Command Line Interface Apps

 Aug 30 2016  
 Not logged in  
 Home    Add App   Forum   Groups   Knowledge   Events   Jobs   Users   Register   Login-


- Content .- Fans (1) .- Knowledge Base  . 



CLI utility

Score 56%
Downloads:  25
Submitted:  Jul 23 2009


The story

This tiny piece of software I have written, while having no internet connection and... surprise... no /bin/chat program.
So, basically what does atscript do, and what is it written for?
Well, I live in russia and we have a bank here called Sberbank. The only way to check how much money you have on your card is: either call the automated service, enter about 60 digits and get the desired info OR go to the bank. No internet option is avaliable. Or you can pay a monthly fee and find out the information using SMS.
Since their quality of service is awful, I do not want to pay them anything. So, I have come up with this piece of software.

The task
We need to grab our old modem (I used oldskool courier v.34, ripped of the speaker and connected it to line-in of soundcard instead. Some newer modems already have the jacks, so you won't need that.). The modem should call the bank, enter all the credentials, than th pc should record the answer of the system and that's it. You can put that in cron, for instance.

This is casual. Just make sure you have cmake around.
tar vxf atscript-0.1.tar.gz
cd atscript-0.1
cmake .
sudo make install

If you have no cmake and do not want to install it, you can just gcc -o atscript main.c, and do the other stuff by hand.

Once you have done it all, you have some new files on your system. in /usr/share/examples/atscript (or /usr/local/share/examples/atscript) you will find to script examples.
time.atscript and sberbank.atscript.
These scripts demonstrate how this software works.
All fields are separated by ONE tab, so pay attention.
The syntax is simple

AT OK 0 - how many seconds should I wait after I got expected responce from modem and before doing anything else
| |
| |- expected responce from modem
|--- AT Command

frk/sys usage
These commands allow to execute external programs.
frk - forks it in background, sys - waits for the program to do all the needed stuff. You can use these to setup alsa mixer, for instance. Syntax is similar, the last field is timeout.

frk uname -a 0
sys uname -a 0

You may want to have a look at the example scripts, since it's all quite simple.

Some hints about dialing rules.
Make sure to setup S8 register. It holds the time it seconds, that a comma (,) will cause to pause
ATDT100,1 will dial 100 in tone, than pause for S8 seconds and then dial one.
W - meens wait for another dial tone
# symbol should be quoted, "#".
For more hints consult the docs for your modem.

When you have written your own script, just run and it should work.
atscript /dev/ttyS0 /path/to/my/script.atscript

If you have any questions - you can contact me through jabber:
aifiltr0 [at] invyl.ath.cx


0.1 - Initial version. Tested and working

(Source Code)
Send to a friend
Other  Apps  from AiFiLTr0
Report inappropriate content

Add commentBack


Copyright 2007-2016 CLI-Apps.org Team  Legal Notice
All rights reserved. CLI-Apps.org is not liable for any content or goods on this site.
You can find our FAQ here.
All contributors are responsible for the lawfulness of their uploads.
Please send us a notice if you spot an ABUSE of the website.
Information about advertising in CLI-Apps.org.
Developers can use our public webservice interface. More information here: public api
For further information or comments on this site, please send us a message

Content RSS   
Events RSS