Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Aug 2005 04:45:28 +0400
From:      Karolis Tamutis <karolis.t@gmail.com>
To:        freebsd-usb@freebsd.org
Subject:   A possible bug or lack of feature in ucom driver
Message-ID:  <6f896f9a050819174578785f9a@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi all. I'm just digging into usb programming, I want to write drivers
for my motorola phone. Normally, my phone connects in AT mode, with
product ID being: 0x4902, but in I need to change this mode to P2K (in
order to operate the phone). On linux it's done by sending AT command
"AT+MODE=3D8" to the acm device, here - by sending the same command to
ucom device. If the command executed successfully, phone's product ID
should change to 0x4901 (I believe the phone has to reboot it self to
achieve this?). But here's what I get when executing the following:
root@# cu -l /dev/ucom0=20
AT+MODE=3D8
OK

Lost carrier.
[EOT]
root@# cu -l /dev/ucom0=20
/dev/ucom0: No such file or directory
link down

Output of dmesg:
ucom0: ucomreadcb: IOERROR
ucom0: abnormal status: IOERROR
ucom0: abnormal status: IOERROR
ucom0: at uhub0 port 1 (addr 2) disconnected
ucom0: still open, forcing close

I believe the phone can't return from rebooting?
Here's that piece of code from /usr/src/sys/dev/usb/ucom.c:

Line 1045
=09if (status !=3D USBD_NORMAL_COMPLETION) {
=09=09if (!(sc->sc_state & UCS_RXSTOP))
=09=09=09printf("%s: ucomreadcb: %s\n",
=09=09=09       USBDEVNAME(sc->sc_dev), usbd_errstr(status));
=09=09sc->sc_state |=3D UCS_RXSTOP;
=09=09if (status =3D=3D USBD_STALLED)
=09=09=09usbd_clear_endpoint_stall_async(sc->sc_bulkin_pipe);
=09=09/* XXX we should restart after some delay. */
=09=09return;
=09}
Line 1056

/* XXX we should restart after some delay. */
Doe's this comment means it lacks some functionality? Could someone
wit the knowledge make a patch or tell me what to do? I would be very
thankful, because this really stops my progress. Thank you.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6f896f9a050819174578785f9a>