Thursday, October 05, 2006

 

Installing SLAX Linux on Flashdisk




What is SLAX:
SLAX is a Linux Live CD . It does not need to be installed as it boots and runs from a CD drive. It is possible to run SLAX on a computer without a hard disk. There is also an option to run SLAX from RAM, freeing the drive for other uses, such as for a DVD or music CD. SLAX is based on Slackware Linux. SLAX Standard and Kill Bill use KDE as their desktop environment, while Popcorn uses XFCE. Fluxbox is an option in all versions except Frodo for users with a low amount of RAM.

This short tutorial will illustrate how to install SLAX Linux to USB flashdisk using windows NT, XP, 2003.
That was needed by you:
1. The strong intention during always tried when gagal

2. Flashdisk 256 MB or more (to that 128 MB can make SLAX frodo or popcorn)

3. The Linux SLAX compilation (the version 5.1.0 that can be downloaded from http://slax.linux-live.org)
4. Winrar or the other program that can extract ISO files.

5. Syslinux V3. 11 (support Fat32)
6. Cemilan and Cofee :)

Installation steps:
1. To format flashdisk, in the windows explorer right click on flashdisk and chose the format, choose the option FAT32 with quick format.
2. Open the ISO SLAX using winrar that already downloaded. Then extract the file from the ISO to flashdisk

3. Open the boot directory in flashdisk, then copy all files inside to the main flashdisk directory.

4. Download (http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.11.zip) and the extract syslinux-3.11.zip kedirektori syslinux311 dikomputer

5. Now open windows command prompt (start-run then type cmd) and moved to the directory syslinux311, then moved again kedirektori win32 in the directory syslinux311, then type syslinux.exe f: (with the assumption that flashdrive is f:)

6. save syslinux.cfg to flashdisk

The contents from file syslinux.cfg are:
Display splash.cfg
default slax
prompt 1
timeout 40
F1 splash.txt
F2 splash.cfg

The label slax
kernel vmlinuz
append max loop=255 initrd=initrd.
Gz init=linuxrc load ramdisk=1 prompt ramdisk=0 ramdisk size=4444 root=/dev/ram0 rw

The label linux
kernel vmlinuz
append max loop=255 initrd=initrd.
Gz init=linuxrc load ramdisk=1 prompt ramdisk=0 ramdisk size=4444 root=/dev/ram0 rw

The label memtest
kernel memtest

7. Restart the computer and enter to the BIOS system and set the first boot to usb device (the USBZIP example, USBFLOPPY, USBHDD)
8. Save BIOS seting, then restart.
9. Congratulations the Computer already booting SLAX from flashdisk, during this eat cemilan and drank coffee:)
Note: use this methoed when BIOS supports USB HDD (USB Hard Drive, USB CD) boot Opotions

Monday, October 02, 2006

 

SMS Gateway using Gammu and MySQL on Linux

The applications of the SMS gateway can be searched and downloaded from the internet. You will be able to find a number of SMS gateway applications from various platforms.

The one that we will discuss here is Gammu in this article. We are going to use Gammu application for sms gateway for number of good reasons. Primarily because Gammu is easily configurable, usable for both Windows and Linux and last but not least it is freely downloadableJ. It is compatible with mysql as well.

Here we will only discuss:

“How to setup SMS gateway using Gammu with Linux”


The mobile phone that succeeded in being tried by me is Nokia 3310 and Siemens C35i using Linux platform.

Before installation is done, first read information repeatedly about Gammu here:

http://www.mwiacek.com/gsm/soft/gammu.html


Have you gathered the information?
OK.
.
Now let’s gather the requirement to dev
elop the SMS Gateway using Gammu.


Download Gammu.

1. gammu.tar.gz
Download the gammu package from: www.mwiacek.com/zips/gsm/gammu/gammu.tar.gz

# wget www.mwiacek.com/zips/gsm/gammu/gammu.tar.gz

2. Web Server (If you have webserver, don’t ignore this, if not yet then you must install first apache, myslq, php)

3. The Nokia mobile phone 3310 or Siemens C35i. For other mobiles phone please read again:

http://www.mwiacek.com/gsm/soft/gammu.html


Gammu supports various types of the mobile phones. How come? look this: Gammu currently supports: majority of Nokia phones from DCT3 generation with Nokia operating system - for example Nokia 3210, 3310, 3315, 3410, 5110, 5130, 6110, 6510, 6610, 7210, 8310
Many AT devices - for example many Siemens, Sony Ericsson, Nokia, Alcatel models, Alcatel from BE5/BF5/BH4 generation - for example 501, 511, 512, also some functions with OBEX and Sym
bian devices

4. The Serial cable for the mobile phone

If you have successfully downloaded gammu.tar.gz, please extract it:

#tar xvfz gammu.tar.gz

After extracted automatically you will find the folder gammu-1.08.00, now enter into the extracted folder.

#cd gammu-1.08.00

Before installation make a custom read README, INSTALL, etc.

#. /configure

#make

Here at this stage one thing needs attention that there may be some error “lssl was not found”. This happens when mysql does not support Gammu or gammu database is not configured yet, (his installation process repeatedly try to find the mysql library which is needed)
#make shared
#make install
#make installshared

Further it’s necessary for you to upgrade the “library”

# vi/etc/ld.so.conf
Add the library link /usr/local/lib to file ld.so.conf, once you have done upgrade the library:

#/sbin/ldconfig

Note: If you did not find any error to this stage means you have successfully installed the Gammu sms Gateway.

Now tried to enter again into the folder where you extracted gammu.tar.gz and copy the available files in folder /docs/example/config/* here you will find 3 files by the name of gammurc, mysql.sql, smsdrc and gammurc.

Copy the gammurc and smsdrc into the /etc directory

#cp gammurc smsdrc /etc/

Further search edited file like this:

[gammu]
port = /dev/ttyS0 #if you are using COM2 then substitute it with ttyS1
#model = 6110 #model of mobile phone was ignored by you, because it does’t need often to mention the phone model.
connection = fbus #With Nokia mobile phone connection should be “fbus” if you used the Siemens mobile phone then substitute the “fbus” with “at19200″
#synchronizetime = yes
#logfile = gammulog
#logformat = textall
#use locking = yes
#gammuloc = locfile
#startinfo = yes
#gammucoding = utf8
#rsslevel = teststable
#usephonedb = yes


If you are still confused, inside the gammurc file it has the guidance available. If you are lazy to edit the file, then you can get the file from www.posmetropadang.com/gammu/gammurc

Now confirm if the data cable and your mobile phone are connected to port COM1 to your computer, if everything is just fine, run the following command.

#gammu –identify

I hope you could see output as being supervised here:

Manufacturer : Nokia
Model : 3310 (NHM-5)
Firmware : 06.33 F (28-11-03)
Hardware : 1012
IMEI : 350835608671298
Original IMEI : 350835608671298
Manufactured : 0802
Product code : 0505201
Simlock 1 : MCC+MNC 00101, opened, user , counter 0
Simlock 2 : GID1 0000, opened, factory, counter 0
Simlock 3 : GID2 0000, opened, factory, counter 0
Simlock 4 : MSIN 0000000001, opened, factory, counter 0
MSID : 830d50880846870ebedd126096
MCU checksum : 9C79
DSP ROM : 6

If you got the connection info like above gammu means Gammu detected your mobile phone and now you can continue to the next step.

Now let’s configure that how all the phone’s SMS’s will be kept by MySQL database to put forward on the webpage using php scripts.

OK further bro… our work has almost finished, possibly have some coffee or cigarettes that could disrupted previously hehe…??

Now try to open the file smsdrc that you copied earlier to directory /etc

#vi /etc/smsdrc

[smsd]
PIN = 1234
logfile = smsdlog
commtimeout = 1
sendtimeout = 10

Search and edit the part that you configured in the mysql database:

# ————————- SETTINGS FOR –smsd MYSQL —————————
user = root
password = password_mysql_user
pc = localhost
database = Database_name

Note: The above lines are to make connection with mysql database.

Now enter to the directory /docs/example/config/ and get the file ‘mysql.Sql’, that is a table structure. Now put this file to the database that we are creating in the MySQL database for SMS gateway.

For sms database
#mysqladmin –u root –p create sms

To create tables for gammu grab the file ‘mysql.sql’

#mysql –u root –p <>

Or it can be easier for you if you make Gammu tables through phpadmin.

http://localhost/phpmyadmin

Once you are finished, you can start the smsd deamon:

#gammu –smsd MYSQL/etc/smsdrc

The Log filename Is “smsdlog”
Press Ctrl+C to stopped the program …

After the issuing above command if output is like above means your SMS gateway is done successfully and you can use it according to your requirements. And all the available sms in your mobile phone will be entered inside the mysql database.

For your further stage is to putting forward your SMS’s to the web which is using php scripts, The required php script can be downloaded from http://posmetropadang.com/gammu/sms.zip


You must edit the SMS database info in the sms.php file.

If all goes well, now you can open the SMS’s through your favorite browser:

http://localhost/sms.php

Now what must be done by you??
The smsd service deamon must be running to grab the SMS’s from the phone and you and you could see on the web.

Create a Gammu startup script.sh and place it in the directory /usr/local/Bin/#cd/usr/local/bin/

#vi gammu.sh

File contents are as follows:
#! /bin/sh
export LANG=da
DK
/usr/local/bin/gam you –smsd MYSQL/etc/smsdrc

After edited that file open /etc/inittab

#vi /etc/inittab

And add the below line in the inittab

GA:345:respawn:/usr/local/bin/gammu.sh

Wow… was long enough also, hmmm hopefully did not have the problem ya… now finished your coffee, until you finished developed the SMS Gateway by using Gammu.
If you are having comments and questions, do not hesitate, just feel free to ask.

This page is powered by Blogger. Isn't yours?