# Alcatel Speedtouch USB with 2.6 kernel guide [superceded]

## kerframil

Alcatel Speedtouch USB with 2.6 kernel guide

NOTE: This guide needs an update. Much of the information here is still valid, but if you read it then please be sure to read the remaining comments on this thread. Fortunately, someone has risen to the challenge and revisited the topic in this HOWTO. Thanks, fazto!

Those of you have one of these devices and like playing with new kernels will doubtless have been frustrated by the current situation. The speedtouch drivers in portage are the user-space versions which are sadly incompatible with the 2.6 kernel. However, I've discovered how to get the Speedtouch kernel-mode driver working in Gentoo and that's what this post is about  :Smile:  Please note that I am only covering the topic as it applies to ISPs who use PPPoA (ATM), not PPPoE.

I'll be assuming that you already have the correct options for general USB support in your kernel. Now, to add support for ATM and the speedtouch module, first go to the Device Drivers > Networking support > Networking Options menu.

```
<M> Asynchronous Transfer Mode (ATM) (EXPERIMENTAL)

<M>   Classical IP over ATM (EXPERIMENTAL)
```

Now setup back up to the Networking support menu and enable:

```
<M>     PPP (point-to-point protocol) support

[ ]       PPP multilink support (EXPERIMENTAL)

[ ]       PPP filtering

<M>       PPP support for async serial ports

<M>       PPP support for sync tty ports

<M>       PPP Deflate compression

<M>       PPP BSD-Compress compression

< >       PPP over Ethernet (EXPERIMENTAL)

<M>       PPP over ATM
```

Finally, enable this module under Device Drivers > USB support:

```

<M> Alcatel Speedtouch USB support
```

Once you have rebuilt your kernel and modules, we can move on to installing the various user-space tools we need. Important: as you will not have access to the internet until the whole procedure is complete, you may wish to perform these steps in a 2.4 kernel which is currently working with the net-dialup/speedtouch drivers, or by using an alternate Internet connection. To be on the safe side please ensure that /usr/src/linux is a symbolic link to the 2.6 sources you are currently using.

Let's start with the speedtouch package. You'll need this for one file only, modem_run, which is used to upload the firmware to the device. The process of uploading the firmware must be carried out each time the USB bus is reset (for example, every time the computer is started) before the ADSL line is activated. If you like (and if you no longer wish to use a 2.4 kernel with the user-space drivers), you can make a copy of /usr/sbin/modem_run then unmerge speedtouch afterwards, remembering to put the modem_run binary back into place of course.

```
# emerge speedtouch
```

We'll be needing the ATM library because it is a pre-requisite for compiling an ATM-aware ppp.

```
# ACCEPT_KEYWORDS="~x86" emerge linux-atm
```

Now it's time to grab and install my modified ppp ebuild. It includes a patch which ensures that the pppoatm.so plugin is built. Advanced users will note that they can skip the steps to create and configure a local portage overlay, if they already have one. Note: the ebuild is versioned the same as the latest version in portage at the time of writing, but with the -r1 suffix to "bump" it a little higher.

```
# mkdir /usr/local/portage

# echo "PORTDIR_OVERLAY=/usr/local/portage" >> /etc/make.conf

# mkdir /usr/local/portage/net-dialup

# mkdir /usr/local/portage/net-dialup/ppp

# cd /usr/local/portage/net-dialup/ppp

# wget http://www.recruit2recruit.net/kerframil/ppp-2.4.2_beta3-r1.ebuild

# ebuild ppp-2.4.2_beta3-r1.ebuild digest

# ACCEPT_KEYWORDS="~x86" emerge ppp
```

The next thing is to configure ppp. Backup your existing /etc/ppp/options, then replace the content with this (replacing the name and user entries as necessary according to your username):

```
lock

defaultroute

noipdefault

noauth

holdoff 4

maxfail 25

persist

asyncmap 0

lcp-echo-interval  2

lcp-echo-failure   7

name myuser@isp

user myuser@isp

                                                                                

plugin /usr/lib/pppd/2.4.2b3/pppoatm.so

0.38
```

IMPORTANT: The numbers at the end indicate the VPI/VCI values respectively. Take care to ensure that these match those used by the ATM network operated by your ISP. The above values are common for many operators in the United Kingdom and France.

If you haven't already done so you'll need to enter your username and password in the /etc/ppp/chap-secrets file:

```
# echo "myuser@isp * password *" >> /etc/ppp/chap-secrets

# cp /etc/ppp/chap-secrets /etc/ppp/pap-secrets
```

I am not aware of any PPPoATM ADSL providers using PAP as the authentication protocol, but the above will not cause any harm.

Now let's load the Speedtouch kernel module and initialise the modem's firmware (note the use of -k to indicate that the kernel-mode driver will be used). IMPORTANT: the choice of the firmware image is absolutely critical for good performance with Speedtouch devices. I would strongly recommend that those who are not experienced with this topic use the firmware file from here. In the following examples I've assumed that this file is to be placed in the /root directory but you can put it where you like. See here for an interesting thread concerning firmware.

```
# modprobe speedtch

# cd /root

# wget http://speedtouch.sourceforge.net/files/firmware.bin

# modem_run -k -s -f /root/firmware.bin
```

If all is well then your syslogger should have reported something like this (tail /var/log/everything/current for metalog, tail /var/log/messages for others):

```
Oct 24 23:59:40 kerfy modem_run[3327]: ADSL synchronization has been obtained

Oct 24 23:59:40 kerfy modem_run[3327]: ADSL line is up (576 kbit/s down | 288 kbit/s up)
```

Now let's dial our connection:

```
# pppd
```

Check your message file again, and you should see something like:

```

Oct 24 23:58:13 kerfy PPP generic driver version 2.4.2

Oct 24 23:58:13 kerfy pppd[3316]: PPPoATM plugin_init

Oct 24 23:58:13 kerfy pppd[3316]: PPPoATM setdevname - remove unwanted options

Oct 24 23:58:13 kerfy pppd[3316]: PPPoATM setdevname_pppoatm - SUCCESS:0.38
```

If so then congratulations! Your modem is now working. You will probably want to have the speedtch module start upon each boot, and perhaps configure your system to initalise the modem too.

```
# echo speedtch >> /etc/modules.autoload.d/kernel-2.6

# echo "/usr/sbin/modem_run -k -s -f /root/firmware.bin" >> /etc/conf.d/local.start
```

A neater approach would be to make a custom init script but I have not gotten around to doing so yet. Please note that to use netfilter/iptables for firewalling on the 2.6 kernel, you must currently install the masked version of iptables (specifically iptables-1.2.8-r2):

```
# ACCEPT_KEYWORDS="~x86" emerge iptables
```

As soon as a newer release of iptables is in portage you should probably no longer use ACCEPT_KEYWORDS. 

So, enjoy! I may follow this guide up with one for kernel 2.4 and also how to get the device working with the latest LiveCD with absolutely no issues, if there is sufficient interest.Last edited by kerframil on Thu Jul 08, 2004 12:06 am; edited 3 times in total

----------

## karan

Great guide, these modems are very popular and you guide should be invaluable to many users.   :Smile: . I personally gave up on this modem, and opted to switch to the Alcatel Speedtouch Pro router. Much less hastle for the home network  :Smile:  .Though I don't use this modem, I would be interested in seeing how to install this from the LiveCD. As always, your guides are always interesting to read, good job.   :Very Happy: 

----------

## karan

Great guide, these modems are very popular and you guide should be invaluable to many users.   :Smile: . I personally gave up on this modem, and opted to switch to the Alcatel Speedtouch Pro router. Much less hastle for the home network  :Smile:  .Though I don't use this modem, I would be interested in seeing how to install this from the LiveCD. As always, your guides are very interesting to read, good job.   :Very Happy: 

----------

## karan

Sorry for doubles   :Confused: 

----------

## dhalsiim

Hi..

I don't own an Alcatel modem, but this guide will sure help me. I use a USR 9000 Sureconnect modem, the drivers are still being ported for 2.6 so I'm going to stick with 2.4 for now. I used to read everywhere that PPP needs a patch for ATM, I thought Gentoo had that already, there was no specific guide that I could find which would take you step by step through the procedure. Anyways, the link you provided to your ebuild does not work  :Sad:  WHY!!! lol .. could you please fix it  :Smile: .

Thanks

-dhalsiim

----------

## Moled

I'm running 2.6 with the speedtouch of doom

there are easier ways than what was said above  :Razz: 

ill make an ebuild later today if I have time

----------

## kerframil

 *Quote:*   

> Anyways, the link you provided to your ebuild does not work  WHY!!! lol .. could you please fix it

 

 :Shocked:  OK, it's fixed now. Sorry about that.

----------

## dhalsiim

Post what you got and I'll try'em all. I hope one of them works. I'm gonna try kerfmala's ebuild for now  :Smile:  .. yipppie DSL after all.   :Embarassed: 

--dhalsiim

----------

## dreamerme

Tried running modem_run without "-s" and it worked.  With "-s", it gives a USBDEVFS bulk error or something, and is unable to upload the microcode.   It then attempts to upload it a few more times then dies.  Everytime i get the USBDEVFS error, I have to unplug the USB cable for like 15s before i can try modem_run again. 

Also, i got the existing init script to work by making a few modifications.

changed

```
( ps -e | grep -q modem_run ) || $MODEM_RUN -v $VERBOSE -m -f $MICROCODE

```

to

```
( ps -e | grep -q modem_run ) || $MODEM_RUN -v $VERBOSE -k -m -f $MICROCODE

```

and

```
start-stop-daemon --start --exec $PPP call $PEER > /dev/null 2>&1

```

to

```
start-stop-daemon --start --exec $PPP > /dev/null 2>&1

```

Starting/stopping the service works.

----------

## antrix

Cool guide.

I'm setting this modem up for BT adsl (england), do i still need all that ATM stuff?

I don't recall needing that for 2.4 using the emerge speedtouch package.

----------

## antrix

Just wanted to say thanks for a great guide!

All working great now.   :Cool: 

Edit: Just wanted to add that I had to remove -s too. 

My ISP is BT Openworld (england), and all the ATM stuff works perfect.

----------

## MulDy

some kind of prob here :s

```
:

localhost root # tail /var/log/everything/current

Feb 22 16:00:10 [pppd] Plugin /usr/lib/pppd/2.4.2b3/pppoatm.so loaded.

Feb 22 16:00:10 [pppd] PPPoATM plugin_init

Feb 22 16:00:10 [pppd] PPPoATM setdevname - remove unwanted options

Feb 22 16:00:10 [pppd] PPPoATM setdevname_pppoatm - SUCCESS:8.35

Feb 22 16:00:10 [pppd] pppd 2.4.2b3 started by root, uid 0

Feb 22 16:00:10 [kernel] ppp_generic: No versions for exported symbols. Tainting kernel.

Feb 22 16:00:10 [kernel] PPP generic driver version 2.4.2

Feb 22 16:00:10 [kernel] failed to register PPP device (-16)

Feb 22 16:00:10 [pppd] connect(8.35): No such device

Feb 22 16:00:10 [pppd] Exit.

```

do you have any idea where it's come from ?   :Embarassed: 

tks

----------

## mahir

do you think that

these settings would work with a BT Voyager 100? (globalspan)

its the usb adsl modems u get with AOL Broadband in England..

any ideas folks?

----------

## rensi

I followed this guide and it seems that everything looks fine!

I get no kind of error message. And ifconfig shows a ppp0

But I'm just able to connect to the Internet as root to do for example an emerge. But as User I can't connect to anything

I think I have to chance some file permissions. But I don't know exactly which one.

Maybe it's because of this error messages I get during emerging ppp-2.4.2_beta3-r1

 *Quote:*   

> make[1]: Leaving directory `/home/tmp/portage/ppp-2.4.2_beta3-r1/work/ppp-2.4.2b3/pppdump'
> 
> >>>
> 
> [...]
> ...

 

----------

## Kirja

I have followed this guide up to the point where I must emerge the patched copy of ppp.  I have tried emerging it but it fails with errors:

```

autoheader-2.58: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'

autoheader-2.58: WARNING: and `config.h.top', to define templates for `config.h.in'

autoheader-2.58: WARNING: is deprecated and discouraged.

autoheader-2.58:

autoheader-2.58: WARNING: Using the third argument of `AC_DEFINE' and

autoheader-2.58: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without

autoheader-2.58: WARNING: `acconfig.h':

autoheader-2.58:

autoheader-2.58: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,

autoheader-2.58:                [Define if a function `main' is needed.])

autoheader-2.58:

autoheader-2.58: WARNING: More sophisticated templates can also be produced, see the

autoheader-2.58: WARNING: documentation.

aclocal.m4:49: error: m4_defn: undefined macro: _m4_divert_diversion

autoconf/oldnames.m4:113: AM_PROG_INSTALL is expanded from...

aclocal.m4:49: the top level

autom4te-2.58: /usr/bin/m4 failed with exit status: 1

autoheader-2.58: /usr/bin/autom4te failed with exit status: 1

make: *** [stamp-h.in] Error 1

!!! ERROR: net-dialup/ppp-2.4.2_beta3-r1 failed.

!!! Function src_compile, Line 53, Exitcode 2

!!! (no error message)

```

Any help much appreciated.  Oh btw is this patched version of ppp in portage ?  The ebuild added yesterday ppp-2.4.2-r1 seems to include the atm patch (read the changelog) as long as you put include 'atm' in your USE flag.

Update:

I may have found a solution to my problem here.

Doh! Seems I didnt have the correct entry in /etc/make.conf for my portage overlay and thus I wasnt emerging the right file.Last edited by Kirja on Sun Mar 07, 2004 3:05 pm; edited 2 times in total

----------

## lzap

Hello, when I try to emerge the patched ppp, I got this error:

```

unpack pppoatm.diff: file format not recognized. Ignoring.

```

It compiles as normal ppp (pppoatm.so is not built).

Please help.

----------

## Kirja

Ok I managed to emerge the patched copy of ppp.  I initialised my modem using modem_run etc and got the expected response as above.  Slight problem though, I still cannot access the net and I get the following output in my /var/logs/messages:

```

Mar  7 19:35:20 BlackBird pppd[3142]: PPPoATM plugin_init

Mar  7 19:35:20 BlackBird pppd[3142]: PPPoATM setdevname - remove unwanted options

Mar  7 19:35:20 BlackBird pppd[3142]: PPPoATM setdevname_pppoatm - SUCCESS:0.38

Mar  7 19:35:20 BlackBird pppd[3144]: pppd 2.4.2b3 started by root, uid 0

Mar  7 19:35:20 BlackBird pppd[3144]: Using interface ppp0

Mar  7 19:35:20 BlackBird pppd[3144]: Connect: ppp0 <--> 0.38

Mar  7 19:35:50 BlackBird pppd[3144]: LCP: timeout sending Config-Requests

Mar  7 19:35:50 BlackBird pppd[3144]: Connection terminated.

Mar  7 19:35:50 BlackBird pppd[3144]: Fatal signal 11

Mar  7 19:35:50 BlackBird pppd[3144]: Exit.

```

----------

## kerframil

Oops, looks like my topic notification died on this one some time ago   :Embarassed: 

I shall examine all of these comments more closely tonight, and see if I can't resolve some of the issues mentioned. In any case, I think it's about time this thread was "bumped" because ppp has now come out of beta and reached version 2.4.2. Watch this space ...

----------

## Kirja

Im watching   :Very Happy: 

----------

## kerframil

Important!!

Firstly, I forgot to mention that you really must have this in your kernel, under Character Devices (as modules or statically):

```
[*] Non-standard serial port support

<M>   HDLC line discipline support
```

Also, you should select the following under Library routines, if your kernel allows you to do so:

```
<M> CRC32 functions
```

Secondly, if you compile the pre-requisite support in the kernel as modules then please use the hotplug service.

```
# emerge hotplug

# rc-update hotplug boot

# /etc/init.d/hotplug start
```

Now for the individual issues raised in the various posts above:

rensi

Please try the following:

```
# find /usr/portage/net-dialup/ppp/files/ -iregex ".*files/[^\(digest\)].*$" -exec cp -a {} /usr/local/portage/net-dialup/ppp/files/ \;
```

Now, rebuild the digest and emerge ppp again:

```
# cd /usr/local/portage/net-dialup/ppp

# ebuild ppp-2.4.2_beta3-r1.ebuild digest

# ACCEPT_KEYWORDS="~x86" emerge =ppp-2.4.2_beta3-r1

# etc-update
```

lzap

Well, I believe you solved this already  :Wink: . But for the benefit of others, that "error" message is perfectly normal. The unpack stage skips the patch, because the patch is not compressed. There is no adverse effect whatsoever. The "right" way to do things is to have the patch exist in ${FILESDIR} which would be the case were this ebuild committed to Portage.

Kirja

Well, there can be a number of reasons for this. Firstly, note the requirement for slhc/n_hldc and crc32 support as mentioned above. Are you sure that the kernel has the pre-requisite features compiled in (as modules or otherwise)? 

I'll describe how the module loading process works on my system. When my system boots, the hotplug service detects the Speedtouch modem and loads the following modules: speedtch, crc32 and atm. You can accomplish the same thing without hotplug by typing:

```
# modprobe speedtch
```

or by adding speedtch to your /etc/modules.autoload.d/kernel-2.6 file prior to a reboot. I then run modem_run followed by pppd. The process of loading pppd results in these additional modules being loaded: pppoatm, ppp_generic and slhc.

Upon first issuing a packet outward bound to the Internet, these modules are loaded: ppp_deflate, zlib_deflate, bsd_comp. Note that the requirement for these may vary according to your ISP.

Of course, you can opt not to play the modules game by compiling in everything statically. When using modules, hotplug merely takes care of loading the speedtch module and dependencies, iirc. All others are loaded on demand.

My guess is that slhc/n_hdlc support is missing in your kernel. Please let me know whether this is the case. If not, then I have other suggestions which may be of assistance.

MulDy

This is not something I have seen before. Are you still experiencing this problem?

Everyone

My apologies for not making certain things clear in the original tutorial. I am currently working on some nice things related to this topic, and will update the guide in due course.

----------

## kerframil

 *mahir wrote:*   

> do you think that
> 
> these settings would work with a BT Voyager 100? 

 

I'm not familiar with that hardware. However, it's possible. I recall that even the earliest BT ADSL modems (those hideous big, black boxen which doubled up as useful frying pans) were simply re-badged Alcatel hardware.

----------

## OneOfOne

FYI latest ppp-2.4.2-r1 includes ATM support.  :Very Happy: 

peace

----------

## kerframil

 *OneOfOne wrote:*   

> FYI latest ppp-2.4.2-r1 includes ATM support. 

 

Hallelujah! Thanks for the heads up.  :Very Happy: 

----------

## Kirja

No luck unfortunatly.  I did as you instructed kerframil and the error message no longer appears but I am still unable to access the internet.  I also double checked that I had everything setup correctly in my kernel.

You said you may have some more suggestions for me to try...?

Thanks

----------

## Qubax

 *Quote:*   

> latest ppp-2.4.2-r1 includes ATM support

 

i wanted to try it out, but didn't come far

my adsl config-file in /etc/ppp/peers/ looked like this for the last 6 months:

```
noaccomp

nopcomp

noccp

novj

#lock

defaultroute

noipdefault

noauth

holdoff 4

maxfail 25

persist

asyncmap 0

lcp-echo-interval  2

lcp-echo-failure   7

user xxxxxxxxxxxxx

plugin /usr/lib/pppd/2.4.2b3/pppoatm.so

8.48

```

an never had a problem.

how to i have to modify the config, to work with current ppp-2.4.2-r1? especially the atm-options (have a look at the last line)

----------

## kerframil

Ok guys, the plot thickens ...

I found out something very interesting about ppp-2.4.2, something which has changed since the beta release. The good news is that the ip-up and ip-down scripts are now coded so that the DNS servers allocated upon a successful connection are automatically populated in /etc/resolv.conf. Furthermore, when the pppd process is terminated your original resolv.conf is restored  :Smile: 

The bad news is that it sets the permissions for resolv.conf to 600 for the duration of the connection, which means that non-root users are unable to read it  :Shocked:  ... thus, non-root users are not able to resolve names  :Sad: 

The simple fix is to adjust /etc/ppp/ip-up as follows (this excerpt begins on line 30):

```
# backup the old configuration and install the new one

cp -a $REALRESOLVCONF $REALRESOLVCONF.pppd-backup

mv $REALRESOLVCONF.tmp $REALRESOLVCONF

chmod 644 $REALRESOLVCONF

fi
```

You can bet your bottom dollar that I'll file a bug on this (assuming one hasn't already been filed). I am sure I'm not the only person to have noticed.

 *Kirja wrote:*   

> No luck unfortunatly. I did as you instructed kerframil and the error message no longer appears but I am still unable to access the internet.

 

Has the above got anything to do with it by any chance? If not, then the suggestions I had are probably null and void as you say the error message that you were originally experiencing (specifically, the "LCP: timeout" message) has gone away. If so, then perhaps we should get in touch so that I can take a closer look at exactly what is happening on your system (feel free to get hold of me on your chat network of choice).

 *Qubax wrote:*   

> i wanted to try it out, but didn't come far

 

Elementary, my dear Watson ... try the following:

```
# emerge sync

# ACCEPT_KEYWORDS="~x86" USE="atm" emerge ppp

# sed -i -e "s/2\.4\.2b3/2\.4\.2/" /etc/ppp/peers/<file>
```

... where <file> should obviously be substituted as necessary.

By the way, the reason I am suggesting that you sync and re-emerge is because the developer who committed ppp-2.4.2-r1 made a mistake when he first committed the ebuild to Portage. This mistake meant that the pppatm.so file was not copied into the right place (outside of the Portage sandbox) during the final merge stage  :Rolling Eyes: 

----------

## Bubsy

Great guide! I've followed it and everything works perfectly!

I run modem_run & pppd and I happily surf the net.

Untill.... I reboot.

pppd gives me this error msg:

```
Kernel doesn't support ppp_generic - needed for PPPoATM
```

I have all necessary PPP kernel options set as modules. I'm sure ppp_generic is there.

To fix this, I need to re-emerge ppp-2.4.2-r1 (and copy pppoatm.so to it's correct loc.). After this, pppd runs without a problem! (Untill I reboot again and I have to re-emerge ppp again...)

As long as I don't reboot, I can start/stop pppd without a problem.

----------

## gen536

Hi ! I followed your great guide, uploaded the firmware, then when I run pppd : (the r1 ebuild, with copied pppoatm.so)

```

sferbox root # pppd call adsl

Plugin /usr/lib/pppd/2.4.2/pppoatm.so loaded.

PPPoATM plugin_init

PPPoATM setdevname - remove unwanted options

PPPoATM setdevname_pppoatm - SUCCESS:0.38

pppd: In file /etc/ppp/peers/adsl: unrecognized option 'pty'

```

It complains on this line from peers/adsl : tty "/usr/sbin/pppoa3 -m ..."

I loaded every ppp* 2.6 module I could find, can someone tell me what's wrong ?

Thanks a LOT

----------

## kerframil

 *Bubsy wrote:*   

> Great guide! I've followed it and everything works perfectly!
> 
> I run modem_run & pppd and I happily surf the net.
> 
> Untill.... I reboot.

 

I am getting this strong sensation that you are using udev on your machine ...

Even if you are not, the problem can be solved as follows:

```
# echo "mknod /dev/ppp c 108 0" >> /etc/conf.d/local.start
```

----------

## kerframil

 *gen536 wrote:*   

> It complains on this line from peers/adsl : tty "/usr/sbin/pppoa3 -m ..."

 

Please re-read the guide, in particular the part about options. You should not be using the pppoa3 binary at all. That is a user-space implementation of PPPoA which should only be used in the case that you are not using the Alcatel kernel module and kernel ATM implementation. This thread is about 2.6 kernels in which case we must use the kernel implementations. A ppp plugin is used to interface with the kernel modules in question.

To clarify, here is my current file (/etc/ppp/peers/zen):

```
defaultroute

holdoff 4

maxfail 25

persist

asyncmap 0

lcp-echo-interval  2

lcp-echo-failure   7

name ********@zen

user ********@zen

                                                                                

plugin /usr/lib/pppd/2.4.2/pppoatm.so

0.38
```

And my /etc/ppp/options, which are inherited by any peer connection definitions, I believe:

```
noauth

usepeerdns

lock

noipdefault
```

----------

## kerframil

 *Bubsy wrote:*   

> .... I need to re-emerge ppp-2.4.2-r1 (and copy pppoatm.so to it's correct loc.)

 

The pppoatm.so should be in the correct location already. As I mentioned before, a developer screwed up when he initially bumped the ebuild to the -r1 release.  That's been resolved now (here's the segment of code in the ebuild which was once missing):

```
if [ "`use atm`" -a "`use x86`" ]; then

         dolib.so pppd/plugins/pppoatm.so

fi
```

So, the file should be placed under /usr/lib/pppd/2.4.2.

----------

## Bubsy

 *Quote:*   

> I am getting this strong sensation that you are using udev on your machine ...

 

You're right. I am using udev.

 *Quote:*   

> Even if you are not, the problem can be solved as follows:
> 
> ```
> # echo "mknod /dev/ppp c 108 0" >> /etc/conf.d/local.start
> ```
> ...

 

That solves it!!!

Thanks again for the great guide and the effort!!!   :Very Happy: 

----------

## Qubax

 *Quote:*   

> 	if [ "`use atm`" -a "`use x86`" ]; then
> 
> 		dolib.so pppd/plugins/pppoatm.so
> 
> 	fi
> ...

 

is there, but as said above, pppoatm.so can be found in /usr/lib/, an not in /usr/lib/pppd/...

so either you move the file into the correct pppd directory (but won't be deleted if unmerging) an use the settings aobe, or set the correct path in the /etc/pppd/peers/<file> to 

```
plugin /usr/lib/pppoatm.so
```

--------------

edit:

persist still not working, but a "connection without automatic reconnection" is better than no "connection with automatic reconnection"Last edited by Qubax on Thu Mar 11, 2004 7:37 am; edited 1 time in total

----------

## kerframil

 *Quote:*   

> is there, but as said above, pppoatm.so can be found in /usr/lib/, an not in /usr/lib/pppd/...

 

Ah, I see. Well, I think most of the issues concerning this topic appear to have been cleared up now. Time to update the guide ...   :Wink: 

----------

## rensi

 *kerframil wrote:*   

> 
> 
> The simple fix is to adjust /etc/ppp/ip-up as follows (this excerpt begins on line 30):
> 
> ```
> ...

 

This is how my /etcp/ppp/ip-up looks now

```
#!/bin/sh

# this is a script which is executed after connecting the ppp interface.

# look at man pppd for details

# the followings parameters are available:

# $1 = interface-name

# $2 = tty-device

# $3 = speed

# $4 = local-IP-address

# $5 = remote-IP-address

# $6 = ipparam

if [ "$USEPEERDNS" ]; then

   # add the server supplied DNS entries to /etc/resolv.conf

   # (taken from debian's 0000usepeerdns)

   # follow any symlink to find the real file

   REALRESOLVCONF=$(readlink --canonicalize /etc/resolv.conf)

   if [ "$REALRESOLVCONF" != "/etc/ppp/resolv.conf" ]; then

   # merge the new nameservers with the other options from the old configuration

   {

      grep --invert-match '^nameserver[[:space:]]' $REALRESOLVCONF

      cat /etc/ppp/resolv.conf

   } > $REALRESOLVCONF.tmp

   # backup the old configuration and install the new one

   cp -a $REALRESOLVCONF $REALRESOLVCONF.pppd-backup

   mv $REALRESOLVCONF.tmp $REALRESOLVCONF

   chmod 644 $REALRESOLVCONF

   fi

fi

[ -f /etc/init.d/firewall ] && /etc/init.d/firewall start

[ -f /etc/ppp/ip-up.local ] && . /etc/ppp/ip-up.local $1 $2 $3 $4 $5 $6

```

but I can't use as normal user  :Sad: 

any ideas?

----------

## kerframil

rensi,

I am not sure whether you are:

1) Initiating ppp as root, dropping your priveleges back to a normal user then experiencing the problem or ...

2) Attempting to start ppp as a non-root user.

In the first case, ensure that the ppp-up and ppp-down scripts have the executable bit set:

```
chmod 755 /etc/ppp/ip-*
```

In the second case, refer to this page which explains how to safely allow ppp access for non-priveleged users.

In all cases, check that resolv.conf looks sane (and has suitable permissions applied) and see if you can ping a known host by IP rather than hostname.

----------

## rensi

 *kerframil wrote:*   

> 
> 
> I am not sure whether you are:
> 
> 1) Initiating ppp as root, dropping your priveleges back to a normal user then experiencing the problem or ...
> ...

 

It was the first case! But changing ther permissions of /etc/resolv.conf from 600 to 644 seems to have fixed it!  :Wink: 

Thanks

rensi

----------

## 50cc

I can't find the pppoatm.so file. I downloaded the modified ebuild file and ran ebuild. Then i emerged ppp. But what i don't understand is this, i ran ebuild with a ppp version 2.4.2_beta3-r1 but when i emerge ppp verion 2.4.2-r1 is installed. Is the ok??

Note: I am not a Gentoo or Linux expert.  :Smile: 

Thanks from the Netherlands

----------

## 50cc

Ok, i just found out that the /etc/make.conf file has been modified somewhere since i installed Gentoo a few weeks ago. I added 'apm' to the USE variable. I did emerge -C ppp and emerge ppp. Now i do have a pppoatm.so in /usr/lib/ppp/2.4.2b3. 

Off topic:

Any ideas what could have changed my /etc/make.conf file?

On topic:

This may be a very stupid question: I don't have speedtouch modem where i am now, and so obviously it is not connected. But because i am curious how far i would get this time i did modprobe speedtch and ran pppd, no i got this error in my /var/log/messages:

```

Mar 18 10:16:43 tux drivers/usb/core/usb.c: registered new driver speedtch

Mar 18 10:17:00 tux pppd[12654]: Plugin /usr/lib/pppd/2.4.2b3/pppoatm.so loaded.

Mar 18 10:17:00 tux pppd[12654]: PPPoATM plugin_init

Mar 18 10:17:00 tux pppd[12654]: PPPoATM setdevname - remove unwanted options

Mar 18 10:17:00 tux pppd[12654]: PPPoATM setdevname_pppoatm - SUCCESS:8.48

Mar 18 10:17:00 tux pppd[12655]: pppd 2.4.2b3 started by root, uid 0

Mar 18 10:17:00 tux pppd[12655]: connect(8.48): No such device

Mar 18 10:17:00 tux pppd[12655]: Exit.

```

The line containing  "connect( 8.48 ): No such device" is an error i also got on a SuSE 9.0 machine with the same modem.

Is this because the modem in not connected or is it a different problem?

Thanks (again)

----------

## kerframil

 *50cc wrote:*   

> Ok, i just found out that the /etc/make.conf file has been modified somewhere since i installed Gentoo a few weeks ago. I added 'apm' to the USE variable. I did emerge -C ppp and emerge ppp. Now i do have a pppoatm.so in /usr/lib/ppp/2.4.2b3.

 

Are you sure it's resident in that path? That makes me fear that you are using the ebuild I created which has been superceded. Allow me to make that perfectly clear: ppp-2.4.2 in the official portage tree now fully supports PPPoATM and this is what everyone should be using. However, the atm USE flag must be active prior to compilation of ppp for this to be the case (I'm assuming you meant atm, not apm because the latter has absolutely nothing to do with this topic).

 *Quote:*   

> Off topic:
> 
> Any ideas what could have changed my /etc/make.conf file?

 

This cannot happen without your consent. Perhaps this is a result of injudicious use of the etc-update utility?

 *Quote:*   

> On topic:
> 
> This may be a very stupid question: I don't have speedtouch modem where i am now, and so obviously it is not connected. But because i am curious how far i would get this time i did modprobe speedtch and ran pppd, no i got this error in my /var/log/messages:
> 
> [snip]
> ...

 

Well, you can certainly load the speedtch module without having the device in question attached. However, the modem_run binary will not execute successfully because the device does not exist. Consequently, the firmware will not be uploaded and the DSL line will not be established. When you run pppd then it is quite right for the ppoatm.so plugin to claim that no device is available.

----------

## clampinus

It works weeeee !

IIn my case, the two big issues I had to solve were :

- getting pppoatm.so to be built and find where it was : use "atm" use flag and use path /usr/lib/pppoatm.so instead of the one provided, as the plugin seems to be installed in the wrong place currently

- adapting the VPI/VCI values to my own provider settings. I found those by using the diagnostic tool under Windows.

Thanks for this guide Kerf !

----------

## 50cc

Am getting a bit closer (i think) i tested the speedtouch again, and after running pppd i got this in my /var/log/messages file:

```

Mar 22 17:31:41 tux pppd[6606]: Plugin /usr/lib/pppd/2.4.2b3/pppoatm.so loaded.

Mar 22 17:31:41 tux pppd[6606]: PPPoATM plugin_init

Mar 22 17:31:41 tux pppd[6606]: PPPoATM setdevname - remove unwanted options

Mar 22 17:31:41 tux pppd[6606]: PPPoATM setdevname_pppoatm - SUCCESS:8.48

Mar 22 17:31:41 tux pppd[6608]: pppd 2.4.2b3 started by root, uid 0

Mar 22 17:31:41 tux pppd[6608]: connect(8.48): Resource temporarily unavailable

Mar 22 17:31:41 tux pppd[6608]: Exit.

```

This was with the speedtouch attached of course.

Any ideas?

----------

## 50cc

I was reading a different thread on this forum which was discussing a user which was using the wrong VCI/VPI values. But i noticed that he had something different in his logs:

```

Dec 21 19:23:35 [pppd] pppd 2.4.2b3 started by root, uid 0 

Dec 21 19:23:35 [pppd] Using interface ppp0 

Dec 21 19:23:35 [pppd] Connect: ppp0 <--> 0.35

```

In the log above pppd connects to ppp0 but if i do

```

bash-2.05b# ls /dev/ppp* -l

crw-------    1 root     root     108,   0 Jan  1  1970 /dev/ppp

```

I don't have a ppp0 file, is this my problem maybe?

----------

## 50cc

I finally got it working!! Thankyou for this guide!

What i was doing wrong (i think) was not running modem_run each time.

Does anyone now howto edit the hotplug files so that modem_run, modprobe speedtouch and pppd are started after the modem is plugged in? This would be pretty cool.

Thanks again.

----------

## Hi-Rider

IMHO you have mixed up two drivers in your guide:

kernel and user space:

http://www.linux-usb.org/SpeedTouch/docs/howto.html

http://cvs.sourceforge.net/viewcvs.py/*checkout*/speedtouch/speedtouch/doc-linux/howto/SpeedTouch-HOWTO-en.html?rev=HEAD

But finally you use userspace driver.

Does anybody trying to use kernel space driver. Does it really stable now ?

----------

## 50cc

 *Hi-Rider wrote:*   

> IMHO you have mixed up two drivers in your guide:
> 
> kernel and user space:
> 
> http://www.linux-usb.org/SpeedTouch/docs/howto.html
> ...

 

I think your wrong, all the drivers come from the kernel all that's used from the userland files is the modem_run utility.

I'm busy converting a SuSE 9.0 maching to a Gentoo maching at this very moment. It wil be used as a fileserver/printserver/NAT/DHCP/firewall machine.

 It will be connected to the Speedtouch, i'm hopping it will be stable.  :Smile:  (the speedtouch part that is)

----------

## Gentii

Does anyone know what has changed with mm-sources 2.6.5 ?

I head about some hotplug fixes. But the speedtouch usb doesn't work anymore with these sources... I can start modem_run, then my modem is synchronized but modem_run doesn't stop. Even with ctrl+c it wont stop.

Is it possible to have this modem working on last mm-sources?

----------

## OneOfOne

 *Bubsy wrote:*   

>  *Quote:*   I am getting this strong sensation that you are using udev on your machine ... 
> 
> You're right. I am using udev.
> 
>  *Quote:*   Even if you are not, the problem can be solved as follows:
> ...

 

which kernel is that? afaik ppp sysfs patch went into main stream a while ago..

 *Quote:*   

> Does anyone know what has changed with mm-sources 2.6.5 ? 
> 
> I head about some hotplug fixes. But the speedtouch usb doesn't work anymore with these sources... I can start modem_run, then my modem is synchronized but modem_run doesn't stop. Even with ctrl+c it wont stop. 
> 
> Is it possible to have this modem working on last mm-sources?

 

it's the usb updates in it, if you dont depend on any of the major usb updates in it do this : cd /usr/src/linux-2.6.5-mm2 && wget http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.5/2.6.5-mm2/broken-out/bk-usb.patch -q -O - | patch -p1 -R and recompile.

that *should* fix modem_run problems.

peace

----------

## Azrael3000

i followed your tutorial and compiled the kernel. all modules were working as supposed. then I started to emerge the whole stuff but the after another reboot the pppoatm module didn't want to start

dmesg says:

```
pppoatm: Unknown symbol register_atm_ioctl 

pppoatm: Unknown symbol deregister_atm_ioctl
```

I disabled the pppoatm module in the kernel and enabled it again. While compiling I got the following message:

```
Warning: /lib/modules/2.6.4-rc1/kernel/net/atm/pppoatm.ko needsunknown symbol register_atm_ioctl

Warning: /lib/modules/2.6.4-rc1/kernel/net/atm/pppoatm.ko needsunknown symbol deregister_atm_ioctl
```

thanks for your help

----------

## danmilkman

Followed the manual, but can't get it to work at all. Fails to load microcode, USBDEVFS_BULK errors?

What am I doin' wrong?

Help pleaze.

----------

## hulmeman

I'm having 2 problems with this, I have an Alcatel Speedtouch USB (Frog type), 

Problem 1:

I can only load the mgmt.o firmware:

modem_run -k -s -f /usr/share/speedtouch/mgmt.o

May 16 16:05:43 localhost modem_run[8274]: modem_run version 1.2 started by root uid 0

May 16 16:06:18 localhost modem_run[8476]: [monitoring report] ADSL link went up

May 16 16:06:27 localhost modem_run[8274]: ADSL synchronization has been obtained

May 16 16:06:27 localhost modem_run[8274]: ADSL line is up (576 kbit/s down | 288 kbit/s up)

If I try <firmware.bin> or <KQD6P2.eni> or <alcaudsl.sys> or <boot.v123.bin> I get:

modem_run -k -s -f /usr/share/speedtouch/firmware.bin

May 16 16:22:01 localhost modem_run[8158]: modem_run version 1.2 started by root uid 0

It doesn't bring the link up!  I could live with using mgmt.o, but my biggest problem is this:

Problem 2:

When I do: (Whichever firmware)

pppd call adsl

It doesn't do anything but load the generic driver, it doesnt connect or anything??

May 16 16:25:29 localhost kernel: PPP generic driver version 2.4.2

Its driving me mad! Obviously I don't get ppp0, or any usefull error messages. Speedtouch works fine with 2.4 kernel.

My /etc/ppp/peers/adsl:

defaultroute

holdoff 4

maxfail 25

persist

asyncmap 0

lcp-echo-interval  2

lcp-echo-failure   7

name "a@b.c"

user "a@b.c"

plugin /usr/lib/pppd/2.4.2/pppoatm.so

0.38

My /etc/ppp/options:

noauth

usepeerdns

lock

noipdefault

Ive got /dev/ppp, /usr/lib/pppd/2.4.2/pppoatm.so, speedtch and atm are loaded!

Please help???/

----------

## hulmeman

D'oh!!!!

I've sorted it, a couple of ppp_* modules weren't loaded! 

Great howto, thanks, tho I still can't get firmware.bin to load.

Baz

----------

## mrjingles

hi everybody, I'm getting this error in the log when I do pppd:

```

tail /var/log/messages

May 19 02:14:24 niko pppd[5873]: ioctl(ATM_SETBACKEND): No such device

May 19 02:14:28 niko pppd[5873]: ioctl(ATM_SETBACKEND): No such device

May 19 02:14:32 niko pppd[5873]: ioctl(ATM_SETBACKEND): No such device

May 19 02:14:36 niko pppd[5873]: ioctl(ATM_SETBACKEND): No such device

May 19 02:14:40 niko pppd[5873]: ioctl(ATM_SETBACKEND): No such device

May 19 02:14:44 niko pppd[5873]: ioctl(ATM_SETBACKEND): No such device

May 19 02:14:48 niko pppd[5873]: ioctl(ATM_SETBACKEND): No such device

```

and I don't know what to do to get It work my connection. thanks in advance.

edit: found the problem. I had to make :

```
modprobe pppoatm

```

----------

## mmg

great guide so far.. 

everytime I start pppd call adsl, I get an error saying:

/usr/lib/pppoatm.so has no initialization entry point

any hints? can't get it to work... 

thanks.

----------

## pjoanes

 *hulmeman wrote:*   

> I'm having 2 problems with this, I have an Alcatel Speedtouch USB (Frog type), 
> 
> ...
> 
> If I try <firmware.bin> or <KQD6P2.eni> or <alcaudsl.sys> or <boot.v123.bin> I get:
> ...

 

I've been seeing similar problems. I'm using kernel 2.6.5 from gentoo-dev-sources. My usb is using the uhci_hcd module for my VT82xxxxx UHCI USB 1.1 Controller. Attempting to unload the usb modules causes rmmod to wait indefinitely.

I have the "firmware.bin" file because I've found it to be the best with my v2 (red) modem. I've also found that modem_run 1.2 doesn't load the firmware or sync the ADSL (it just exits). However, with the machine freshly rebooted I can get it to work using modem_run v1.2-beta1.

Unfortunately, improving this situation would seem to require fixes to both the kernel and modem_run. 

- Peter Joanes.

----------

## OneOfOne

 *pjoanes wrote:*   

>  *hulmeman wrote:*   I'm having 2 problems with this, I have an Alcatel Speedtouch USB (Frog type), 
> 
> ...
> 
> If I try <firmware.bin> or <KQD6P2.eni> or <alcaudsl.sys> or <boot.v123.bin> I get:
> ...

 

you guys need to pass the -a option with the new modem_run

either use the KQD6_3.012 driver from the site or use /usr/share/speedtouch/boot.v123.bin which comes with speedtouch-1.2 (only for the -a option, use the -f option with whatever you want).

peace

----------

## rensi

since I've switched from kernel 2.6.5 to kernel 2.6.6 I always get following error when i try to start my connection as usual

```
May 27 15:49:02 [modem_run] modem_run version 1.2-beta2 started by reini uid 0_

May 27 15:49:02 [kernel] usb 1-2: usbfs: interface 1 claimed while 'modem_run' sets config #1

May 27 15:49:06 [kernel] usb 1-2: usbfs: interface 0 claimed while 'modem_run' sets config #1

May 27 15:49:30 [modem_run] ADSL synchronization has been obtained_

May 27 15:49:30 [modem_run] ADSL line is up (800 kbit/s down | 128 kbit/s up)_

May 27 15:49:30 [modem_run] pusb_release_interface 2 failed

May 27 15:49:31 [modem_run] Device disconnected, shutting down

May 27 15:49:35 [pppd] Plugin /usr/lib/pppd/2.4.2/pppoatm.so loaded.

May 27 15:49:35 [pppd] pppd 2.4.2 started by root, uid 0

May 27 15:49:35 [pppd] connect(8.48): Resource temporarily unavailable

May 27 15:49:35 [pppd] Failed to open 8.48: Resource temporarily unavailable

May 27 15:49:39 [pppd] connect(8.48): Resource temporarily unavailable

May 27 15:49:39 [pppd] Failed to open 8.48: Resource temporarily unavailable

May 27 15:49:43 [pppd] connect(8.48): Resource temporarily unavailable

[...]

```

anyone can help?

thanks reini

----------

## mmg

I had the same problem. fixed it by downgrading to 2.6.5 again. 

it seems to be related to the usb-updates in the kernel 2.6.6. there are several fixes available, but none of the fixes that I tried brought back my modem...

so, downgrading to 2.6.5 was the solution I choosed.

regs,

marco

----------

## fr4nk

Hi,

First of all, I don't use gentoo, because my Traffic Limit is not so high   :Sad:  , but the documentations here are great  :Smile: .

I'm using Mandrake 9.2 with kernel 2.6.6, and have problems with my USB-Modem...

I've read this how-to, done everything postet there, except the thing with the patched pppd, because I can't make ebuild with Mandrake...

So I've skipped this step and went on. After running modem_run and pppd, I get following:

```
PPPoATM plugin_init

PPPoATM setdevname - remove unwanted options

PPPoATM setdevname_pppoatm - SUCCESS:8.48
```

looks allright, but there is still no internet connecton  :Sad: 

The Modem ran well with the original Mandrake Kernel 2.4.22 and the speedtouchconf-script.

does anybody know what to do?

tia, frank

----------

## fazto

After reading this GREAT guide (thanx Kerframil!!) i've managed to get it work after quitte some nights. Because I've done it quitte a bit different than this guide, i've decided to put together a new HOWTO

----------

## rensi

 *rensi wrote:*   

> since I've switched from kernel 2.6.5 to kernel 2.6.6 I always get following error when i try to start my connection as usual
> 
> Code:
> 
> May 27 15:49:02 [modem_run] modem_run version 1.2-beta2 started by reini uid 0_
> ...

 

 *mmg wrote:*   

> I had the same problem. fixed it by downgrading to 2.6.5 again.
> 
> it seems to be related to the usb-updates in the kernel 2.6.6. there are several fixes available, but none of the fixes that I tried brought back my modem...
> 
> so, downgrading to 2.6.5 was the solution I choosed.
> ...

 

In kernel 2.6.7 it's working for me again!

----------

## kerframil

 *fazto wrote:*   

> After reading this GREAT guide (thanx Kerframil!!) i've managed to get it work after quitte some nights. Because I've done it quitte a bit different than this guide, i've decided to put together a new HOWTO

 

Thank you  :Smile: 

----------

