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 <endpoint alternate interface> 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 -0000       1.22
+++ modem_run.c 24 Oct 2002 17:24:31 -0000
@@ -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.c    20 Oct 2002 22:32:54 -0000      1.28
+++ pppoa3.c    24 Oct 2002 17:24:33 -0000
@@ -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.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

        

Reply via email to