[uClinux-dev] Can't get Gadget Serial driver to start on WindowsXPPro

Butok Andrey-B00423 Andrey.Butok at freescale.com
Thu Feb 22 02:18:52 EST 2007


Hi Bob

I am glad that the issue is solved.

>>So is it true that the acm mode is only available when loading as a
module?
As I know Windows support only this mode.

>> Seems to work, though a "make clean" seems to delete that.  Is there
a better way to do this? 
Option 1:
	The better way is to edit the
	/uClinux-dist/vendors/Freescale/M5329EVB/Makefile

	...
	DEVICES = \
		...
		ttygserial,c,127,0 
		..
Option 2:
	You can try during run-time:
		 mknod /var/ttygserial c 127 0

Best regards
Andrey

-----Original Message-----
From: uclinux-dev-bounces at uclinux.org
[mailto:uclinux-dev-bounces at uclinux.org] On Behalf Of Robert S. Grimes
Sent: Thursday, February 22, 2007 1:36 AM
To: uClinux development list
Subject: Re: [uClinux-dev] Can't get Gadget Serial driver to start on
WindowsXPPro

Hi Andrey,

Well, it took quite a while, but when I got everything just right, IT
WORKS!!!  THANKS!

Take care,
-Bob

P.S. As Andrey surmised, I had not built the driver as a module.  Once I
did, I had to revert the .inf file to the original value; in other
words, ignore my earlier comment about it.  Seems what was happening is
the g_serial driver was loading in bulk in/out mode, which doesn't work
with Windoze; in fact, that is not how I wanted to use the device
anyways.

So is it true that the acm mode is only available when loading as a
module?

Another problem is this instruction in the docs: 
    mknod /dev/ttygserial c 127 0
Because my /dev is in the romfs, that of course won't work.  I
discovered I could do that by copying an existing file in ../romfs/dev
of the distribution, then rebuilding it.  Seems to work, though a "make
clean" seems to delete that.  Is there a better way to do this?  Feels a
bit kludgy to me.

Anyway, it works!!!

Butok Andrey-B00423 wrote:
> Hi Bob
>
> Please try to build the gadget serial driver as a module and install 
> it with enabled "use_acm" parameter :
>
> 	insmod g_seria.ko use_acm=1
>
> Best regards
> Andrey
>
>
> -----Original Message-----
> From: uclinux-dev-bounces at uclinux.org
> [mailto:uclinux-dev-bounces at uclinux.org] On Behalf Of Robert S. Grimes
> Sent: Wednesday, February 21, 2007 1:25 AM
> To: uClinux Mailing List
> Subject: [uClinux-dev] Can't get Gadget Serial driver to start on 
> Windows XPPro
>
> Hi,
>
> I'm developing a uClinux-based device based on the Freescale MCF532x, 
> which has integral USB device peripheral.  The device will interface 
> with a host computer via USB.  The communications protocol is quite 
> simple, and for ease of use from the host computer's viewpoint, it 
> would be great if my device looks like a serial port.  It would be 
> really fantastic if it looked like a USB/serial port adapter, such 
> that the host computer (Windoze, Linux, Mac, whatever) could "borrow" 
> a suitable driver, at least initially.
>
> So I found the Gadget Serial (see
> linux-2.6.x/Documentation/usb/gadget_serial.txt) and am attempting to 
> use it.  I am currently using the M5329EVB board from 
> Freescale/LogicPD,
> uClinux-dist-20070130.tar.bz2 with some patches from a Freescale 
> AppNote (AN3408.pdf).  I _think_ I've got the configuration for the 
> kernel correct, and everything builds okay.  Here is part of the 
> console
> output:
>
>     USB-MCF532x: (HOST module) EHCI device is registered
>     USB-MCF532x: (OTG module) EHCI device is registered
>     USB-MCF532x: (OTG module) UDC device is registered
>     SCSI subsystem initialized
>     usbcore: registered new driver usbfs
>     usbcore: registered new driver hub
>     ...
>     usbmon: debugfs is not available
>     MCF532x USB EHCI: is found. ID=0x5 Rev=0x41
>     ehci ehci.1: EHCI Host Controller
>     ehci ehci.1: new USB bus registered, assigned bus number 1
>     ehci ehci.1: irq 176, io mem 0xfc0b4000
>     ehci ehci.1: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
>     usb usb1: Product: EHCI Host Controller
>     usb usb1: Manufacturer: uClinux 2.6.17.1 ehci_hcd
>     usb usb1: SerialNumber: ehci.1
>     usb usb1: configuration #1 chosen from 1 choice
>     hub 1-0:1.0: USB hub found
>     hub 1-0:1.0: 1 port detected
>     MCF532x USB EHCI: is found. ID=0x5 Rev=0x41
>     ehci ehci.0: EHCI Host Controller
>     ehci ehci.0: new USB bus registered, assigned bus number 2
>     ehci ehci.0: irq 175, io mem 0xfc0b0000
>     ehci ehci.0: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
>     usb usb2: Product: EHCI Host Controller
>     usb usb2: Manufacturer: uClinux 2.6.17.1 ehci_hcd
>     usb usb2: SerialNumber: ehci.0
>     usb usb2: configuration #1 chosen from 1 choice
>     hub 2-0:1.0: USB hub found
>     hub 2-0:1.0: 1 port detected
>     ehci-mcf532x: No external transceiver!
>     Initializing USB Mass Storage driver...
>     usbcore: registered new driver usb-storage
>     USB Mass Storage support registered.
>     udc: Freescale MCF532x UDC driver version 27 October 2006 init
>     udc: No external transceiver!
>     udc: MCF532x USB Device is found. ID=0x5 Rev=0x41
>     gs_bind: Gadget Serial v2.0 bound
>     udc: mcf532x_udc: mcf532x_udc bind to driver g_serial
>     gs_module_init: Gadget Serial v2.0 loaded
>     ...
>     Sash command shell (version 1.1.1)
>     /> <4> ehci.0: Unlink after no-IRQ?  Controller is probably using
>     the wrong IRQ.
>
> When I connect the M5329EVB to my Windows XP host computer, the latter

> detects the "Gadget Serial" device, and installs the driver.  Note 
> that in order to get this far, I had to change the following lines in 
> the .inf file from the documentation from:
>
>     [GSerialDeviceList]
>     %GSERIAL%=GSerialInstall, USB\VID_0525&PID_A4A7
>
> to
>
>     [GSerialDeviceList]
>     %GSERIAL%=GSerialInstall, USB\VID_0525&PID_A4A6
>
> Anyway, the following is output on the uClinux console:
>
>     gs_disconnect: Gadget Serial disconnected
>     gs_disconnect: Gadget Serial disconnected
>     gs_set_config: Gadget Serial configured, full speed BULK config
>
> Which seems it is happy.  However, on the Windows host I get an error,

> stating that "This device cannot start. (Code 10)".  I seem to be so 
> close, but I'm not sure where to go from here.  Any ideas?!
>
> Thanks,
> -Bob
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev
>
>   
_______________________________________________
uClinux-dev mailing list
uClinux-dev at uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev at uclinux.org To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev


More information about the uClinux-dev mailing list