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):
> 
> --------------------------------------
> 00000002��������11:02:45��������>>>>>>> URB 18 going down...����
> 00000003��������11:02:45��������-- URB_FUNCTION_VENDOR_INTERFACE:�������
> 00000004��������11:02:45�������� �TransferFlags � � � � �= 00000002 
> (USBD_TRANSFER_DIRECTION_OUT, USBD_SHORT_TRANSFER_OK)�������
> 00000005��������11:02:45�������� �TransferBufferLength = 00000008�������
> 00000006��������11:02:45�������� �TransferBuffer � � � = 81752ff0�������
> 00000007��������11:02:45�������� �TransferBufferMDL � �= 00000000�������
> 00000008��������11:02:45�������� �������
> 00000009��������11:02:45�������� � �0000:�������
> 00000010��������11:02:45�������� 00�����
> 00000011��������11:02:45�������� 07�����
> 00000012��������11:02:45�������� 00�����
> 00000013��������11:02:45�������� 22�����
> 00000014��������11:02:45�������� 00�����
> 00000015��������11:02:45�������� 00�����
> 00000016��������11:02:45�������� 00�����
> 00000017��������11:02:45�������� 00�����
> 00000018��������11:02:45�������� �������
> 00000019��������11:02:45�������� �UrbLink � � � � � � � � = 00000000����
> 00000020��������11:02:45�������� �RequestTypeReservedBits = 00��
> 00000021��������11:02:45�������� �Request � � � � � � � � = 02��
> 00000022��������11:02:45�������� �Value � � � � � � � � � = 0000��������
> 00000023��������11:02:45�������� �Index � � � � � � � � � = 0008��������
> 00000024��������11:02:45�������� �������
> 00000025��������11:02:45��������<<<<<<< URB 18 coming back...���
> 00000026��������11:02:45��������-- URB_FUNCTION_CONTROL_TRANSFER:�������
> 00000027��������11:02:45�������� �PipeHandle � � � � � = ffa86c00�������
> 00000028��������11:02:45�������� �TransferFlags � � � �= 0000000a 
> (USBD_TRANSFER_DIRECTION_OUT, USBD_SHORT_TRANSFER_OK)�
> 00000029��������11:02:45�������� �TransferBufferLength = 00000008�������
> 00000030��������11:02:45�������� �TransferBuffer � � � = 81752ff0�������
> 00000031��������11:02:45�������� �TransferBufferMDL � �= 817ac150�������
> 00000032��������11:02:45�������� �UrbLink � � � � � � �= 00000000�������
> 00000033��������11:02:45�������� �SetupPacket � � � � �:��������
> 00000034��������11:02:45�������� 41�����
> 00000035��������11:02:45�������� 02�����
> 00000036��������11:02:45�������� 00�����
> 00000037��������11:02:45�������� 00�����
> 00000038��������11:02:45�������� 08�����
> 00000039��������11:02:45�������� 00�����
> 00000040��������11:02:45�������� 08�����
> 00000041��������11:02:45�������� 00�����
> 00000042��������11:02:45�������� �������
> 00000043��������11:02:45��������UsbSnoop - IRP_MJ_INTERNAL_DEVICE_CONTROL, 
> IOCTL_INTERNAL_USB_SUBMIT_URB��������
> 00000044��������11: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
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to