Peter Chen <hzpeterchen@...> writes: > > > > > However I have another problem. My host application calls > > SET_CONFIGURATION everytime it starts. On device side my application > > is running and waiting for data from Host. But whenever set config > > is called serial gadget driver (from composite.c) does soft reset and > > I think new port number is generated. Because of this my device > > application will not receive data until I close and reopen device node > > (/dev/ttyGS0). > > > So, the port number has not changed as you can still open with ttyGS0. > The set_config should call gserial_disconnect from reading code. Well I have already open the port as soon as board boots and application starts. And after that I start my host application and it will first do set_config. Since my device has only one configuration it will perform reset and since acm_set_alt() calls gserial_connect() it will create new port (I think so). > > > How to let device side application know that set_config is called and > > it needs to reopen device node? > Are there any Error returns for read if you have disconnected the > cable or set_config > occurs? Read will return EAGAIN if set_config is called and I try to read. But I never get data untill I close and reopen /dev/ttyGS0 Regards, Dipen Patel -- 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