On Sun, 30 Jan 2005, Dmitry Nezhevenko wrote: > Hello, > > I am trying to write driver (but now not kernel module, only user mode) for > Motorola C380/C650 Mobile phone. After plug in in Linux (Kernel 2.6.10), it > works as ACM modem (cdc-acm module). I send "AT+MODE=8" AT command. Phone > change's Product id, so it became not ACM device. Here is output of lsusb -a: > > > I have some information about protocol. (I get it via UsbSnoop in M$). > Windows > program use Interface Number 8 (Motorola Test Command), which has no > endpoints (except standart). So, it must use only CONTROL TRANSFER. Now i use > libusb and try to create user mode program. Here is one of packet (UsbSnoop): > > -------------------------------------- > 0000000211:02:45>>>>>>> URB 18 going down... > 0000000311:02:45-- URB_FUNCTION_VENDOR_INTERFACE: > 0000000411:02:45 TransferFlags = 00000002 > (USBD_TRANSFER_DIRECTION_OUT, USBD_SHORT_TRANSFER_OK) > 0000000511:02:45 TransferBufferLength = 00000008 > 0000000611:02:45 TransferBuffer = 81752ff0 > 0000000711:02:45 TransferBufferMDL = 00000000 > 0000000811:02:45 > 0000000911:02:45 0000: > 0000001011:02:45 00 > 0000001111:02:45 07 > 0000001211:02:45 00 > 0000001311:02:45 22 > 0000001411:02:45 00 > 0000001511:02:45 00 > 0000001611:02:45 00 > 0000001711:02:45 00 > 0000001811:02:45 > 0000001911:02:45 UrbLink = 00000000 > 0000002011:02:45 RequestTypeReservedBits = 00 > 0000002111:02:45 Request = 02 > 0000002211:02:45 Value = 0000 > 0000002311:02:45 Index = 0008 > 0000002411:02:45 > 0000002511:02:45<<<<<<< URB 18 coming back... > 0000002611:02:45-- URB_FUNCTION_CONTROL_TRANSFER: > 0000002711:02:45 PipeHandle = ffa86c00 > 0000002811:02:45 TransferFlags = 0000000a > (USBD_TRANSFER_DIRECTION_OUT, USBD_SHORT_TRANSFER_OK) > 0000002911:02:45 TransferBufferLength = 00000008 > 0000003011:02:45 TransferBuffer = 81752ff0 > 0000003111:02:45 TransferBufferMDL = 817ac150 > 0000003211:02:45 UrbLink = 00000000 > 0000003311:02:45 SetupPacket : > 0000003411:02:45 41 > 0000003511:02:45 02 > 0000003611:02:45 00 > 0000003711:02:45 00 > 0000003811:02:45 08 > 0000003911:02:45 00 > 0000004011:02:45 08 > 0000004111:02:45 00 > 0000004211:02:45 > 0000004311:02:45UsbSnoop - IRP_MJ_INTERNAL_DEVICE_CONTROL, > IOCTL_INTERNAL_USB_SUBMIT_URB > 0000004411:02:45 > ----------------------------------------- > > Have you any idea, how can i send same packet with libusb or another way. > > I try to use usb_control_msg function: > > int usb_control_msg(usb_dev_handle *dev, int requesttype, int request, int > value, int index, char *bytes, int size, int timeout); > > requesttype is 00, request=0x02, value=0, index=0x8. bytes is array of {00 07 > 00 22 00 00 00 00}. But phone don't accept this packet. libusb says, that > pipe is broken. > > Can i send this packet this way?
It's hard for me to read your message because of character set translation problems. But I think the problem is that the log for URB 18 going down doesn't report the full bRequestType value; it only reports the reserved bits. You need to use the bRequestType value reported in the Setup Packet for URB 18 coming back: 0x41. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel