[speedtouch] Re: undetermined signal loss

2003-11-27 Thread Tim Woodall
On Sun, 23 Nov 2003, el_magico wrote:

> 
> Hello everybody!
>   at random time my ADLS connection loss but ppp0 interface is
>   still up, I can ping on external IP , but not on P-t-p and any




I'll lay odds its a chipset issue.

  Bus  0, device   7, function  2:
USB Controller: Intel Corp. 82371SB PIIX3 USB [Natoma/Triton II] (rev 1).
  IRQ 11.
  Master Capable.  Latency=48.
  I/O at 0x1200 [0x121f].

by any chance?

I have the same issue. I've added a couple of delays to the driver (which
limits my download speed to about 30k rather than 60k) and I rarely see
the problem.

FTP a file consisting entirely of 0xFF and it usually dies in a few seconds
even with my patch.

I've tried everything except a USB hub - my firewall is up in the loft so 
it's a bit of a hassle to try things that can't be done remotely.

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: [CVS commits] Various small things

2003-11-27 Thread Tim Woodall
On Thu, 20 Nov 2003, Leonard den Ottolander wrote:

>   /* calculate the rest if there is any */
> - num_bytes_new = num_bytes_read - 
> nb_cells*ATM_CELL_TOTAL_SIZE;
> - num_bytes_read -= nb_cells*ATM_CELL_TOTAL_SIZE;
> + num_bytes_new = num_bytes_read -= nb_cells * 
> ATM_CELL_TOTAL_SIZE;
>  
It's a style thing but this I really don't like. It is far too easy
to overlook the - in the -= in the changed version. IMnsHO, the
original was better.

Wouldn't
num_bytes_read -= nb_cells * ATM_CELL_TOTAL_SIZE;
num_bytes_new = num_bytes_read;
be better?

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: Problems with latest RedHat errata kernel(2.4.20-18.7)

2003-07-28 Thread Tim Woodall
All,

I have just received the following email:

Date: Sat, 26 Jul 2003 18:30:26 -0400
From: Pete Zaitcev <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: RHL Bug 96984 (ohci regression)

Hello:

I would appreciate if you tested a kernel which I built
to address the problem. Please select one which suits your hardware
from this FTP location:
 people.redhat.com:/zaitcev/tmp/*-2.4.20-19.z1.*.rpm

Thanks,
-- Pete
 

Can anybody with this problem test this please and get back to Pete.
I'm not going to be able to try anything for a couple of weeks at least
(The only setups I have with ohci are remote - I'm not testing a new
kernel if I might not be able to connect back to the machine!)

Regards,

Tim.



On Mon, 9 Jun 2003, Philip Ross wrote:

> 
> - Original Message - 
> From: "Tim Woodall" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, June 08, 2003 11:16 PM
> Subject: [speedtouch] Re: Problems with latest RedHat errata kernel
> (2.4.20-18.7)
> 
> 
> > I've had no chance to look but if you look at the errata list for the
> > kernel there are numerous USB fixes. Seems like the previous kernel
> > broke lots of things.
> 
> I had noticed.
> 
> I forgot to mention earlier - I have now raised a bug for this issue with
> Red Hat (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=96984).  You
> may like to post details of the problems you've seen there too.
> 
> Phil
> 
> 
> 
> 
> Liste de diffusion modem ALCATEL SpeedTouch USB
> Pour se désinscrire : mailto:[EMAIL PROTECTED]
> 
>   
> 

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: AW: Re: AW: Re: AW: Re: ping impossible

2003-07-13 Thread Tim Woodall
On Sat, 12 Jul 2003, Ok Overbeek (mz) wrote:

> 
> Can't see any errors there...everything should work properly.
> Maybe someone else has an idea??
> 

I haven't been following this thread closely but firewall?

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: Speedtouch - Everything seems to be ok but I cantconnect.

2003-07-03 Thread Tim Woodall
On Wed, 2 Jul 2003, Martin Moreira wrote:

> 
> Before nothing thank you for the work.
> 
> I installed Mandrake 9.1 and the speedtouch driver.
> I didn't have problems with that, everything was ok.
> 
> I tested the ppp connection with
> 
> ifconfig ppp0
> 
> and I have the message... But I can't connect to any page or IP address.
> 
> 

At a guess your routing table is wrong - the default route should use
ppp0.

Try pinging the two ip addresses from ifconfig ppp0
If both work then it is probably your routing table. If one of them doesn't
then it is probably a firewall problem.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: New beta available

2003-06-28 Thread Tim Woodall
On Sat, 28 Jun 2003, Edouard Gomez wrote:

> > The little omission in atm.c (regarding the congestion-bit) is still there,
> > and I can tell you: I get tons of 'em, leading to tons of CRC-errors.
> > And the length-error in pppoa3 is still there..
> 
> Just post them, i'll update them if needed. 
> 

Here are the changes to atm.c. I need to spend some more time looking at
the changes for pppoa3.

The only critical bit is the hunk at line 366, the rest is debugging changes.

(The lines might wrap - beware - I'll send direct as an attachment if required.)

Regards,

Tim.


--- atm.c   Thu May 15 20:17:49 2003
+++ atm.c.new   Sat Jun 28 13:01:29 2003
@@ -325,6 +325,7 @@
break;
}
}
+   if (i > 0) report(0, REPORT_ERROR|REPORT_DATE, "Junk bytes\n");
}
 
 
@@ -339,7 +340,7 @@
 
/* Skip cells that don't use the same vpi, vci as ours */
if( vpi != atm_header_get_vpi(src) || vci != atm_header_get_vci(src)) {
-   report(1, REPORT_INFO|REPORT_DATE, "Cell had wrong 
VPI(%d)/VCI(%d) (OAM?) PTI=0x%.2x\n",
+   report(0, REPORT_INFO|REPORT_DATE, "Cell had wrong 
VPI(%d)/VCI(%d) (OAM?) PTI=0x%.2x\n",
atm_header_get_vpi(src),
atm_header_get_vci(src),
atm_header_get_pti(src));
@@ -350,6 +351,10 @@
continue;
}
 
+   pti = atm_header_get_clp(src);
+   if (pti > 0) {
+   report(0, REPORT_ERROR|REPORT_DATE, "Clp bit is ON\n");
+   }
pti = atm_header_get_pti(src);
 
/* 
@@ -366,6 +371,11 @@
continue;
}
 
+   /* deal with the congestion bit in user-data cell: take it out; data 
is OK */
+
+   if (pti == 2)  pti = 0;
+   if (pti == 3)  pti = 1;
+
atm_cell_read(dst, src);
 
src  += ATM_CELL_TOTAL_SIZE;
@@ -418,7 +428,7 @@
 
/* If real > expected length, This is most likely a deliberate crack attempt */
if(real_length > length)
-   return(-1);
+   return(-2);
 
/* Copy the data */
if(data != frame)



-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: Testers fore.........

2003-06-26 Thread Tim Woodall
On Wed, 18 Jun 2003, Ok Overbeek (mz) wrote:

> 
> To those with persisting CRC-errors!
> Who is in for a test of an updated version of pppoa3?
> This version will cure your ailments
> On your request I will send you the source on your
> private address.
> 

Any more developments on this? I don't have CRC errors but I would be
interested in seeing what has been changed.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: Problems with latest RedHat errata kernel(2.4.20-18.7)

2003-06-08 Thread Tim Woodall
On Sun, 8 Jun 2003, Philip Ross wrote:

> 
> - Original Message - 
> From: "Tim Woodall" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, June 08, 2003 3:26 PM
> Subject: [speedtouch] Re: Problems with latest RedHat errata kernel
> (2.4.20-18.7)
> 
> 
> > > I've just installed the latest errata kernel (2.4.20-18.7,
> > > https://rhn.redhat.com/errata/RHSA-2003-187.html) on my RedHat 7.2 box
> and I
> > > am getting errors when starting modem_run (Speedtouch 1.2 beta 1):
> > >
> > Yes, I've seen the same thing today.
> 
> Any idea what is causing the problem / how to fix it? Does anyone know
> whether this is a bug in the Speedtouch USB code or in the new kernel
> version?
> 
I've had no chance to look but if you look at the errata list for the
kernel there are numerous USB fixes. Seems like the previous kernel
broke lots of things.

I've rolled back to the 2.4.18 for now.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: Problems with latest RedHat errata kernel (2.4.20-18.7)

2003-06-08 Thread Tim Woodall
On Sat, 7 Jun 2003, Philip Ross wrote:

> 
> I've just installed the latest errata kernel (2.4.20-18.7,
> https://rhn.redhat.com/errata/RHSA-2003-187.html) on my RedHat 7.2 box and I
> am getting errors when starting modem_run (Speedtouch 1.2 beta 1):
> 
Yes, I've seen the same thing today.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Archive gone?

2003-06-04 Thread Tim Woodall

Does anyone know what has happened to the mailing list archive?

I am having some problems talking someone setting up a system with
a frog with a serial number that ends in 02. (I set the machine up with
my 05 frog and it worked for me. Username and password have been changed
but I'm pretty sure they are correct. Anyone with a btclick account got
any tips?)

modem_run completes successfully and ADSL sync is obtained but pppd only
gets as far as starting pppoa3 and then there is no further info.

(I haven't yet tried turning on pppoa3 logging as I am trying to debug
this over the telephone at the moment. Maybe I'm going to have to pay a
visit :-( )

I'm sure I remember something like this from years ago but I can't find
the list archive to look for any solutions.

Anyone got any ideas? (Either how to solve my problem or where to find
the list archive)

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: Les meilleurs choses ont une fin

2003-05-30 Thread Tim Woodall
On Thu, 29 May 2003, dodo wrote:

> 
> la débit a de nouveau chuté à 12-15 ko/s, même si j'ai beaucoup moins 
> d'erreurs CRC qu'au début.
> 
> May 29 13:34:00 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:35:04 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:36:01 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:37:02 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:38:08 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:39:02 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:40:00 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:41:01 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:42:02 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:43:02 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:44:05 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:45:10 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:46:04 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:47:10 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:48:04 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:49:02 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:50:03 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> May 29 13:51:00 Pentium4 pppoa3[2032]: CRC error in an AAL5 frame
> 
> Une erreur CRC chaque minute, un vrai métronome ...
> 

This sort of implies that either the modem or your ISP are inserting
a timing cell or something like that which is causing a problem.

Have you tried Ok's changes for the Congestion bit?

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: Solving CRC-errors: help again!

2003-05-29 Thread Tim Woodall
On Wed, 28 May 2003, Ok Overbeek (mz) wrote:

> 
> Don't look at the CRC-stuff; it could never interfere...
> It is the size of the block I get (straight from the incoming
> urb)!!
> 
> 
Ok. I've got an idea - no guarantees though.

Given the size of your reads, multiple frames are being sent over the
USB link back to back. 3392 is the maximum read size we do.

Now maybe the 330 is sending data before the second frame is complete, so
you are getting one complete and one incomplete frame.

I don't think we handle joining the next USB read to the last USB read
unless only complete frames are being read.

Regards,

Tim.


> >On Wed, 28 May 2003, Ok Overbeek (mz) wrote:
> >
> >  
> >
> >>Still hacking along, guys; I made a simple
> >>pipe-version for the  usb-read-part, but 
> >>that gave no difference.
> >>In the meantime I found something else though:
> >>I always get a CRC-error, when the amount of
> >>data as read from the modem is abnormally (??)
> >>large, i.e. larger than 1696..
> >>
> >>The regular sort of data-chunk I get is 53 bytes
> >>(1 cell) or 159 bytes (3 cells) and from time to
> >>time something larger, but these top em all:
> >>
> >>
> >>ATM cells read from usb (3339 bytes long)
> >>ATM cells read from usb (1855 bytes long)
> >>ATM cells read from usb (2120 bytes long)
> >>ATM cells read from usb (2597 bytes long)
> >>ATM cells read from usb (3339 bytes long)
> >>ATM cells read from usb (2650 bytes long)
> >>
> >>Questions:
> >>Is it normal?
> >>
> >>
> >
> >Don't know.
> >
> >  
> >
> >>If no, what can I do about it?
> >>
> >>
> >>
> >Try disabling software buffering?
> >
> >Anything over 1696 is definitely[1] two IP frames being joined back to back.
> >Maybe there is a bug in the code when this happens.
> >
> >Regards,
> >
> >Tim.
> >
> >p.s. I seem to recall the CRC check is done at the end of the buffer read
> >from the USB. If two frames have been joined then we are probably doing the
> >CRC wrong. I'll have a look in a minute
> >
> >[1] Ok, not definitely but does anyone know of an isp with an MTU >1500? :-)
> >  
> >
> 
> 
> 
> 
> Liste de diffusion modem ALCATEL SpeedTouch USB
> Pour se désinscrire : mailto:[EMAIL PROTECTED]
> 
>   
> 

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: Solving CRC-errors: help again!

2003-05-29 Thread Tim Woodall
On Wed, 28 May 2003, Ok Overbeek (mz) wrote:

> 
> Still hacking along, guys; I made a simple
> pipe-version for the  usb-read-part, but 
> that gave no difference.
> In the meantime I found something else though:
> I always get a CRC-error, when the amount of
> data as read from the modem is abnormally (??)
> large, i.e. larger than 1696..
> 
> The regular sort of data-chunk I get is 53 bytes
> (1 cell) or 159 bytes (3 cells) and from time to
> time something larger, but these top em all:
> 
> 
> ATM cells read from usb (3339 bytes long)
> ATM cells read from usb (1855 bytes long)
> ATM cells read from usb (2120 bytes long)
> ATM cells read from usb (2597 bytes long)
> ATM cells read from usb (3339 bytes long)
> ATM cells read from usb (2650 bytes long)
> 
> Questions:
> Is it normal?

Don't know.

> If no, what can I do about it?
> 
Try disabling software buffering?

Anything over 1696 is definitely[1] two IP frames being joined back to back.
Maybe there is a bug in the code when this happens.

Regards,

Tim.

p.s. I seem to recall the CRC check is done at the end of the buffer read
from the USB. If two frames have been joined then we are probably doing the
CRC wrong. I'll have a look in a minute

[1] Ok, not definitely but does anyone know of an isp with an MTU >1500? :-)
-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: Speedtouch USB Modem

2003-03-29 Thread Tim Woodall
On Sun, 30 Mar 2003, David Rosthorn wrote:

> 
> I've recently decided to switch to Red Hat 8.0, and I've been *attempting* to 
> install it, using the How-To file made by Benoit.
> 
> First, I took the alcaudsl.sys file from my WINNT\System\Drivers directory
> 
> I installed the drivers, and configured the PPPD correctly, and when it got to 
> launching the connection, i tried the modprobes and only one gave ANY output (mount 
> none /proc/bus/usb -t usbdevfs) which was positive.
> 
> I then proceeded to load the microcode, so I inputted the command, and it just sat 
> there for 30 seconds or so then sent me back to the prompt for commands.
> 
This might be correct. What happens when you try to run pppd?

Have a look in /var/log/messages.

Tim.

p.s. your line length is a little long!


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: Can't start ADSL connection, Redhat8.0

2003-03-22 Thread Tim Woodall
On Fri, 21 Mar 2003, scott wrote:


> Give me the password for [EMAIL PROTECTED]:
   



asdl? or adsl?

If I were you I would get that password changed NOW. It is archived for
all posterity.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: How do I set up my Speedtouch

2003-03-19 Thread Tim Woodall
On Wed, 19 Mar 2003, Paul Hudson wrote:

> 
> Hi All,
> 
 >
> Below is the tail of the /var/log/messages file after setting the vci and
> vpi to the suggested for the UK,
> and editing the pap-secrets and chap-secrets file.  It looks pretty good to
> me - but I'm no expert -
> but still when I try any URL in Mozilla it can't be found.
> 
> Mar 17 19:18:38 localhost pppd[2016]: local IP address 81.86.246.146
> Mar 17 19:18:38 localhost pppd[2016]: remote IP address 81.86.240.1
> Mar 17 19:18:38 localhost pppd[2016]: primary DNS address 158.43.240.3
> Mar 17 19:18:38 localhost pppd[2016]: secondary DNS address 158.43.240.4

You are connected successfully. Well done. :-)

> Mar 17 19:18:59 localhost kernel: Packet log: output ACCEPT lo PROTO=17
> 127.0.0.1:32769 127.0.0.1:53 L=61 S=0x00 I=63145 F=0x4000 T=64 (#2)
> Mar 17 19:18:59 localhost kernel: Packet log: input ACCEPT lo PROTO=17
> 127.0.0.1:32769 127.0.0.1:53 L=61 S=0x00 I=63145 F=0x4000 T=64 (#3)
> Mar 17 19:18:59 localhost kernel: Packet log: output ACCEPT lo PROTO=17
> 127.0.0.1:32769 127.0.0.1:53 L=61 S=0x00 I=63145 F=0x4000 T=64 (#2)


It looks to me like you have a DNS problem - you are querying a DNS
server on localhost - you probably don't intend that - look at
/etc/resolv.conf


Finally - you need to turn off some of that firewall logging - otherwise 
your logs are going to get VERY big very quickly :-)

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: [PATCH] Skipping junk bytes

2003-03-10 Thread Tim Woodall
On Mon, 10 Mar 2003, Edouard Gomez wrote:

> 
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
> 
> Edouard Gomez ([EMAIL PROTECTED]) wrote:
> > I'll do that tonight.
> 
> Quick hack that could be the start of a smarter junk byte skipping.
> 
> My approach is now to look for the next cell beginning in a [0..ATM cell si=
> ze]
> range. To achieve that, i look for a vpi, vci matching the ones we
> expect and finally the HEC (header CRC) just to be sure.=20
> 

Seems sensible to me.

You might want to optimize the atm_header_get_vpi and atm_header_get_vci. You
should be able to do something nifty like:

if(*(unsigned int*)(src+i)&0x0ff0 == (vpi<<24)+(vci<<4))

Not sure that the shifts are right so this probably doesn't work :-)

Also assumes that unsigned int is 32 bits.


OTOH, this code should only be hit when something has already gone wrong so
clarity may be far better than performance in this instance - someone trying 
to debug why they are having problems may prefer not to have to "decode" the
code first.


Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: atm.c

2003-03-10 Thread Tim Woodall
On Mon, 10 Mar 2003, Duncan Sands wrote:

> 
> Spotted in atm.c:
> 
> /* Skip the junk bytes at the beginning */
> if(!tmp) {
> src+= tmp;
> length -= tmp;
> }
> 
> Hmmm.
> 
> Duncan.
> 
I remember this one - but I hadn't noticed the !

Previously the code did something like:

src = atm_cells;
dst = atm5_frames + *cur_pos;



src = atm_cells;
dst = atm5_frames + *cur_pos;

So basically the code just used to trim the length.
I remember saying that the comment didn't match the code.


This could explain the CRC errors if the crud really is at the beginning
of the buffer. I think you will usually get away with this if the
crud is at the end although you will probably get CRC errors.


So, IMO,

if(!tmp) should be if(tmp)

and possibly the src+=tmp should be removed - people getting CRC errors
should try with and without so we can narrow this one down.

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: Problems with pppoa3

2003-02-28 Thread Tim Woodall
On Fri, 28 Feb 2003, Matt Wright wrote:

> Hi,
> 
> A while ago a swapped from the kenerl mode drivers to these userland 
> drivers and I can say I'm impressed. Well done to you all.
> 
> One small problem has arisen though. A couple of weeks back I 
> experienced a problem with pppoa3 where it kept dying as pppd started 
> it, or soon after. Now I found the section in the FAQ about /var/run 
> files and followed the instructions therein. These didn't make much 
> difference.
> 
> Therefore I've been running for week son pppoa2. Not that I mind this 
> but it's nice to keep up with the latest software. I can't figure out 
> what is up. I tried compiling using the newest CVS this morning and it 
> died not long into being used. So I'm back on pppoa2.
> 
> I would include more detail but the logs don't show anything, they have 
> the normal debug of raw data but nothing to indicate why it suddenly 
> stops working.
> 
> Any ideas? or ideas on what I need to post to help??
> 
Initally at least post the last 30 or so lines that pppoa3 puts in the
logs when debugging is at its highest level.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: LCP timeout with speedtouch 330 & redhat 7.2

2003-02-28 Thread Tim Woodall
On Fri, 28 Feb 2003, Duncan Sands wrote:

> 
> > As I understand it, you still need the -e 1 switch to pppoa3 but I don't
> > think you do do modem run.
> 
> Is there any reason not to make -e 1 the default?
> 
None that I know of. When I originally wrote the patch I was guessing as
I didn't have a 330 to test with. I wanted to make sure that I wasn't going
to break anything if and when I managed to get the 330 working because
it's easier to get people to test your code if they haven't got something
that works but if I got the 330 to work but simultaneously broke the
original speedtouch then I might have had problems getting something
that works for everyone due to lack of testers.

But it's really not my decision. I hack on the project when I have time
but then abandon it for months at a time when I don't. It's the regulars
here who fix peoples day to day problems and who would probably end up
sorting any problems with any odd speedtouchs that stop working for
some bizarre reason when people eventually upgrade to a later version.

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: LCP timeout with speedtouch 330 & redhat 7.2

2003-02-28 Thread Tim Woodall
On Thu, 27 Feb 2003, Enrique Dorantes wrote:

> Hi, Í have the same problem, i got LCP timeout request, and I have USB  Modem 
> running on Debian
> 
> But I can not patch the source code...
> 
> I save the mail as text and I run  patch < mail 
> 
> and I get a lot of errors, and I try to modify the file but it doesn't patch
> 
> Help please
> 
> [EMAIL PROTECTED]
> 

I suspect that this patch is already present, certainly it is in the latest
CVS version (actually a slightly modified version but it should still work)

As I understand it, you still need the -e 1 switch to pppoa3 but I don't
think you do do modem run.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: [INFO] Reverse engineering infos available

2003-02-23 Thread Tim Woodall
On Sun, 23 Feb 2003, Edouard Gomez wrote:

> 
> Edouard Gomez ([EMAIL PROTECTED]) wrote:
> > You can find information there:
> > http://ed.gomez.free.fr/speetouch-info/
> 
> Of course it is:
> http://ed.gomez.free.fr/speedtouch-info/
> 
Cool. Thanks. Downloading it now.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: Unravelling the Speedtouch

2003-02-22 Thread Tim Woodall
On Sat, 22 Feb 2003, Duncan Sands wrote:

> 
> Thanks for the interesting post and keep up the good work.
> I'm really looking forward to the day when we will be able to
> program the modem ourselves!
> 
Seconded.

I've had a brief look but the ARM7 disassembler I found can't
cope with the code :-( Tomorrow I'm going to go and see if I
can find a book on ARM9 and maybe write a disassembler :-)

If you have a look at extract.c there is a main() function 
commented out that will extract the stuff that is sent to the
modem.

There is one block of 512 bytes hardcoded into modem_run.c
that gets sent first - this looks like ARM code as well.

The stuff extracted from mgmt.o or mgmt (md5sum below)
looks like it could be possible to put some hooks into so
that we could include pppd in the microcode.

For example:
[EMAIL PROTECTED] /home/tim/cvs/microcode]$ strings mgmt.bin | grep "fft"
/cm4/fsn/hs/sachem/adsl30/common/sources/Ifft.cc

Anyone want to bet that here is the code to do an inverse fft :-)

There are also things like Decoder.cc and Encoder.cc

Regards,

Tim.

MD5SUM of the extracted microcode
2820937dc9651e086435aa49f53d4348  mgmt.bin


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]




[speedtouch] Re: Help - Thompson reply for speedtouch techspecs...

2003-02-17 Thread Tim Woodall
On 17 Feb 2003, Peter Riocreux wrote:

> 
> >> "DS" == Duncan Sands <[EMAIL PROTECTED]> writes:
> 
> >> However, being able to include the pppd code into the microcode so
> >> that the modem presents standard IP packets to the device driver
> >> would be nice and shouldn't be too difficult to achieve.
> 
> DS> Yes, this is a good idea.
> 
> >> I wonder how much DSP work the microcode has to do and how much is
> >> built into the ATM chipset?
> 
> DS> Given it is a cheap modem, I'm guessing the microcode does a lot.
> 
> I had not realised that there was an ARM core in there, and even if I
> had, I probably would have assumed that the microcode contains a lot
> of other stuff too. Is it known/believed/guessed that all/most of the
> microcode is ARM code?
> 
> Do we know what ARM core? 6, 7, 9? Thumb/non-Thumb?, with or without an
> MPU/MMU? If it does a lot of hard DSP stuff, that might point to it
> being a 9E core.
> 

One of the modems advertised on a press release - sorry you will
have to google for it and I can't remember the search terms I used -
definitely uses an ARM 9E core. No idea about Thumb/Non-Thumb.

I've managed to find an Arm 7 (psion 5?) GPLed disassembler on the
web that should be easy enough to interface with - basically you
pass it a 32 bit word and the routine disassembles that command.
(I've not done any ARM before but I've learned other assemblers by
debugging compilers output so it's nothing new ;-)

The real problem will be if most of the microcode is doing DSP magic.
You will need the detailed specs of the signalling etc on the line and
also the detailled specs of the ATM chips so you know what data you are
getting and what you need to do with it in order to make any sense of
most of the code.

Best hope is to spot bits like the 0xec -> ATM cell CRC code and then
"rip" big chunks of the microcode and use it unchanged.

IIRC, when doing a dump of the microcode there is significant amounts of
ASCII in there (but I might be getting confused with the mgmt.o file rather
than the microcode itself. ISTR that the microcode looked like it was 
probably similar to that used in the ethernet modems.)


> A trivial way to spot ARM code is places where a large proportion of
> the words have 0xE as the most significant nibble. (For the
> uninitiated, *all* [1] ARM instructions are contionally executed, and
> 0xE is the unconditional condition.) The start of ARM code will often
> contain words starting 0xEA (an unconditional branch) or 0xE59FF (load
> the PC from a PC-relative address) - and you get these in the bottom
> seven or eight words [2], possibly with a gap at address 0x14 [3], as
> these addresses are the exception vectors.
> 

Useful info. I might have a play sometime this week (and maybe buy
a book on ARM)

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Help - Thompson reply for speedtouch techspecs...

2003-02-16 Thread Tim Woodall
On Fri, 14 Feb 2003, Duncan Sands wrote:

> 


> I think you mean 0xec.  Maybe if we had the specs we would know.  For me,
> the worst bit about only a few people having access to the specs is that it excludes
> everyone else who would like to do something with the modem or the drivers.  For
> example, the modem contains an ARM processor.  I can imagine someone wanting
> to boot linux on the modem!  Crazy, I know, but we can't know what someone might
> want to do.  Without the specs, playing around with the modem becomes almost
> impossible.  I don't want there to be a "chosen few".  I want to give power to the 
>people!
> But if there is no other way, then maybe that is how it will have to be.
> 
Do you know of anyone working on reverse engineering the microcode? I've 
done similar jobs in the past but it takes more time than I have got at
the moment but I might be interested in helping someone elses effort.

I'm not sure about booting linux - seems rather pointless to me ;-) However, 
being able to include the pppd code into the microcode so that the
modem presents standard IP packets to the device driver would be nice
and shouldn't be too difficult to achieve.

I wonder how much DSP work the microcode has to do and how much is built
into the ATM chipset? 

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Help - Thompson reply for speedtouch techspecs...

2003-02-14 Thread Tim Woodall
On Fri, 14 Feb 2003, Duncan Sands wrote:

> I can see three possibilities:
> (1) they refuse to release the specs
> (2) they release the specs to a limited group of developers
> (3) they release the specs publically.
> 
> Is (2) acceptable?
> 

Not really. If it is the only option then it's better than 1 but it
has a number of problems:

1. E.g. software buffering - it works for some, it doesn't for others,
nobody knows what it does or why it doesn't work, it is just magic numbers.
Once the code has dozens/hundreds of these "quirks" it becomes unsupportable
except by people who have the specs and also have the particular problem
people are seeing.

I got the speedtouch 330 working without access to a 330. Could I have
done that if there had been hundreds of incomprehensible commands being
sent to the modem? I suspect not as one or more of them would almost
certainly not have been correct for the 330. (With help from others who
could try my patch together with the "And try this if it doesn't work"
instructions)


2. Some of the commands can be "reverse engineered" from the code. Again,
take the software buffering. Either there will have to be comments in
the code in which case the developer with the specs will be violating
the NDA or there will be a 

/* Yes, its crazy but it works for me (tm) and I can't tell you what it does. 
 * Tough if it doesn't work for you 
 */
NDA_command1[] = { 0x45, 0x42, 0xFF, 0xFF, 0x01 };


I would not be prepared to sign an NDA for specs for a device where the
device driver would be open source as it is almost impossible to write
code based on specs without "leaking" a lot of the information in the spec
into the codebase.


3. We already have some magic in the usermode driver - the cell header
CRC calculation. When someone started having some problems I spotted that
the code to calculate the CRC had been removed and a constant (0xcb IIRC)
was being used instead. This looked like a bug to me and I wasted some
time writing some code to calculate and cache the CRC values. I now notice
that this magic number is in (and was probably always in) the kernel mode
driver and I suspect it was "pinched" from there. Maybe the person who
put this magic constant into the usermode driver should have put a comment
but what could they have put? /* The kernel mode driver does it this way.
It seems to work. If you start getting errors then it may or may not be
this magic number, who knows? */


3. From Thompson's point of view.

GiveDeveloperSpec();
usleep(1);
DeveloperLeakSpec();




Following on from this, just the spec for the Speedtouch USB wouldn't be
a great idea unless we also know that the 330 ``should'' be backwards
compatible with all the commands. Otherwise we are likely to end up with
a code fork. As it is, many people are now running older versions and the
software buffering has caused them problems when they upgrade.



Just my 0.02EUR 


Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: pppoa3 and netfilter

2003-01-29 Thread Tim Woodall
On Wed, 29 Jan 2003, Matthieu Foillard wrote:

> 
> Le Wednesday 29 January 2003 10:11, Matthieu Foillard a écrit :
> > I noticed that pppoa3 eats cpu time (about 4-5%) when i enable some
> > iptables rules and make my connection laggy (e.g. ping the second host in
> > my route is about 500 ms and is 55 ms when i disable flush all rules).
> > Did you noticed somethings similar ? If yes, any solutions u should provide
> > ?
> 
> after some test, it seems that the rule which cause this problem is this one : 
> iptables -A FORWARD -i eth+ -s 192.168.1.0/24 -j ACCEPT
> when i enable it, pppoa3 eats cpu time and connection is slow, like i describe 
> before.
> 

This doesn't make sense for a number of reasons:

1. Assuming eth+ is a shorthand for eth0, eth1 etc (I've never seen it before)
then you are adding iptables rules to the ethernet interfaces while pppoa3
is talking via pppd to a ppp* interface.

2. pppoa3 is doing _exactly_ the same work regardless of whether iptables
is in use or not. I get about 4-5% cpu on a P133 when the connection is 
running flat out.

The only thing I can think of is your iptables rules blocking some of the
ICMP messages. ICMP redirect or DF set but must fragment would seem to
me to be likely candidates.

Do you have a RELATED rule? And are you explicitly blocking ICMP before
that? Have you tried logging everything that is denied or rejected and 
then looking for something suspicious.

(I would be particularly suspicious if your ppp0 interface doesn't negotiate
a 1500 MTU with its peer or you have reduced one or more of the eth*
interfaces to less than 1500 for "performance" reasons)

Regards,

Tim


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: it works for me with st330

2003-01-22 Thread Tim Woodall
On Wed, 22 Jan 2003, Matthieu Foillard wrote:

> 
> sorry but i just repost since nobody answers :

I think it is because nobody knows the answer :-(

Can you try one of the older versions - try going back to
pppoa3 v1.24 - you will need to then find my patch for the
330 to apply.

You can also try going back to 1.23 of modem_run.c
This has the 330 patch applied but not the software buffering.

See if that makes a difference.

I am using the old "frog" and I am getting CRC errors if I use
the latest CVS but I don't think it is a bug in the CVS code. I think
it is just that the code is better and more efficient now and my
(buggy - Triton II) usb chipset can't cope.

I'm not sure about this but I can't see anything obvious and I haven't
got time to investigate further at the moment.


Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Speedtouch 330 and OPTi Inc USB

2003-01-17 Thread Tim Woodall
On Fri, 17 Jan 2003 [EMAIL PROTECTED] wrote:

> It may still be a bit early to draw conclusions, but I connected my
> SpeedTouch 330 modem to a newly purchased USB PCI-card (82C861 from vendor
> OPTi Inc) in stead of the USB on the motherboard, which uses chipset VIA
> VT6202. It makes some difference:
> 
> the OPTi works great, not a single error message;
> the VIA gives, as I was used to, dozens of these "CRC errors on AAL5".
> 
> There is definitely something true about the rumours of VIA chipsets being
> flaky.
> 
Even on the old "frog" I have had to back out most of the latest changes
and go back to an old version.

The bits that seem to be causing the most problem are the "enable software
buffering" bit in modem_run.c and a lot of the latest code in pppoa3.c.

The patch for the 330 doesn't seem to cause me any problems although I've
stopped using it as it's easier for me to just use an old version from CVS.

I'm pretty sure this is a USB chipset problem (for me anyway). Unfortunately,
I don't have any spare PCI slots in my firewall and I can't find any
ISA USB cards (any suggestions?) so I can't use a different USB chipset.


(FWIW, I'm using modem_run.c 1.25 and pppoa3.c 1.24 currently with an
extra delay patch which makes my chipset mostly stable)


Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: slow speedtouch 330

2003-01-05 Thread Tim Woodall
On Sun, 5 Jan 2003, Tim Woodall wrote:

> On Sat, 4 Jan 2003, Tim Woodall wrote:
> 
> > > > Dec 24 15:26:04 pcronald pppoa2[249]: CRC error in an AAL5 frame
> > > 
> > 
> > I think there is a problem somewhere but I'm not sure where.
> > 
> 
> 
> The CRC errors are "caused" by the line
> 
>   swbuff(fdusb,1);
> 
> in modem_run.c. Commenting this line out fixes my CRC errors. 
> Can others give this a try?
> 
> I don't believe this is really the problem, maybe there is a 
> bug in pppoa3 (I suspect aal5_frame_dec where two frames are
> getting concatenated on slow computers - I'm about to have a play)
> 
Seems like a good guess :-)

The following patch appears to have fixed my CRC errors.
I'll let it run for a bit to be sure but I was getting them 
very regularly and now they seem better.

However, I am suddenly getting terrible packet loss on pings
but aparently not with TCP (I haven't checked UDP)

Regards,

Tim.

N.B. This patch is a HACK. It is NOT an example of good coding :-)


Index: atm.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/atm.c,v
retrieving revision 1.8
diff -u -r1.8 atm.c
--- atm.c   28 Dec 2002 13:42:21 -  1.8
+++ atm.c   5 Jan 2003 18:03:34 -
@@ -384,31 +384,48 @@
 
 int aal5_frame_dec(unsigned char *data, unsigned char *frame, int length)
 {
+   /* This is a mess and needs to be done properly
+* The recursion is a HACK
+*/
 
-   int real_length;
+   int real_length;/* The real length of the data in the frame */
+   int padded_length;  /* The number of bytes it occupies */
unsigned int frame_crc, computed_crc;
 
-
+   int current_length = 0; /* The total number of bytes we have output */
+   
+   /* Find the real len and crc from the frame*/
+   real_length = (frame[length - 6]<<8)+frame[length - 5];
+   frame_crc= 
+(frame[length-4]<<24)+(frame[length-3]<<16)+(frame[length-2]<<8)+frame[length-1];
+
+   /* Find the padded len */
+   padded_length = ATM_CELL_DATA_SIZE * ((real_length + 8 + ATM_CELL_DATA_SIZE - 
+1) / ATM_CELL_DATA_SIZE);
+
+   length  -= padded_length;
+ 
+   if(length<0) {  /* Not enough data? */
+   return -1;
+   }
+   else if(length>0) { /* another frame before this one in the buffer */
+   int prev_length = aal5_frame_dec(data, frame, length-padded_length);
+   if(prev_length == -1)   /* What to do about errors? */
+   return -1;
+   data += prev_length;
+   current_length = prev_length;
+   }
+   
/* CRC checking */
-   computed_crc = ~aal5_calc_crc(frame, length - 4, ~0);
-   frame_crc= 
data[length-4]<<24|data[length-3]<<16|data[length-2]<<8|data[length-1];
+   computed_crc = ~aal5_calc_crc(frame+length, padded_length - 4, ~0);
 
/* If not equal the aal5 frame is corrupted */
if(computed_crc != frame_crc)
-   return(-1);
-
-   /* Find the real len */
-   real_length = (((int)frame[length - 6])<<8)|((int)frame[length - 5]);
-
-   /* If real > expected length, This is most likely a deliberate crack attempt */
-   if(real_length > length)
-   return(-1);
-
+   return(-1); /* Is this the right thing to do? */
+   
/* Copy the data */
if(data != frame)
memmove(data, frame, real_length);
 
-   return(real_length);
+   return(current_length + real_length);
 
 }
 




> Regards,
> 
> Tim.
> 
> 

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/




Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: slow speedtouch 330

2003-01-05 Thread Tim Woodall
On Sat, 4 Jan 2003, Tim Woodall wrote:

> > > Dec 24 15:26:04 pcronald pppoa2[249]: CRC error in an AAL5 frame
> > > Dec 24 15:27:06 pcronald last message repeated 7 times
> > > Dec 24 15:27:52 pcronald last message repeated 34 times
> > > Dec 24 15:29:19 pcronald last message repeated 318 times
> > > Dec 24 15:30:19 pcronald last message repeated 331 times
> > > Dec 24 15:31:20 pcronald last message repeated 375 times
> > > Dec 24 15:32:19 pcronald last message repeated 386 times
> > > Dec 24 15:33:19 pcronald last message repeated 355 times
> > > Dec 24 15:34:19 pcronald last message repeated 360 times
> > > Dec 24 15:35:19 pcronald last message repeated 374 times
> > > Dec 24 15:36:19 pcronald last message repeated 362 times
> > > Dec 24 15:37:20 pcronald last message repeated 352 times
> > > Dec 24 15:38:19 pcronald last message repeated 386 times
> > 
> 
> I think there is a problem somewhere but I'm not sure where.
> 


> 
> So it doesn't appear to be a kernel problem.
> 

The CRC errors are "caused" by the line

  swbuff(fdusb,1);

in modem_run.c. Commenting this line out fixes my CRC errors. 
Can others give this a try?

I don't believe this is really the problem, maybe there is a 
bug in pppoa3 (I suspect aal5_frame_dec where two frames are
getting concatenated on slow computers - I'm about to have a play)

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: slow speedtouch 330

2003-01-04 Thread Tim Woodall
On Tue, 24 Dec 2002, Ronald Baljeu wrote:

> 
> > I doubt its the driver itself per-se. Do you have any processor load
> > figures? Does the driver take a lot of time? I suspect a potential buggy
> > USB chipset that windows copes with better. What chipset have you got?
> 
> It's a D850MV board from Intel (850 chipset, 82801BA I/O controller ICH2).
> The load remains low (0.03). After 7 minutes downloading only
> pppoa shows a CPU time of 0:03 (also low); the rest
> (modem_run, pppd) show 0:00. The syslog shows this:
> 
> > Dec 24 15:20:35 pcronald pppoa2[249]: CRC error in an AAL5 frame
> > Dec 24 15:20:52 pcronald last message repeated 9 times
> > Dec 24 15:21:54 pcronald pppoa2[249]: CRC error in an AAL5 frame
> > Dec 24 15:22:52 pcronald last message repeated 14 times
> > Dec 24 15:23:27 pcronald last message repeated 2 times
> > Dec 24 15:26:04 pcronald pppoa2[249]: CRC error in an AAL5 frame
> > Dec 24 15:27:06 pcronald last message repeated 7 times
> > Dec 24 15:27:52 pcronald last message repeated 34 times
> > Dec 24 15:29:19 pcronald last message repeated 318 times
> > Dec 24 15:30:19 pcronald last message repeated 331 times
> > Dec 24 15:31:20 pcronald last message repeated 375 times
> > Dec 24 15:32:19 pcronald last message repeated 386 times
> > Dec 24 15:33:19 pcronald last message repeated 355 times
> > Dec 24 15:34:19 pcronald last message repeated 360 times
> > Dec 24 15:35:19 pcronald last message repeated 374 times
> > Dec 24 15:36:19 pcronald last message repeated 362 times
> > Dec 24 15:37:20 pcronald last message repeated 352 times
> > Dec 24 15:38:19 pcronald last message repeated 386 times
> 

I think there is a problem somewhere but I'm not sure where.

I have almost never seen this CRC error. I have my logs back to
Dec 1 and I have one CRC error on 22nd Dec.

Last night I attempted to upgrade my firewall and install
a new USB card as I have:
USB Controller: Intel Corp. 82371SB PIIX3 USB [Natoma/Triton II] (rev 1).
which causes problems.

Unfortunately, I discovered that I have no free PCI slots so instead
I fiddled with other settings - reduced the processor speed from
133 to 100.

I also upgraded my personal "hacked" version of pppoa3 to the CVS one
(and unfortunately didn't keep a copy of my code which was basically
an old pppoa3 + my "endpoint" patch. Finally I fiddled with the
bios settings but AFAIR the only thing I have changed is disabling
the floppy drive controller (the floppy drive was already disabled)

In addition I upgraded from a custom 2.4.14 kernel to the latest RH7.2
2.4.18-19.7.x (I think)


Here is what I got last night:

Jan  3 23:30:55 heisenberg pppd[2202]: secondary DNS address 213.120.62.99
Jan  3 23:36:06 heisenberg pppoa3[2228]: CRC error in an AAL5 frame
Jan  3 23:36:38 heisenberg last message repeated 40 times
Jan  3 23:50:21 heisenberg last message repeated 70 times
Jan  4 00:00:19 heisenberg last message repeated 8 times
Jan  4 00:10:19 heisenberg last message repeated 3 times
Jan  4 00:20:19 heisenberg last message repeated 35 times
Jan  4 00:30:25 heisenberg last message repeated 5 times
Jan  4 00:40:23 heisenberg last message repeated 21 times
Jan  4 00:50:21 heisenberg last message repeated 32 times
Jan  4 01:00:35 heisenberg last message repeated 29 times
Jan  4 01:10:19 heisenberg last message repeated 33 times
Jan  4 01:20:17 heisenberg last message repeated 6 times
Jan  4 10:15:52 heisenberg syslogd 1.4.1: restart.

(Every ten minutes one of my machines goes off to collect news and mail
and I also ran it manually at 23:36 before going to bed)

The machine locked up solid last night and there is nothing in any of
the logs to give me any clues as to what went wrong.


I have now reverted to my custom 2.4.14 kernel:

Jan  4 10:22:43 heisenberg rc: Starting adsl.sh:  succeeded
Jan  4 10:25:09 heisenberg pppoa3[786]: CRC error in an AAL5 frame
Jan  4 10:25:40 heisenberg last message repeated 43 times
Jan  4 10:26:00 heisenberg last message repeated 31 times
Jan  4 10:26:01 heisenberg sshd(pam_unix)[1009]: session opened for user root by 
(uid=0)
Jan  4 10:26:02 heisenberg pppoa3[786]: CRC error in an AAL5 frame
Jan  4 10:26:33 heisenberg last message repeated 52 times
Jan  4 10:28:00 heisenberg last message repeated 103 times
Jan  4 10:28:10 heisenberg sshd(pam_unix)[1009]: session closed for user root
Jan  4 10:36:29 heisenberg sshd(pam_unix)[1146]: session opened for user root by 
(uid=0)
Jan  4 10:40:12 heisenberg pppoa3[786]: CRC error in an AAL5 frame


So it doesn't appear to be a kernel problem.

I will revert to my old hacked pppoa3 tonight to eliminate that and then,
if necessary, dismantle the machine again and return the processor
speed to its previous setting.

N.B. I _do_ have a known buggy chipset which I have managed to work around
at the cost of reduced bandwidth previously by using delays in pppoa3 but
with the latest pppoa3 from CVS these delays don't seem to work any more.
Maybe pppoa3 is now running much faster and that is causin

[speedtouch] Re: pppoatm3 and Deutsche Telekom ( for ChristineNoot Huyghe )

2002-12-16 Thread Tim Woodall
On Fri, 13 Dec 2002, Bruno wrote:

 
> /Proc/bus/usb says:
> 
> 
> T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3
> B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
> D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> P:  Vendor= ProdID= Rev= 0.00
> S:  Product=USB OHCI Root Hub
> S:  SerialNumber=e4916000
> C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
> I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
> E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
> T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
> D:  Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> P:  Vendor=06b9 ProdID=4061 Rev= 2.00
> S:  Manufacturer=ALCATEL
> S:  Product=Speed Touch 330
> S:  SerialNumber=0090D074EAD1
> C:* #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=500mA
> I:  If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
> E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=50ms
> I:  If#= 1 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
> I:  If#= 1 Alt= 1 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
> E:  Ad=06(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> E:  Ad=07(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> E:  Ad=87(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> I:  If#= 1 Alt= 2 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
> E:  Ad=06(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> E:  Ad=07(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> E:  Ad=87(I) Atr=01(Isoc) MxPS= 640 Ivl=1ms
> I:  If#= 1 Alt= 3 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
> E:  Ad=06(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> E:  Ad=07(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> E:  Ad=87(I) Atr=01(Isoc) MxPS= 960 Ivl=1ms
> I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
> E:  Ad=05(O) Atr=02(Bulk) MxPS=   8 Ivl=0ms
> E:  Ad=85(I) Atr=02(Bulk) MxPS=   8 Ivl=0ms
> T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 3
> B:  Alloc= 11/900 us ( 1%), #Int=  1, #Iso=  0
> D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> P:  Vendor= ProdID= Rev= 0.00
> S:  Product=USB OHCI Root Hub
> S:  SerialNumber=e4914000
> C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
> I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
> E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms
> T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 4
> D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> P:  Vendor=03eb ProdID=3301 Rev= 3.00
> S:  Product=Standard USB Hub
> C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 64mA
> I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
> E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=255ms
> T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
> D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
> P:  Vendor=04a9 ProdID=106a Rev= 1.03
> S:  Manufacturer=Canon
> S:  Product=S200
> S:  SerialNumber=407PRJ
> C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
> I:  If#= 0 Alt= 0 #EPs= 2 Cls=07(print) Sub=01 Prot=02 Driver=usblp
> E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> 
> Only the canon printer is connected on the hub,. the modem directly on a
> normal usb.
> 
> The commands I give as root are:
> modem_run -v 2 -m -f  /home/bruno/mgmt.o
> pppd call adsl
> 
> I hope you can help me, and my excuses to Martin Drautzburg who started the
> Deutsche Telecom conversation. ( I live in Holland but have simular
> problems )
> 


Somethings not right here.

at least some of those lines that say driver=(none) should say
driver=usbdevfs (or something like that)

There is a line somethine like mount -t usb /proc/bus/usbdevfs
(Sorry, I'm really busy at the moment and haven't got time to look
it up) which might help.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: [CVS] Patch from Tim merged

2002-12-08 Thread Tim Woodall
On Thu, 5 Dec 2002, Edouard Gomez wrote:

> 
> Tim's patch is now in CVS. Please test the cvs version (both pppoa2 and
> pppoa3) so even BSD users can use the new stusb device.
> 
> Thx
> 
The merge into modem_run and pppoa3 looks good to me. The changed usage
message to include the "(1 for SpeedTouch USB 330)" in "Use an alternate 
endpoint interface (1 for SpeedTouch USB 330)" was a good idea.

(Works for me - old modem - although I also apply a "delay" patch to
make the Triton II chipset "sort of" work :-)

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: SpeedTouch 330 on SuSE8.1

2002-12-02 Thread Tim Woodall
On Mon, 2 Dec 2002 [EMAIL PROTECTED] wrote:

> Hello Tim,
> 
> Indeed it seems parameter -e 1 is not necessary for making a connection,
> but for modem_run it is.
> I give you the results of the contents of /proc/bus/ubs/devices before and
> after modem_run is executed. Hope you find something in it.
> By the way: it is Mandrake 9.0 that I use now because SuSE8.1 started to
> give problems with the LiteOn CD-RW, to which it could no longer get
> access.
> 


Thanks for that. There isn't anything clever happening.

pppoa3 doesn't actually set the endpoint to use at all. 
(I suspect it should!) unless you specify a -e  parameter.

My guess is that once modem_run has set the alternate endpoint to use, 
that is the default that all other programs will chose to use.

So by default both modem_run and pppoa3 are using alternate 2 while
once you run modem_run with -e 1, that is the default that pppoa3
will pick up.

(I would suggest that you don't rely on this and explicitly set the
endpoint (-e 1) for pppoa3 as well as, in the future, someone may change
the way that modem_run is working and you will find that the connection
will break for no aparent reason)

It's also possible that everyone is defaulting to alternate 1 for
pppoa3 (as that is the first alternate with endpoint 87 available)


Can someone who is on the various USB lists query this? (I'm not a member)
as we probably should "fix/document" what the behaviour is. It is not
inconceivable that a future kernel may change the default behaviour
slightly and everyones modem might stop working.


(Note that for the original "stingray" alternates 1,2 and 3 all work so
it isn't easy to determine which is the default)

Regards,

Tim


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: st330 + T. Woodall's patch works. Here isthepatch

2002-12-02 Thread Tim Woodall
On Sun, 1 Dec 2002 [EMAIL PROTECTED] wrote:

> My /etc/rc.d/rc.local contains:
> 
> modprobe ppp_generic
> modprobe ppp_synctty
> modprobe n_hdlc
> modem_run -e 1 -m -f /windows/D/Linux/adsl/alcaudsl.sys
> pppd call adsl
> 

Do you need the -e 1 on the pppoa3 line in peers/adsl? Someone posted here
that it wasn't necessary, only the modem_run one was.

If the -e 1 to pppoa3 isn't necessary can you post a copy of 
/proc/bus/usb/devices both before running modem_run and after running it
(or email me direct at [EMAIL PROTECTED])
because I don't understand how this can work



> To make them work from the non-root terminal window I must however issue
> them like this:
> 
> su -c "/usr/bin/adslstart"  and
> su -c "/usr/bin/adslstop"
> 
> In both cases, my root password is asked because I am dealing with pppd?

No, the root password is asked because you are running su.

There are two common ways of avoiding this problem.

a) use sudo - you will have to look this up, I don't tend to use it although
it is probably the more secure way.

b) set the ownership of pppd to root with the group to a "modem" group.
chmod 4750 pppd (only group "modem" or root can run pppd but it
always runs a root.
   Add yourself to group modem

> Is it a good idea to exit the terminal window after giving the command to
> start? Although it is a terminal window in which I am a normal user, it
> might still cause a danger problem?

No it won't cause a problem. The advantage of your way is that if you
leave the terminal logged in and walk away then nobody else can run these
scripts without being root. The disadvantage is that you have to type
in the root password and someone can "shoulder surf" it potentially.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: SpeedTouch 330 on SuSE8.1

2002-12-01 Thread Tim Woodall
On Sat, 30 Nov 2002 [EMAIL PROTECTED] wrote:

> Hello Tim!
> 
> Got things working thanks to the patched modem_run! Tried it on Mandrake
> 9.0 because I could not get SuSE8.1 installed correctly again.
> I still have to sort out a few things but I guess the biggest hurdle has
> been taken.
> By the way: I would like to know what you mean by "sorting out
> automatically detecting the correct endpoint to use?"
> I am certainly willing to try out a few things to ensure that the
> SpeedTouch 330 is taken out of the experimental phase.
> 
It's merely that the "correct" endpoint to use depends on finding an
endpoint that supports a bulk transfer

IIRC /proc/bus/usb/devices for the 330 frog only supports bulk
transfers on alternate 1 (The others are isoc)

It would be preferable if modem_run and pppoa3 automatically 
determined an appropriate endpoint to use. (Even better
would be for someone to write the code to support isoc
- if that is possible - so that the next version of the
"frog" can work out of the box :-)

I hacked the patch together (I don't have a 330 frog) for people
to test with but I don't know how to automatically detect
the correct alternate endpoints to use and I don't have the time
to find out at the moment. (I suggested a perl script that read
/proc/bus/usb/devices :-)

Regards,

Tim.



(From the non 330 frog)

[root@heisenberg root]# cat /proc/bus/usb/devices
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor= ProdID= Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=1200
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=06b9 ProdID=4061 Rev= 0.00
S:  Manufacturer=ALCATEL
S:  Product=Speed Touch USB
S:  SerialNumber=0090D00CA58D
C:* #Ifs= 3 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=00 Driver=usbdevfs
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl= 50ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=00 Prot=00 Driver=usbdevfs
I:  If#= 1 Alt= 1 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=usbdevfs
E:  Ad=06(O) Atr=02(Bulk) MxPS=  64 Ivl=  0ms

E:  Ad=07(O) Atr=02(Bulk) MxPS=  64 Ivl=  0ms

E:  Ad=87(I) Atr=02(Bulk) MxPS=  64 Ivl=  0ms

Bulk available on interface 1, alternate 1

I:  If#= 1 Alt= 2 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=usbdevfs
E:  Ad=06(O) Atr=02(Bulk) MxPS=  32 Ivl=  0ms
E:  Ad=07(O) Atr=02(Bulk) MxPS=  32 Ivl=  0ms
E:  Ad=87(I) Atr=02(Bulk) MxPS=  64 Ivl=  0ms

Ditto interface 1, alternate 2.

I:  If#= 1 Alt= 3 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=usbdevfs
E:  Ad=06(O) Atr=02(Bulk) MxPS=  16 Ivl=  0ms
E:  Ad=07(O) Atr=02(Bulk) MxPS=  16 Ivl=  0ms
E:  Ad=87(I) Atr=02(Bulk) MxPS=  64 Ivl=  0ms

Ditto alternate 3.

I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=05(O) Atr=02(Bulk) MxPS=   8 Ivl=  0ms
E:  Ad=85(I) Atr=02(Bulk) MxPS=   8 Ivl=  0ms


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: st330 + T. Woodall's patch works. Here isthepatch

2002-12-01 Thread Tim Woodall
On Sun, 1 Dec 2002, christine noot-huyghe wrote:

> > as non-root, but that opens no connection. And even then the connection
> > seems to be usable only once. When ending it with:
> > 
> > killall -9 ppp0a3

You don't want to do this. kill -9 is only for times when everything has 
gone wrong and you are getting desperate for something to try.

> > killall pppd

This alone will do. Only if the pppoa3 don't die after this should you
consider a kill -9 on pppoa3 (and you will need to clean up the
/var/run/ file with the pid in it)

> For me the following works:
> "killall pppd" 
> "/usr/sbin/pppd call adsl" restart the connection
> 
> But: I use mgmt.o instead of alcaudsl.sys and a patched version of 
> pppoa3.
> I am currently using LM8.2
> 
It shouldn't make any difference whether you are using mgmt.o or
alcaudsl.sys (but you never can tell :-)

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: SpeedTouch 330 on SuSE8.1

2002-11-29 Thread Tim Woodall
On Fri, 29 Nov 2002, Vaessen, E.M.J. (Ed) wrote:

> Has anyone had suces with getting a SpeeTouch USB ADSL modem to work on
> SuSE8.1 (or even 8.0)?
> I tried SuSE's 8.0 approach, followed the instructions of Papillaut and also
> tried the BTO-approach. Nothing works.
> The instructions are all clear enough though and all modules, configure
> files and scripts needed are there.
> 

Speedtouch 330 - patch below (search the archives for how to use it,
iirc -e 1 for modem_run and pppoa3


Note to ed gomez - any chance you can put this patch into CVS until
you sort out automatically detecting the correct endpoint to use?
(It works on my non 330 modem and defaults to exactly the behaviour of
the old code so shouldn't break anything for anyone)

Regards,

Tim.


Index: modem_run.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/modem_run.c,v
retrieving revision 1.22
diff -u -r1.22 modem_run.c
--- modem_run.c 8 Sep 2002 22:18:40 -   1.22
+++ modem_run.c 24 Oct 2002 17:24:31 -
@@ -83,6 +83,7 @@
 **/
 
 static int verbose = 0;
+static int alternate_ep = 2;   /* historically defaulted to 2 */
 FILE *log = NULL;
 
 /*
@@ -301,6 +302,8 @@
file = argv[++i];
else if(strcmp(argv[i], "-d") == 0 && i + 1 < argc)
devicename = argv[++i];
+   else if(strcmp(argv[i], "-e") == 0 && i + 1 < argc)
+   alternate_ep = atoi(argv[++i]);
else if (strcmp(argv[i],"--help")==0)
usage();
else
@@ -407,7 +410,7 @@
return(-1);
}

-   if (pusb_set_interface(fdusb,1,2) < 0) {
+   if (pusb_set_interface(fdusb,1,alternate_ep) < 0) {
report(0, REPORT_ERROR, "pusb_set_interface");
return(-1);
}
@@ -480,6 +483,7 @@
fprintf(stderr, "  -s   : skip the first 512 bytes read\n");
fprintf(stderr, "  -f microcode : upload this microcode file first\n");
fprintf(stderr, "  -d device: defines the device to use\n");
+   fprintf(stderr, "  -e alternate : defines the endpoint alternate interface to 
+use\n");
fprintf(stderr, "  --help   : this message\n");
exit(-1);
 
Index: pppoa3.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/pppoa3.c,v
retrieving revision 1.28
diff -u -r1.28 pppoa3.c
--- pppoa3.c20 Oct 2002 22:32:54 -  1.28
+++ pppoa3.c24 Oct 2002 17:24:33 -
@@ -186,6 +186,7 @@
 static char *log_file;
 #endif
 static int verbose;
+static int alternate_ep = -1;  /* historically wasn't set */
 
 /* Named pipe filename */
 #define PIPE_NAME_FORMAT "/var/run/pppoa3-modem%d.pipe"
@@ -665,6 +666,20 @@
report(0, REPORT_ERROR|REPORT_DATE, "pusb_claim_interface 1 failed\n");
return(-1);
}
+
+   if (alternate_ep != -1) {
+   /* Historically this wasn't set */
+   /* reconfigure USB (configuration & alternate settings) */
+   if (pusb_set_configuration(fdusb,1) < 0) {
+   report(0, REPORT_ERROR, "pusb_set_configuration 1");
+   return(-1);
+   }
+   
+   if (pusb_set_interface(fdusb,1,alternate_ep) < 0) {
+   report(0, REPORT_ERROR, "pusb_set_interface");
+   return(-1);
+   }
+   }
 
/* Opens the end point */
ep_data = pusb_endpoint_open(fdusb, EP_DATA_OUT, O_RDWR);
@@ -1872,6 +1887,9 @@
else if((strcmp(argv[i], "--device") == 0 || strcmp(argv[i], "-d") == 
0) && i + 1 < argc) {
device_name = argv[++i];
}
+   else if((strcmp(argv[i], "--alt-ep") == 0 || strcmp(argv[i], "-e") == 
+0) && i + 1 < argc) {
+   alternate_ep = atoi(argv[++i]);
+   }
else if((strcmp(argv[i], "--clean") == 0 || strcmp(argv[i], "-c") == 
0)) {
clean_previous_instance = 1;
}
@@ -1968,6 +1986,8 @@
fprintf(stderr, "  -d   | --device device_filename\n");
fprintf(stderr, "   Force usage of the device_filename. Usefull when 
using\n");
fprintf(stderr, "   more than one modem on the same machine\n");
+   fprintf(stderr, "  -e   | --alt-ep alternate_endpoint\n");
+   fprintf(stderr, "   Use an alternate endpoint interface\n");
 #ifndef USE_SYSLOG
fprintf(stderr, "  -f   | --filename filename\n");
fprintf(stderr, "   Define the log filename to use (Default %s)\n", 
log_file);
-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw

[speedtouch] Re: Mandrake 9.0 problems

2002-11-22 Thread Tim Woodall
On Fri, 22 Nov 2002, france wrote:

> 
> Hi,
> 
> I'm trying to install Manta SpeedTouch USB on Mandrake 9.0.
> 

I think you have the kernel mode driver loaded. You need to get rid
of that first



> with #lsmod i read:
> ppp_deflate41024   0  (autoclean)
> bsd_comp4344   0  (autoclean)
> lt_serial  19732   3  (autoclean)
> lt_modem  479739   0  (autoclean) [lt_serial]
> ppp_synctty 5952   0  (unused)
> speedtouch  6964   0  (unused)
  ^^

> sr_mod 15096   0  (autoclean) (unused)
> floppy 49340   0  (autoclean)
> es1371 26568   0
> soundcore   3780   0  [es1371]
> ac97_codec  9928   0  [es1371]
> gameport1660   0  [es1371]
> ppp_async   7456   1
> ppp_generic20064   3  [ppp_deflate bsd_comp ppp_synctty
> ppp_async]
> slhc5072   0  [ppp_generic]
> af_packet  13000   0  (autoclean)
> nls_iso8859-15  3356   1  (autoclean)
> ntfs   72908   1  (autoclean)
> supermount 14340   3  (autoclean)
> ide-cd 28712   0
> cdrom  26848   0  [sr_mod ide-cd]
> ide-scsi8212   0
> scsi_mod   90372   2  [sr_mod ide-scsi]
> speedtch   12492   2  (autoclean) [speedtouch]
  

> usb-uhci   21676   0  (unused)
> usbcore58304   1  [speedtouch speedtch usb-uhci]
> 
> But I don't know why...
> P.S.: After, Is it possible use kppp too?
> 
> thanks very much
> Francesco
> 
> 
> 
> Liste de diffusion modem ALCATEL SpeedTouch USB
> Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe
> 
>   
> 

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Dissolving PPPD?

2002-11-17 Thread Tim Woodall
On Sun, 17 Nov 2002, Simon Dean wrote:

> Every now and again, my whole pppd setup goes out the window. I can do a 
> pppd call adslscript but it wont connect. Diald doesn't even seem to 
> work to bring up a regular modem connection. Rebooting the computer 
> however does the trick! Today it just stopped working while it was 
> connected,. Even though the computer had an IP address, I could not ping 
> anything.
> 
> Any ideas what the problem might have been?
> 
> I've tried looking through my /var/log/messages but nothing stands out...
> 
At a guess

[root@heisenberg root]# cat /proc/pci
PCI devices found:
  Bus  0, device   0, function  0:
Host bridge: Intel Corp. 430HX - 82439HX TXC [Triton II] (rev 3).
  Master Capable.  Latency=32.



  Bus  0, device   7, function  2:
USB Controller: Intel Corp. 82371SB PIIX3 USB [Natoma/Triton II] (rev 1).
  IRQ 11.
  Master Capable.  Latency=48.
  I/O at 0x1200 [0x121f].



The Triton II "bug"


You can try the following which "works for me (tm)"

[tim@pauli /home/tim/cvs/speedtouch]$ cat patch.bug
diff -u -r1.24 pppoa3.c
--- src/pppoa3.c18 May 2002 19:54:46 -  1.24
+++ src/pppoa3.c23 May 2002 18:37:29 -
@@ -849,6 +849,7 @@

/* Reads 64*53 bytes from usb */
do {
+   usleep(900);
n = pusb_endpoint_read(ep_data, lbuf, sizeof(lbuf), 0);
} while (n < 0 && (errno == EINTR || errno == ETIMEDOUT));

@@ -888,6 +889,7 @@
/* Writes the result buffer */
if(ppp_write(STDOUT_FILENO, ppp_write_buf, n + 
HDLC_HEADER_SIZE) > 0)
report(2, REPORT_DEBUG|REPORT_DATE, "Extracted 
PPP packet sent to ppp(d)\n\n");
+   usleep(100);

}


but it halves the maximum download rate (approximately)


I believe that this is a hardware issue. It appears that one (or more)
interrupts are getting lost from the usb hardware - the kernel is
blocking waiting for input from the usb but the interrupt controller
won't signal any more interrupts until the lost one is acknowledged
(This is based on a fairly cursory reading of the kernel usb code
so could well be completely wrong)


You don't need to reboot to get things back under control:

See the function "do_reload_mcode" in the script below for the
way I "reset" the modem.

Regards,

Tim.

p.s. I have found that long sequences of 0xff hang the connection "reliably".

Just an ftp is enough to cause the problem


#!/bin/bash

#
# 
#  downup.sh
# 
#  Copyright (c) 2002 Tim Woodall ([EMAIL PROTECTED])
# 
#  This program is licenced under the GNU licence.
#  See LICENCE for more details
# 
#  $Id: downup.sh,v 1.3 2002/10/09 22:12:46 tim Exp $
# 
#

PING_TIMEOUT=20
PPPD_TIMEOUT=240
MCODE_TIMEOUT=240

LOCK_FILE=/root/firewall/lock

MCODE_LOADED=/root/firewall/mcode_loaded

kill_pppd()
{
echo kill_pppd at `/bin/date`

/usr/bin/killall pppd >/dev/null 2>&1
sleep 10
. /etc/sysconfig/firewall

while [ "$NET_IF" != "" ]; do
echo killall pppd at `/bin/date`
/usr/bin/killall pppd >/dev/null 2>&1
sleep 10

. /etc/sysconfig/firewall
done

/usr/bin/killall -9 pppoa3 >/dev/null 2>&1
sleep 10

rm -f /var/run/pppoa3-modem1.pid

echo finished kill_pppd with NET_IF = $NET_IF at `/bin/date`
}

start_pppd()
{
echo start_pppd at `/bin/date`

/usr/sbin/pppd call adsl

STOPTIME=$[$PPPD_TIMEOUT+`/bin/date +%s`]

. /etc/sysconfig/firewall

while [ "$NET_IF" = "" -a `/bin/date +%s` -lt $STOPTIME ]; do
sleep 1
. /etc/sysconfig/firewall
done

echo finished start_pppd with NET_IF = $NET_IF at `/bin/date`
}

#Dont call this directly - use reload_mcode
do_reload_mcode()
{
/usr/bin/killall modem_run >/dev/null 2>&1
/sbin/rmmod usb-uhci
sleep 5
rm -f $MCODE_LOADED
/sbin/modprobe usb-uhci
sleep 5
/usr/local/bin/modem_run -v 2 -f /usr/local/bin/mgmt.o -m
touch $MCODE_LOADED
}

load_mcode()
{
echo load_mcode at `/bin/date`

while [ ! -e $MCODE_LOADED ]; do
echo $MCODE_LOADED not found - reloading microcode at `/bin/date`

do_reload_mcode &
sleep 10

STOPTIME=$[$MCODE_TIMEOUT+`/bin/date +%s`]

while [ ! -e $MCODE_LOADED -a `/bin/date +%s` -lt $STOPTIME ]; do

[speedtouch] Re: Modem not found problem

2002-11-12 Thread Tim Woodall
On Tue, 12 Nov 2002, Greg Cook wrote:

> Thanks for the reply.
> 
> I have to type : mount none /proc/bus/usb -t usbdevfs to correctly mount the modem
> I think, then the modem_run prog seems to initialise the modem OK. At first, before
> running it, both leds are green, then when I run, the left blinks then remains on,
> and the right flashes green. Actually it flashes about nine times green then
> briefly red..then cycle repeats. I am not yet connected to Freeserve...how long
> does the process take? Also, when I run modem_run, I actually get a timeout message
> and an error relating to USBDEVFS, but the modem lights seem to indicate things are
> ok, and the usb/devices file seems to have correct modem details with serial no.
> etc. so I presume everything is OK?
> 
The nine greens + one red sounds correct. That is what happens if the 
modem can't sync to the exchange (as, presumably yours can't as your 
line won't have been enabled yet)

Tim

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: Speedtouch 330 endpoint modification

2002-11-11 Thread Tim Woodall
On Mon, 11 Nov 2002, Frans King wrote:

> 
> I have a copy of the patch which I include below. 
> 
> Patch with patch < "patch file name" in the src directory. You then need
> to add "-e 1" switches to both modem_run and pppoa3. I also found that
> using the .sys file that came with the windows drivers gave a load of
> CRC errors which limited my bandwidth to around 5kb so I suggest you use
> the mgmt.o file instead.
> 
> Regards,
> 
> Frans
> 

I don't think the included patch would work - the lines have been wrapped 
somewhere.

Reincluded below.

Regards,

Tim.



Date: Wed, 6 Nov 2002 14:43:10 + (GMT)
From: Tim Woodall <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [speedtouch] Re: LCP timeout with speedtouch 330 & redhat 7.2

On Wed, 6 Nov 2002, Aiman Albaharna wrote:

> I made a post last week with the exact same problem. Except I was using 
> Mandrake 8.2 with the Speedtouch 330 and OHCI not UHCI. But apart from 
> that, I get the same LCP timeout and sem-post event thing.
> 
> Tim Woodall <[EMAIL PROTECTED]> mentioned an email he wrote 
> about the 330 and the need to try a "different endpoint alternative" but 
> I couldn't find the email in the archive.
> 
> I initially thought the problem was with USBDEVFS, but after writing the 
> post I found Mandrake docs to get it to respond properly. So I fixed it 
> up by blinding following directions and I no longer had any USBDEVFS 
> warnings.
> 
> Take a look at my email if you want:
> 
> http://www.mail-archive.com/speedtouch@;ml.free.fr/msg03539.html
> 
> Cheers, Aiman.
> 

Odd. I don't know why the email isn't in the archive - other posts of mine
are and it arrived at the list OK.

I've included the entire email below.

Regards,

Tim.

Date: Thu, 24 Oct 2002 18:33:45 +0100 (BST)
From: Tim Woodall <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [speedtouch] Re: Alcatel 330 USB connection failure

On Thu, 24 Oct 2002, Edouard Gomez wrote:

> 
> Tim Woodall ([EMAIL PROTECTED]) wrote:
> > I would suggest a -e  switch to pppoa3 and
> > modem run with the default left at 2 
> 
> It  would prefer  extend pusb  to  tell us  what type  of transfer  is
> supported for  a specific (interface,endpoint)  couple. I think  it is
> rather easy to implment this,  and loop through all interfaces for the
> known data endpoints (0x07/0x87).
> 
> I'll have a look at usbfs specification.
> 
Sounds good. I wouldn't know how to do this without some intensive
reading but I could hack a perl script together that reads 
/proc/bus/usb/devices and says
"You need to use alternate 1 on interface 1" :-)

Attached is an (untested) patch that should allow people with the
330 Speedtouch to test. I think you need -e 1 on the commandline for
both modem_run and pppoa3.

Hopefully Edouard will make this -e switch unnecessary once the changes
make it to cvs or a release.

Tim.

(For those people who don't know how to use patch, get the source tarball
of the driver and extract it.

Save this email as a plain text file (you don't need to delete the message)
cd to the src directory of the tarball you extracted
then type patch < (the file with this email in)
Finally build and install as normal)


Index: modem_run.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/modem_run.c,v
retrieving revision 1.22
diff -u -r1.22 modem_run.c
--- modem_run.c 8 Sep 2002 22:18:40 -   1.22
+++ modem_run.c 24 Oct 2002 17:24:31 -
@@ -83,6 +83,7 @@
 **/
 
 static int verbose = 0;
+static int alternate_ep = 2;   /* historically defaulted to 2 */
 FILE *log = NULL;
 
 /*
@@ -301,6 +302,8 @@
file = argv[++i];
else if(strcmp(argv[i], "-d") == 0 && i + 1 < argc)
devicename = argv[++i];
+   else if(strcmp(argv[i], "-e") == 0 && i + 1 < argc)
+   alternate_ep = atoi(argv[++i]);
else if (strcmp(argv[i],"--help")==0)
usage();
else
@@ -407,7 +410,7 @@
return(-1);
}

-   if (pusb_set_interface(fdusb,1,2) < 0) {
+   if (pusb_set_interface(fdusb,1,alternate_ep) < 0) {
report(0, REPORT_ERROR, "pusb_set_interface");
return(-1);
}
@@ -480,6 +483,7 @@
fprintf(stderr, "  -s   : skip the first 512 bytes read\n");
fprintf(

[speedtouch] Re: LCP timeout with speedtouch 330 & redhat 7.2

2002-11-06 Thread Tim Woodall
On Wed, 6 Nov 2002, Aiman Albaharna wrote:

> I made a post last week with the exact same problem. Except I was using 
> Mandrake 8.2 with the Speedtouch 330 and OHCI not UHCI. But apart from 
> that, I get the same LCP timeout and sem-post event thing.
> 
> Tim Woodall <[EMAIL PROTECTED]> mentioned an email he wrote 
> about the 330 and the need to try a "different endpoint alternative" but 
> I couldn't find the email in the archive.
> 
> I initially thought the problem was with USBDEVFS, but after writing the 
> post I found Mandrake docs to get it to respond properly. So I fixed it 
> up by blinding following directions and I no longer had any USBDEVFS 
> warnings.
> 
> Take a look at my email if you want:
> 
> http://www.mail-archive.com/speedtouch@;ml.free.fr/msg03539.html
> 
> Cheers, Aiman.
> 

Odd. I don't know why the email isn't in the archive - other posts of mine
are and it arrived at the list OK.

I've included the entire email below.

Regards,

Tim.

Date: Thu, 24 Oct 2002 18:33:45 +0100 (BST)
From: Tim Woodall <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [speedtouch] Re: Alcatel 330 USB connection failure

On Thu, 24 Oct 2002, Edouard Gomez wrote:

> 
> Tim Woodall ([EMAIL PROTECTED]) wrote:
> > I would suggest a -e  switch to pppoa3 and
> > modem run with the default left at 2 
> 
> It  would prefer  extend pusb  to  tell us  what type  of transfer  is
> supported for  a specific (interface,endpoint)  couple. I think  it is
> rather easy to implment this,  and loop through all interfaces for the
> known data endpoints (0x07/0x87).
> 
> I'll have a look at usbfs specification.
> 
Sounds good. I wouldn't know how to do this without some intensive
reading but I could hack a perl script together that reads 
/proc/bus/usb/devices and says
"You need to use alternate 1 on interface 1" :-)

Attached is an (untested) patch that should allow people with the
330 Speedtouch to test. I think you need -e 1 on the commandline for
both modem_run and pppoa3.

Hopefully Edouard will make this -e switch unnecessary once the changes
make it to cvs or a release.

Tim.

(For those people who don't know how to use patch, get the source tarball
of the driver and extract it.

Save this email as a plain text file (you don't need to delete the message)
cd to the src directory of the tarball you extracted
then type patch < (the file with this email in)
Finally build and install as normal)


Index: modem_run.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/modem_run.c,v
retrieving revision 1.22
diff -u -r1.22 modem_run.c
--- modem_run.c 8 Sep 2002 22:18:40 -   1.22
+++ modem_run.c 24 Oct 2002 17:24:31 -
@@ -83,6 +83,7 @@
 **/
 
 static int verbose = 0;
+static int alternate_ep = 2;   /* historically defaulted to 2 */
 FILE *log = NULL;
 
 /*
@@ -301,6 +302,8 @@
file = argv[++i];
else if(strcmp(argv[i], "-d") == 0 && i + 1 < argc)
devicename = argv[++i];
+   else if(strcmp(argv[i], "-e") == 0 && i + 1 < argc)
+   alternate_ep = atoi(argv[++i]);
else if (strcmp(argv[i],"--help")==0)
usage();
else
@@ -407,7 +410,7 @@
return(-1);
}

-   if (pusb_set_interface(fdusb,1,2) < 0) {
+   if (pusb_set_interface(fdusb,1,alternate_ep) < 0) {
report(0, REPORT_ERROR, "pusb_set_interface");
return(-1);
}
@@ -480,6 +483,7 @@
fprintf(stderr, "  -s   : skip the first 512 bytes read\n");
fprintf(stderr, "  -f microcode : upload this microcode file first\n");
fprintf(stderr, "  -d device: defines the device to use\n");
+   fprintf(stderr, "  -e alternate : defines the endpoint alternate interface to 
+use\n");
fprintf(stderr, "  --help   : this message\n");
exit(-1);
 
Index: pppoa3.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/pppoa3.c,v
retrieving revision 1.28
diff -u -r1.28 pppoa3.c
--- pppoa3.c20 Oct 2002 22:32:54 -  1.28
+++ pppoa3.c24 Oct 2002 17:24:33 -
@@ -186,6 +186,7 @@
 static char *log_file;
 #endif
 static int verbose;
+static int alternate_ep = -1;  /* historically wasn't set */
 
 /* Named pipe filename */
 #define PIPE_NAME_FORMAT "/var/run/pppoa3-modem%d.pipe"
@@ -665,6 +6

[speedtouch] Re: LCP timeout with speedtouch 330 & redhat 7.2

2002-11-05 Thread Tim Woodall
On Tue, 5 Nov 2002, Frans King wrote:

> 
> Hi,
> 
> I don't have problems with the pid - it is removed correctly. As for the
> pap/chap-secrets file, I'm pretty sure that they are correct. For BT you
> don't need a password so it is just
> 
> [EMAIL PROTECTED]   *   "password"  *
> 
> But ppp still doesn't work?.
> 
> I might give Mandrake 8.2 a try.
> 
> Regards,
> 
> Frans
> 
Speedtouch 330 - needs to use a different endpoint alternate.

See my mail:

Date: Thu, 24 Oct 2002 18:33:45 +0100 (BST)
From: Tim Woodall <[EMAIL PROTECTED]>
X-X-Sender: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [speedtouch] Re: Alcatel 330 USB connection failure
In-Reply-To: <20021024170751.GB775@leloo>
Message-ID: <[EMAIL PROTECTED]>


(At least it has worked for two people - I don't have a 330 to test)

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: building driver errors - au secour!

2002-11-03 Thread Tim Woodall
On Sun, 3 Nov 2002, Francois Rogler wrote:

> 
> On Sat, Nov 02, 2002 at 01:09:56PM +, [EMAIL PROTECTED] wrote:
> > hullo,
> > 
> > I'm running netbsd 1.6; have built user-ppp and copied the mgmt.o file
> > a-ok.
> > 
> > However, when I cd to speedtouch-1.1 and try make and make install I get
> > some errors.
> > 
> 
> This was corrected on the cvs a long time ago, but no new version has
> been pushed out since that (last july)
> 
> check that :
> http://www.mail-archive.com/speedtouch@;ml.free.fr/msg03209.html
> 
> So you just have to change the line in pusb-bsd.c :
> #if ((defined (__FreeBSD__)) && (__FreeBSD_version > 50 &&
> __FreeBSD_version < 
> 500031) || (__FreeBSD_version < 450001)) || (defined (__NetBSD__) && 
> (__NetBSD_version__ < 10528)) || (defined (__OpenBSD__))
> 
> by :
> -#if ((defined (__FreeBSD__)) && (__FreeBSD_version > 50 &&
> __FreeBSD_version < 
> 500031) || (__FreeBSD_version < 450001)) || (defined (__NetBSD__) && 
> (__NetBSD_version__ < 10528)) || (defined (__OpenBSD__))
> 
> 
> There is also the same problem with the lastest version of openbsd ... i
> think we should do a new version.
> 
> Regards,
> 
> 
I've never used *BSD in anger and certainly never tried the speedtouch
driver but I think you have picked up the wrong line from the diff -
should be

+#if ((defined (__FreeBSD__)) && ((__FreeBSD_version > 50 && __FreeBSD_version < 
+500031) || (__FreeBSD_version < 450001))) || (defined (__NetBSD__) && 
+__NetBSD_Version__ < 10528) || (defined (__OpenBSD__))

Regards,

Tim.

-- 


[tim@pauli /home/tim/cvs/speedtouch]$ cvs diff -D 2002/06/01 src/pusb-bsd.c
Index: src/pusb-bsd.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/pusb-bsd.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- src/pusb-bsd.c  29 Apr 2002 20:28:47 -  1.11
+++ src/pusb-bsd.c  19 Jul 2002 10:18:14 -  1.12
@@ -19,7 +19,7 @@
 *  Author   : Richard Tobin
 *  Creation : May 2001
 *
-* $Id: pusb-bsd.c,v 1.11 2002/04/29 20:28:47 rogler Exp $
+* $Id: pusb-bsd.c,v 1.12 2002/07/19 10:18:14 rogler Exp $
 */

 #include 
@@ -40,9 +40,9 @@
 /**
 * Patch USB structures for the change in early 2002
 **/
-#if ((defined (__FreeBSD__)) && (__FreeBSD_version > 50 && __FreeBSD_version < 
500031) || (__FreeBSD_version < 450001)) ||
(defined (__NetBSD__) && (__NetBSD_version__ < 10528)) || (defined (__OpenBSD__))
+#if ((defined (__FreeBSD__)) && ((__FreeBSD_version > 50 && __FreeBSD_version < 
+500031) || (__FreeBSD_version < 450001))) || (defined (__NetBSD__) && 
+__NetBSD_Version__ < 10528) || (defined (__OpenBSD__))

-/* strcut usb_ctl_request */
+/* struct usb_ctl_request */
 #define ucr_actlen  actlen
 #define ucr_flags   flags
 #define ucr_datadata
[tim@pauli /home/tim/cvs/speedtouch]$

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: pppoa3 terminated with signal 11

2002-10-29 Thread Tim Woodall
On Tue, 29 Oct 2002, Sam Griffiths-Jones wrote:

> On Fri, 25 Oct 2002, Tim Woodall wrote:
> 
> > You haven't quite got enough logging here to be sure but it might be
> > the OAM cell at the end of a frame problem or a buffer overflow in
> > the frame.
> >
> 
> Hi Tim
> 
> Thanks for this.  I haven't actually tried your suggestions, because
> if I turn off pppoa3 logging then it's all fine.  This seems to be
> reproducable -- dunno if its anything to do with the painfully slow
> computer I'm trying to use (P166, 64MB RAM)?.
> 
> Anyway I'm very happy to have all this working, so thanks a lot for
> your help.  If you want me to try stuff to try and pin down the
> problem with -v then feel free to shout either on or off list.
> 
I don't think it's your slow machine. P133, 48MB RAM here :-)
I'll try enabling logging and see if I get the problem at some stage but
I can't see anything obviously wrong.

I've got another project I'm working on at the moment so unless it is a
problem I'll ignore it for now :-)

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: pppoa3 terminated with signal 11

2002-10-25 Thread Tim Woodall
On Fri, 25 Oct 2002, Sam Griffiths-Jones wrote:

> 
> Hi all
> 
> I remember seeing something about this before, but the mail archive
> seems to be having trouble -- I can't read messages older than a
> couple of weeks.
> 
> Tim's successful fix of the speedtouch 330 thing has exposed the next
> problem.  After only a couple of minutes connection time I get:
> 
> Oct 24 23:54:44 lucy pppd[2365]: Child process /usr/bin/pppoa3 -v 2 -c
> -m 1 -vpi 0 -vci 38 (pid 2368) terminated with signal 11
> 
> in my /var/log/messages.  pppd stays active, and ifconfig reports
> link still up, but I can't send/recieve anything.  When I run the
> sysv init script to stop the connection I get:
> 
> Shutting down ADSL connection:n_hdlc: Device or resource busy
> 
> And I can't rmmod n_hdlc for the same reason.  Unplugging the modem
> and starting again doesn't sort it either so the only option that I've
> found to work is a reboot.  Of course I only get a 2 minute connection
> the next time round aswell.
> 
> Expanded syslog follows.  Any ideas?
> 
> Sam
> 

> 
> 
> 
> Oct 24 23:54:16 lucy pppoa3[2374]: Extracted PPP packet sent to ppp(d)
> Oct 24 23:54:16 lucy pppoa3[2373]: ATM cell queue sent to USB
> <. x lots>
> 
> Oct 24 23:54:44 lucy pppd[2365]: Child process /usr/bin/pppoa3 -v 2 -c
> -m 1 -vpi 0 -vci 38 (pid 2368) terminated with signal 11
> 
You haven't quite got enough logging here to be sure but it might be the
OAM cell at the end of a frame problem or a buffer overflow in the frame.

The latest CVS version has a fix for both of these.


(There is a strange oddity in the logging code - I'm not sure if its a
bug or by design. - If REPORT_DUMP is NOT set then the log level is always
LOG_INFO. If REPORT_DUMP is set then the log level depends on whether
REPORT_ERROR, REPORT_INFO or REPORT_DEBUG is set.)


To get the logging needed to check whether this is the bug outlined
above you need to enable LOG_DEBUG logging in syslog.

Hopefully you will see "AAL5 frame joined up  (0 bytes long)" in the log
just before the crash. 
(Or "Buffer overflow, too many cells for the same aal5 frame")


Signal 11 is SIGSEGV which means that pppoa3 is writing to illegal memory.
If the latest CVS (plus my patch) doesn't fix it can you enable maximum
logging and then recreate the crash and then post the last 20 or so lines
of the log before the "signal 11" line. Hopefully this will give a clue.
(The log will get pretty big pretty quickly and the crash may not happen
because things are running more slowly.)
Regards,

Tim.



> 
> 
> 
> Liste de diffusion modem ALCATEL SpeedTouch USB
> Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe
> 
>   
> 

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: Alcatel 330 USB connection failure

2002-10-24 Thread Tim Woodall
On Thu, 24 Oct 2002, Tim Woodall wrote:

> On Thu, 24 Oct 2002, Edouard Gomez wrote:
> 
> > 
> > Tim Woodall ([EMAIL PROTECTED]) wrote:
> > > I would suggest a -e  switch to pppoa3 and
> > > modem run with the default left at 2 
> > 
> > It  would prefer  extend pusb  to  tell us  what type  of transfer  is
> > supported for  a specific (interface,endpoint)  couple. I think  it is
> > rather easy to implment this,  and loop through all interfaces for the
> > known data endpoints (0x07/0x87).
> > 
> > I'll have a look at usbfs specification.
> > 
> Sounds good. I wouldn't know how to do this without some intensive
> reading but I could hack a perl script together that reads 
> /proc/bus/usb/devices and says
> "You need to use alternate 1 on interface 1" :-)
> 

I've just tested on my machine and all the alternate interfaces[1] work with the 
frog (Equally unreliably if you have a Triton II chipset :-( )

[1] 1,2 and 3 - alternate 0 on interface 1 doesn't seem to have any endpoints.

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: Alcatel 330 USB connection failure

2002-10-24 Thread Tim Woodall
On Thu, 24 Oct 2002, Edouard Gomez wrote:

> 
> Tim Woodall ([EMAIL PROTECTED]) wrote:
> > I would suggest a -e  switch to pppoa3 and
> > modem run with the default left at 2 
> 
> It  would prefer  extend pusb  to  tell us  what type  of transfer  is
> supported for  a specific (interface,endpoint)  couple. I think  it is
> rather easy to implment this,  and loop through all interfaces for the
> known data endpoints (0x07/0x87).
> 
> I'll have a look at usbfs specification.
> 
Sounds good. I wouldn't know how to do this without some intensive
reading but I could hack a perl script together that reads 
/proc/bus/usb/devices and says
"You need to use alternate 1 on interface 1" :-)

Attached is an (untested) patch that should allow people with the
330 Speedtouch to test. I think you need -e 1 on the commandline for
both modem_run and pppoa3.

Hopefully Edouard will make this -e switch unnecessary once the changes
make it to cvs or a release.

Tim.

(For those people who don't know how to use patch, get the source tarball
of the driver and extract it.

Save this email as a plain text file (you don't need to delete the message)
cd to the src directory of the tarball you extracted
then type patch < (the file with this email in)
Finally build and install as normal)


Index: modem_run.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/modem_run.c,v
retrieving revision 1.22
diff -u -r1.22 modem_run.c
--- modem_run.c 8 Sep 2002 22:18:40 -   1.22
+++ modem_run.c 24 Oct 2002 17:24:31 -
@@ -83,6 +83,7 @@
 **/
 
 static int verbose = 0;
+static int alternate_ep = 2;   /* historically defaulted to 2 */
 FILE *log = NULL;
 
 /*
@@ -301,6 +302,8 @@
file = argv[++i];
else if(strcmp(argv[i], "-d") == 0 && i + 1 < argc)
devicename = argv[++i];
+   else if(strcmp(argv[i], "-e") == 0 && i + 1 < argc)
+   alternate_ep = atoi(argv[++i]);
else if (strcmp(argv[i],"--help")==0)
usage();
else
@@ -407,7 +410,7 @@
return(-1);
}

-   if (pusb_set_interface(fdusb,1,2) < 0) {
+   if (pusb_set_interface(fdusb,1,alternate_ep) < 0) {
report(0, REPORT_ERROR, "pusb_set_interface");
return(-1);
}
@@ -480,6 +483,7 @@
fprintf(stderr, "  -s   : skip the first 512 bytes read\n");
fprintf(stderr, "  -f microcode : upload this microcode file first\n");
fprintf(stderr, "  -d device: defines the device to use\n");
+   fprintf(stderr, "  -e alternate : defines the endpoint alternate interface to 
+use\n");
fprintf(stderr, "  --help   : this message\n");
exit(-1);
 
Index: pppoa3.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/pppoa3.c,v
retrieving revision 1.28
diff -u -r1.28 pppoa3.c
--- pppoa3.c20 Oct 2002 22:32:54 -  1.28
+++ pppoa3.c24 Oct 2002 17:24:33 -
@@ -186,6 +186,7 @@
 static char *log_file;
 #endif
 static int verbose;
+static int alternate_ep = -1;  /* historically wasn't set */
 
 /* Named pipe filename */
 #define PIPE_NAME_FORMAT "/var/run/pppoa3-modem%d.pipe"
@@ -665,6 +666,20 @@
report(0, REPORT_ERROR|REPORT_DATE, "pusb_claim_interface 1 failed\n");
return(-1);
}
+
+   if (alternate_ep != -1) {
+   /* Historically this wasn't set */
+   /* reconfigure USB (configuration & alternate settings) */
+   if (pusb_set_configuration(fdusb,1) < 0) {
+   report(0, REPORT_ERROR, "pusb_set_configuration 1");
+   return(-1);
+   }
+   
+   if (pusb_set_interface(fdusb,1,alternate_ep) < 0) {
+   report(0, REPORT_ERROR, "pusb_set_interface");
+   return(-1);
+   }
+   }
 
/* Opens the end point */
ep_data = pusb_endpoint_open(fdusb, EP_DATA_OUT, O_RDWR);
@@ -1872,6 +1887,9 @@
else if((strcmp(argv[i], "--device") == 0 || strcmp(argv[i], "-d") == 
0) && i + 1 < argc) {
device_name = argv[++i];
}
+   else if((strcmp(argv[i], "--alt-ep") == 0 || strcmp(argv[i], "-e") == 
+0) && i + 1 < argc) {
+   alternate_ep = atoi(argv[++i]);
+   }
else if((st

[speedtouch] Re: Alcatel 330 USB connection failure

2002-10-24 Thread Tim Woodall
On Thu, 24 Oct 2002, Sam Griffiths-Jones wrote:

> On Wed, 23 Oct 2002, Tim Woodall wrote:
> 
> 
> 
> Yippee -- worked for me!  Had to also do your modem_run.c change else
> I got wierd vci/vpi error messages.  One very happy punter here.
> 
That's interesting. Might also account for why some people report
thousands of vci/vpi error messages. modem_run is always using alternate
2 while pppoa3 is using a default (random?)

I would suggest a -e  switch to pppoa3 and
modem run with the default left at 2 (we don't really want to break any
working configurations although I'm not sure if forcing the endpoint
on pppoa3 might cause some people problems.

Opinions?

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: Alcatel 330 USB connection failure

2002-10-23 Thread Tim Woodall
One other thing to try if this doesn't work - change the
line 

if (pusb_set_interface(fdusb,1,2) < 0) {

in modem_run.c to

if (pusb_set_interface(fdusb,1,1) < 0) {


Regards,

Tim.

On Wed, 23 Oct 2002, Tim Woodall wrote:

> On 23 Oct 2002, Diye Wariebi wrote:
> 
> > 
> > I tried using the normal SpeedTouch USB modem last night and it worked
> > fine first time.  I had my connection up all night without much
> > problems.  However the SpeedTouch 330 still had problem using the same
> > configuration files.  Below is a link showing the Syslog messages and
> > /proc/bus/usb/devices for both setup.  I hope someone can help.  I have
> > to give the SpeedTouch (flatfish/stingray) back tonight and would dearly
> > like to get my 330 model working soon.
> > 
> > http://www.nascr.net/~yakub
> > 
> > Thx
> > 
> It looks like we need to use a different endpoint configuration
> (I'm not sure what is used as default)
> 
> in pppoa3.c try:
> 
> /* reconfigure USB (configuration & alternate settings) */
> if (pusb_set_configuration(fdusb,1) < 0) {
> report(0, REPORT_ERROR, "pusb_set_configuration 1");
> return(-1);
> }
> 
> if (pusb_set_interface(fdusb,1,1) < 0) {
> report(0, REPORT_ERROR, "pusb_set_interface");
> return(-1);
> }
> 
> immediately after the bit that says:
> 
> /* We claim interface 1, where endpoints 0x07 & 0x87 are */
> if(pusb_claim_interface(fdusb, 1) < 0) {
> report(0, REPORT_ERROR|REPORT_DATE, "pusb_claim_interface 1 fail
> return(-1);
> }
> 
> I can't promise it will work but looking at the devices file we need to use 
> alternate 1 on interface 1 as this is the only one that has bulk transfer
> support when sending data.
> 
> (This change ought to work on the frog as well but I can't test now)
> 
> Regards,
> 
> Tim.
> 
> 
> 

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: Alcatel 330 USB connection failure

2002-10-23 Thread Tim Woodall
On 23 Oct 2002, Diye Wariebi wrote:

> 
> I tried using the normal SpeedTouch USB modem last night and it worked
> fine first time.  I had my connection up all night without much
> problems.  However the SpeedTouch 330 still had problem using the same
> configuration files.  Below is a link showing the Syslog messages and
> /proc/bus/usb/devices for both setup.  I hope someone can help.  I have
> to give the SpeedTouch (flatfish/stingray) back tonight and would dearly
> like to get my 330 model working soon.
> 
> http://www.nascr.net/~yakub
> 
> Thx
> 
It looks like we need to use a different endpoint configuration
(I'm not sure what is used as default)

in pppoa3.c try:

/* reconfigure USB (configuration & alternate settings) */
if (pusb_set_configuration(fdusb,1) < 0) {
report(0, REPORT_ERROR, "pusb_set_configuration 1");
return(-1);
}

if (pusb_set_interface(fdusb,1,1) < 0) {
report(0, REPORT_ERROR, "pusb_set_interface");
return(-1);
}

immediately after the bit that says:

/* We claim interface 1, where endpoints 0x07 & 0x87 are */
if(pusb_claim_interface(fdusb, 1) < 0) {
report(0, REPORT_ERROR|REPORT_DATE, "pusb_claim_interface 1 fail
return(-1);
}

I can't promise it will work but looking at the devices file we need to use 
alternate 1 on interface 1 as this is the only one that has bulk transfer
support when sending data.

(This change ought to work on the frog as well but I can't test now)

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: Alcatel 330 USB connection failure

2002-10-22 Thread Tim Woodall
On Tue, 22 Oct 2002, Sam Griffiths-Jones wrote:

> On Mon, 21 Oct 2002, Edouard Gomez wrote:
> 
> > Diye Wariebi ([EMAIL PROTECTED]) wrote:
> > > Oct 20 18:41:43 escapethenet pppd[9504]: pppd 2.4.1 started by root, uid 0
> > > Oct 20 18:41:43 escapethenet pppd[9504]: Using interface ppp0
> > > Oct 20 18:41:43 escapethenet pppd[9504]: Connect: ppp0 <--> /dev/pts/2
> > > Oct 20 18:41:44 escapethenet pppoa3[9505]: PPPoA3 version 1.1 started by root 
>(uid 0)
> > > Oct 20 18:41:44 escapethenet pppoa3[9505]: Control thread ready
> > > Oct 20 18:41:44 escapethenet pppoa3[9510]: ppp(d) --> pppoa3 --> modem  stream 
>ready
> > > Oct 20 18:41:44 escapethenet pppoa3[9511]: modem  --> pppoa3 --> ppp(d) stream 
>ready
> > > Oct 20 18:41:46 escapethenet kernel: usb_control/bulk_msg: timeout
> > > Oct 20 18:41:46 escapethenet kernel: usbdevfs: USBDEVFS_BULK failed dev 2 ep 0x7 
>len 53 ret -110
> >
> > I think  the driver is  not adapted to  this new model of  modem. Just
> > look at the way  the modem fails as soon as atm  cells are sent to usb
> > (53 bytes length).
> >
> 
> Doh -- this is not good news.  It seems that I have the same problem
> with a Speedtouch 330 (contrary to short conversation on this list
> last week where I completely failed to describe the problem
> adequately!).  These things are shipping by default now with various
> connection packages so there are gonna be a load of people stuck with
> this.  My C is certainly not up to helping directly but if I can
> provide any info then please shout.
> 
> My config files/syslog output can be found here:
> 
> http://www.sanger.ac.uk/Users/sgj/speedtouch/
> 
You appear to be getting packets from your ISP correctly, it's
just the sending that is failing.

can you give the output of 
cat /proc/bus/usb/devices

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: Alcatel 330 USB connection failure

2002-10-22 Thread Tim Woodall
On 22 Oct 2002, Diye Wariebi wrote:

> 
> On Mon, 2002-10-21 at 18:09, Tim Woodall wrote:
> > On 21 Oct 2002, Diye Wariebi wrote:
> > 
> > > 
> > > Below is my /etc/ppp/peers/adsl
> > > 
> > 
> > 
> > > this is because BT does not require a password for authentication.
> > > 
> > Someone else had this problem. Search the archive and email them to
> > see if they sorted it.
> > 
> > Otherwise, I'm afraid you are going to have to get a dump of windows
> > connecting and post it (to a website - only post the link here) and
> > someone here will "decode" it and work out what windows is doing.
> 
> How do I do that (dump of windows connecting)?

I've absolutely no idea. Sorry. I don't use windows unless I absolutely
have to. (And don't have windows installed at home at all :-)

However, IIRC there is a thing called winpcap (which IIRC is a windows
replacement for libpcap) and I'm sure there is a TCPdump clone or
something similar that will dump the traffic.

IIRC you will see datagrams starting C0 21 or similar if you are logging
the correct stuff.

HTH.

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: Alcatel 330 USB connection failure

2002-10-21 Thread Tim Woodall
On Mon, 21 Oct 2002, Tim Woodall wrote:

> On Mon, 21 Oct 2002, Tim Woodall wrote:
> 
>  
> > There are three posibilities I can see. 1. Windows is doing something 
> > completely non-standard and pppd will need hacking to make it work.
> > 2. There is a "standard" password. That is going to be difficult to extract
> > from the binary on your system (and impossible from the log I think)
> > 3. Windows uses some "standard" password to authenticate if you don't
> > provide one. Again I have no idea how to determine this although one
> > possibility would be to set up a modem peer and then try to connect using
> > pap as the password is then in plaintext.
> > 
> > 
> One other possibility. There is a bug in pppd and you can't put in
> a null password.
> 
> Does windows work with any password? or just a blank one?
> 
Yet another possibility - windows is using pap not chap. Try creating a
pap-secrets as well and maybe add refuse-chap to options.
(Obviously if it is a blank password then using chap offers no advantage :-)



> Tim.
> 
> 

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: Alcatel 330 USB connection failure

2002-10-21 Thread Tim Woodall
On 21 Oct 2002, Diye Wariebi wrote:

> 
> Resending after subscribing to list.
> BTW
> I am using a H 7.2 system
> 
> 
> Hi list
> 
> I have been up all night and cannot resolve this problem.  My ISP is
> btbroadband and my modem is an alcatel speedtouch 330 USB.
> 
> Below is an extract from my log file.  Can anyone help me please.  I am
> getting very frustrated and running out of ideas.  Apologies for the
> length of the log file.
> 
> When I do ifconfig there is no entry for ppp.
> 
chap-secrets probably.

Everything looks good until you start trying to talk to the ISP.

Turn on pppd debugging. Also post your peers/adsl (or whatever)

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: Alcatel 330 USB connection failure

2002-10-21 Thread Tim Woodall
On 21 Oct 2002, Diye Wariebi wrote:

> 
> Below is my /etc/ppp/peers/adsl
> 


> this is because BT does not require a password for authentication.
> 
Someone else had this problem. Search the archive and email them to
see if they sorted it.

Otherwise, I'm afraid you are going to have to get a dump of windows
connecting and post it (to a website - only post the link here) and
someone here will "decode" it and work out what windows is doing.

There are three posibilities I can see. 1. Windows is doing something 
completely non-standard and pppd will need hacking to make it work.
2. There is a "standard" password. That is going to be difficult to extract
from the binary on your system (and impossible from the log I think)
3. Windows uses some "standard" password to authenticate if you don't
provide one. Again I have no idea how to determine this although one
possibility would be to set up a modem peer and then try to connect using
pap as the password is then in plaintext.


Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/




Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: Alcatel 330 USB connection failure

2002-10-21 Thread Tim Woodall
On Mon, 21 Oct 2002, Tim Woodall wrote:

 
> There are three posibilities I can see. 1. Windows is doing something 
> completely non-standard and pppd will need hacking to make it work.
> 2. There is a "standard" password. That is going to be difficult to extract
> from the binary on your system (and impossible from the log I think)
> 3. Windows uses some "standard" password to authenticate if you don't
> provide one. Again I have no idea how to determine this although one
> possibility would be to set up a modem peer and then try to connect using
> pap as the password is then in plaintext.
> 
> 
One other possibility. There is a bug in pppd and you can't put in
a null password.

Does windows work with any password? or just a blank one?

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: [PATCH] I need feedback from PPPoE users

2002-10-20 Thread Tim Woodall
On Sun, 20 Oct 2002, Edouard Gomez wrote:

> swaped in by the VM. Could you explain your point of view a bit more ?
> 
All I meant is that someone in the future could use BUFFER_SIZE in an
expression and get a surprise because it isn't surrounded with "(" ")".

It's things like this that appear to work for years before someone spots
the bug and suddenly discovers a buffer overrun that allows a box to be
rooted.

As pppoa3 sits before any firewall filters it's preferable that it's
right ;-) (and coded as defensively as possible)

(There is nothing wrong with your code that I can see, I'm just trying to
avoid a potential problem in the future)


> > Finally, can you apply (or comment upon) this patch which is required to
> > fix a number of potential SIGSEGV problems that could affect anybody
> > (although, to the best of my knowledge only one person has experienced
> > one). In particular, if the last cell of a frame is a management cell then
> > you will get a core dump currently.
> 
> Sure, it does not hurt so it's accepted.
> 
> 
Thanks.

And keep up the good work.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: [PATCH] I need feedback from PPPoE users

2002-10-20 Thread Tim Woodall
On Sat, 19 Oct 2002, Edouard Gomez wrote:

Hopefully this makes more sense.

> 
> Hello,
> 
> I merged  the experimental patch for  pppoe support in  pppoa3. At the
> moment the code is for linux only as i don't have *BSD box.
> 
> I would like people who needs or can use PPPoE to try this patch.
> 
I don't think I can - can BT people use PPPoE?


> Index: src/pppoa3.c
> ===
> RCS file: /cvsroot/speedtouch/speedtouch/src/pppoa3.c,v
> retrieving revision 1.25
> diff -r1.25 pppoa3.c
> 915a970,972
> > #ifdef __linux__
> > if(write_dest(fdout, destination_buf, n  + 
>(bridging)?-BRIDGING1483_HEADER:HDLC_HEADER_SIZE) > 0)

This is surely wrong? ITYM
if(write_dest(fdout, destination_buf, n  + 
((bridging)?-BRIDGING1483_HEADER:HDLC_HEADER_SIZE)) > 0)

Infact I'm amazed it works at all as you will be passing a negative length to 
write_dest.


> 1166a1227,1247
> > #ifdef __linux__
> > if(bridging) {
> > /*
> >  * When bridging aal5 frames will never use more than 1500 
>bytes
> >  * because max I802.2 frames are 15000 bytes long, so there is 
>no

Do you mean 1500 here in the comment rather than 15000. Otherwise it doesn't make 
sense!

> >  * buffer overflow possible here even if we use 12 bytes more
> >  */
> > 

> 1193a1275,1277
> > #ifdef __linux__
> > return(r + (bridging)?BRIDGING1483_HEADER:-HDLC_HEADER_SIZE);

Wrong? ITYM
return(r + ((bridging)?BRIDGING1483_HEADER:-HDLC_HEADER_SIZE));


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: [PATCH] I need feedback from PPPoE users

2002-10-20 Thread Tim Woodall
On Sat, 19 Oct 2002, Edouard Gomez wrote:

> 
> Hello,
> 
(I've confused myself :-(. These are comments on the patch from
r1.24 to r1.25 of pppoa3.c. I'll reply with my comments on your
suggested patch in another email. (I hadn't read your email
properly and assumed that the latest change in cvs was the patch :-(



@@ -268,13 +272,11 @@
};

/* Reading and writing buffers */
-#define BUFFER_SIZE (64*1024)
-#define HDLC_HEADER_SIZE 2
-
-static unsigned char ppp_read_buf[HDLC_HEADER_SIZE + 1367*ATM_CELL_TOTAL_SIZE];
-static unsigned char ppp_write_buf[HDLC_HEADER_SIZE + 1367*ATM_CELL_TOTAL_SIZE];
-static unsigned char *aal5_send_buf = &ppp_read_buf[HDLC_HEADER_SIZE];
-static unsigned char *aal5_recv_buf = &ppp_write_buf[HDLC_HEADER_SIZE];
+#define HDLC_HEADER_SIZE2
+#define BRIDGING1483_HEADER 12
+#define AAL5_MAX_SIZE   64*1024
+#define BUFFER_SIZE HDLC_HEADER_SIZE + BRIDGING1483_HEADER + \
+1367*ATM_CELL_TOTAL_SIZE

These last two (and especially the BUFFER_SIZE) ought to be enclosed with "(" 
and ")".

I can imagine a change later

/* Use double buffer so we can process one packet on one cpu while receiving
another with the other cpu */

unsigned char read_buffer[BUFFER_SIZE * 2];

which might not crash straight away!



@@ -751,19 +759,26 @@
sigfillset(&signal_set);
pthread_sigmask(SIG_SETMASK, &signal_set, NULL);

+   /* Allocate buffer memory */
+   if((buffer = malloc(BUFFER_SIZE)) == NULL)
+   goto local_end;

/* Reads data from ppp(d) */
-   n = ppp_read(STDIN_FILENO, ppp_read_buf, BUFFER_SIZE);
+   n = read_source(fdin, source_buf, AAL5_MAX_SIZE);

It isn't immediately obvious that AAL5_MAX_SIZE <= BUFFER_SIZE

At the very least there should be a
#if AAL5_MAX_SIZE > BUFFER_SIZE
#error "AAL5_MAX_SIZE must not be bigger than BUFFER_SIZE"
#endif


There is a similar thing in read_from_usb_thread but its more obviously
correct (53*64)<=(BUFFER_SIZE) :-)



Finally, can you apply (or comment upon) this patch which is required to
fix a number of potential SIGSEGV problems that could affect anybody
(although, to the best of my knowledge only one person has experienced
one). In particular, if the last cell of a frame is a management cell then
you will get a core dump currently.

The real_length@ -329,6 +329,7 @@
atm_header_get_pti(src));
src  += ATM_CELL_TOTAL_SIZE;
length   -= ATM_CELL_TOTAL_SIZE;
+   pti = 0;/* Reset pti because this could be the last cell 
+in the buffer */
continue;
}
 
@@ -343,6 +344,7 @@
report(0, REPORT_DEBUG|REPORT_DATE|REPORT_DUMP, "Management 
cell in stream (OAM)\n", src, ATM_CELL_TOTAL_SIZE);
src+= ATM_CELL_TOTAL_SIZE;
length -= ATM_CELL_TOTAL_SIZE;
+   pti = 0;/* Reset pti because this could be the last cell 
+in the buffer */
continue;
}
 
@@ -384,6 +386,8 @@
int real_length;
unsigned int frame_crc, computed_crc;
 
+   if(length < 6)
+   return(-1);
 
/* CRC checking */
computed_crc = ~aal5_calc_crc(frame, length - 4, ~0);
@@ -395,6 +399,10 @@
 
/* Find the real len */
real_length = (((int)frame[length - 6])<<8)|((int)frame[length - 5]);
+
+   if(real_length > length)
+   /* This is most likely a deliberate hack attempt - perhaps we ought to 
+log this??? */
+   return(-1);
 
/* Copy the data */
if(data != frame)
Index: pppoa3.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/pppoa3.c,v
retrieving revision 1.25
diff -u -r1.25 pppoa3.c
--- pppoa3.c13 Oct 2002 20:42:12 -  1.25
+++ pppoa3.c20 Oct 2002 15:45:04 -
@@ -894,6 +894,7 @@
/* A buffer overflow has been detected */
if(pti<0) {
report(0, REPORT_ERROR|REPORT_DATE, "Buffer overflow, too many 
cells for the same aal5 frame\n");
+   pti = 0;
}
 
/* As the last pti is 1, we have to send the aal5_frame data */

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/




Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:speedtouch-request@;ml.free.fr?subject=unsubscribe





[speedtouch] Re: pppd probs I suspect

2002-10-16 Thread Tim Woodall

On Wed, 16 Oct 2002, Sam Griffiths-Jones wrote:

> 
> On 16/10/02 Tim said:
> 
> > > sam@lucy [~]181% cat /etc/ppp/peers/adsl
> > > debug
> > > kdebug 1
> > > noipdefault
> > > defaultroute
> > > #pty "/usr/local/sbin/pppoa2 -vpi 0 -vci 38"
> > > pty "/usr/local/sbin/pppoa3 -a -m -c -vpi 0 -vci 38"
> >  ^^
> > async
> > > sync
> >   ^
> >
> > Oops. Remove either the -a or the sync and it will work (hopefully
> > :-)
> >
> >  Tim.
> 
> Sorry Tim -- my fault but I think this is distracting from the real
> problem as I've tried every combination of -a and sync with the same
> negative result.  The above cut and paste was simply the last one I
> tried (not expecting much for the reason you point out!).
> 
> I was thinking that the LCP timeout is the thing I should be focussing
> on -- should this be telling me something?
> 
I don't think so (yet).

Few other things - -m needs a number after it - but you don't need it at all.
(The -c option is being treated as the number 0 to -m)

Propose a patch to alert to this sort of problem

First thing can you do a -v 2 (IIRC) We should then be able to see if you
are sending and/or receiving packets over the USB link.

Next. I remember people having problems with the 2.4.18 kernel when it
first came out. Some people had to go back to an earlier kernel. So I 
suggest you try an earlier kernel (I'm running 2.4.14 successfully)
- I don't know what happened to this problem. People just stopped
reporting it. Maybe it is a hardware specific problem.

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: pppd probs I suspect

2002-10-16 Thread Tim Woodall

On Tue, 15 Oct 2002, Sam Griffiths-Jones wrote:

> 
> Hello all
> 
> Proud new owner of speedtouch 330 and Zen ADSL connection (which
> works fine in windows) seeks help with linux things.
> 
> modem_run works fine, pppd seems to timeout and I never get an IP in
> ifconfig ppp0.
> 
> Very grateful for assistance -- various config and debug stuff
> follows.
> 
> Sam
> 
> -
> 
> slackware 8.1
> kernel 2.4.18
> pppd version 2.4.1
> 
> sam@lucy [~]180% lsmod
> Module  Size  Used byTainted: P
> ppp_deflate39456   0  (unused)
> ppp_async   6048   0
> n_hdlc  5888   0
> ppp_synctty 4512   0
> ppp_generic14908   0  [ppp_deflate ppp_async ppp_synctty]
> slhc4400   0  [ppp_generic]
> usb-uhci   20876   0  (unused)
> 
> sam@lucy [~]181% cat /etc/ppp/peers/adsl
> debug
> kdebug 1
> noipdefault
> defaultroute
> #pty "/usr/local/sbin/pppoa2 -vpi 0 -vci 38"
> pty "/usr/local/sbin/pppoa3 -a -m -c -vpi 0 -vci 38"
  ^^
  async
> sync
  ^

Oops. Remove either the -a or the sync and it will work (hopefully :-)

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Problem with Speedtouch and ClarkConnect 1.1 (RH7.2)

2002-10-09 Thread Tim Woodall

On Wed, 9 Oct 2002, Cedric Diebolt wrote:

Try this. It works for me (tm)


/etc/init.d/firewall is my code to start my firewall. I haven't
included it here. There is a version on my website - link in .sig
but it is probably a bit out of date.

Call downup.sh from crontab. I call it once every 5 minutes.

Regards,

Tim.

#!/bin/bash

#
# 
#  downup.sh
# 
#  Copyright (c) 2002 Tim Woodall ([EMAIL PROTECTED])
# 
#  This program is licenced under the GNU licence.
#  See LICENCE for more details
# 
#  $Id: downup.sh,v 1.3 2002/10/09 22:12:46 tim Exp $
# 
#

PING_TIMEOUT=20
PPPD_TIMEOUT=240
MCODE_TIMEOUT=240

LOCK_FILE=/root/firewall/lock

MCODE_LOADED=/root/firewall/mcode_loaded

kill_pppd()
{
echo kill_pppd at `/bin/date`

/usr/bin/killall pppd >/dev/null 2>&1
sleep 10
. /etc/sysconfig/firewall

while [ "$NET_IF" != "" ]; do
echo killall pppd at `/bin/date`
/usr/bin/killall pppd >/dev/null 2>&1
sleep 10

. /etc/sysconfig/firewall
done

/usr/bin/killall -9 pppoa3 >/dev/null 2>&1
sleep 10

rm -f /var/run/pppoa3-modem1.pid

echo finished kill_pppd with NET_IF = $NET_IF at `/bin/date`
}

start_pppd()
{
echo start_pppd at `/bin/date`

/usr/sbin/pppd call adsl

STOPTIME=$[$PPPD_TIMEOUT+`/bin/date +%s`]

. /etc/sysconfig/firewall

while [ "$NET_IF" = "" -a `/bin/date +%s` -lt $STOPTIME ]; do
sleep 1
. /etc/sysconfig/firewall
done

echo finished start_pppd with NET_IF = $NET_IF at `/bin/date`
}

#Dont call this directly - use reload_mcode
do_reload_mcode()
{
/usr/bin/killall modem_run >/dev/null 2>&1
/sbin/rmmod usb-uhci
sleep 5
rm -f $MCODE_LOADED
/sbin/modprobe usb-uhci
sleep 5
/usr/local/bin/modem_run -v 2 -f /usr/local/bin/mgmt.o -m
touch $MCODE_LOADED
}

load_mcode()
{
echo load_mcode at `/bin/date`

while [ ! -e $MCODE_LOADED ]; do
echo $MCODE_LOADED not found - reloading microcode at `/bin/date`

do_reload_mcode &
sleep 10

STOPTIME=$[$MCODE_TIMEOUT+`/bin/date +%s`]

while [ ! -e $MCODE_LOADED -a `/bin/date +%s` -lt $STOPTIME ]; do
sleep 10
done
done

echo finished load_mcode at `/bin/date`
}

reload_mcode()
{
echo reload_mcode at `/bin/date`
rm -f $MCODE_LOADED
load_mcode
echo finished reload_mcode at `/bin/date`
}

if [ -f ${LOCK_FILE} ]; then
echo Another downup.sh running at `/bin/date`
exit 0
fi

# Get config.
if [ ! -f /etc/sysconfig/firewall ]; then
echo
echo "ERROR IN CONFIGURATION: Can't find /etc/sysconfig/firewall"
exit 0
fi

touch ${LOCK_FILE}

while true; do

. /etc/sysconfig/firewall

if [ "$PTP_IP" != "" ]; then

STOPTIME=$[$PING_TIMEOUT+`/bin/date +%s`]
while [ `/bin/date +%s` -lt $STOPTIME ]; do
. /etc/sysconfig/firewall
if ( /bin/ping -c 1 $PTP_IP >/dev/null 2>&1 ); then
rm -f ${LOCK_FILE}
echo Connection OK at `/bin/date`
exit 0
else
/etc/init.d/firewall
sleep 1
fi
done

fi

echo restarting at `/bin/date`

kill_pppd
load_mcode
start_pppd

. /etc/sysconfig/firewall

while [ "$NET_IF" = "" ]; do
echo "Timed out after $PPPD_TIMEOUT seconds"

kill_pppd
reload_mcode
start_pppd

. /etc/sysconfig/firewall
done

/etc/init.d/firewall
done

exit 0


============



#
# 
#  Firewall
# 
#  Copyright (c) 2002 Tim Woodall ([EMAIL PROTECTED])
# 
#  This program is licenced under the GNU licence.
#  See LICENCE for more details
# 
#  $Id: firewallsetup,v 1.6 2002/02/09 13:02:29 tim Exp $
# 
#

IPTABLES="/sbin/iptables"
SED="/bin/sed"
IFCONFIG="/sbin/ifconfig"

LAN_IF="eth0"
DMZ_IF="eth1"
NET_IF=`${IFCONFIG} | ${SED} -n "s/^\(ppp[0-9]\).*$/\1/p"`

LAN_IP=`${IFCONFIG} ${LAN_IF} | ${SED} -n "

[speedtouch] Re: Encapsulation problem?

2002-10-03 Thread Tim Woodall

On Fri, 20 Sep 2002, Paolo 'Garrone' Prandoni wrote:

> Hi all
> reading the docs attached to Speedtouch sw, I read that there are 2 method 
> to encapsulate/decapsulate PPP packets in/from AAL5. One is VCMUX and the 
> ather is LLC.
> 
> My ISP (Elitel.biz) is using VCMUX. Can this be a problem? The driver 
> supports this method?
> 
> All the best
> Paolo
> 
I've just read something in uk.telecom.broadband.

But there is something to do with llc-encaps a ppp option but llc-encaps
isn't listed in my manpage.

I've snipped the bottom of the post (below) - see google for the whole thing.

Regards,

Tim.

--

Newsgroups: uk.telecom.broadband
Subject: Re: Kingston Communications ADSL + Linux pppd issues
Date: Thu, 3 Oct 2002 22:12:47 +0100
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.
X-Complaints-To: [EMAIL PROTECTED]
Lines: 70
Xref: einstein.locofungus.org uk.telecom.broadband:48785

Sorted.

No... LCP is necessary...

Solution was to add 'llc-encaps' to /etc/ppp/options after pppoatm.so plugin
line.
ISP uses LLC encapsulation, not VC. Option didn't seem to work when I stuck
it there on its own, that's why I was stuck.

btw 2.4.19 does not need ANY patching at all to get pppoa working. Just
compile atm, load the itex driver and run pppd.
--Corf




-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/




Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Mandrake 8.2-Connection problem

2002-10-03 Thread Tim Woodall


I posted this a couple of weeks ago. It has got missed, presumably when
I was looking at the CRC calculation code and posted another patch
that isn't required.

The only hunk that isn't strictly required is the length<6 line but this
line would have fixed the OPs coredump. (And will catch any other "special"
cases that haven't been found yet :-)


Note that without this patch, if your ISP sends OAM cells that are the
only or last thing in a frame then you _will_ get a core dump.

Regards,

Tim.



On Thu, 19 Sep 2002, Tim Woodall wrote:

OK. To the CVS authors, here is a patch:

First two hunks fix the reported coredump where the last cell in the
buffer is bad and pti then holds an invalid value.

Next hunk (length<6) is a sanity check and would also have prevented
the reported coredump. Note that if we ever get to here with length<6
the something has gone very wrong but this will prevent a core dump.

Fourth hunk (security fix) is one that has been bugging me for a long 
time. It is unlikely to happen by accident because the CRC has to be 
correct but the length invalid. The test is the losest that is sufficient. 
It may be possible to tighten this test but I don't think it is worth
it unless someone is going to log this event.

(This could be exploited where a ping packet with an invalid size is
used to read memory in the TCP stack. ISPs will (hopefully) prevent
anyone injecting packets like this but we shouldn't rely on it)

Final hunk (pppoa3 - there may be a matching fix needed in pppoa2?)
prevents processing of the oversized cell that we have already flagged
as bad (because -1 is TRUE)!


I don't know how important the CVS history is and whether you want
to apply as several packages or just one.

Regards,

Tim.



Index: atm.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/atm.c,v
retrieving revision 1.6
diff -u -r1.6 atm.c
--- atm.c   21 Mar 2002 23:35:43 -  1.6
+++ atm.c   19 Sep 2002 18:07:25 -
@@ -329,6 +329,7 @@
atm_header_get_pti(src));
src  += ATM_CELL_TOTAL_SIZE;
length   -= ATM_CELL_TOTAL_SIZE;
+   pti = 0;/* Reset pti because this could be the last cell 
+in the buffer */
continue;
}
 
@@ -343,6 +344,7 @@
report(0, REPORT_DEBUG|REPORT_DATE|REPORT_DUMP, "Management 
cell in stream (OAM)\n", src, ATM_CELL_TOTAL_SIZE);
src+= ATM_CELL_TOTAL_SIZE;
length -= ATM_CELL_TOTAL_SIZE;
+   pti = 0;/* Reset pti because this could be the last cell 
+in the buffer */
continue;
}
 
@@ -384,6 +386,8 @@
int real_length;
unsigned int frame_crc, computed_crc;
 
+   if(length < 6)
+   return(-1);
 
/* CRC checking */
computed_crc = ~aal5_calc_crc(frame, length - 4, ~0);
@@ -395,6 +399,10 @@
 
/* Find the real len */
real_length = (((int)frame[length - 6])<<8)|((int)frame[length - 5]);
+
+   if(real_length > length)
+   /* This is most likely a deliberate hack attempt - perhaps we ought to 
+log this??? */
+   return(-1);
 
/* Copy the data */
if(data != frame)
Index: pppoa3.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/pppoa3.c,v
retrieving revision 1.24
diff -u -r1.24 pppoa3.c
--- pppoa3.c18 May 2002 19:54:46 -  1.24
+++ pppoa3.c19 Sep 2002 18:07:27 -
@@ -867,6 +867,7 @@
/* A buffer overflow has been detected */
if(pti<0) {
report(0, REPORT_ERROR|REPORT_DATE, "Buffer overflow, too many 
cells for the same aal5 frame\n");
+   pti = 0;
}
 
/* As the last pti is 1, we have to send the aal5_frame data */



-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/




Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: CHAP authentication problems

2002-09-30 Thread Tim Woodall

On Mon, 30 Sep 2002, Richard Thompson wrote:

> > Have you made sure that the "user" entry in your ppp
> > options file
> > matches the username in the chap file?
> > 
> > If that is not it, then I am out of suggestions.
> 
> yes, the entries match..
> 
> i am pretty sure the authentication is the problem...
> 
> Sep 30 16:17:12 dragon pppd[1395]: Remote message:
> Authentication failure
> Sep 30 16:17:12 dragon pppd[1395]: CHAP authentication
> failed
> Sep 30 16:17:12 dragon pppd[1395]: Connection
> terminated.
> 
> but I cannot see what the problem is as bt state they
> do not do any authentication!!
> 
> can anyone think of a reason why this isn't working?
> 
One guess. Try the silent option in pppd. I've no idea if this
will help but try and see if you can let the ISP drive this.

Also consider using your username as a password.

Have you got noauth in your options file? And not got auth in
/etc/ppp/peers/*. And also are you running pppd as root?

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: please help with problems on ppp and redhat7.3

2002-09-30 Thread Tim Woodall

On Mon, 30 Sep 2002, Richard Thompson wrote:

> Hi, thanks for the reply..
> 
> > Do you mean you don't have a windows password or
> > that you don't know
> > where to put it in linux? Not having a windows
> > password sounds very odd!
> 
> Strange as it may sound, because of the way BT
> broadband is organised, you actually only put a
> username into the dialog when dialing inwindows, there
> is actually no password assigned to individual users..
> How do I get around this with the chap-secrets file?
> thanks again :p
> 

There will be a password. Sounds like everyone will have the same one.

If it is using the windows standard dialing/auth stuff then do a google 
for how to extract the password from the registry.

Also try running strings on the dialer and see if you can find anything
that looks like a password.

Finally, change to another isp. We all know know your username. If the
password is really not unique then anyone who bothers to view the 
speedtouch archives can connect as you (potentially) and wreak havoc in
your name.

I really can't believe there isn't a password. Its far more likely that
it was set up by an engineer and you weren't told.

Have you tried ringing support and telling them that someone has go
hold of your password and would they change it for you (and tell you
the new one :-)

Does your software come on a floppy or a CD? If its a silver disk then
there will be a password somewhere else. If its a floppy or a CDR then 
see if you can get hold of someone elses and do a diff.

Tim.



-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: please help with problems on ppp and redhat 7.3

2002-09-30 Thread Tim Woodall

On Mon, 30 Sep 2002, Richard Thompson wrote:

OK. Read it more carefully this time.

> I am using modem_run version 1.1
> vpi = 0, vci = 38 (in the uk)
> My adsl provider is BT broadband (not BT Openworld)
> modem_run seems to be working..
> One thing about BT broadband is that there is no
> password, in the windows dial-up I only enter a user
> name without a password. Could this be the source of
> problems? I suspect it could, but do not have any
> ideas about a workaround for it...
> 
Do you mean you don't have a windows password or that you don't know
where to put it in linux? Not having a windows password sounds very odd!



> pppd seems to replicate itself - when I do ps -aux
> there 
> are about 4 copies where previously there was only 1
> (i.e. when I first 
> started it up..)
> 

This is correct.

> and daemon.* in /etc/syslog/conf gives lines and lines
> and lines of this 
> stuff:
> 
> Sep 29 21:55:45 dragon pppd[1313]: sent [LCP ConfRej
> id=0xce  MD5>]

You have refused to do CHAP authentication.


> Sep 29 21:55:45 dragon pppd[1313]: rcvd [LCP ConfReq
> id=0xcf  MD5> ]
> 
But your isp wants to do chap authentication.

Put your password in /etc/ppp/chap-secrets


[root@pauli /home/tim]# cat /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# clientserver  secret  IP addresses
richard.xxx *   YourPassword*


> I don't know if I've severely messed up my config
> files or what!!
> 
For the most part it all looks good. It looks like a password problem.
Sorry I didn't read more carefully first time.

Tim

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: please help with problems on ppp and redhat 7.3

2002-09-30 Thread Tim Woodall

On Mon, 30 Sep 2002, Richard Thompson wrote:


Now I have managed to completely piss off the moderators (sorry :-( )
lets try again

> Hi all,
> 


You don't say what isn't working. Everything looks fine to me.

Turn off logging if you don't want the "noise" in your logfiles.

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Multi Link (UK - BT)

2002-09-26 Thread Tim Woodall

On Thu, 26 Sep 2002, Alex Bennee wrote:

> Jim Morrison [Mailinglists] said:
> >
> > Hello guys..
> >
> > Does anyone know if it's possible to get two 500k BT ADSL lines running
> > in multilink? By which I mean, appearing as 1x 1Mb:DownStream and
> > 500k:UpStream line? (Through a linux box of course ;)
> >
> > I guess there would be obvious problems like the two lines having
> > different IP addresses etc..??
> 
> Yes its possible if you do shenanigans with linux traffic control to split
> packets between two links. Its probably worth reading up the Linux Advanced
> Routing howto for ideas on how this could be done.
> 
Surely this only works for outgoing traffic anyway. If you are running
a busy webserver then you could accept requests on one ip but "spoof" the
replies on the other line (assuming that the ISP doesn't filter them)
but there is no way AFAICT to get this to work for downloads. Downloading
a single iso from an FTP site is going to only be able to use one line.

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: bridging mode

2002-09-26 Thread Tim Woodall

On Thu, 26 Sep 2002, Michael Slater wrote:

> 
> Hi,
> Thanks for your reply.. im with iiNet in Australia, on another machine, i
> use an Alcatel Ethernet Modem, and i dont need to set up ppp.. i simply
> assign an i.p address to the ethernet card that the modem is plugged into,
> and it works.. i dont seem to need ppp of any kind. On this machine however
> i must use a usb modem.. can i just load the usb driver, and assign it an
> i.p address ?
> 

Ahh. You are using ppp (at least I would assume so) it is just that the
ethernet modem negotiates the ppp for you.

What happens is that you set up a ppp connection to your isp and then make
this the default gateway for all your traffic. If you put an ethernet
card into your linux box using the frog then you will be able to set up
something that works the same way as the ethernet modem and you wil have
to give the ethernet card an ip address.

You will also need to set up masquerading/NAT and possibly port forwarding,
again your ethernet modem is doing all this as well.

You will actually end up with two IP addresses, one from the ppp connection
and one from the ethernet card.


Your ethernet modem (assuming you used it to send the email I am replying
to got the IP address 203.41.169.130 from your ISP. I would guess that
you configured an address like 10.0.0.1.



Regards,

Tim.



> Michael
> 
> ----- Original Message -
> From: "Tim Woodall" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, September 26, 2002 3:50 PM
> Subject: [speedtouch] Re: bridging mode
> 
> 
> > On Thu, 26 Sep 2002, Michael Slater wrote:
> >
> > >
> > > Hi,
> > > I have read the documentation on the Alcatel Speed Touch USB drivers,
> and
> > > the documentation all seems to support ppp on FreeBSD Can the driver
> be
> > > made to work in bridging mode where ppp is not required ?
> > >
> >
> > Probably yes, it depends what you ISP supports.
> >
> > The pppoa3 driver basically receives ATM frames, extracts the cell data
> > removing the AAL5 headers and then passes it on.
> >
> > You may need to play around with the tty options that are set up, IIRC
> > the async option sets up the tty the way you would want while the
> > sync option transmits the data the way you would need so a bit of
> > hacking would be required.
> >
> > Which ISP are you with?
> >
> > Tim.
> >
> > --
> > God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t,"
> > and there was light.
> >
> >  http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/
> >
> >
> >
> > Liste de diffusion modem ALCATEL SpeedTouch USB
> > Pour se désinscrire :
> mailto:[EMAIL PROTECTED]?subject=unsubscribe
> >
> >
> >
> >
> 
> 
> 
> 
> Liste de diffusion modem ALCATEL SpeedTouch USB
> Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe
> 
>   
> 

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/






Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: bridging mode

2002-09-26 Thread Tim Woodall

On Thu, 26 Sep 2002, Michael Slater wrote:

> 
> Hi,
> I have read the documentation on the Alcatel Speed Touch USB drivers, and
> the documentation all seems to support ppp on FreeBSD Can the driver be
> made to work in bridging mode where ppp is not required ?
> 

Probably yes, it depends what you ISP supports.

The pppoa3 driver basically receives ATM frames, extracts the cell data 
removing the AAL5 headers and then passes it on.

You may need to play around with the tty options that are set up, IIRC
the async option sets up the tty the way you would want while the
sync option transmits the data the way you would need so a bit of
hacking would be required.

Which ISP are you with?

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: AAL5 CRC calculation (untested!)

2002-09-20 Thread Tim Woodall

On Fri, 20 Sep 2002, Edouard Gomez wrote:

> 
> Tim Woodall ([EMAIL PROTECTED]) wrote:
> > header[2] =  (vci & 0x0ff0) >> 4;
> > header[3] = ((vci & 0x000f) << 4) | (pti << 1) | clp;
> > -#ifdef DEBUG
> > -   header[4] =  atm_calc_hec(header);
> > -#else
> > -   header[4] = 0xec; /* Arbitrary constant */
> > -#endif
> 
> I  don't know exactly  what you're  trying to  achieve putting  lot of
> checking, but you must know that hec is computed by the speedtouch and
> i see no reason why storing uploaded hec values.
> 
> Anyway, i'll have a look at these patches soon.
> 

I didn't know the hec was calculated by the speedtouch.

I thought the ISPs aren't checking the hec.

I wondered if the reason the OPs connection wasn't working was because
his ISP was checking the hec.

Everything looks OK, he is even getting OAM cells but nothing else.

I need to "decode" the windows traffic to see if there is something
that is kicking off his ISP that pppd isn't doing that his ISP needs.

But I don't know when I will get time :-(

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: AAL5 CRC calculation (untested!)

2002-09-20 Thread Tim Woodall

On 20 Sep 2002, Peter Riocreux wrote:

> 
> 
> 
> >>header[1] =  (vpi << 4) | (vci >> 12);
> 
> This looks suspect to me. I don't know the code, and I certainly know
> nothing in detail about ATM, but IIRC, vci is a small (<8 bits?)
> positive integer, so >>12 is going to make it 0 always.
> 
> Perhaps you meant:
>   header[1] =  (vpi << 4) | (vci << 12);
> 
No. vpi is 8 bits and vci is 16 bits. 

(But this is existing code anyway and works. It is the bits with +
at the start of the line that I have added and bits with - at the
start of the line that I have removed)

Thanks for looking though.

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] AAL5 CRC calculation (untested!)

2002-09-20 Thread Tim Woodall


Opinions?

Possibly move it into atm_calc_hec so that we can verify these crc's as well?

Add in code to check the vpi/vci?

static struct { int last_vpi, last_vci; } crc[16];
perhaps so that we remember the last crc for this vpi/vci pair with this
pti and clp?

Might want to expand the array to 256 to cover the GLP if we want to check
the CRCs as well.

Regards,

Tim.


Index: atm.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/atm.c,v
retrieving revision 1.6
diff -u -r1.6 atm.c
--- atm.c   21 Mar 2002 23:35:43 -  1.6
+++ atm.c   20 Sep 2002 12:05:54 -
@@ -49,6 +49,9 @@
 
 void atm_header_create(unsigned char *header, int vpi, int vci, int pti, int clp)
 {
+   /* We assume that vpi and vci are constant */
+
+   static int crc[16] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
 
/*
* ATM UNI cell header
@@ -77,12 +80,11 @@
header[1] =  (vpi << 4) | (vci >> 12);
header[2] =  (vci & 0x0ff0) >> 4;
header[3] = ((vci & 0x000f) << 4) | (pti << 1) | clp;
-#ifdef DEBUG
-   header[4] =  atm_calc_hec(header);
-#else
-   header[4] = 0xec; /* Arbitrary constant */
-#endif
-   
+
+   if(crc[(pti<<1)|clp] == -1)
+   crc[(pti<<1)|clp] = atm_calc_hec(header);
+
+   header[4] = crc[(pti<<1)|clp];
 }
 
 /*
Index: crc.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/crc.c,v
retrieving revision 1.3
diff -u -r1.3 crc.c
--- crc.c   4 Dec 2001 18:11:23 -   1.3
+++ crc.c   20 Sep 2002 12:05:54 -
@@ -114,7 +114,6 @@
 * Precomputed ATM CRC8 lookup table
 **/
 
-#ifdef DEBUG
 unsigned char hec_table[256]=
 {
 
@@ -152,7 +151,6 @@
0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3
 
 };
-#endif
 
 /**
 * Functions
@@ -185,7 +183,6 @@
 
 }
 
-#ifdef DEBUG
 unsigned char atm_calc_hec(unsigned char *header)
 {
 
@@ -199,6 +196,5 @@
return(hec^ATM_HEADER_COSET_LEADER);
 
 }
-#endif
 
 #endif
Index: crc.h
===
RCS file: /cvsroot/speedtouch/speedtouch/src/crc.h,v
retrieving revision 1.3
diff -u -r1.3 crc.h
--- crc.h   4 Dec 2001 18:11:23 -   1.3
+++ crc.h   20 Sep 2002 12:05:54 -
@@ -40,8 +40,6 @@
 **/
 
 extern unsigned int  aal5_calc_crc(unsigned char *mem, int len, unsigned int initial);
-#ifdef DEBUG
 extern unsigned char atm_calc_hec(unsigned char *header);
-#endif
 
 #endif

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Encapsulation problem?

2002-09-20 Thread Tim Woodall

On Fri, 20 Sep 2002, Tim Woodall wrote:

> On Fri, 20 Sep 2002, Paolo 'Garrone' Prandoni wrote:
> 
> > Hi all
> > reading the docs attached to Speedtouch sw, I read that there are 2 method 
> > to encapsulate/decapsulate PPP packets in/from AAL5. One is VCMUX and the 
> > ather is LLC.
> > 
> > My ISP (Elitel.biz) is using VCMUX. Can this be a problem? The driver 
> > supports this method?
> > 
> I don't believe so.

Sorry, I meant I don't believe this (VCMUX) is your problem.

> 
> However, I have just spotted something very odd that could be your
> problem.
> 



Folks,

There is a funny optimization of "0xec" for the atm header crc.

Given that there are (I think) only two ATM headers we ever send,

namely :VPI:VCI:PTI:0:CRC where VPI and VCI are commandline constants,
PTI=0 or 1 and CRC is a function of the rest wouldn't it be
better to precalculate the two CRC values (or even the two headers)
and do "the right thing"?

(Patch follows shortly :-)

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Encapsulation problem?

2002-09-20 Thread Tim Woodall

On Fri, 20 Sep 2002, Paolo 'Garrone' Prandoni wrote:

> Hi all
> reading the docs attached to Speedtouch sw, I read that there are 2 method 
> to encapsulate/decapsulate PPP packets in/from AAL5. One is VCMUX and the 
> ather is LLC.
> 
> My ISP (Elitel.biz) is using VCMUX. Can this be a problem? The driver 
> supports this method?
> 
I don't believe so.

However, I have just spotted something very odd that could be your
problem.


At the top of crc.h add a line

#define DEBUG

Anywhwere will do (not in the middle of a comment), 
probably after the bit marked 
/*
 * Constants
 */

Would be best.


I'm now off to see when and why this change was made :-)

It might not help but if it does then let us know because if so then
this "optimization" needs to be controlled via a commandline option.



Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Mandrake 8.2-Connection problem

2002-09-19 Thread Tim Woodall

On Wed, 18 Sep 2002, Tim Woodall wrote:

> On Tue, 17 Sep 2002, Paolo 'Garrone' Prandoni wrote:
> 
> > Answering to Alex question my ISP is called Elitel which basically uses 
> > Telecom Italia phone lines to provide ADSL connections.
> > 
> > Tim: about bugs into atm.c and pppoa3.c can you provide me source files 
> > corrected ? (I am sorry but I don't know C language!!)
> > Thanks to all
> > Paolo
> > 
> 
> Thursday Evening I can do this provided I don't end up upgrading a server
> that night. (It's going to be Thursday or Friday night)
> 
> 
OK. To the CVS authors, here is a patch:

First two hunks fix the reported coredump where the last cell in the
buffer is bad and pti then holds an invalid value.

Next hunk (length<6) is a sanity check and would also have prevented
the reported coredump.

Fourth hunk (security fix) is one that has been bugging me for a long 
time. It is unlikely to happen by accident because the CRC has to be 
correct but the length invalid. The test is the losest that is sufficient. 
It may be possible to tighten this test but I don't think it is worth
it unless someone is going to log this event.

Final hunk (pppoa3 - there may be a matching fix needed in pppoa2?)
prevents processing of the oversized cell that we have already flagged
as bad (because -1 is TRUE)!


I don't know how important the CVS history is and whether you want
to apply as several packages or just one.

... quickly runs of to check it still builds :-)


Regards,

Tim.



Index: atm.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/atm.c,v
retrieving revision 1.6
diff -u -r1.6 atm.c
--- atm.c   21 Mar 2002 23:35:43 -  1.6
+++ atm.c   19 Sep 2002 18:07:25 -
@@ -329,6 +329,7 @@
atm_header_get_pti(src));
src  += ATM_CELL_TOTAL_SIZE;
length   -= ATM_CELL_TOTAL_SIZE;
+   pti = 0;/* Reset pti because this could be the last cell 
+in the buffer */
continue;
}
 
@@ -343,6 +344,7 @@
report(0, REPORT_DEBUG|REPORT_DATE|REPORT_DUMP, "Management 
cell in stream (OAM)\n", src, ATM_CELL_TOTAL_SIZE);
src+= ATM_CELL_TOTAL_SIZE;
length -= ATM_CELL_TOTAL_SIZE;
+   pti = 0;/* Reset pti because this could be the last cell 
+in the buffer */
continue;
}
 
@@ -384,6 +386,8 @@
int real_length;
unsigned int frame_crc, computed_crc;
 
+   if(length < 6)
+   return(-1);
 
/* CRC checking */
computed_crc = ~aal5_calc_crc(frame, length - 4, ~0);
@@ -395,6 +399,10 @@
 
/* Find the real len */
real_length = (((int)frame[length - 6])<<8)|((int)frame[length - 5]);
+
+   if(real_length > length)
+   /* This is most likely a deliberate hack attempt - perhaps we ought to 
+log this??? */
+   return(-1);
 
/* Copy the data */
if(data != frame)
Index: pppoa3.c
===
RCS file: /cvsroot/speedtouch/speedtouch/src/pppoa3.c,v
retrieving revision 1.24
diff -u -r1.24 pppoa3.c
--- pppoa3.c18 May 2002 19:54:46 -  1.24
+++ pppoa3.c19 Sep 2002 18:07:27 -
@@ -867,6 +867,7 @@
/* A buffer overflow has been detected */
if(pti<0) {
report(0, REPORT_ERROR|REPORT_DATE, "Buffer overflow, too many 
cells for the same aal5 frame\n");
+   pti = 0;
}
 
/* As the last pti is 1, we have to send the aal5_frame data */

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/




Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Mandrake 8.2-Connection problem

2002-09-18 Thread Tim Woodall

On Wed, 18 Sep 2002, Paolo 'Garrone' Prandoni wrote:

> Hi all
> following on my trouble with ADSL connection I report here last progress.
> I manage to correct atm.c and pppoa3.c with Tim suggestions and the AAL5 
> problem is gone.
> But unfortunatelly the connection is still not working.
> I suspect something related to pppd. In the Speedtouch HOW-TO it is 
> mentioned to create a ppp device in the /dev dir (I did not have any ppp 
> device there!!!).
> I did it but I get the following error:
> 
> MAKEDEV: error making /dev/pppox0: Operation not permitted
> 
> Moreover reading PPP-HOW-TO it says that with new kernels (mine is 2.4.18) 
> the ppp device is created "on the fly" and you can see it when the pppd is 
> running into the /proc/net/dev file.
> Is that correct?
> Why the Speedtouch How-To ask me to create ppp into /dev?
> Is the error I get relevant?
> 
> If some has suggestions..
> thanks to all
> Paolo
> 
> 

I know it's frustrating and you want to make it work but ~1000 lines of
logs is unlikely to make you popular - post a bit and a link to a 
webpage if you think it might be useful.


Can you post your /etc/ppp/peers/adsl and /etc/ppp/options.

It appears that you are sending packets OK. You are also receiving
packets but not the ones we need so everything is _almost_ right.

Alex suggested VPI/VCI settings which seems most likely. You aren't
getting as far as chap/pap authentication so that isn't a problem (yet ;-)

Recheck what the VPI/VCI numbers are for your telco (and don't assume
that the numbers the windows driver prints out are the number it is using :-)

(In fact, knowing the way windows drivers often work it is probably
trying half a dozen numbers until it finds one that works but is only
printing out the "default" number to try first :-( )

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Mandrake 8.2-Connection problem

2002-09-18 Thread Tim Woodall

On Tue, 17 Sep 2002, Paolo 'Garrone' Prandoni wrote:

> Answering to Alex question my ISP is called Elitel which basically uses 
> Telecom Italia phone lines to provide ADSL connections.
> 
> Tim: about bugs into atm.c and pppoa3.c can you provide me source files 
> corrected ? (I am sorry but I don't know C language!!)
> Thanks to all
> Paolo
> 

Thursday Evening I can do this provided I don't end up upgrading a server
that night. (It's going to be Thursday or Friday night)


I note from your other post that you have managed to sort this but I
will do a patch ASAP anyway if noone else beats me to it (hint :-)


Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Mandrake 8.2-Connection problem

2002-09-17 Thread Tim Woodall

On Tue, 17 Sep 2002, Tim Woodall wrote:

Sorry for all these emails. I am supposed to be at work and working and I
don't think this counts :-)

> 
> Bug is in aal5_frame_from_atm_cells in atm.c
> 
> There needs to be a pti=0; before each of the continue lines.
> 
I think it is just one of the continue lines actually.

> If the _last_ cell in the packet is bad then we don't reset pti and so
> we will be passing garbage out.
> 
> Alternatively make the while(pti = 0 || length > 0)
> but that is a cludge :-) (N.B. the _single_ equals sign)
> 
Another bug here: (pppoa3.c)

if(pti<0) {
report(0, REPORT_ERROR|REPORT_DATE, "Buffer ..."
>>>>>   pti = 0; /* don't want to do the next while! */
}

/* As the last pti is 1, we have to send the aal5_frame data */
while(pti) {

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Mandrake 8.2-Connection problem

2002-09-17 Thread Tim Woodall

On Tue, 17 Sep 2002, Tim Woodall wrote:

> On Tue, 17 Sep 2002, Paolo 'Garrone' Prandoni wrote:
> 
> > Hi all,
> > following suggestion from a friend of mine more expert in Linux staff than 
> > me (unfortunatelly he hasn't a ADSL connection) I would focus your 
> > attention on the following log lines
> > 
> 
> Yup. Thanks :-)
> 

Bug is in aal5_frame_from_atm_cells in atm.c

There needs to be a pti=0; before each of the continue lines.

If the _last_ cell in the packet is bad then we don't reset pti and so
we will be passing garbage out.

Alternatively make the while(pti = 0 || length > 0)
but that is a cludge :-) (N.B. the _single_ equals sign)

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Mandrake 8.2-Connection problem

2002-09-17 Thread Tim Woodall

On Tue, 17 Sep 2002, Paolo 'Garrone' Prandoni wrote:

> Hi all,
> following suggestion from a friend of mine more expert in Linux staff than 
> me (unfortunatelly he hasn't a ADSL connection) I would focus your 
> attention on the following log lines
> 

Yup. Thanks :-)


> Sep 17 13:14:52 PC-GARRO pppoa3[3207]: ATM cell queue sent to USB
> Sep 17 13:14:53 PC-GARRO pppoa3[3208]: ATM cells read from USB (53 bytes long)
> Sep 17 13:14:53 PC-GARRO pppoa3[3208]: 00 80 02 3a d2 18 01 00 08 ea b6 ff 
> ff ff ff ff ...:
> Sep 17 13:14:53 PC-GARRO pppoa3[3208]: ff ff ff ff ff ff ff ff ff ff ff ff 
> ff ff ff ff 
> Sep 17 13:14:53 PC-GARRO pppoa3[3208]: ff ff ff 6a 6a 6a 6a 6a 6a 6a 6a 6a 
> 6a 6a 6a 6a ...j
> Sep 17 13:14:53 PC-GARRO pppoa3[3208]: 6a 6a 6a 03 
> 39  jjj.9
> Sep 17 13:14:53 PC-GARRO pppoa3[3208]: Management cell in stream (OAM)
> Sep 17 13:14:53 PC-GARRO pppoa3[3208]: 00 80 02 3a d2 18 01 00 08 ea b6 ff 
> ff ff ff ff ...:
> Sep 17 13:14:53 PC-GARRO pppoa3[3208]: ff ff ff ff ff ff ff ff ff ff ff ff 
> ff ff ff ff 
> Sep 17 13:14:53 PC-GARRO pppoa3[3208]: ff ff ff 6a 6a 6a 6a 6a 6a 6a 6a 6a 
> 6a 6a 6a 6a ...j
> Sep 17 13:14:53 PC-GARRO pppoa3[3208]: 6a 6a 6a 03 
> 39  jjj.9

This is a management cell. Everything is OK.

> Sep 17 13:14:53 PC-GARRO pppoa3[3208]: AAL5 frame joined up  (0 bytes long)

This is OK (sort of). We drop management cells.

> Sep 17 13:14:53 PC-GARRO pppd[3192]: Child process /usr/local/bin/pppoa3 -v 
> 2 -m 1 -c -vpi 8 -vci 35 (pid 3195) terminated with signal 11
> 

But now we've got a problem. Looking at the code, if all we have is a
management cell then we try to do aal5_frame_dec on a buffer that doesn't
contain anything useful. Infact we do a [length-4] which is pointing
_before_ the start of the buffer.


I'm sure someone can work out a patch and get it to you to test before
you get your connection working.


Tim.

p.s. I don't think this is your problem but it could be the cause of the
occasional semaphore left around!


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Objet : Connection loss/USB read error

2002-09-11 Thread Tim Woodall

On Tue, 10 Sep 2002, Edouard Gomez wrote:

> 
> [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote:
> > Lot of interesting stuff
> 
> Thanks !
> 
> Could people with simular problem  test this and give feedback so i'll
> put it into the FAQ ?
> 
:-(

Initially:
 MIN_GNT MAX_LAT LATENCY
00:00.0 Host Bridge00  00  20
00:04.0 VGA00  00  00
00:07.0 ISA Bridge 00  00  00
00:07.1 IDE00  00  40
00:07.2 USB00  00  30
00:0d.0 Realtek NIC40  20  d0
00:0e.0 Bridgecom NIC  ff  ff  d0

(Don't know what ff is supposed to mean)

First attempt - up USB latency timer to d0 - no difference.

Second attempt - lower NIC timers to 30 - no difference

Currently everything is at 40 (except VGA and ISA Bridge which I can't
set) but I haven't tried again with an unpatched pppoa3 - I am trying this
from work and I have to wait for the cron job to detect the failure and
restart everything and then wait for DNS to update so I can find my machine.


If anyone has any other ideas of what else I can try then let me know.

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Kernel config

2002-09-09 Thread Tim Woodall

On Mon, 9 Sep 2002, Mark Ty wrote:

> 
> > > Ultra Newbie Question, When the How-To says to:
> > >
> > > Options to allow usb support :
> > >
> > > /<*> Support for USB (CONFIG_USB)
> > > <*> Preliminary USB device filesystem (CONFIG_USB_DEVICEFS)
> > >  UHCI (Intel PIIX4, VIA, ...) support (CONFIG_USB_UHCI)
> > >  UHCI Alternate Driver (JE) support (CONFIG_USB_UHCI_ALT)
> > >  OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support
> > (CONFIG_USB_OHCI)
> > >
> > >
> > > Where is this set?
> >
> > Probably worth browsing the Kernel Building Howto, however
> > you can configure
> > you kernel before compilation by going to the root of the
> > kernel src tree and
> > typing "make menuconfig" or "make xconfig"
> 
> 
> Thanks Alex! *Whips out the "kernel building howto" ;p
> 
> BTW when i install a fresh RH7.3 using the standard "SERVER" setup, where
> should i type make menuconfig?
> 
You don't need to do this with a RH kernel to get the speedtouch stuff
working.

I would suggest that you want to try building and installing a stock
kernel that you know should work before attempting to modify anything.

(These steps are from memory and I rarely build RH kernels)

1. Install the kernel source rpm rpm -ivh kernel-source-2.4.xxx
2. cd /usr/src/linux
3. cp configs/redhat-i386 .config
4. make oldconfig
5. make dep
6. make
7. make modules

You need to then worry about installing everything. I think there is a
line in Makefile that should enable you to do a make modules-install
without risking trashing your existing modules.
(EXTRA_VERSION= or something like that)

Then install the kernel, reboot and hope :-)

I would recommend you have a boot disk to hand just in case :-)


Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Oddities with Redhat 7.3

2002-08-29 Thread Tim Woodall

On Thu, 29 Aug 2002, Lee Bohan wrote:

> 
> > Mmm, my reading of peer was the user but later on in the authup script
> > section it seems to imply the remote end. I don't have noauth in my peers
> > file and "It Works For Me Also" (TM) :-)
> >
> > > I suspect it is the missing hg* as you stated.
> >
> > Probably. Lee, did it work?
> 
> Yes, it was the hg*.
> 
> I also had to remove the default gateway it had randomly assigned to me on
> the local lan despite the fact there isn't one.
> 
> If I could work out how to get it to reassign the default gateway to the ppp
> at bt when I could connect that'd be really cool, but doing it manually
> isn't the end of the world.
> 
> Thanks to everyone.
> 
> Lee.
> 
/etc/sysconfig/network

Remove/comment the GATEWAY= line.


Alternatively put something like:

route del -net default
route add -net default gw ppp0

(Where you should ideally replace ppp0 with $1 (i think))
into /etc/ppp/ip-up.local

or do a route del -net default before doing pppd call adsl.


Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Oddities with Redhat 7.3

2002-08-29 Thread Tim Woodall

On Thu, 29 Aug 2002, Alex Bennee wrote:

> Tim Woodall said:
> > On 28 Aug 2002, alex wrote:
> >> On Wed, 2002-08-28 at 17:11, Lee Bohan wrote:
> >> > > Can you post what your ppp peer file config so we can look at it?
> >> > Here it is:
> >> > noauth
> >> Where did this come from, it turns off authentication (see pppd man
> >> page). You should get rid of this.
> >>
> > I think this is required otherwise the BT server will be expected to
> > authenticate itself (which it won't).
> >
> > I have this option in my peers/adsl anyway and "It Works For Me" (TM)
> 
> Mmm, my reading of peer was the user but later on in the authup script
> section it seems to imply the remote end. I don't have noauth in my peers
> file and "It Works For Me Also" (TM) :-)
> 

I've just RTFM and I think the following applies :

noauth - this will work. The peer (BT end) will not be required to
authenticate itself.

auth - this won't work. The peer (BT end) will have to authenticate itself.

Neither noauth nor auth. This will work provided the local end (non BT)
does not already have a default route to the peers (BT end) ip address.

So in general noauth is probably safest. At least then you will get
the message "not replacing default route" if it exists.

Regards,

Tim.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Oddities with Redhat 7.3

2002-08-29 Thread Tim Woodall

On 28 Aug 2002, alex wrote:

> 
> On Wed, 2002-08-28 at 17:11, Lee Bohan wrote:
> > 
> > > Can you post what your ppp peer file config so we can look at it?
> > 
> > Here it is:
> 
> > noauth
> 
> Where did this come from, it turns off authentication (see pppd man
> page). You should get rid of this.
> 
I think this is required otherwise the BT server will be expected to
authenticate itself (which it won't).

I have this option in my peers/adsl anyway and "It Works For Me" (TM)


I suspect it is the missing hg* as you stated.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Speedtouch USB MAC/Serial

2002-07-11 Thread Tim Woodall

On Thu, 11 Jul 2002, Hugh Hamilton wrote:

> 
> I am using a Speedtouch USB with Windows XP
> How do I query the modem to determine my MAC address/serial 
> number?
> 
> Thank you
> 
You start by scrapping XP and installing linux or *BSD.

Then call back.

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: problems with alcatel modem and suse 8

2002-07-06 Thread Tim Woodall

On Sat, 6 Jul 2002, v wrote:

> 
> My friend has got suse 8 and a speedtouch modem from alcatel,
> 
> He has installed everything and configured it, everything was working but 
> decided to reinstall after reinstall,
> 
> the following happens: 
> 
> >after i've added the next lines to the /etc/modules.conf
> >
> >alias char-major-108 ppp_generic
> >alias tty-ldisk-14 ppp_synctty
> >alias tty-ldisk-13 n_hdlc
> >
> >the adsl0 is added to eth0 and lo during rebooting process, but i stil have
> >the same message
> >
> >modprobe: cannot locate module tty-ldisk-13
> >
> >and don't have access to the Net...
> >
> >thanks,
> 
> 
> does any one here have the answer because i cant figure it out, 
> 
I don't know what is wrong - maybe n_hdlc isn't found. Have you tried 
depmod -a?

However, if you add -a to the pppoa3 commandline then you don't need
the n_hdlc module so if the module had got corrupted or won't load
you can at least get onto the net.

(I get a more reliable connection with the -a option and it doesn't
seem to up the load on the box measurably but I also have a buggy
usb chipset and a patched(hacked) pppoa3 so my results should be
taken with a pinch of salt :-)

Regards,

Tim.

Just spotted the problem - ldisc - not ldisk!


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: FreeBSD problems + some fixes.

2002-07-06 Thread Tim Woodall

On Wed, 3 Jul 2002, David Hedley wrote:

I have tested the watchdog patch and the one from Duncan Sands.

Neither make any difference to my connection problems - neither better 
nor worse.

Interestingly however, on my system the watchdog timer never seems to
be tripped so I need to look more into that but I haven't had time.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: bootable cd dsl distro

2002-07-04 Thread Tim Woodall

On 4 Jul 2002, Tom Stockton wrote:

> 
> For those that are interested a colleague of mine has developed a
> bootable cd distribution with all the speedtouch usb stuff built in. 
> Just insert cd boot comp, load modules / microcode , call pppd and
> bosh!  You've got a working router.  Its currently under beta testing,
> but I've tried it and it works a treat.  If enough ppl are interested
> then he may let you trial the beta.  Currently only works with pppoa2 as
> pppoa3 gives 
> 
Do you have to download the microcode from the Alcatel site or does
he include it? If he includes it has he got permission from Alcatel?
If he has got permission then I think there are some people on this
list who are also trying to get permission to include the microcode in
the RPM and would like some pointers/help.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: Problems with speedtouch and redhat

2002-07-04 Thread Tim Woodall

On Wed, 3 Jul 2002, Matthew Pocock wrote:

> Hi.
> 
> I use a speedtouch adsl modem, BT broadband and redhat 7.3, and have 
> been trying your drivers. I have read the howto and been on a couple of 
> chat rooms trying to get things going. However, I'm still having problems.
> 

> On the occasions that this stage works, I see log messages about 
> timeouts, then modem_run says that the ADSL has synchronized and gives a 
> download and upload speed. When running pppd (by the way, my ppp 
> binaries got put in /usr/sbin, not /usr/local/sbin), things go through, 
> IPs for DNS and local/remote are obtained. However, it says "not 
> replaced existing default route to eth0 [192.168.0.1]" and this has 
> caused me all sorts of problems. When I tracked this down (with help 
> from the #linuxhelp chat), I was able to work around this by using route 
> to change the default gateway to the remote IP. I then modify the 
> /etc/resolv.conf file to include the new DNS entries, either by hand or 
> using neat. At this point, I can ping things by IP, but can't resolve 
> names.
> 
You (probably) shouldn't have a default route on the box that connects
to the internet. Remove/comment the "GATEWAY=192.168.0.1" line from
 /etc/sysconfig/network.

DNS check /etc/resolv.conf. I don't think that pppd replaces it, it
creates its own copy. You have several solutions possible. 1. symlink
/etc/resolv.conf to /etc/ppp/resolv.conf (I think). 2. Hard code the
dns servers into /etc/resolv.conf (I use 194.73.73.94 and 194.73.73.95
or 3. Set up a DNS server locally. (I do this and use the BT servers
as forwarders to reduce the load on the root servers but means that I
don't suffer from their unreliability)

Also check if you installed a firewall. Maybe DNS traffic is firewalled.
Does RH7.3 install iptables or ipchains. If ipchains then DNS is probably
firewalled as UDP is hard/impossible to filter properly using a packet
filter.


> I'm running kernel 2.4.18-5smp, and the latest drivers downloaded from 
> your sourceforge site. I got the latest mgmt.o file from alcatel. I 
> accepted the default secure firewall options from the redhat install.
> 

I should read before I write :-) Probably a firewall problem.

Try /etc/init.d/ipchains stop

or

/etc/init.d/iptables stop and see if that fixes things.

(If it does then you need to sort out the firewall as the above disable
it completely which you really don't want on adsl.)

Finally, are you running apache or openssh. If so please upgrade them
before you get hacked. AFAICT apache on linux and openssh on RH (default 
install) have, as yet no known way to exploit them but apache on *bsd was
believed safe as well until a (brilliant but annoying) piece of work
by gobbles.

upgrades can be got from ftp://updates.redhat.com - or
ftp:://ftp.mirror.ac.uk/sites/ftp.mirror.ac.uk which tends to be faster
but 1/2 to 1 day behind updates.redhat.com.

I think RH now has an automatic upgrader as well but I like to do these
things manually so that I know what has changed.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: FreeBSD problems + some fixes.

2002-07-03 Thread Tim Woodall

On Wed, 3 Jul 2002, David Hedley wrote:

> 
> 
> I have been extensively testing the Speedtouch USB modem under
> FreeBSD (currently 4.4, will be testing 4.6 soon) with the latest
> (161.5R) alcaudsl.sys from Alcatel and the 1.1 drivers from this
> site.
> 
> I have noticed the following problems:
> 

> 
> 2) pppoa2 freezes under heavy load.
> 
> I use the excellent userland ppp which uses pppoa2. Under heavy load,
> the pppoa2 process which reads from the USB hangs in
> pusb_endpoint_read in pusb-bsd.c. This will normally be observed as
> an LQR timeout in the upper PPP layer (assuming you enable LQR). I'm
> not sure why this is happening. The only way I've found to unwedge it
> is to send the pppoa2 process a signal. To this end, the following
> patch uses a watchdog timer to ensure the process doesn't get wedged:
> 

I get this with pppoa3 on linux.

Same place in the code. I will try your fix.

(The thing that trips it reliably for me is downloading a 64K or so file 
consisting entirely of 0xFF via FTP.)


> (You can ignore the first part to this patch - I just don't like rude
> words being written to the logs!)
> 
> 3) Heavy usages causes large amounts of bad data to be read from the
> USB. In the logs this looks like:
> 
> Jul  3 13:58:35 exoserver pppoa2[6631]: Cell had wrong VPI(4068)/VCI(31234) (OAM?) 
>PTI=0x06 
> Jul  3 13:58:41 exoserver pppoa2[6631]: Cell had wrong VPI(3240)/VCI(48850) (OAM?) 
>PTI=0x04 
> Jul  3 13:58:48 exoserver pppoa2[6631]: Cell had wrong VPI(981)/VCI(44053) (OAM?) 
>PTI=0x05 
> Jul  3 13:58:49 exoserver pppoa2[6631]: Cell had wrong VPI(1447)/VCI(31788) (OAM?) 
>PTI=0x00 
> Jul  3 13:59:05 exoserver pppoa2[6631]: Cell had wrong VPI(2948)/VCI(3831) (OAM?) 
>PTI=0x03 
> Jul  3 13:59:05 exoserver pppoa2[6631]: CRC error in an AAL5 frame 
> Jul  3 13:59:26 exoserver pppoa2[6631]: Cell had wrong VPI(1251)/VCI(55468) (OAM?) 
>PTI=0x06 
> Jul  3 13:59:31 exoserver pppoa2[6631]: Cell had wrong VPI(671)/VCI(4876) (OAM?) 
>PTI=0x07 
> 
> Not sure why this is happening - it doesn't seem to affect throughput that much but 
>is quite noisy. It seems to result from a read from pusb_endpoint_read which returns 
>a non-integer number of ATM cells. This looks to me like a synchronisation/locking 
>issue between the read syscall in pppoa2 and the USB subsystem.
> 

There is definitely a bug in the bit of code that rebuilds the ppp
packet from the atm frame where it calculates the length.

in aal5_frame_dec if the CRC check passes we rely on the length being
correct in the packet. This _might_ be exploitable but won't be a
standard "stack smashing" attack if so. However, AFAICT, only someone
with the ability to craft corrupt ATM frames and get them delivered to
pppoa[23] could exploit it which I think limits it to people with
access to the ATM equipment at the exchange.

(I don't think it can be exploited to give remote access/run remote
commands but it could possibly be used to sniff network traffic
remotely by sending a corrupted echo_request packet which would then
reply with the data that was previously read from the frog.  Of course,
if someone has access to the equipment at the exchange then this seems
like a somewhat tortuous route to sniff the traffic :-)

Regards,

Tim.

p.s. any chance you can configure your mail client to limit its lines
to circa 72 characters please.


-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: [INFO] Possible cause of ppp hangup

2002-07-01 Thread Tim Woodall

On Mon, 1 Jul 2002, Tim Woodall wrote:

> On Mon, 1 Jul 2002, Edouard Gomez wrote:
> 
> > 
> > Hello,
> > 
> > This  lkml post  talks  about a  bug  which makes  a  ppp queue  waits
> > forever,  this looks  like our  "ppp is  alive but  i get  no traffic"
> > bug.  So i  would  like  somebody investigate  this  because i  cannot
> > reproduce the bug myself.
> > 
> > The  better would be  to contact  the author  of the  post to  get his
> > patch. 
> > 
> > The post archive :
> > http://www.uwsg.indiana.edu/hypermail/linux/kernel/0206.3/0433.html
> > 
> > There was no answer to his post. 
> > 
> > Thanks. 
> > 
> I have tried this, (guessed what the change was from the description)
> and it has made absolutely no difference. I have emailed the author
> to ask for a patch but he hasn't replied (yet)
> 
> I didn't expect it to make a difference as I'm pretty sure it is in the 
> usb read where the hang is occuring.
> 
I have now received a description of the change which is slightly different
to the one I tried:

=== Quote =
I won't give you the .patch or .diff file as i don't have the original code
handy. however, it's quite easy to patch manually.
just find ppp_xmit_process() in src/linux/drivers/net/ppp_generic.c and
replace

---
if (ppp->xmit_pending == 0 && skb_peek(&ppp->file.xq) == 0
&& ppp->dev != 0)
netif_wake_queue(ppp->dev);

---
with

---
if (ppp->dev != 0)
netif_wake_queue(ppp->dev);

---
WBR,
Denis Yarkovoy
=== End Quote ===


I don't think this will make any difference either but I will give it a try.
(It won't be until near the end of this week though if someone else wants
to try first) (I had commented out the whole of the if statement in my test)

Regards,

Tim.
-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: [INFO] Possible cause of ppp hangup

2002-07-01 Thread Tim Woodall

On Mon, 1 Jul 2002, Edouard Gomez wrote:

> 
> Hello,
> 
> This  lkml post  talks  about a  bug  which makes  a  ppp queue  waits
> forever,  this looks  like our  "ppp is  alive but  i get  no traffic"
> bug.  So i  would  like  somebody investigate  this  because i  cannot
> reproduce the bug myself.
> 
> The  better would be  to contact  the author  of the  post to  get his
> patch. 
> 
> The post archive :
> http://www.uwsg.indiana.edu/hypermail/linux/kernel/0206.3/0433.html
> 
> There was no answer to his post. 
> 
> Thanks. 
> 
I have tried this, (guessed what the change was from the description)
and it has made absolutely no difference. I have emailed the author
to ask for a patch but he hasn't replied (yet)

I didn't expect it to make a difference as I'm pretty sure it is in the 
usb read where the hang is occuring.

Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: [INFO] Possible cause of ppp hangup

2002-07-01 Thread Tim Woodall

On Mon, 1 Jul 2002, Edouard Gomez wrote:

> 
> Hello,
> 
>Date: Mon, 1 Jul 2002 02:28:50 +0200

Oh for the student life ;-)
(Had you just got up or not gone to bed yet?)

> This  lkml post  talks  about a  bug  which makes  a  ppp queue  waits
> forever,  this looks  like our  "ppp is  alive but  i get  no traffic"
> bug.  So i  would  like  somebody investigate  this  because i  cannot
> reproduce the bug myself.
> 
> The  better would be  to contact  the author  of the  post to  get his
> patch. 
> 
> The post archive :
> http://www.uwsg.indiana.edu/hypermail/linux/kernel/0206.3/0433.html
> 
I'll have a look tonight and see. I'll email him now to get his patch
although I think I can guess it from the description although I haven't
actually looked at the code.


Regards,

Tim.

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





[speedtouch] Re: FAQ updated

2002-05-30 Thread Tim Woodall

On 29 May 2002, alex wrote:

> 
> I've added a few more FAQ entries and tidied up a few other bits. I'm
> attaching it here so:
> 
> a) people can let me know if anything is out of date/unclear
> b) it might show up in a few search engines by being archived in the
> mailing list
> 
> Cheers,
> 
> 
4.9 My microcode upload has failed!

We here this from time to time and are not sure what causes this (except
   
   hear

Not very important :-)

Tim

-- 
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t," 
and there was light.

 http://tjw.hn.org/  http://www.locofungus.btinternet.co.uk/



Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se désinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe





  1   2   >