I've had another look at the problem, and at last can report
a bit of success - at least I think I have bracketed the problem...

I started by enabling the USB debug messages in the kernel 
(CONFIG_USB_DEBUG) to see if that shed any light on what was
happening, but it just produced a lot of stuff like:
  usb 1-1: new full speed USB device using uhci_hcd and address 2
  uhci_hcd 0000:00:07.2: uhci_result_control: failed with status 440000
  [cb907240] link (0b9071b2) element (0b03e040)
    0: [cb03e040] link (0b03e080) e0 Stalled CRC/Timeo Length=7 MaxLen=7 DT0 
EndPt
  =0 Dev=0, PID=2d(SETUP) (buf=0c3d0860)
    1: [cb03e080] link (0b03e0c0) e3 SPD Active Length=0 MaxLen=3f DT1 EndPt=0 
Dev
  =0, PID=69(IN) (buf=0b31c9a0)
    2: [cb03e0c0] link (00000001) e3 IOC Active Length=0 MaxLen=7ff DT1 EndPt=0 
De
  v=0, PID=e1(OUT) (buf=00000000)

which didn't enlighten me very much.

So I then decided to try something fairly radical and booted a ubuntu live
CD which I picked up at a recent show in a different PC, and used
'apt-get install' to add all the pre-requisite packages and cvs to
download the latest version of moto4lin. 

The first interesting thing that I learned was that the error messages I was
getting on connection of the phone are not specific to gentoo - I get exactly
the same messages from ubuntu:
 usb 1-2: new full speed USB device using uhci_hcd and address 2
 usb 1-2: device descriptor read/64, error -71
 usb 1-2: device descriptor read/64, error -71
 usb 1-2: new full speed USB device using uhci_hcd and address 3
 usb 1-2: device descriptor read/64, error -71
 cdc_acm 1-2:1.0: ttyACM0: USB ACM device
 usbcore: registered new driver cdc_acm
 drivers/usb/class/cdc-acm.c: v0.23:USB Abstract Control Model driver for USB 
modems and ISDN adapters

This did produce the '/dev/ttyACM0' device file which you are seeing (rather
than the /dev/usb/acm/0 I am seeing on gentoo). It took me several attempts
before I found a configuration and sequence that worked, but eventually managed
to get the phone recognised in P2K mode and I successfully transfered all
accessible files from the phone onto my disk.

So now I know that my phone and cable are good, and just need track down
which difference between these systems is causing my problem with gentoo.

Havn't worked out yet where the phonebook or SMS inbox/outbox (two items
I really wanted to be able to archive from the phone) are stored.
Let me know if you have any suggestions.

Regards,
DigbyT

On Wed, Nov 02, 2005 at 06:46:48PM -0500, James Hiscock wrote:
> > Thanks for going to all the trouble of testing out the phone
> > operation on your SuSE machine. I havn't had any breakthrough
> > yet, but your help has given me the confidence to persevere..
> 
> No problem -- I'm a software tester in Real Life (tm), so stuff like
> this bugs the crap out of me. I have a tendency to get a hold of a
> problem, and beat it into the ground sometimes, and this is one of
> those things that drives me absolutely crazy: inconsistent behaviour
> of software is _extremely_ annoying and frustrating - especially when
> _I'm_ the one with the "works for me" response, but I can't figure out
> what I did (if anything) to solve the problem. <sigh>
> 
> Anyway... I'm not convinced that the problem's in the kernel. If it
> was, then anybody with the same kernel would run into the same
> problem(s)...
> 
> ...and, following that logic, I started digging through the code for
> moto4lin, trying to see if there was anything spectacularly obvious
> that _might_ be causing the behaviour we're seeing. In so doing, I
> _think_ I _might_ have found a typo in moto_ui/p2kproc.cpp, on line
> 729... here's the function where that line appears:
> 
> <snip>
> 
> // Connect to phone.
> int P2kProc::drv_connect()
> {
>         FUNC("drv_connect");
>         int ph=drv_findPhone();
>         if (ph==PHONE_NONE) RAISE("no phone")
>                 if (ph==PHONE_AT) drv_switchP2K();
> 
>         int t;
>         t=time(NULL);
> 
>         while ((time(NULL)-t<5) && (ph!=PHONE_P2K))
>         {
>                 usb_find_devices();
>                 ph=drv_findPhone();
>                 usleep(10000);
>         }
>         if (ph!=PHONE_P2K) return(-1);
>         return(drv_openPhone());
> }
> </snip>
> 
> What's got me thinking there's a typo are the following two lines:
> 
>         if (ph==PHONE_NONE) RAISE("no phone")
>                 if (ph==PHONE_AT) drv_switchP2K();
> 
> This looks to me like if there's no phone, an error is spit out (to
> the terminal, if you started moto4lin from there), then it checks to
> see if the phone's in AT mode, and then it tries to switch it to P2K
> mode. The problem here is that the switch to P2K will never be
> reached, because there's a missing semi-colon at the end of the first
> line, which means that if there's no phone _and_ it's in AT mode, then
> it'll do the switch... which makes little to no sense to me, if I'm
> reading this correctly...
> 
> ...it might be worth trying out, though, to see if adding a semi-colon
> here would help, so that it looks like this instead:
> 
>         if (ph==PHONE_NONE) RAISE("no phone");
>         if (ph==PHONE_AT) drv_switchP2K();
> 
> I checked out the current CVS version, using the instructions on the
> moto4lin website, and it looks as though this entire function's been
> rewritten (and moved to line 857-ish), and would work the way I'm
> thinking it should: if it doesn't find a phone, it prints an error;
> then it checks to see if it's an AT phone, and switches to P2K mode if
> it is...
> 
> ...but - as I said before - I'm a software tester, not a developer...
> so it's entirely possible that I'm just jumping at shadows... <shrug>
-- 
Digby R. S. Tarvin                                             [EMAIL PROTECTED]
http://www.digbyt.com
-- 
gentoo-user@gentoo.org mailing list

Reply via email to