Rabu, 21 Mei 2008

Configuring A Belkin F5d6050 802.11b Usb Wifi Device On Mandriva 2007 Using Ndiswrapper - A step-by-step tutorial.

The Belkin F5D6050 802.11b USB wifi device is sold with it’s Microsoft Windows auto-installing driver package. Let’s suppose that you are installing a dual-boot system, and that the windows installation allowed you to verify that your usb device is fullty functionnal and is able to discover your wifi access point and connect to the internet.
Then, you installed Linux Mandriva 2007, and you have to configure the Linux wifi device.



1. CONFIGURING THE LINUX WIFI DEVICE



Now your system is booted under Mandriva 2007 Linux, and you have no wifi device because you did not install the driver yet.
Let’s suppose that you obtained the driver as you were previously booted under Windows, and that the driver is available on a CD-ROM or on any other removable device or Linux-mounted NTFS partition.
Now, in order to install the device driver, proceed like follows :
Go to the KDE main Menu, and then
Choose Configuration
Choose Configure your computer
(you will have to provide the root password in order to continue)
Choose Mandriva Linux control Center
Choose Network and Internet
Choose “Configure a new internet connection (LAN, ISDN, ADSL, Wifi)
Choose “Use Windows Drivers using NDISwrapper”
(You will probably have to add you Linux Distro CD)
When prompted, choose the driver you previously obtained
The GUI will automatically recognize the available access point, choose yours, it will be configured automatically and you will be able to surf over the Internet.



2. OBTAINING THE NDISWRAPPER DRIVER



Before that, obtaining the Windows driver in a format accepted by ndiswrapper is sometimes a little bit tricky.

As explained in the http://ndiswrapper.sourceforge.net/mediawiki/index.php/List url (this address is provided by theLinux installer itself) , first of all, download the driver from http://www.belkin.com/support/download/files/F5D6050z.exe
Then, you can see that the sourceforge site explains :
QUOTE

Download the driver. Extract to a new directory using unzip. Extract the CAB files (DATA1.CAB, DATA1.HDR, DATA2.CAB) using "unshield x" . cd Drivers/WINXP . edit bkusb.in_ and uncomment the CopyFile.XP.Sys section. Run ndiswrapper -i bkusb.in_ as root followed by ndiswrapper -m . modprobe ndiswrapper. ifdown wlan0. ifup wlan0 and you are there.

Once you have already done this, it’s rather simple. However, the first time you have to do it, it has to be commented. By the way, only the first three lines have to be performed, the rest of the install will be done using the GUI.
Of course, you first have todownload the driver.
The “real” part of the driver is simply two files, a binary .sys file and a text .inf file. Unfortunately, these files are not simply visible when unpacking the driver. The files are embedded in the .cab and .hdr files. And standard Windows commands cannot extract the files, because they are embedded in the installshield cab files. But the unix “unshield” command can perform this.
So, the solution is simple. You first have to install the unshield rpm in your Linux system. The unshield rpm should be on your Linux distro CD’s, otherwise get it from the internet “easy urpmi” or rpmfinder.
Then, use the “unshield X” command to extract the files from data1.cab, then from data1.hdr and from data2.cab.
The work is now almost finisthed. You have to modify the bkusb.in_ file, in order to uncomment the CopyFile.XP.Sys section
Now the job is done, go to the first part of this tutorial and use the GUI in order to configure the usb wifi adapter using the ndiswrapper drivers you have just obtained.

3. SUMMARY AND CONCLUSION.




It’s rather easy to install and configure the Belkin F5D6050 802.11b USB wifi device on Mandriva 2007 provided that you have the Windows driver (two files). If you are lucky and find the drivers ready-made from Internet or from another computer, you just have to startup the Linux network configuration GUI and click in the .inf driver description file.
If you don’t directly have the .inf and the .sys parts of the driver, it seems complicated the first time you do that, but you simply have to unpack the Windows driver in order to extract the .inf and .sys files, before starting the network install.


This is the tutorial I would like to have had when I started this job some weeks ago. I hope it will be helpful.

Membuat hotspot dengan menggunakan Belkin F5D7231-4 AP

Bagi rekan yang ingin membuat Wi-Fi Hostpot Internet Cafe dan ingin menambah pengetahuan, ini saya akan membagi-bagi pengalaman saya tentang bagaimana cara membuatnya mudah-mudahan dapat beguna bagi rekans sekalian, dan lumayan juga bisa untuk di jual.

Beberapa waktu yang lalu saya mencoba membuat Wi-Fi Hotspot mengikuti tutorial http://www.hendra-k.net/how-to-setup-a-wi-fi-hotspot.html. Pada tutorial tersebut menyebutkan untuk memakai Access Point dari Linsys WRT54G, namun pada saat itu saya mencoba dengan menggunakan dengan Belkin F5D7231-4 AP.

Berikut saya akan mencoba menjelaskan bagaimana cara membuat Wi-Fi Hotspot terserbut :

A. Yang dibutuhkan :

1. Hotspot Access Point device //dalam hal ini saya menggunakan Belkin F5D7231-4 AP.

2. Sebuah komputer yang akan di jadikan sebagai radius server.

3. OS Linux //Saya menggunakan FC4 (Fedora Core 4)

4. Mysql //untuk Authentic melalui database, utk authentic nya bisa dengan beberapa cara seperti : unix user, smb user, file user

5. Apache dengan perl support //utk membuat user authentic melalui web-based, serta utk membuat login authentic via web-based di cgi-bin/hotspotlogin.cgi

6. Chillispot //sistem kerja software ini adalah apabila user belum mendapatkan auth dari server maka ia akan ter-redirect ke halaman login

7. Freeradius //ini berfungsi sebagai pemberi authentifikasi kepada user

8. PhpMyPrepaid //bila anda menggukan authentic melalui database Mysql, bisa juga sebagai pembuat user prepaid utk billing nya

B. Cara Install :

1. Untuk OS tergantung dari distro apa yang anda pakai, kali ini saya memakai distro keluaran dari Redhat yaitu Fedora Core 4. Saya hanya akan menjelaskan cara meng-install-nya dengan cara Distro Fedora Core 4, dan utk yang lain itu tergantung distro apa yang anda pilih.

2. Download dulu mysql-nya; rpm -ivh mysql-4.1.11-2.i386.rpm

3. Download dan install Apache

4. Download chillispot; lalu install rpm -ivh chillispot-1.0.i386.rpm

5. Download Freeradius; lalu istall rpm -ivh freeradius-1.0.2-2.i386.rpm

6. Setelah kita mengintsall Apache dan Mysql lalu kita dapat men-download; extract ke /var/www; lalu edit konfigurasi

C. Konfigurasi :

1. Saya mengeset Wi-Fi Hostpot hanya sebagai Access Point //jadi untuk konfigurasi nya semua dari server.

2. Install OS nya seperti kebutuhan anda //dalam hal ini saya memakai server yang telah tersedia yaitu saya memakai server gateway FC4, dan dalam server itu sudah terdapat httpd (apache) dan mysql yang sudah jalan sebelumnya. Karena kita membutuhkan dalam pembuatan radius server yang authentic user-nya malalui Mysql. Jadi selain Mysql dibutuhkan yaitu libmysqlclient.

3. Setelah kita menginstall chillispot maka kita akan mencoba untuk konfigurasi nya :

a. pertama kita harus mematikan service dhcpd yang ada di server kita, biarkan chillispot yang menangani dhcp.

b. # pico /etc/chilli.conf

c. konfigurasikanlah sesuai kebutuhan anda.

d. disini ada beberapa point penting dalam konfigurasinya, yaitu:

§ radiussecret //ini dibutuhkan untuk komunikasi antara radius server dan chillispot

§ uamserver //copy /usr/share/doc/chillispot-1.0/hotspotlogin.cgi ke /var/www/cgi-bin, jadi nanti utk URL redirect nya akan menjadi https://192.168.0.254/cgi-bin/hotspotlogin.cgi, ingat harus dalam secure line ssl.

e. konfigurasi radius :

§ setelah install Freeradius lalu masuklah ke direktori radius konfigurasi berada, bila anda menggunakan FC4 dan memakai RPM dalam menginstallnya maka anda masuk ke direktori /etc/raddb/ dan apabila anda menginstall dengan cara meng-compile sendiri secara default direktori nya ada di /usr/local/etc/raddb/ atau terserah dimana –prefix=PREFIX anda diletakan.

§ # pico client.conf :client 192.168.0.254 {
secret = //ini untuk membuat komunikasi dalam chillispot dan radius (seperti pada point C.3.d)
shortname = localhost
nastype = other
}

§ # pico sql.conf //ini digunakan karena kita akan menggunakan mysql sebagai database user authentic
ada beberapa point penting yaitu
river = “rlm_sql_mysql” //driver/lib yang digunakan apabila kita menggunakan Mysql, ada beberapa tipe driver disini yaitu : rlm_sql_mysql, rlm_sql_postgresql,rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds
server = “localhost” //server mysql berada.
login = “root” //login access ke mysql dan memiliki GRANT ke database radius
password = “blablabla” //password dari database-user yang memiliki GRANT ke database radius
radius_db = “radius”//database-name dimana user radius berada

§ # pico radius.confsearch “${confdir}/sql.conf” lalu tambahkan dengan :
sqlcounter noresetcounter {
counter-name = Max-All-Session-Time
check-name = Max-All-Session
sqlmod-inst = sql
key = User-Name
reset = never
query = “SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName=’%{%k}’”
}untuk authorize ganti dengan :
authorize {
preprocess
chap
mschap
suffix
sql
noresetcounter
}dan untuk # Authentication ganti dengan:
authenticate {
Auth-Type PAP {
pap
}
Auth-Type CHAP {
chap
}
Auth-Type MS-CHAP {
mschap
unix
}

2. Sekarang kita akan mencoba men-setting konfigurasi di PhpMyPrepaid sebagai user administrator sekaligus bisa sebagai pembuat prepaid card login serta billing nya.

a. Extract ke folder apache berada, default ada di /var/www/

b. Masuk ke folder phpmyprepaid

c. # pico config.inc.php
disini ada beberapa point penting:
$dbName=”radius”; //database yang di pakai
$fpdfdir=”/var/www/phpmyprepaid/fpdf”; //lokasi dari direktori fpdf berada, tanpa “/” (slash)
$radius_server=”192.168.0.254″; //server radius berada
$radius_server_port=”1812″; //port yang dipakai oleh radius server
$radiussecret=”"; //huruf rahasia yang dipakai oleh radius server untuk dapat berkomunikasi, seperti yang ada di point no C.3.e

d. # pico dbconnect.php //edit seperti yang di edit di radius server pada point C.3.e
$my_host = “localhost”;
$my_user = “root”;
$my_pass = “”;
$my_dbase = “radius”;

e. Jalankan http://192.168.0.254/phpmyprepaid/index.php //maka dia akan secara otomatis akan menginstall sendiri

f. Masukan username admin dan password admin setelah semua database terinstall.

Maka dengan berakhir nya point terakhir maka selesai jugalah pekerjaan kita