Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jul 2003 13:15:34 +0100
From:      Izam-Ryan Bahrin <izamryan@uk.co.demon.materialitynospam.demon.co.uk>
To:        "Rick Duvall" <rduvall@onlinehighways.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Speed Touch 330, FreeBSD 4.8: Working
Message-ID:  <200307061315.36322.izamryan@uk.co.demon.materialitynospam>

next in thread | raw e-mail | index | archive | help

--Boundary-00=_mLBC/mDMzwnYG2B
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Description: clearsigned data
Content-Disposition: inline

=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I have a SpeedTouch 330 USB ADSL modem which I am trying to connect to
> Qwest's ADSL (PPPoA).  I am running FreeBSD 4.2, and all I can find in the
> docs is support for a SpeedTouch USB, not the 330.

GENERAL OBSERVATIONS

I initially tried this modem with FreeBSD 5.0, however since the driver cau=
sed=20
a kernel panic I am now using FreeBSD 4.8 and 2-3 days ago have gotten this=
=20
setup to work.

You WILL have problems using SpeedTouch hardware with buggy USB controllers=
=2E I=20
have previously used the SpeedTouch frog (the green modem) with a buggy USB=
=20
1.0 controller (my old machine) and experienced kernel panics after being=20
connected for a sufficient length of time.

I would recommend you use your motherboard's built in USB 2.0 controller, o=
r=20
purchase an el-cheapo PCI USB expansion board.

Alternatively, instead of purchasing a USB ADSL modem, consider purchasing =
an=20
external ADSL router and connect to the router via ethernet. Unfortunately=
=20
this will expose you to the risk of remote exploits if the router you have=
=20
chosen has buggy firmware. I cannot recommend any models, as I have not don=
e=20
any research into this.

This will have the effect of changing your SpeedTouch headache into a route=
r=20
headache, but with the side benefit of making it somewhat easier to hook up=
=20
the XBox to the XBox live service.

If you can call it a benefit.


=46reeBSD SPECIFIC ADVICE: PREAMBLE

=46irstly, before you disrespect any code, keep in mind that BSD & OSS in=20
general is a volunteer project. I've observed that the quality of OSS=20
projects is adversely affected by their obscurity, and I reckon that FreeBS=
D=20
+ SpeedTouch 330 is a relatively obscure setup. FreeBSD excels in networked=
=20
environments, precisely because this is the environment most developers wor=
k=20
in and want FreeBSD to excel in.

If this setup is too flaky for you, it may be a result of the SpeedTouch 33=
0=20
being somewhat obscure hardware. As much as I dislike saying it, try Linux=
=20
instead. There appears to be more mailing list traffic dedicated to Linux,=
=20
suggesting it is less of an obscure setup. Or it just might mean the=20
opposite: that all the BSD users have little/no problem. Go figure.


=46reeBSD SPECIFIC ADVICE: Specifics

I've just read news claiming the newest beta driver (1.2 beta 2) supports=20
=46reeBSD 5.1
http://speedtouch.sourceforge.net/index.php?/news.en.html

You can use the /usr/ports/net/pppoa port to install Benoit's speedtouch=20
drivers. It includes the following:

	modem_run:
		a helper program that initialises the speedtouch modem by sending
		bytes from the firmware down the USB bus.

	pppoa2:
		a helper program that intercepts the data off the USB bus and converts it
		into something the FreeBSD ppp user-space daemon can use.

		The documentation hints that this process is FLAKY on STARTUP.
		Specifically: "another bug in the driver, in some cases pppoa2 does not
		fork well"

	pppoa3:
		same as the above, but uses THREADS.
		FreeBSD thread implementation in 4.x leaves a lot to be desired for.
		FreeBSD thread implementation in 5.x is better.

		http://www.mail-archive.com/speedtouch@ml.free.fr/msg01339.html

I have had success with pppoa2, but I have encountered the abovementioned=20
problem.

> ... it seems that everything is
> fine except for the firmware that you download off of the SpeedTouch
> website.  I am expecting to download speedmgmt.tar.gz, and they just have=
 a
> zip file binary that extracts into 2 binary files that the Makefile doesn=
't
> recognize.


INSTALLING THE SPEEDTOUCH GPL DRIVER (HOWTO)

Unfortunately, the pppoa port does not include Speed Touch 330 support. The=
=20
1.2 beta versions from the sourceforge site support the Speed Touch 330.

I would suggest requesting an update to the ports package when version 1.2 =
is=20
out of beta. Either that or submit a patch.

=46ollow the following recipe to force the ports system to install the upda=
ted=20
beta

1. Get the firmware.bin file from the following URLs. The modem is initiali=
sed=20
by sending some bytes from the firmware down the USB bus. I think that the=
=20
ZIP file that extracts into 2 binary files that you mention above contains=
=20
this firmware + other LINUX SPECIFIC files.

http://speedtouch.sourceforge.net/files/firmware.bin
http://speedtouch.sourceforge.net/index.php?/download.en.html


2. Get the latest beta SOURCE in .tar.gz (I'm using beta1, beta2 is out, yo=
ur=20
mileage may vary YMMV). Copy the .tar.gz file to /usr/ports/distfiles

http://sourceforge.net/project/showfiles.php?group_id=3D32758&release_id=3D=
168217


3. Perform an FTP search for the Alcatel firmware. This is needed for the=20
ports system, and I don't use this firmware. (use the one you downloaded in=
=20
step 1.) Copy the .tar.gz file to /usr/ports/distfiles

http://www.alltheweb.com/search?cat=3Dftp&cs=3Diso-8859-1&ftype=3D4&q=3Dspe=
edmgmt.tar.gz


4. Ports uses md5 hashes to ensure downloaded software is not compromised. =
You=20
will have to override this by doing something like this :

bash-2.05b$ md5 speedtouch-1.2-beta2.tar.gz > distinfo
bash-2.05b$ cat distinfo
MD5 (speedtouch-1.2-beta2.tar.gz) =3D 5daa67d80be2f400471e764e8f1baed3

bash-2.05b$ md5 speedmgmt.tar.gz >> distinfo


5. You should now have 4 files: the good firmware, the latest speedtouch=20
source, the Alcatel firmware and a distinfo file.

I ran the following commands on a FreeBSD 4.5-Release. After this I cvsuped=
 my=20
source trees, so YMMV.

	(i) Copy distinfo into /usr/ports/net/pppoa.

	This will overwrite the old md5 checksums.
=09
	(ii) cd /usr/ports/net/pppoa and
	make extract
=09
	you should now have the latest speedtouch source extracted to
	/usr/ports/net/pppoa/work
=09
	(iii) cd /usr/ports/net/pppoa/work
	mv speedtouch-1.2-beta2 speedtouch-1_0

	This will have the effect of tricking the ports system into thinking the n=
ew
	source =3D the old source.

	(iv) cd /usr/ports/net/pppoa
	make build

	This will tell ports to compile the speedtouch source.

	(v) mkdir /usr/local/share/speedtouch

	For some reason ports does not create this directory but required it.

	(vi) cp firmware.bin /usr/local/libdata/firmware.bin

CONGRATULATIONS! if you got this far without any hassle, you've got the mos=
t=20
up to date binaries installed with 2 firmware versions you can choose from.

All that's left to do is configure PPP and away you go.


CONFIGURING PPP

1. The default install creates an adsl.sh.sample script in
/usr/local/etc/rc.d/

Copy this to adsl.sh and change ONE line:

modem_run -f $PREFIX/libdata/mgmt.o

to

/usr/local/sbin/modem_run -f $PREFIX/libdata/firmware.bin -d /dev/ugen0=20

This has forces modem_run to initialise the modem on /dev/ugen0. If this=20
doesn't work, dmesg | grep -i speed and look at the device name the=20
speedtouch driver initialises to. I don't think mine worked without this=20
switch.

2. The default install has a ppp.conf.sample in
/usr/local/share/doc/speedtouch

Backup the /etc/ppp/ppp.conf, and copy ppp.conf.sample to /etc/ppp/ppp.conf=
=20
and change ONE line:

set device !"/usr/local/sbin/pppoa2 -vpi <VPI> -vci <VCI> -v 1"


to

set device !"/usr/local/sbin/pppoa2 -vpi <VPI> -vci 38 -v <VCI> -d /dev/uge=
n0"

Again, this forces pppoa2 to use the modem on /dev/ugen0. I don't think min=
e=20
worked without this switch.

You can also try to add the switch: "-e 1", which the pppoa2 man page sugge=
sts=20
for SpeedTouch 330 modems. Haven't tried it yet.

Now edit <login>, <password> and <VPI>.<VCI> for the appropriate settings.


VIOLA: that should be it.


ALTERNATIVE CONFIGURATION

Alternatively, you can get rc.conf to start up ppp on startup and not call =
the=20
initialisation script from /usr/local/etc/rc.d/

Delete /usr/local/etc/rc.d/adsl.sh to prevent it from running at boot and e=
dit=20
/etc/rc.conf by including the following lines.

ppp_enable=3D"YES"
ppp_mode=3D"ddial"
ppp_profile=3D"adsl"
ppp_nat=3D"NO"

Now just edit /etc/ppp/ppp.conf and include ONE line:

shell !"/usr/local/sbin/modem_run -m -f /usr/local/libdata/firmware.bin -d=
=20
/dev/ugen0"

before set authname <login>

This has the effect of starting ppp on boot BEFORE sendmail starts up. This=
=20
then allows sendmail to bind to the appropriate IP, but that's another stor=
y.

I still get some flakiness: it takes a long time to come up and I have to=20
Control+C to cancel something, but it still connects and I get connectivity.


IN CONCLUSION

I attach below the ppp.conf and adsl.sh for my system AS IT STANDS.=20
Demon.co.uk doesn't support LQR, so it's commented out.

I have decided to go for the alternate method by starting ppp on startup fr=
om=20
rc.conf

You'll notice the ppp.conf specifies pppoa3 not pppoa2, which I'm going to =
try=20
on my next reboot to see if it's any better than pppoa2.


Good luck, Rick!
I hope this is of some assistance to you. Please do not hesitate to email m=
e=20
at the unscrambled address above (rewrite it backwards and remove the nospa=
m)=20
for advice in this or any other FreeBSD matter.

Kind Regards,

Izam-Ryan Bahrin.
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/CBLmsQXZdmpre1gRAmPKAJ9wstDuAJIlU3JyWyMqPdBRuqxwzQCbBpjB
4a6/SeMbZyVUMbUsIr2JgqQ=3D
=3Dwkmp
=2D----END PGP SIGNATURE-----

--Boundary-00=_mLBC/mDMzwnYG2B
Content-Type: text/plain;
  charset="us-ascii";
  name="ppp.conf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="ppp.conf"

#################################################################
# PPP  Sample Configuration File to use with the Speedtouch USB
# Written by Francois Rogler <francois@rogler.org>
# 
# You will have to fill in :
# - <login>
# - <password>
# - <VPI>.<VCI> os defined by your provider. Common values are :
#     - 8.35 or 8.67 in France
#     - 0.38 in the UK
#     - 8.48 in the Netherlands
#     - 8.35 in the USA
#     - 8.35 in Italy
#
#   $Id: ppp.conf,v 1.3 2003/06/28 17:49:54 root Exp root $
#################################################################

default:
 ident user-ppp VERSION (built COMPILATIONDATE)
 set log Phase Chat IPCP CCP tun command

adsl:
 shell !"/usr/local/sbin/modem_run -m -f /usr/local/libdata/firmware.bin -d /dev/ugen0"
 set authname <login>
 set authkey <password>
 set device !"/usr/local/sbin/pppoa3 -vpi 0 -vci 38 -v 1 -d /dev/ugen0 -e 1"
 accept chap
 set speed sync
 set timeout 0
# enable lqr
 set lqrperiod 5
 set redial 15 10000
 set dial ""
 set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 
 add default HISADDR
 enable dns

--Boundary-00=_mLBC/mDMzwnYG2B--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307061315.36322.izamryan>