none
USB to Serial connection on Windows CE 6 without ActiveSync RRS feed

  • Question

  • Hi,

    I am trying to use an usb serial connection between my WindowsXP/Linux host
    and my Windows CE 6.0 R3 board without ActiveSync support but I was unable
    to make it work.

    I'm using:
     - Hardware:
      - AT91SAM9261-EK development board with the free BSP provided by ATMEL
     - Software:
      - Windows XP Professional SP3
      - Platform Builder + VS 2005
      - Windows CE 6.0 R3

    On Platform Builder I checked:
     - Device Driver -> USB Function -> USB Function Clients -> Serial
     - 3° Party -> AT91SAM9261EK -> USB Function -> USB Function Driver -> USB Function Driver

    The device registry contains:

    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Serial_Class]
       "Dll"="serialusbfn.dll"
       "DeviceName"="USBFNS1:"
       "Prefix"="COM"
       "DeviceArrayIndex"=dword:0
       "RxBufferSize"=dword:4000
       "IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
       "idVendor"=dword:03EB
       "Manufacturer"="Atmel Manufactor"
       "idProduct"=dword:6119
       "Product"="at91sam9261-ek"
       "bcdDevice"=dword:0
       "Tsp"="Unimodem.dll"
       "DeviceType"=dword:0
      
    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Serial_Class]
     "Index"=dword:4
     "FriendlyName"="USB Cable Connection"
      
    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\USBSER_Class]
      "Dll"="serialusbfn.dll"
      "DeviceName"="USBFNS2:"
      "Prefix"="COM"
      "DeviceArrayIndex"=dword:1
      "RxBufferSize"=dword:4000
      "IClass"=multi_sz:"{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}","{C375C787-B721-4b8e-B67F-A112D5C0A404}"
      "idVendor"=dword:03EB
      "Manufacturer"="Atmel Manufactor"
      "idProduct"=dword:6119
      "Product"="At91sam9261-ek"
      "bcdDevice"=dword:90
      "Tsp"="Unimodem.dll"
      "DeviceType"=dword:0
      
    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers] 
      "DefaultClientDriver"=- ; erase previous default 
    [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers] 
      "DefaultClientDriver"="Serial_Class"
     
    On the board I can open the "virtual" serial port (I see it as COM4) and read/write on it.
    I attached the usb cable to a Linux Host PC with:
     
     modprobe usbserial vendor=0x03EB product=0x6119

    I opened a terminal on Linux and everything seems to work fine.

    On Windows, I use the following .inf file:

    -------------------------------------------------------------------------------
    [Version]
    Signature="$Chicago$"
    Class=Ports
    ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
    Provider=%ATMEL%
    DriverVer=09/12/2006,1.1.1.1

    [SourceDisksNames]
    1="Windows Install CD"

    [SourceDisksFiles]
    usbser.sys=1

    [DestinationDirs]
    DefaultDestDir=12

    [Manufacturer]
    %ATMEL%=AtmelMfg

    [AtmelMfg]
    %USBtoSerialConverter%=USBtoSer.Install,USB\VID_03EB&PID_6119

    [USBtoSer.Install]
    CopyFiles=USBtoSer.CopyFiles
    AddReg=USBtoSer.AddReg

    [USBtoSer.CopyFiles]
    usbser.sys,,,0x00000002

    [USBtoSer.AddReg
    HKR,,DevLoader,,*ntkern
    HKR,,NTMPDriver,,usbser.sys

    [USBtoSer.Install.Services]
    AddService=usbser,0x00000002,USBtoSer.AddService

    [USBtoSer.AddService]
    DisplayName=%USBSer%
    ServiceType=1
    StartType=3
    ServiceBinary=%12%\usbser.sys

    [Strings]
    ATMEL="ATMEL Corp."
    USBtoSerialConverter="AT91 USB to Serial Converter"
    USBSer="USB Serial Driver"
    -------------------------------------------------------------------------------

    I plug the USB cable and Windows detects the device. Unfortunately Windows cannot initialize it
    (a ! appear in Control Panel - ERROR NUMBER 10 - Device cannot start).

    If I change the "DeviceArrayIndex"=dword:0 in [HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Serial_Class] with
    "DeviceArrayIndex"=dword:1 the device is detected (the ! disappear). When I try to use it with Putty an error
    messagge appears (Unable to open serial port!).

    English is not my native language; please excuse typing errors.

    Thanks for your attention.

    A.Biasci

    Thursday, December 9, 2010 4:03 PM

All replies

  • Hi,

    We are working with the AT91SAM9263-EK and the free BSP from Atmel/Adeneo.

    All BSPs for the SAM9 series are written and maintained by Adeneo. The USBFN driver code is basically the same for both BSPs.

    Though we did not test using the USBFN as SERIAL connection, we got the same Error Code 10 when trying to connect to our desktop systems using USB RNDIS.

    Finally we got a USB hardware logger and found that the driver somehow did not read the number of Bytes returned in a control request correctly.

    Our main problem was that the USBFN driver seemded to work on some of our older systems correctly but on newer machines having an ICore-7 or an AMD chip set, the driver would fail to initialize.

    In the end we had to consult a company specializing in USB drivers to help us re-write the driver.

    I am not allowed to share the code, but you should try reading the UDP Endpoint Control and Status Register more than once to retrieve the number of bytes received as part of a control request.

    HTH,

    Bjoern

     

    Monday, December 13, 2010 10:50 AM
  • Hello,

    We have a similar issue with USB.  I tried re-reading the UDP_CSR register again, but It's not solving our issue.  Our device still cannot start.  Can you offer any more insight>?

    Friday, August 31, 2012 5:11 PM