hi
i use the usb g_serial module:
modprobe g_serial use_acm=0
in the /dev. i can saw the ttyGS0。
connect pc ,i can saw the Device endpoint use the libusb:
i can use :
int usb_fd = open("/dev/ttyGS0", O_RDWR);
and use the usb by read and writ functoin.
in the pc ,i use the libusb-win32-bin-1.2.6.0 .
in a qt project, i read and write the usb by:
usb_bulk_write(dev, EP_OUT, tmp, sizeof(tmp), 5000);
usb_bulk_read(dev, EP_IN, tmp, sizeof(tmp), 5000);
1.how to use the timeout in arm board?
i use the select to implement this function.
is there have other way to implement this function?
2.i want to use the Device endpoint 00h.
there is only one ttyGS0.how can i identification the data from the pc with different endpoint address?
and hwo can i send and receive data by endpoint 00h?
in the /sys/bus/usb/devices/usb1:
int the /sys/bus/usb/devices/usb1/1-0:1.0:
if i can use these files to send and receive data by different endpoint? how?
thanks for you help!!
Hi
endpoint 0 is special Control endpoint and can not be used
for other purposes. Description can be found in usb2.0 specification
(on usb.org) and for example on
USB in a NutShell - Chapter 4 - Endpoint Types
USB in a NutShell - Chapter 5 - USB Descriptors
timeout example can found on patches
simple usb example with different endpoints can be found
in attached sdk example, please pay attention to
Chapter 34 Configuring the USB Host Controller Driver
pdf document.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
hi
can i use two endpoint to transfer or receive data at the same time?
how?
thanks!