* [gentoo-user] USB mobile phone connection.. @ 2005-10-23 13:00 Digby Tarvin 2005-10-25 23:58 ` James Hiscock 0 siblings, 1 reply; 18+ messages in thread From: Digby Tarvin @ 2005-10-23 13:00 UTC (permalink / raw To: gentoo-user Looking for anyone that can offer advice on connecting a Motorola C380 mobile phone to my gentoo Linux system via the USB interface. When I connect the phone, I see the following in /var/log/messages: 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 A disconnect and reconnect produces: usb 1-2: USB disconnect, address 3 usb 1-2: new full speed USB device using uhci_hcd and address 4 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 5 usb 1-2: device descriptor read/64, error -71 Any idea what the error messages indicate, and should I be worried about them? Is it normal that the addresses appear to be monotonically increasing with each successive connect? While connected, /proc/bus/usb/devices contains: T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 7 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=22b8 ProdID=4902 Rev= 0.01 S: Manufacturer=Motorola Inc. S: Product=Motorola Phone (C380) C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr= 20mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=(none) E: Ad=89(I) Atr=03(Int.) MxPS= 16 Ivl=10ms I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none) E: Ad=01(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms I have tried emerge'ing gnoki, but it doesn't seem to succeed in connecting, but perhaps there is some configuration that I havn't stumbled across yet. anyone have any experience or suggestions on what to try with this? Thanks, DigbyT -- Digby R. S. Tarvin digbyt@digbyt.com http://www.digbyt.com -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-10-23 13:00 [gentoo-user] USB mobile phone connection Digby Tarvin @ 2005-10-25 23:58 ` James Hiscock 2005-10-26 11:26 ` Digby Tarvin 0 siblings, 1 reply; 18+ messages in thread From: James Hiscock @ 2005-10-25 23:58 UTC (permalink / raw To: gentoo-user On 10/23/05, Digby Tarvin <digbyt@acm.org> wrote: > Looking for anyone that can offer advice on connecting a Motorola C380 > mobile phone to my gentoo Linux system via the USB interface. I'd suggest trying moto4lin -- it's pretty slick. Not too sure about the error messages you're getting, though, so I'm not sure how much help moto4lin'll actually be... <shrug> -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-10-25 23:58 ` James Hiscock @ 2005-10-26 11:26 ` Digby Tarvin 2005-10-26 20:43 ` James Hiscock 0 siblings, 1 reply; 18+ messages in thread From: Digby Tarvin @ 2005-10-26 11:26 UTC (permalink / raw To: gentoo-user Hi, Thanks - I did home in on that one as it seems to be the only one that explicitly claims to support my model phone. I tried the other options first as moto4lin was masked. As per my recent post, the problem I am having seems to be a mismatch in the USB system on my gentoo and what moto4lin expects. Do you have it working? And if so, which kernel are you using? Is your /dev/usb (which moto4lin seems to use) more populated than mine: /home2/digbyt> ls -lR /dev/usb /dev/usb: total 0 drwxr-xr-x 1 root root 0 Jan 1 1970 hid /dev/usb/hid: total 0 Is it a Kernel V2.6 thing, or is there some configuration that I need to do? Regards, DigbyT On Tue, Oct 25, 2005 at 07:58:34PM -0400, James Hiscock wrote: > On 10/23/05, Digby Tarvin <digbyt@acm.org> wrote: > > Looking for anyone that can offer advice on connecting a Motorola C380 > > mobile phone to my gentoo Linux system via the USB interface. > > I'd suggest trying moto4lin -- it's pretty slick. Not too sure about > the error messages you're getting, though, so I'm not sure how much > help moto4lin'll actually be... <shrug> > > -- > gentoo-user@gentoo.org mailing list -- Digby R. S. Tarvin digbyt@digbyt.com http://www.digbyt.com -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-10-26 11:26 ` Digby Tarvin @ 2005-10-26 20:43 ` James Hiscock 2005-10-26 23:09 ` Digby Tarvin 0 siblings, 1 reply; 18+ messages in thread From: James Hiscock @ 2005-10-26 20:43 UTC (permalink / raw To: gentoo-user > Do you have it working? Yes. > And if so, which kernel are you using? gentoo-sources-2.6.13-r3 (or some other -r? value - can't recall offhand) > Is it a Kernel V2.6 thing, or is there some configuration that I need > to do? As I said in my reply to your other post, make sure you have USB Modem support in the kernel compiled as a module, and pay attention to dmesg when you plug your phone in -- it'll give you the right device path... just slap that into the configuration for moto4lin, and it should work... (I suspect I also had to change the permissions/ownership of the /dev entry for the USB Modem driver, but that was pretty straight-forward: since I'm working on a single-user system, I did the horribly insecure thing and just chmod 777'd the dev entry... ;) -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-10-26 20:43 ` James Hiscock @ 2005-10-26 23:09 ` Digby Tarvin 2005-10-27 4:31 ` James Hiscock 0 siblings, 1 reply; 18+ messages in thread From: Digby Tarvin @ 2005-10-26 23:09 UTC (permalink / raw To: gentoo-user On Wed, Oct 26, 2005 at 04:43:23PM -0400, James Hiscock wrote: > > Do you have it working? > > Yes. That is encouraging. Which model phone to you have it working with? > > And if so, which kernel are you using? > > gentoo-sources-2.6.13-r3 (or some other -r? value - can't recall offhand) Ok, hopefully my 2.6.10-gentoo-r6 is close enough to not make any difference. > > Is it a Kernel V2.6 thing, or is there some configuration that I need > > to do? > > As I said in my reply to your other post, make sure you have USB Modem > support in the kernel compiled as a module, and pay attention to dmesg > when you plug your phone in -- it'll give you the right device path... > just slap that into the configuration for moto4lin, and it should > work... > > (I suspect I also had to change the permissions/ownership of the /dev > entry for the USB Modem driver, but that was pretty straight-forward: > since I'm working on a single-user system, I did the horribly insecure > thing and just chmod 777'd the dev entry... ;) You were right - my initail problem was having omitted the cdc_acm driver from my kernel config. Now that I have rectified that oversight I seem to get a little closer, but something is still going wrong. Plugging in the phone now results in the following messages: usb 1-1: new full speed USB device using uhci_hcd and address 2 usb 1-1: device descriptor read/64, error -71 usb 1-1: device descriptor read/64, error -71 usb 1-1: new full speed USB device using uhci_hcd and address 3 usb 1-1: device descriptor read/64, error -71 cdc_acm 1-1:1.0: ttyACM0: USB ACM device The last message is encouraging, but the preceding error '-71's are worrying. The /proc/bus/usb/devices entry for the phone has the correct driver indicated: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=22b8 ProdID=4902 Rev= 0.01 S: Manufacturer=Motorola Inc. S: Product=Motorola Phone (C380) C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr= 20mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm E: Ad=89(I) Atr=03(Int.) MxPS= 16 Ivl=10ms I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm E: Ad=01(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms And /proc/usb now contains 1.penemunde:/proc/bus/usb> ls -l /dev/usb total 0 drwxr-xr-x 1 root root 0 Jan 1 1970 acm drwxr-xr-x 1 root root 0 Jan 1 1970 hid 1.penemunde:/proc/bus/usb> ls -lR /dev/usb /dev/usb: total 0 drwxr-xr-x 1 root root 0 Jan 1 1970 acm drwxr-xr-x 1 root root 0 Jan 1 1970 hid /dev/usb/acm: total 0 crw------- 1 root root 166, 0 Jan 1 1970 0 /dev/usb/hid: total 0 But when I try moto4lin I get [info] Phone pluged as AT Try to connect [error] Unable to connect [info] Phone is unpluged and the following system messages are generated usb 1-1: USB disconnect, address 3 usb 1-1: new full speed USB device using uhci_hcd and address 4 usb 1-1: config 1 has an invalid interface number: 5 but max is 2 usb 1-1: config 1 has an invalid interface number: 6 but max is 2 usb 1-1: config 1 has an invalid interface number: 8 but max is 2 usb 1-1: config 1 has no interface number 0 usb 1-1: config 1 has no interface number 1 usb 1-1: config 1 has no interface number 2 Any ideas what you are doing differently? What do your system messages look like? Regards, DigbyT -- Digby R. S. Tarvin digbyt@digbyt.com http://www.digbyt.com -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-10-26 23:09 ` Digby Tarvin @ 2005-10-27 4:31 ` James Hiscock 2005-10-27 13:26 ` Digby Tarvin 0 siblings, 1 reply; 18+ messages in thread From: James Hiscock @ 2005-10-27 4:31 UTC (permalink / raw To: gentoo-user > That is encouraging. Which model phone to you have it working > with? Razr V3 - it's a pretty sweet phone. ;) > You were right - my initail problem was having omitted the cdc_acm > driver from my kernel config. Excellent. I like it when I'm right - it happens so infrequently... :) > cdc_acm 1-1:1.0: ttyACM0: USB ACM device Now _that's_ what I was expecting you to get -- the rest of the messages are gibberish to me, though... :( > But when I try moto4lin I get > [info] Phone pluged as AT > Try to connect > [error] Unable to connect > [info] Phone is unpluged Did you specify the correct device for moto4lin? Should be /dev/ttyACM0. Also, check the permissions on /dev/ttyACM0 -- by default, they're too restrictive. If you run moto4lin from a terminal, it spits out a bit of debugging info that might help too, that looks like this: <snip> sanity@greed ~ $ moto4lin Form1 PhoneMan New mode: 1 doActConnect doActConnect P2kProc::doConnect() sh: /dev/ttyACM0: Permission denied </snip> ...so I changed the permissions, and tried clicking the Connect/Disconnect button again, and go this: <snip> doActConnect doActConnect P2kProc::doConnect() New mode: 2 doActConnect Filelist received: 527 </snip> > What do your system messages look like? When I first plugged in the phone, I got this: <snip> usb 4-2: new full speed USB device using uhci_hcd and address 2 usb 4-2: configuration #1 chosen from 2 choices usb.agent[24980]: Keeping default configuration with /sys//devices/pci0000:00/0000:00:1d.3/usb4/4-2 cdc_acm 4-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 </snip> After fixing the permissions on /dev/ttyACM0 and clicking the Connect/Disconnect button in moto4lin, I got this: <snip> usb 4-2: USB disconnect, address 2 usb 4-2: new full speed USB device using uhci_hcd and address 3 usb 4-2: config 1 has an invalid interface number: 5 but max is 2 usb 4-2: config 1 has an invalid interface number: 6 but max is 2 usb 4-2: config 1 has an invalid interface number: 8 but max is 2 usb 4-2: config 1 has no interface number 0 usb 4-2: config 1 has no interface number 1 usb 4-2: config 1 has no interface number 2 </snip> ...which looks pretty much the same as yours, but everything works the way it should after that, so the only thing I can think of is the permissions thing. <shrug> > Any ideas what you are doing differently? Well, it's a slightly different configuration from the default: I've got the Settings -> Preferences -> File Manager -> "Load File list on connect" option selected, the "ACM Device" pointed at /dev/ttyACM0, and read-write permissions for everybody on /dev/ttyACM0... I suspect I may have also gone into the Preferences -> Connection section, and clicked the "Update List" button, selected my phone from the list of devices, and clicked both the "Set As AT Device" and "Set As P2k Device" as well, since I've got the right Vendor/Product IDs set, as well... Anyway... hope _something_ in there helps... -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-10-27 4:31 ` James Hiscock @ 2005-10-27 13:26 ` Digby Tarvin 2005-10-27 21:25 ` James Hiscock 0 siblings, 1 reply; 18+ messages in thread From: Digby Tarvin @ 2005-10-27 13:26 UTC (permalink / raw To: gentoo-user On Thu, Oct 27, 2005 at 12:31:37AM -0400, James Hiscock wrote: > > Did you specify the correct device for moto4lin? Should be > /dev/ttyACM0. Also, check the permissions on /dev/ttyACM0 -- by > default, they're too restrictive. It defaults to /dev/usb/acm/0 which seems to be correct for me. At least this file exists, whereas /dev/ttyACM0 does not. I tried it as root to make sure there were no permissions problems - it had no effect. > If you run moto4lin from a terminal, it spits out a bit of debugging > info that might help too, that looks like this: . . > <snip> > doActConnect > doActConnect > P2kProc::doConnect() > New mode: 2 > doActConnect > Filelist received: 527 > </snip> > For me it produces: Form1 PhoneMan New mode: 1 doActConnect doActConnect P2kProc::doConnect() New mode: 0 > > What do your system messages look like? > > When I first plugged in the phone, I got this: > <snip> > usb 4-2: new full speed USB device using uhci_hcd and address 2 > usb 4-2: configuration #1 chosen from 2 choices > usb.agent[24980]: Keeping default configuration with > /sys//devices/pci0000:00/0000:00:1d.3/usb4/4-2 > cdc_acm 4-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 > </snip> Looks like the main clues are the error messages produced when I plug in: usb 1-1: new full speed USB device using uhci_hcd and address 8 usb 1-1: device descriptor read/64, error -71 usb 1-1: device descriptor read/64, error -71 usb 1-1: new full speed USB device using uhci_hcd and address 9 usb 1-1: device descriptor read/64, error -71 cdc_acm 1-1:1.0: ttyACM0: USB ACM device vs your usb 4-2: new full speed USB device using uhci_hcd and address 2 usb 4-2: configuration #1 chosen from 2 choices usb.agent[24980]: Keeping default configuration with /sys//devices/pci0000:00/0000:00:1d.3/usb4/4-2 cdc_acm 4-2:1.0: ttyACM0: USB ACM device and the fact that you get a /dev/ttyACM0 and I get a /dev/usb/acm/0. I wonder if that indicates a slight USB driver change between our two kernels? I assume the two addresses I get on connect reflect the fact that my phone has two interfaces defined - one comm. with a single endpoint, and one data with 2 endpoints. Yours seems to have two configurations whereas mine has Cfg#=1 Errno 71 corresponds to "protocol error" which doesn't sound good. What does your /proc/bus/usb/devices entry show for the phone? Regards, DigbyT -- Digby R. S. Tarvin digbyt@digbyt.com http://www.digbyt.com -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-10-27 13:26 ` Digby Tarvin @ 2005-10-27 21:25 ` James Hiscock 2005-11-01 12:54 ` Digby Tarvin 0 siblings, 1 reply; 18+ messages in thread From: James Hiscock @ 2005-10-27 21:25 UTC (permalink / raw To: gentoo-user > Looks like the main clues are the error messages produced when I plug in: > usb 1-1: new full speed USB device using uhci_hcd and address 8 > usb 1-1: device descriptor read/64, error -71 > usb 1-1: device descriptor read/64, error -71 > usb 1-1: new full speed USB device using uhci_hcd and address 9 > usb 1-1: device descriptor read/64, error -71 > cdc_acm 1-1:1.0: ttyACM0: USB ACM device Yup - I'd buy that assessment. > and the fact that you get a /dev/ttyACM0 and I get a /dev/usb/acm/0. > I wonder if that indicates a slight USB driver change between our > two kernels? The device file difference might just be from me running sys-fs/udev-070-r1... not sure, though. > I assume the two addresses I get on connect reflect the fact that my > phone has two interfaces defined - one comm. with a single endpoint, and > one data with 2 endpoints. Yours seems to have two configurations > whereas mine has Cfg#=1 You lost me there, but that's ok -- I think I know what you're talking about.... > Errno 71 corresponds to "protocol error" which doesn't sound good. No, that it doesn't. > What does your /proc/bus/usb/devices entry show for the phone? Here you go -- hope it makes more sense to you, than it does to me. ;) T: Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 4 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 2 P: Vendor=22b8 ProdID=4902 Rev= 0.01 S: Manufacturer=Motorola Inc. S: Product=Motorola Phone (V3) C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm E: Ad=89(I) Atr=03(Int.) MxPS= 16 Ivl=10ms I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm E: Ad=01(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms C: #Ifs= 2 Cfg#= 2 Atr=c0 MxPwr=100mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver= E: Ad=89(I) Atr=03(Int.) MxPS= 16 Ivl=10ms I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver= E: Ad=01(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-10-27 21:25 ` James Hiscock @ 2005-11-01 12:54 ` Digby Tarvin 2005-11-01 13:26 ` Qian Qiao 2005-11-01 18:10 ` James Hiscock 0 siblings, 2 replies; 18+ messages in thread From: Digby Tarvin @ 2005-11-01 12:54 UTC (permalink / raw To: gentoo-user Sorry about the delayed reply - I have been away for a couple of days. On Thu, Oct 27, 2005 at 05:25:12PM -0400, James Hiscock wrote: > > and the fact that you get a /dev/ttyACM0 and I get a /dev/usb/acm/0. > > I wonder if that indicates a slight USB driver change between our > > two kernels? > > The device file difference might just be from me running > sys-fs/udev-070-r1... not sure, though. Is that non-standard? I only see * sys-fs/udev Latest version available: 068 Latest version installed: [ Not Installed ] Size of downloaded files: 436 kB Homepage: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html Description: Linux dynamic and persistent device naming support (aka userspace devfs) License: GPL-2 in portage, and as you can see I don't have it installed. > > I assume the two addresses I get on connect reflect the fact that my > > phone has two interfaces defined - one comm. with a single endpoint, and > > one data with 2 endpoints. Yours seems to have two configurations > > whereas mine has Cfg#=1 > > You lost me there, but that's ok -- I think I know what you're talking > about.... It is all magic that I didn't know anything about till I started trying to figure out how to get this phone to work ;) > > Errno 71 corresponds to "protocol error" which doesn't sound good. > > No, that it doesn't. > > > What does your /proc/bus/usb/devices entry show for the phone? > > Here you go -- hope it makes more sense to you, than it does to me. ;) > > T: Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 4 Spd=12 MxCh= 0 > D: Ver= 1.10 Cls=02(comm.) Sub=00 Prot=00 MxPS= 8 #Cfgs= 2 > P: Vendor=22b8 ProdID=4902 Rev= 0.01 > S: Manufacturer=Motorola Inc. > S: Product=Motorola Phone (V3) config 1 (active) > C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=500mA > I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm > E: Ad=89(I) Atr=03(Int.) MxPS= 16 Ivl=10ms > I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm > E: Ad=01(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms > E: Ad=82(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms config 2 > C: #Ifs= 2 Cfg#= 2 Atr=c0 MxPwr=100mA > I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver= > E: Ad=89(I) Atr=03(Int.) MxPS= 16 Ivl=10ms > I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver= > E: Ad=01(O) Atr=02(Bulk) MxPS= 32 Ivl=0ms > E: Ad=82(I) Atr=02(Bulk) MxPS= 32 Ivl=0ms That tells me that you (or at least your phone) has two configurations, of which the first is the active one. The only significant difference I can see is that the first has a much higher maximum power requirement (500mA vs 100mA) - however both are quite a bit higher than the 20mA of my phone's single configuaration... Both of your configurations have two Interfaces, the first is a 'comm.' type with one end point, and the second a 'data' with two Bulk endpoints. Thus they both look more or less the same as the single config that I have. I tried installing the latest kernel (2.6.12-r10) but that did not seem to make any difference - I get the same protocol error message on connection. So currently I am at a bit of a loss. Unless you have some subtly different settings in your kernel config, it is starting to look like resolving this may require a deeper understanding of USB, the Linux USB driver implementation and the protocols used by Motorola phones than I currently posess (I do not have a copy of the Windows software for the phone, so I can't check to see what it is doing differently). Here is what 'grep USB /usr/src/linux/.conf' produces for me - does anything standout as being different to your config? # USB devices # CONFIG_SND_USB_AUDIO is not set # CONFIG_SND_USB_USX2Y is not set # USB support CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB=m # CONFIG_USB_DEBUG is not set # Miscellaneous USB options CONFIG_USB_DEVICEFS=y # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_SUSPEND is not set # CONFIG_USB_OTG is not set # USB Host Controller Drivers CONFIG_USB_EHCI_HCD=m # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set CONFIG_USB_OHCI_HCD=m # CONFIG_USB_OHCI_BIG_ENDIAN is not set CONFIG_USB_OHCI_LITTLE_ENDIAN=y CONFIG_USB_UHCI_HCD=m # CONFIG_USB_SL811_HCD is not set # USB Device Class drivers # CONFIG_USB_AUDIO is not set # CONFIG_USB_BLUETOOTH_TTY is not set # CONFIG_USB_MIDI is not set CONFIG_USB_ACM=m CONFIG_USB_PRINTER=m # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information CONFIG_USB_STORAGE=m # CONFIG_USB_STORAGE_DEBUG is not set # CONFIG_USB_STORAGE_DATAFAB is not set # CONFIG_USB_STORAGE_FREECOM is not set # CONFIG_USB_STORAGE_ISD200 is not set # CONFIG_USB_STORAGE_DPCM is not set # CONFIG_USB_STORAGE_USBAT is not set # CONFIG_USB_STORAGE_SDDR09 is not set # CONFIG_USB_STORAGE_SDDR55 is not set # CONFIG_USB_STORAGE_JUMPSHOT is not set # USB Input Devices CONFIG_USB_HID=m CONFIG_USB_HIDINPUT=y CONFIG_USB_HIDDEV=y # USB HID Boot Protocol drivers # CONFIG_USB_KBD is not set # CONFIG_USB_MOUSE is not set # CONFIG_USB_AIPTEK is not set # CONFIG_USB_WACOM is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set # CONFIG_USB_MTOUCH is not set # CONFIG_USB_EGALAX is not set # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set # USB Imaging devices # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set # USB Multimedia devices # CONFIG_USB_DABUSB is not set # Video4Linux support is needed for USB Multimedia device support # USB Network Adapters # CONFIG_USB_CATC is not set # CONFIG_USB_KAWETH is not set # CONFIG_USB_PEGASUS is not set # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set # CONFIG_USB_ZD1201 is not set CONFIG_USB_MON=m # USB port drivers # CONFIG_USB_USS720 is not set # USB Serial Converter support # CONFIG_USB_SERIAL is not set # USB Miscellaneous drivers # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set # CONFIG_USB_CYTHERM is not set # CONFIG_USB_PHIDGETKIT is not set # CONFIG_USB_PHIDGETSERVO is not set # CONFIG_USB_IDMOUSE is not set # CONFIG_USB_SISUSBVGA is not set # CONFIG_USB_TEST is not set # USB ATM/DSL drivers # USB Gadget Support # CONFIG_USB_GADGET is not set Only other thing I can think of is a problem with my cable. It is not specifically made for the phone (it is from my MP3 player), but my understanding is that USB is just a 4 wire protocol, so it the connectors phsically fit the cable should be usable. Regards, DigbyT -- Digby R. S. Tarvin digbyt@digbyt.com http://www.digbyt.com -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-11-01 12:54 ` Digby Tarvin @ 2005-11-01 13:26 ` Qian Qiao 2005-11-01 18:10 ` James Hiscock 1 sibling, 0 replies; 18+ messages in thread From: Qian Qiao @ 2005-11-01 13:26 UTC (permalink / raw To: gentoo-user On 11/1/05, Digby Tarvin <digbyt@acm.org> wrote: > Is that non-standard? I only see > * sys-fs/udev > Latest version available: 068 > Latest version installed: [ Not Installed ] > Size of downloaded files: 436 kB > Homepage: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html > Description: Linux dynamic and persistent device naming support (aka userspace devfs) > License: GPL-2 > > in portage, and as you can see I don't have it installed. When was the last time you emerge --sync? and you are still using devfs? Google for gentoo udev guild, it'll tell you how to switch to udev. -- Joe -- There are 3 kinds of people in the world: Those who can count, and those who can't. -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-11-01 12:54 ` Digby Tarvin 2005-11-01 13:26 ` Qian Qiao @ 2005-11-01 18:10 ` James Hiscock 2005-11-02 1:55 ` James Hiscock 1 sibling, 1 reply; 18+ messages in thread From: James Hiscock @ 2005-11-01 18:10 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1442 bytes --] > Is that non-standard? I only see > * sys-fs/udev > Latest version available: 068 > in portage, and as you can see I don't have it installed. I suspect I've got udev marked as ~x86 in /etc/portage/package.keywords, but I might be wrong. > Here is what 'grep USB /usr/src/linux/.conf' produces for me - does > anything standout as being different to your config? The only things that stand out that are different is that I've got some bluetooth stuff as well as some USB Serial stuff for my Tungsten T3 as modules... everything else is media-related (sound drivers, webcams, that sorta thing). The output of the above command is in the attached zip file, just in case there's something else I've missed... > Only other thing I can think of is a problem with my cable. It is not > specifically made for the phone (it is from my MP3 player), but my > understanding is that USB is just a 4 wire protocol, so it the > connectors phsically fit the cable should be usable. Yup - I'm using a cable from an external hard drive, and before that I was using a cable from a digital camera, so I doubt it's that. <shrug> ...I keep thinking that I've forgotten about something that I did in moto4lin to get it to work, but I can't for the life of me remember what that was... maybe I'll try installing it on my laptop, and see if I can reproduce what I did on my desktop once I get home from work this evening... [-- Attachment #2: usb-config.zip --] [-- Type: application/zip, Size: 1354 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-11-01 18:10 ` James Hiscock @ 2005-11-02 1:55 ` James Hiscock 2005-11-02 11:10 ` Neil Bothwick 0 siblings, 1 reply; 18+ messages in thread From: James Hiscock @ 2005-11-02 1:55 UTC (permalink / raw To: gentoo-user > ...I keep thinking that I've forgotten about something that I did in > moto4lin to get it to work, but I can't for the life of me remember > what that was... maybe I'll try installing it on my laptop, and see if > I can reproduce what I did on my desktop once I get home from work > this evening... So... I got home from work, and started poking around at this on my laptop. I'm running SuSE 10 on it, not Gentoo, but I figured it'd work pretty much the same - most of the software on it is pretty close to the same as my desktop... I downloaded the source from the moto4lin site, unpacked it, and compiled it. For two hours, I tried to get moto4lin to connect to my phone, with no luck whatsoever. Finally, not five minutes ago, it suddenly decided to work. What it looks like is that the AT Product ID is one off of the P2K Product ID - the moto4lin website suggests that this is usually the case. For my phone, the values are as follows (these go into the Preferences dialog): AT Vendor ID: 22b8 AT Product ID: 4902 P2K Vendor ID: 22b8 P2K Product ID: 4901 Looking at the moto4lin wiki, your phone apparently uses the exact same values. When my phone's initially plugged in, the "USB View" list shows it as 22b8:4902. If I click the "Switch to P2K" button, I see a message in the main window that says that my phone's unplugged. If I update the "USB View" again, the phone shows up as 22b8:4901. If I click the "Switch to P2K" button yet _again_, I see "[info] Phone pluged as P2K" (the typo's in the program <shrug>) -- this is the magic message. ;) At this point, I can actually use moto4lin properly... don't ask me why this works, but it does. <shrug> Maybe something in there'll help ya out... -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-11-02 1:55 ` James Hiscock @ 2005-11-02 11:10 ` Neil Bothwick 2005-11-02 11:40 ` James Hiscock 0 siblings, 1 reply; 18+ messages in thread From: Neil Bothwick @ 2005-11-02 11:10 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 838 bytes --] On Tue, 1 Nov 2005 20:55:09 -0500, James Hiscock wrote: > When my phone's initially plugged in, the "USB View" list shows it as > 22b8:4902. If I click the "Switch to P2K" button, I see a message in > the main window that says that my phone's unplugged. If I update the > "USB View" again, the phone shows up as 22b8:4901. If I click the > "Switch to P2K" button yet _again_, I see "[info] Phone pluged as P2K" > (the typo's in the program <shrug>) -- this is the magic message. ;) I've just tried to use moto4lin with a Motorola Razr. It starts as with yours, but when I click "Switch to P2K", /dev/ttyACM0 disappears! nothing works after that until I disconnect and reconnect the phone, at which point I am back in AT mode and it all starts again. -- Neil Bothwick OPERATOR ERROR: Nyah, Nyah, Nyah, Nyah, Nyah! [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-11-02 11:10 ` Neil Bothwick @ 2005-11-02 11:40 ` James Hiscock 2005-11-02 12:03 ` Neil Bothwick 2005-11-02 12:36 ` Digby Tarvin 0 siblings, 2 replies; 18+ messages in thread From: James Hiscock @ 2005-11-02 11:40 UTC (permalink / raw To: gentoo-user > I've just tried to use moto4lin with a Motorola Razr. It starts as with > yours, but when I click "Switch to P2K", /dev/ttyACM0 disappears! nothing > works after that until I disconnect and reconnect the phone, at which > point I am back in AT mode and it all starts again. That's what was happening for me for several hours until it magically started working... I honestly don't know what the heck changed. But once it decided to work, it works consistently. There's a note in the moto4lin wiki specifically for Razr phones (http://moto4lin.sourceforge.net/wiki/Razr_V3) that says that it's inconsistent, and you may need to run echo AT+MODE=8 > /dev/ttyACM0 When I was doing that last night on my laptop, the first time would work, and the second time it removed the device... I honestly don't know what the heck is going on with this program, but it _is_ a pretty early release... <shrug> There isn't much info for the C380 in the wiki, other than the settings that should be used (which are the defaults)... -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-11-02 11:40 ` James Hiscock @ 2005-11-02 12:03 ` Neil Bothwick 2005-11-02 12:36 ` Digby Tarvin 1 sibling, 0 replies; 18+ messages in thread From: Neil Bothwick @ 2005-11-02 12:03 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1070 bytes --] On Wed, 2 Nov 2005 06:40:11 -0500, James Hiscock wrote: > That's what was happening for me for several hours until it magically > started working... I honestly don't know what the heck changed. But > once it decided to work, it works consistently. The only thing more annoying than that happening to you, it when it happens for someone else and doesn't work at all for you :( > There's a note in the moto4lin wiki specifically for Razr phones > (http://moto4lin.sourceforge.net/wiki/Razr_V3) that says that it's > inconsistent, and you may need to run > > echo AT+MODE=8 > /dev/ttyACM0 > > When I was doing that last night on my laptop, the first time would > work, and the second time it removed the device... I tried that, but it removed the device every time. I also tried running kmobiletools as it said in the wiki. kmobiletools works fine, but makes no difference to moto4lin. I'll try to get some more information on this problem and post it on the moto4lin site. -- Neil Bothwick Why isn't phonetically spelled that way? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-11-02 11:40 ` James Hiscock 2005-11-02 12:03 ` Neil Bothwick @ 2005-11-02 12:36 ` Digby Tarvin 2005-11-02 23:46 ` James Hiscock 1 sibling, 1 reply; 18+ messages in thread From: Digby Tarvin @ 2005-11-02 12:36 UTC (permalink / raw To: gentoo-user Hi James, 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.. On Wed, Nov 02, 2005 at 06:40:11AM -0500, James Hiscock wrote: > > I've just tried to use moto4lin with a Motorola Razr. It starts as with > > yours, but when I click "Switch to P2K", /dev/ttyACM0 disappears! nothing > > works after that until I disconnect and reconnect the phone, at which > > point I am back in AT mode and it all starts again. > > That's what was happening for me for several hours until it magically > started working... I honestly don't know what the heck changed. But > once it decided to work, it works consistently. It also sounds very much like what I am seeing. My /dev/usb/acm/0 disappears the first time it is accessed (either by moto4lin or by just echoing anything to it), followed by a message along the lines of usb 1-1: USB disconnect, address 17 in /var/log/messages So far I havn't managed to get it into a mode where it works more sucessfully. I have noticed that on connection I sometimes get: usb 1-1: new full speed USB device using uhci_hcd and address 5 usb 1-1: device descriptor read/64, error -71 usb 1-1: device descriptor read/64, error -71 usb 1-1: new full speed USB device using uhci_hcd and address 6 cdc_acm 1-1:1.0: ttyACM0: USB ACM device whereas on other occasions I get: usb 1-1: new full speed USB device using uhci_hcd and address 16 usb 1-1: device descriptor read/64, error -71 usb 1-1: device descriptor read/64, error -71 usb 1-1: new full speed USB device using uhci_hcd and address 17 usb 1-1: device descriptor read/64, error -71 cdc_acm 1-1:1.0: ttyACM0: USB ACM device ie sometimes 2 descriptor read failures, sometimes 3. so perhaps there is something a bit flakey in there that at some point might just start working. Anyone else seen these sort of error messages on plug-in? I'm really not sure what they are telling me. I can't even find the error message in the source. The closest I have found is in linux/drivers/usb/core/hub.c: dev_err(&udev->dev, "device descriptor read/%s, error %d\n", "all", retval); but the '%s' seems hard wired to produce the string "all" rather than 64, unless dev_err is doing something funny with its 3rd arg. > There's a note in the moto4lin wiki specifically for Razr phones > (http://moto4lin.sourceforge.net/wiki/Razr_V3) that says that it's > inconsistent, and you may need to run > > echo AT+MODE=8 > /dev/ttyACM0 > > When I was doing that last night on my laptop, the first time would > work, and the second time it removed the device... I honestly don't > know what the heck is going on with this program, but it _is_ a pretty > early release... <shrug> I get the device disappearing every time I attempt this. My gut feeling is that the problem has nothing to do with moto4lin. After all, when I am using echo it isn't even running. I suspect it is more a compatability issue between the Linux USB/ACM code and the Motorola gadget code. > There isn't much info for the C380 in the wiki, other than the > settings that should be used (which are the defaults)... Yes, although it is listed as one of the models that work, so I assume somebody must have managed to get it to go. I still have to try tweaking the kernel USB related config parameters, but if that doesn't help, I suspect I am going to have to bite the bullet and try and find my way around the USB driver code. Anybody know of any good references on USB protocols and drivers? Regards, DigbyT -- Digby R. S. Tarvin digbyt@digbyt.com http://www.digbyt.com -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-11-02 12:36 ` Digby Tarvin @ 2005-11-02 23:46 ` James Hiscock 2005-11-03 19:50 ` Digby Tarvin 0 siblings, 1 reply; 18+ messages in thread From: James Hiscock @ 2005-11-02 23:46 UTC (permalink / raw To: gentoo-user > 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> -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [gentoo-user] USB mobile phone connection.. 2005-11-02 23:46 ` James Hiscock @ 2005-11-03 19:50 ` Digby Tarvin 0 siblings, 0 replies; 18+ messages in thread From: Digby Tarvin @ 2005-11-03 19:50 UTC (permalink / raw To: gentoo-user 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 digbyt@digbyt.com http://www.digbyt.com -- gentoo-user@gentoo.org mailing list ^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2005-11-03 19:58 UTC | newest] Thread overview: 18+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-10-23 13:00 [gentoo-user] USB mobile phone connection Digby Tarvin 2005-10-25 23:58 ` James Hiscock 2005-10-26 11:26 ` Digby Tarvin 2005-10-26 20:43 ` James Hiscock 2005-10-26 23:09 ` Digby Tarvin 2005-10-27 4:31 ` James Hiscock 2005-10-27 13:26 ` Digby Tarvin 2005-10-27 21:25 ` James Hiscock 2005-11-01 12:54 ` Digby Tarvin 2005-11-01 13:26 ` Qian Qiao 2005-11-01 18:10 ` James Hiscock 2005-11-02 1:55 ` James Hiscock 2005-11-02 11:10 ` Neil Bothwick 2005-11-02 11:40 ` James Hiscock 2005-11-02 12:03 ` Neil Bothwick 2005-11-02 12:36 ` Digby Tarvin 2005-11-02 23:46 ` James Hiscock 2005-11-03 19:50 ` Digby Tarvin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox