Alcatel Speedtouch USB ADSL Modem NASIL
From Lapis Wiki
Bu makale NASIL bölümü serisinin bir parçasıdır
|
| MasaÜstü • Donanım • Ağ • Dağıtımlar |
| Tarayıcılar• Programlama • Linux ve Oyunlar |
Konu başlıkları |
Giriş
Burada anlatılacak yöntem Linux From Scratch (LFS) yöntemidir. Her hangi bir dağıtım göz önünde bulundurulmamıştır. Bizzat Slackware altında deneyip sonuca ulaştım. Hiç bir problem yok.
Öncelikle elimizde 2.6 serisinden bir kernel olmalı ve bunu ihtiyaçlarımıza göre derlemeliyiz. Normal şartlar altında sürücüyü doğrudan kernele gömmemiz tavsiye edilirken bazı donanımsal durumlar yüzünden modül olarak kullanmamız gerekebildiği hatırlatılıyor. Eğer kernele gömer ve firmaware'in yüklenemediğine dair bir hata alırsak modül olarak denememiz söylenmekte.
Kernel Derleme
Derlemeden önce bilmemiz gereken bir iki şey var. Sistemimiz USB denetleyicisi olarak UHCI mi OHCI mi kullanıyor. Buna göre ikisinden birini eklemeliyiz. Bunu
cat /proc/bus/usb/devices | grep USB
komutunun çıktısına bakarak anlayabiliriz.
Bir diğer bilmemiz gereken konu ise ISP'nin PPPoA veya PPPoE mi kullandığı. Telekomdan sorduğum nazik bayan zamanında ikisinin de kullanılabileceğini söylemiş idi. Ben de PPPoE tercih etmiş ve bu yönde ayarlamıştım.
Evet kernel de düzenlememiz gereken kısımlar
| Kod: |
* Code Maturity Level Options --->
*
o [*] Prompt for development and/or incomplete code/drivers
* General Setup --->
*
o [*] Support for hot-pluggable devices
* Networking support --->
*
o [*] Networking support
o Networking options --->
o
+ [*] Packet Socket
+ [*] Asynchronous Transfer Mode (ATM) (EXPERIMENTAL)
+ [*] RFC1483/2684 Bridged protocols (only needed if you're going to use PPPoE)
* Device Drivers --->
*
o Generic Driver Options --->
o
+ [*] Hotplug firmware loading support
o Network device support --->
o
+ [*] Network device support
+ [*] PPP (point-to-point protocol) support
+ [*] PPP support for async serial ports
+ [*] PPP Deflate compression (not essential, but useful)
+ [*] PPP BSD-Compress compression (not essential)
+ [*] PPP over Ethernet (EXPERIMENTAL) (only needed if you're going to use PPPoE)
+ [*] PPP over ATM (only needed if you're going to use PPPoA)
o Character devices --->
o
+ [*] Non-standard serial port support
+ [*] HDLC line discipline support
o USB Support --->
o
+ [*] Support for Host-side USB
+ [*] USB Device Filesystem
+ [*] OHCI HCD support (only if your USB controller is OHCI)
+ [*] UHCI (most Intel and VIA) Support (only if your USB controller is UHCI)
+ USB DSL modem Support --->
+
# [*] USB DSL modem Support
# [*] Speedtouch USB support (or <M>)
|
bunlardır.
Kernel derlemeyi bitirdikten sonra gerektiği gibi kernelinizi kopyalayın.
Linux-ATM Kurulumu
http://prdownloads.sourceforge.net/linux-atm/linux-atm-2.4.1.tar.gz?download adresinen linux-atm-2.4.1 dosyasını indirin.
Eğer gcc 3.4 veya daha yeni bir sürüm kullanıyorsanız yama yapmak zorundasınız. İşte yama adresi:http://www.linux-usb.org/SpeedTouch/LFS/linux-atm-2.4.1-gcc-4.patch
Sırayla aşağıdaki komutları uyguluyoruz:
tar xzf linux-atm-2.4.1.tar.gz cd linux-atm-2.4.1
yama gerekiyorsa
patch -Np1 -i ../linux-atm-2.4.1-gcc-4.patch
gerekmiyorsa devam
./configure --prefix=/usr --sysconfdir=/etc make su make install
Böylece linux-atm kurulmuş oluyor.
PPP-2.4.3 Kurulumu
Eğer kurulu değilse -ki genelde kurulu olur- http://ccache.samba.org/ftp/ppp/ppp-2.4.3.tar.gz adresinden indirip,
tar xzf ppp-2.4.3.tar.gz cd ppp-2.4.3 ./configure --prefix=/usr make su make install
komutları ile kuruyoruz.
Firmware Kurulumu
Önce modemin hangi model olduğunu buluyoruz.
cat /proc/bus/usb/devices | grep -B 1 THOMSON
veya
cat /proc/bus/usb/devices | grep -B 1 ALCATEL
ile bunu öğrenebiliriz.
İlk satırın sonunda Rev= X.00 gibi bir şey göreceksiniz. Buradaki X modemin sürüm numarasıdır.
Bu modemlerin geneli için http://www.speedtouch.com/download/drivers/USB/SpeedTouch330_firmware_3012.zip adresinden indireceğiniz paketin içindeki bir firmware uyar. Şöyle ki;
Eğer modem eski yeşil bir (rev 0) veya mor bir (rev 2) ise KQD6_3.012 isimli firmware'i Eğer modem gümüş (rev 4) ise ZZZL_3.012 isimli firemware'i Eğer modem eski yeşil (rev 0) ise ve KQD6_3.012 isimli firmware'i beğenmediyse http://download.ethomson.com/download/speedmgmt.tar.gz dosyasındaki mgmt.o isimli firmware'i kullanın.
2.6.X.X serisi firmware'i kendisi yükleyebilse de bunun bir uygulamayla ikiye ayrılması gerekiyor ki bu uygulama http://www.linux-usb.org/SpeedTouch/firmware/firmware-extractor.tar.gz adresindeki firmare-extractor uygulaması.
Bu firmware-extractor'u bir yere açın, ve bu dizinin yanına kendi firmware'inizi kopyalayın ve ismini mgmt.o olarak değiştirin.
Daha sonra firmware-extractor dizinine düşün ve klasik derleme yapın:
./configure make su make install
Bu firmware'i speedtch-1.bin ve speedtch-2.bin olarak /lib/firmware dizinine kopyalayacaktır.
Secrets Dosyaları
root hakları ile /etc/ppp/peers dosyasını oluşturun.
mkdir -p /etc/ppp/peers
Şimdi /etc/ppp/chap-secrets veya /etc/ppp/pap-secrets isminde bir dosya oluşturun. Bu ISP'nin ne chap veya pap kullandığına bağlıyımış, ancak ikisini de oluşturmanın bir zararı yokmuş. Böylece ben o nazik bayanı tekrar aramadım, acaba arasa mıydım :D
Neyse oluşturduğumuz bu iki (veya siz biliyorsanız hangisini kullandığını bir) dosyanın içine 'username@isp' * 'password' şekline bilgilerinizi giriyorsunuz.
PPP ayarları
Eğer PPPoA'ya göre ayar yapacaksanız: Aşağıdaki satırları /etc/ppp/peers/speedtch isimli bir dosyaya yazın ve kaydedin.
noipdefault defaultroute user 'username@isp' noauth updetach usepeerdns plugin pppoatm.so 0.00 ### You may need to uncomment these ### options to connect with some ISP's. ### They disable compression. # noaccomp # nobsdcomp # nodeflate # nopcomp # noccp # novj ### If the firmware loads and pppd won't ### connect uncomment this option to make ### pppd be more verbose in the system log # debug ### For more details (and more options) ### read man pppd
username@isp kısmını haliyle değiştireceksiniz. 0.00 satırlarını da vp/vc ayarlarına göre değiştireceksiniz. Türkiye için 8.35
Şimdi. Sistemi yeniden başlatın. Hotplug'ın modemi tanıması lazım.
Daha sonra /etc/rc.d/rc.local (Bu slackware için, siz de ne ise) dosyasının içine sistem her başladığında çalıştırılması için:
#!/bin/bash
# If you compiled the speedtouch driver as a module you'll
# need to load it first, so uncomment the next line
# modprobe speedtch
count=0
while [[ $count -lt 40 ]]
do
sync=$(dmesg | grep 'ADSL line is up')
if [ ! -z "$sync" ]
then
pppd call speedtch
exit 0
fi
sleep 1
let "count += 1"
done
echo "The Speedtouch firmware didn't load"
satırlarını ekleyin. Konsoldan:
chmod 600 /etc/ppp/{*secrets,peers/speedtch}
rm -f /etc/resolv.conf
ln -s ppp/resolv.conf /etc/resolv.conf
komutlarını verin. Sistemi yeniden başlattığınızda bağlı olmanız lazım.
Eğer PPPoE'ye göre ayar yapacaksanız: PPPoE için http://www.linux-usb.org/SpeedTouch/LFS/brctl-010226.c dosyasına ihtiyacınız var. İndirin. Daha sonra
gcc -o br2684ctl brctl-010226.c -latm
ile derleyin. root haklarını alıp
su
/usr/sbin dizinine kopyalayın:
cp br2684ctl /usr/sbin
Aşağıdakini /etc/ppp/peers/speedtch isimli dosyaya yazıp kaydedin:
noipdefault defaultroute user 'username@isp' noauth updetach usepeerdns plugin rp-pppoe.so nas0 ### You may need to uncomment these ### options to connect with some ISP's. ### They disable compression. # noaccomp # nobsdcomp # nodeflate # nopcomp # noccp # novj ### If the firmware loads and pppd won't ### connect uncomment this option to make ### pppd be more verbose in the system log # debug ### For more details (and more options) ### read man pppd
Haliyle username@isp kısmını değiştirin. Sistemi başlattığınızda modem tanınacaktır. Daha sonra yine /etc/rc.d/rc.local dosyasına şunları ekleyin:
#!/bin/bash
# If you compiled the speedtouch driver as a module you'll
# need to load it first, so uncomment the next line
# modprobe speedtch
count=0
while [[ $count -lt 40 ]]
do
sync=$(dmesg | grep 'ADSL line is up')
if [ ! -z "$sync" ]
then
br2684ctl -b -c 0 -a VP.VC
sleep 2
ip addr add 192.168.0.1/32 dev nas0
ip link set nas0 up
sleep 5
/usr/sbin/pppd call speedtch
exit 0
fi
sleep 1
let "count += 1"
done
echo "The Speedtouch firmware didn't load"
Burada da VP.VC kısmını Türkiye için 8.35 yapın. Konsoldan:
chmod 600 /etc/ppp/{*secrets,peers/speedtch}
rm -f /etc/resolv.conf
ln -s ppp/resolv.conf /etc/resolv.conf
komutlarını verin. Sistemi yeniden başlattığınızda bağlı olacaksınız.
Orijinal Kaynaktan Derleme-Çeviri: http://www.linux-usb.org
