个人工具

“UbuntuHelp:UsbAdslModem/SpeedTouch”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的6个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/UsbAdslModem/SpeedTouch}}
 
{{From|https://help.ubuntu.com/community/UsbAdslModem/SpeedTouch}}
 
{{Languages|UbuntuHelp:UsbAdslModem/SpeedTouch}}
 
{{Languages|UbuntuHelp:UsbAdslModem/SpeedTouch}}
This guide is for setting up a USB ADSL modem with the '''''Speed``Touch''''' driver under Ubuntu 6.10 (Edgy Eft).
+
This guide is for setting up a USB ADSL modem with the '''''Speed``Touch''''' driver .
=== The firmware ===
+
(Ubuntu 9:10 Kernel 2.6.31-14)
===== About the firmware =====
+
=== Method 1 ===
The firmware is a small piece of code that gets loaded into the modem itself as a kind of OS for the modem. There are three revisions for the '''''Speed``Touch''''' and each revision runs its own firmware. To determine what revision you need, use the following command:
+
Follow this guide ([[UbuntuHelp:UKSpeedtouchDSLHowTo|UKSpeedtouchDSLHowTo]])
 +
=== Method 2 ===
 +
Go to a computer or another operating system with internet access.
 +
Visit [http://packages.ubuntu.com/ Ubuntu Packages Search] and search for each of the following packages. Download them to a folder that is also visible from Ubuntu (or to a USB stick).
 +
<ol><li>python-gtkmozembed</li></ol>
 +
 
 +
for 32 bit http://packages.ubuntu.com/karmic/i386/python-gtkmozembed/download
 +
for 64 bit http://packages.ubuntu.com/karmic/amd64/python-gtkmozembed/download
 +
<ol><li>python-eggtrayicon</li></ol>
 +
 
 +
for 32 bit http://packages.ubuntu.com/karmic/i386/python-eggtrayicon/download
 +
for 64 bit http://packages.ubuntu.com/karmic/amd64/python-eggtrayicon/download
 +
<ol><li>python-gtkspell</li></ol>
 +
 
 +
for 32 bit http://packages.ubuntu.com/karmic/i386/python-gtkspell/download
 +
for 64 bit http://packages.ubuntu.com/karmic/amd64/python-gtkspell/download
 +
<ol><li>python-gksu2
 +
</li><li>libgdl-1-common
 +
</li><li>libgdl-1-3
 +
</li><li>python-gdl
 +
</li><li>libgda-4.0-common
 +
</li><li>libgda-4.0-4</li></ol>
 +
 
 +
10. python2.5-minimal
 +
11. libdb4.6
 +
12. python2.5
 +
13. python-gda
 +
14. python-gnome2-extras
 +
Boot into Ubuntu and install each package in the ''exact'' order listed.
 +
Now download [http://www.squeezedonkey.com/svn/linux/trunk/releases/ubuntu/32-bit%20i386/usbadslmodemmanager_0.5.8_i386.deb USB ADSL Modem Manager] and install it.
 +
After installation, to access the USB ADSL Modem Manager, go to
 +
Applications...Internet...USB ADSL Modem Manager.
 +
When first run, it will ask for the settings of your connection: Username, Password, VP and VC.
 +
To connect, right click the tray icon with your mouse and choose '''Connect''' from the context menu.  
 +
You should now be connected to the internet!
 +
=== PPP Over ATM only if you have done method  1 ===
 +
If your ISP uses PPP Over ATM (PPPoATM, PPPoA) then read this section. If it uses PPP Over Ethernet (PPPoE) then jump to the PPP Over Ethernet section.
 +
We now need to create a configuration file for pppd to use so open a text editor and paste the following into it:
 +
(for Ubuntu)
 
<pre><nowiki>
 
<pre><nowiki>
grep -B 1 "THOMSON" /proc/bus/usb/devices
+
touch speedtch
 +
gedit speedtch
 
</nowiki></pre>
 
</nowiki></pre>
After that you will see something like this: Rev= X.00 (where X is the version of your modem).
+
(or for Kubuntu)
If you have a 0 or 2 revision then you will have to use the KQD6_3.012 file from [http://www.speedtouch.com/download/drivers/USB/SpeedTouch330_firmware_3012.zip this archive] and if the output of the command says you have a revision 4 modem then you will have to use the ZZZL_3.012 file from [http://www.speedtouch.com/download/drivers/USB/SpeedTouch330_firmware_3012.zip the same archive]. Download [http://www.speedtouch.com/download/drivers/USB/SpeedTouch330_firmware_3012.zip the zip file] containing the firmware and save it in your home folder. Create a folder called "speedtouch" where you will do all the work and move the zip file containing the firmware files to it and unzip it.
+
 
<pre><nowiki>
 
<pre><nowiki>
mkdir speedtouch
+
touch speedtch
mv SpeedTouch330_firmware_3012.zip speedtouch
+
kwrite speedtch
cd speedtouch
+
unzip SpeedTouch330_firmware_3012.zip
+
 
</nowiki></pre>
 
</nowiki></pre>
Now we have the firmware files in our speedtouch working folder.
 
===== Preparing the firmware =====
 
You now have the needed firmware - but that is not enough - the firmware file needs to be prepared and for this we will use a tool called firmware-extractor. The firmware-extractor splits the firmare file in two pieces so it vcan be loaded into the modem's memory. So [http://www.linux-usb.org/SpeedTouch/firmware/firmware-extractor download] the firmware-extractor and move it to the fresh created working folder:
 
<pre><nowiki>
 
mv firmware-extractor speedtouch
 
</nowiki></pre>
 
Now we will split the firmware using the following commands depending on the modem revision:
 
<pre><nowiki>
 
cd speedtouch
 
chmod +x firmware-extractor
 
./firmware-extractor KQD6_3.012
 
</nowiki></pre>
 
if you have a 0 or 2 revision modem or:
 
<pre><nowiki>
 
cd speedtouch &&
 
chmod +x firmware-extractor &&
 
./firmware-extractor ZZZL_3.012
 
</nowiki></pre>
 
if you have a 4 revision modem.
 
After that you will have two files in the speedtouch folder: speedtch-1.bin & speedtch-2.bin is just the firmware splited in two parts.
 
===== Copying the firmware into the right place. =====
 
Now we will copy the firmware files to the right place for the firmware to be loaded at boot time.
 
This command will do the work:
 
<pre><nowiki>
 
sudo cp speedtch* /lib/firmware/
 
</nowiki></pre>
 
=== Secrets ===
 
We need to create a file called either pap-secrets or chap-secrets but since we don't know what authentication method our ISP is using we will just create a secrets file and copy it to /etc/ppp.So open a text editor and put a line like this (don't forget about the spaces in the ' * ')
 
<pre><nowiki>
 
'username' * 'password'
 
</nowiki></pre>
 
replace 'username' and 'password' with those provided by your ISP and save the file as <code><nowiki>secrets</nowiki></code>.  Make sure there are no quotes around those details.
 
Now we will copy it to /etc/ppp:
 
<pre><nowiki>
 
sudo install -m 600 secrets /etc/ppp/chap-secrets
 
sudo install -m 600 secrets /etc/ppp/pap-secrets
 
</nowiki></pre>
 
=== PPP Over ATM ===
 
If your ISP uses PPP Over ATM (PPPoATM, PPPoA) then read this section. If it uses PPP Over Ethernet (PPPoE) then jump to the PPP Over Ethernet section.
 
We now need to create a configuration file for pppd to use so open a text editor and paste the following into it:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
noipdefault
 
noipdefault
 
defaultroute
 
defaultroute
user 'username'
+
user 'username@isp'
 +
 
noauth
 
noauth
 
updetach
 
updetach
第65行: 第62行:
 
plugin pppoatm.so
 
plugin pppoatm.so
 
0.00
 
0.00
 +
 +
 
# noaccomp
 
# noaccomp
 
# nobsdcomp
 
# nobsdcomp
第71行: 第70行:
 
# noccp
 
# noccp
 
# novj
 
# novj
 +
 +
 
# debug
 
# debug
 +
 
</nowiki></pre>
 
</nowiki></pre>
Replace 'username' with that provided by your ISP and also change 0.00 with the VP/VC values and save the file as speedtch.
+
Replace 'username' and 'isp' with that provided by your ISP and also change 0.00 with the VP/VC values and save the file as speedtch.
 
Now copy it to /etc/ppp/peers :
 
Now copy it to /etc/ppp/peers :
 
<pre><nowiki>
 
<pre><nowiki>
第96行: 第98行:
 
If your ISP is using PPP Over Ethernet (PPPoE) then things are a little bit more complicated because we need to create a bridging connection using br2684ctl bridging utility. Download br2684ctl from [http://www.linux-usb.org/SpeedTouch/mandrake/br2684ctl here] and install it with this command:
 
If your ISP is using PPP Over Ethernet (PPPoE) then things are a little bit more complicated because we need to create a bridging connection using br2684ctl bridging utility. Download br2684ctl from [http://www.linux-usb.org/SpeedTouch/mandrake/br2684ctl here] and install it with this command:
 
<pre><nowiki>
 
<pre><nowiki>
 +
wget http://www.linux-usb.org/SpeedTouch/mandrake/br2684ctl
 
sudo install -m 755 br2684ctl /usr/sbin
 
sudo install -m 755 br2684ctl /usr/sbin
 
</nowiki></pre>
 
</nowiki></pre>
 
Now we also need a configuration file for pppd to use so we open a text editor and paste the following:
 
Now we also need a configuration file for pppd to use so we open a text editor and paste the following:
 +
(for Ubuntu)
 +
<pre><nowiki>
 +
touch speedtch
 +
gedit speedtch
 +
</nowiki></pre>
 +
(or for Kubuntu)
 +
<pre><nowiki>
 +
touch speedtch
 +
kwrite speedtch
 +
</nowiki></pre>
 
<pre><nowiki>
 
<pre><nowiki>
 
noipdefault
 
noipdefault
 
defaultroute
 
defaultroute
user 'username'
+
user 'username@isp'
 +
 
noauth
 
noauth
 
updetach
 
updetach
第108行: 第122行:
 
plugin rp-pppoe.so
 
plugin rp-pppoe.so
 
nas0
 
nas0
 +
 +
 
# noaccomp
 
# noaccomp
 
# nobsdcomp
 
# nobsdcomp
第114行: 第130行:
 
# noccp
 
# noccp
 
# novj
 
# novj
 +
 +
 
# debug
 
# debug
 +
 
</nowiki></pre>
 
</nowiki></pre>
replace 'username' with that provided by your ISP, save it as speedtch and copy it to /etc/ppp/peers:
+
replace 'username' and 'isp' with that provided by your ISP, save it as speedtch and copy it to /etc/ppp/peers:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo install -m 600 speedtch /etc/ppp/peers
 
sudo install -m 600 speedtch /etc/ppp/peers
第130行: 第149行:
 
while [ $count -lt 40 ]
 
while [ $count -lt 40 ]
 
do
 
do
sync=$(dmesg | grep 'ADSL line is up')
+
  sync=$(dmesg | grep 'ADSL line is up')
if [ ! -z "$sync" ]
+
  if [ ! -z "$sync" ]
then
+
  then
br2684ctl -b -c 0 -a VP.VC
+
    br2684ctl -b -c 0 -a VP.VC
sleep 3
+
    sleep 3
ifconfig nas0 192.168.0.1 netmask 255.255.255.0 up
+
    ifconfig nas0 192.168.0.1 netmask 255.255.255.0 up
sleep 10
+
    sleep 10
pppd call speedtch
+
    pppd call speedtch
exit 0
+
    exit 0
fi
+
  fi
sleep 1
+
  sleep 1
count=$((1+$count))
+
  count=$((1+$count))
 
done
 
done
 
echo "The Speedtouch firmware didn't load"
 
echo "The Speedtouch firmware didn't load"
第154行: 第173行:
 
==== Finally ====
 
==== Finally ====
 
You now reboot and should be online. The Net is yours! :)
 
You now reboot and should be online. The Net is yours! :)
http://www.easy-poll.com/counters/free_counter.32449.png
 
 
----
 
----
 
[[category:CategoryNetworking]]
 
[[category:CategoryNetworking]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月20日 (四) 00:43的最新版本

This guide is for setting up a USB ADSL modem with the Speed``Touch driver . (Ubuntu 9:10 Kernel 2.6.31-14)

Method 1

Follow this guide (UKSpeedtouchDSLHowTo)

Method 2

Go to a computer or another operating system with internet access. Visit Ubuntu Packages Search and search for each of the following packages. Download them to a folder that is also visible from Ubuntu (or to a USB stick).

  1. python-gtkmozembed

for 32 bit http://packages.ubuntu.com/karmic/i386/python-gtkmozembed/download for 64 bit http://packages.ubuntu.com/karmic/amd64/python-gtkmozembed/download

  1. python-eggtrayicon

for 32 bit http://packages.ubuntu.com/karmic/i386/python-eggtrayicon/download for 64 bit http://packages.ubuntu.com/karmic/amd64/python-eggtrayicon/download

  1. python-gtkspell

for 32 bit http://packages.ubuntu.com/karmic/i386/python-gtkspell/download for 64 bit http://packages.ubuntu.com/karmic/amd64/python-gtkspell/download

  1. python-gksu2
  2. libgdl-1-common
  3. libgdl-1-3
  4. python-gdl
  5. libgda-4.0-common
  6. libgda-4.0-4

10. python2.5-minimal 11. libdb4.6 12. python2.5 13. python-gda 14. python-gnome2-extras Boot into Ubuntu and install each package in the exact order listed. Now download USB ADSL Modem Manager and install it. After installation, to access the USB ADSL Modem Manager, go to Applications...Internet...USB ADSL Modem Manager. When first run, it will ask for the settings of your connection: Username, Password, VP and VC. To connect, right click the tray icon with your mouse and choose Connect from the context menu. You should now be connected to the internet!

PPP Over ATM only if you have done method 1

If your ISP uses PPP Over ATM (PPPoATM, PPPoA) then read this section. If it uses PPP Over Ethernet (PPPoE) then jump to the PPP Over Ethernet section. We now need to create a configuration file for pppd to use so open a text editor and paste the following into it: (for Ubuntu)

touch speedtch
gedit speedtch

(or for Kubuntu)

touch speedtch
kwrite speedtch
noipdefault
defaultroute
user 'username@isp'
# user '[email protected]'
noauth
updetach
usepeerdns
plugin pppoatm.so
0.00


# noaccomp
# nobsdcomp
# nodeflate
# nopcomp
# noccp
# novj


# debug

Replace 'username' and 'isp' with that provided by your ISP and also change 0.00 with the VP/VC values and save the file as speedtch. Now copy it to /etc/ppp/peers :

sudo install -m 600 speedtch /etc/ppp/peers

Make a Bootscript

Edit /etc/rc.local as root, e.g.

sudo nano /etc/rc.local

and after the line

# By default this script does nothing

paste the following:

# Start up Speedtouch connection
pon speedtch

Now the connection will start at boot time.

PPP Over Ethernet

If your ISP is using PPP Over Ethernet (PPPoE) then things are a little bit more complicated because we need to create a bridging connection using br2684ctl bridging utility. Download br2684ctl from here and install it with this command:

wget http://www.linux-usb.org/SpeedTouch/mandrake/br2684ctl
sudo install -m 755 br2684ctl /usr/sbin

Now we also need a configuration file for pppd to use so we open a text editor and paste the following: (for Ubuntu)

touch speedtch
gedit speedtch

(or for Kubuntu)

touch speedtch
kwrite speedtch
noipdefault
defaultroute
user 'username@isp'
# user '[email protected]'
noauth
updetach
usepeerdns
plugin rp-pppoe.so
nas0


# noaccomp
# nobsdcomp
# nodeflate
# nopcomp
# noccp
# novj


# debug

replace 'username' and 'isp' with that provided by your ISP, save it as speedtch and copy it to /etc/ppp/peers:

sudo install -m 600 speedtch /etc/ppp/peers

Make a Bootscript

Open a text editor and paste the following:

#!/bin/bash
modprobe ppp_generic
modprobe pppoatm
modprobe br2684
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 3
    ifconfig nas0 192.168.0.1 netmask 255.255.255.0 up
    sleep 10
    pppd call speedtch
    exit 0
  fi
  sleep 1
  count=$((1+$count))
done
echo "The Speedtouch firmware didn't load"

change the VP.VC values with those provided by your ISP ( in my case 0.35 ) save the file as dial then install the bootcript and make the needed symbolic links:

sudo install -m 744 dial /etc/init.d &&
sudo ln -s ../init.d/dial /etc/rc2.d/S95dial &&
sudo ln -sf ppp/resolv.conf /etc/resolv.conf

Now everything is in place and the connection is set.

Finally

You now reboot and should be online. The Net is yours! :)