LG 5350 cell phone

Sean Welch welchsm at earthlink.net
Thu Jan 8 14:21:40 PST 2004


I don't know if anyone is still interested in this topic or not but I just
made some progress today (got sick of not being able to use my
straight through USB cable with FreeBSD).  Here's what I've got at
the moment under 4.9-RELEASE.

I went tracing through /usr/src/sys/dev/usb/umodem.c (good old
printf statements) to see what exactly it was that was causing the
"reboots" of my cellphone.  I came to the conclusion that it probably
wasn't something in umodem.c that needed tweaking so I went
nosing around in /usr/src/sys/dev/usb/usbdevs again.

As the phone doesn't start misbehaving until umodem attempts to
attach to it I was able to just leave it at ugen0 and ask usbdevs for
the vendor and product codes (usbdevs -v).  I put those into
usbdevs and the diff looks like this:

*** usbdevs.orig        Tue Sep  2 09:35:17 2003
--- usbdevs     Thu Jan  8 15:12:03 2004
***************
*** 341,346 ****
--- 341,347 ----
  vendor AGATE          0x0c08  Agate Technologies
  vendor DMI            0x0c0b  DMI
  vendor LUWEN          0x0c76  Luwen
+ vendor QUALCOMM               0x1004  Qualcomm
  vendor MOTOROLA               0x1063  Motorola
  vendor PLX            0x10b5  PLX
  vendor ASANTE         0x10bd  Asante
***************
*** 648,653 ****
--- 649,657 ----
  
  /* Fujitsu protducts */
  product       FUJITSU AH_F401U        0x105b  AH-F401U Air H device
+ 
+ /* Qualcomm products */
+ product QUALCOMM CDMA_MSM     0x6000  CDMA Technologies MSM phone
  
  /* General Instruments (Motorola) products */
  product GENERALINSTMNTS SB5100        0x5100  SURFboard SB5100 Cable modem


Having been down this route before without success (usbdevs itself notes
that simply adding IDs does not add any functionality at all) and noticing
a call to /usr/src/sys/dev/usb/usb_quirks.c from umodem.c during
initialization I took a look over there and added this:

*** usb_quirks.c.orig   Wed Feb 12 08:05:57 2003
--- usb_quirks.c        Thu Jan  8 16:03:35 2004
***************
*** 83,88 ****
--- 83,90 ----
   { USB_VENDOR_HP, USB_PRODUCT_HP_815C,                    ANY,   { UQ_BROKEN_BIDIR }},
   { USB_VENDOR_HP, USB_PRODUCT_HP_810C,                    ANY,   { UQ_BROKEN_BIDIR }},
   { USB_VENDOR_HP, USB_PRODUCT_HP_830C,                    ANY,   { UQ_BROKEN_BIDIR }},
+  { USB_VENDOR_QUALCOMM, USB_PRODUCT_QUALCOMM_CDMA_MSM,
+       ANY, { UQ_ASSUME_CM_OVER_DATA}},
   /* YAMAHA router's ucdDevice is the version of farmware and often changes. */
   { USB_VENDOR_YAMAHA, USB_PRODUCT_YAMAHA_RTA54I,
        ANY, { UQ_ASSUME_CM_OVER_DATA }},

After compiling a new kernel with these changes incorporated
(don't forget to run a make -f Makefile.usbdevs if you've got
old kernel compile stuff still around!!!) I now can use the phone as
a modem!!!  I can set the speed up to 230400 (matching the 
setting indicated in the phone's menu) and the transfer speeds are every
bit as good as on the iBook now.  This is what dmesg now reports:

umodem0: Qualcomm CDMA Technologies MSM phone, rev 1.01/0.00, addr 2, iclass 2/2
umodem0: data interface 1, has CM over data, has break

The only issue remaining is when I try to bring the connection down.
When I do this ppp reports:

Warning: deflink: Unable to set physical to speed 0

and on the console I see this:

putc to a clist with no reserved cblocks
putc to a clist with no reserved cblocks
putc to a clist with no reserved cblocks
putc to a clist with no reserved cblocks
putc to a clist with no reserved cblocks
putc to a clist with no reserved cblocks
putc to a clist with no reserved cblocks
putc to a clist with no reserved cblocks
putc to a clist with no reserved cblocks
putc to a clist with no reserved cblocks
putc to a clist with no reserved cblocks
putc to a clist with no reserved cblocks
putc to a clist with no reserved cblocks
putc to a clist with no reserved cblocks

These messages appear to be harmless (ppp is down now and
I can reestablish a connection without problem), but obviously
it isn't the best behaved.

Would anyone care to chip in with suggestions and/or advice?

Sean

> Delivered-To: freebsd-mobile at freebsd.org
> Date: Mon, 16 Jun 2003 19:52:36 -0700 (PDT)
> From: David Yeske <dyeske at yahoo.com>
> To: Josef Karthauser <joe at FreeBSD.org>, Sean_Welch at alum.wofford.org
> In-Reply-To: <20030611224338.GA10822 at genius.tao.org.uk>
> Cc: dyeske at yahoo.com
> Cc: current at freebsd.org
> Cc: mobile at freebsd.org
> Subject: Re: LG 5350 cell phone
> X-BeenThere: freebsd-mobile at freebsd.org
> X-Mailman-Version: 2.1.1
> Precedence: list
> List-Id: Mobile computing with FreeBSD <freebsd-mobile.freebsd.org>
> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-mobile>,
>         <mailto:freebsd-mobile-request at freebsd.org?subject=unsubscribe>
> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-mobile>
> List-Post: <mailto:freebsd-mobile at freebsd.org>
> List-Help: <mailto:freebsd-mobile-request at freebsd.org?subject=help>
> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-mobile>,
>         <mailto:freebsd-mobile-request at freebsd.org?subject=subscribe>
> Errors-To: owner-freebsd-mobile at freebsd.org
> 
> Should this get a new vendor entry in usbdevs?
> 
> --- Josef Karthauser <joe at FreeBSD.org> wrote:
> > On Wed, Jun 11, 2003 at 01:05:00PM -0500, Sean Welch wrote:
> > > I have this phone myself.  I have two adapters for it -- one is
> > > a serial cable the other a "true" (as in no serial to usb
> > > conversion box in the middle) usb cable.
> > >
> > > The phone works great under FreeBSD on the serial cable (normal
> > > Hayes modem type at commands work fine), but no version of
> > > FreeBSD has worked with the usb cable so far.  I tried 4.8,
> > > 5.0-RELEASE, and a few versions of 5.x-CURRENT.  The phone is
> > > quite usable from my iBook so the cable isn't the issue (the   
> > > iBook reports it as a Qualcomm -- which is what the sticker
> > > says too).  I see the message you do, but when I try to use
> > > umodem with it the phone continuously "reboots" itself until 
> > > detached.
> > >
> > > I tried something along the lines of what you did to usbdevs
> > > a while back but didn't get any improvement.
> > >
> > > The connection is appreciably faster over the usb port with
> > > the "true" cable when compared to the serial cable; it would
> > > be very nice to use it this way on FreeBSD...
> > >
> > >                                                    Sean  
> > > 
> > Maybe the phone doesn't identify itself as a usb modem class, instead
> > relying on a vendor driver.
> >  
> > An easy project for someone would be to write a general usb querying
> > tool for displaying the classes, etc that a usb device supports.
> > I've got code kicking around, mostly from Nick Hibma, but I never got
> > around to finishing it off.
> > 
> > Joe
> > --
> > Josef Karthauser (joe at tao.org.uk)            http://www.josef-k.net/
> > FreeBSD (cvs meister, admin and hacker)     http://www.uk.FreeBSD.org/
> > Physics Particle Theory (student)   http://www.pact.cpes.sussex.ac.uk/
> > ================ An eclectic mix of fact and theory. =================
> 
>    
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> _______________________________________________
> freebsd-mobile at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
> To unsubscribe, send any mail to "freebsd-mobile-unsubscribe at freebsd.org"





More information about the freebsd-hackers mailing list