Re: About gadget configfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Peter,

W dniu 06.05.2014 03:01, Peter Chen pisze:
On Mon, May 05, 2014 at 11:09:30AM +0200, Andrzej Pietrasiewicz wrote:
W dniu 04.05.2014 09:48, Peter Chen pisze:
Hi Sebastian & Andrzej,

<snip>


1. I have setup successfully for running mass storage and CDC ACM at the
same time with below steps:

- Using CDC ACM config (CONFIG_USB_CONFIGFS_ACM), I thought the gser at
configfs is the same with g_serial, but in fact, it is not. The gser at
configfs seems to work not well at my linux pc, it can't create serial
port, but the acm and g_serial can let the pc create /dev/ttyACM0.


It is the same function.
g_serial in fact offers _three_ different functions:

- acm proper
- gser
- obex

Which is chosen depends on g_serial's module parameters.
Please do modinfo g_serial.
If use_acm is true, ACM is used [use_acm is true by default].
Else if use_obex is true, obex is used [use_obex is false by default].
Else gser is used.
So if you load g_serial without using any parameters, in fact you
get acm, not gser.

Please add "use_acm=0" to modprobe/insmod g_serial and try again,
and see if the host creates a new node in /dev.
Please note, that if you use generic serial (gser), then the host
creates /dev/ttyUSB<n>, not /dev/ttyACM<n>.

Only if you successfully see /dev/ttyUSB<n> at host using g_serial,
you can start suspecting gser set up through configfs interface
of not working correctly.

Please note that g_serial by default uses 0x0525 as vendor id
and as product id it uses 0xa4a7 for ACM, 0xa4a9 for obex and
0xa4a6 for generic serial. If your PC host can only talk to gadgets
with these ids you need to use the same with configfs,
or configure your host to accept different ids.


<snip>


3. Besides, I have tried two configurations, and each configuration with
one function, I find the host PC always set configuration 1 (The first
		configuration), any ways to switch configuration at host
side? libusb?

You either have a driver/class driver at the host side, or use libusb.

AP

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux