none
PCI Serial Extension Card in Windows Embedded Compact 2013 RRS feed

  • Question

  • Hi,

    I'm trying to set up a WEC2013 System on an embedded computer (Wafer8522) with a Moxa PCI card (CB-134I). It's an old system which ran on DOS and needs for some new features more power through the new OS.

    I made a System-Builder Project in VS2013 for the OS and added the CE6-driver from MOXA as subproject. When I build the solution I can see the driver-DLLs in the BIN-Explorer, but whe I try to use the COM-Ports by a test-Subproject I get an Error 55 from CreateFile. The on-board COM-port is working fine (after I fixed the "COM1:" colon), so it's not a problem in the test-project. I checked with FindNextDevice all installed devices and the MOXA ports doesn't show.

    My best guess is a problem in the registry. I tried everything I could think of but I have no experience with Windows at all (come from µC). The specified Keys appear in the registry in the BIN-File, but somehow the System doesn't load the device. Doesn't there have to be a "SysIntr" entry somewhere? Does it help to add the driver as catalog-item? Should I insert all Ports (it should be only 4 not 30!!) manualy with all registry-key settings (I don't really understand the template-part)?

    It would be great if someone could help me, I tried and googled anything, but am still stuck for over a week...

    Best,

    Wolfgang

    The default registry file from MOXA:

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Template\MOXAPCICOM]
       "Dll"="mxser_com.Dll"
       "Prefix"="COM"
       "VendorID"=multi_sz:"1393","1393","1393","1393","1393","1393","1393","1393","1393","1393","1393","1393","1393","1393","1393","1393","1393","1393"
       "DeviceID"=multi_sz:"1022","1021","1321","1020","1041","1042","1340","1143","1043","1180","1380","1681","1682","1181","1080","1142","1341","1044"
       "Class"=dword:07
       "SubClass"=dword:00
       "index"=dword:2
       "IsrDll"="mxisr.dll"
       "IsrHandler"="ISRHandler"
       "Tsp"="Unimodem.dll"
       "DeviceArrayIndex"=dword:0
       "Order"=dword:0
       "DeviceType"=dword:0
       "FIFO"=dword:1 
       "CHIP"= dword:1
    	
    
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Template\MOXAPCICOM\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 2:"
    
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU1]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU1\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 3:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU2]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU2\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 3:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU3]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU3\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 4:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU4]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU4\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 4:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU5]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU5\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 5:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU6]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU6\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 5:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU7]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU7\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 6:"
        
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU8]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU8\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 7:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU9]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU9\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 8:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU10]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU10\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 9:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU11]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU11\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 10:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU12]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU12\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 11:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU13]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU13\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 12:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU14]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU14\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 13:"    
    
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU15]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU15\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 14:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU16]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU16\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 15:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU17]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU17\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 16:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU18]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU18\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 17:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU19]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU19\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 18:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU20]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU20\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 19:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU21]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU21\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 20:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU22]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU22\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 21:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU23]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU23\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 22:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU24]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU24\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 23:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU25]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU25\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 24:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU26]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU26\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 25:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU27]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU27\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 26:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU28]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU28\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 27:"
        
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU29]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU29\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 28:"
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU30]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU30\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 29:"
        
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU31]
    "Order"=dword:100
    "FIFO"=dword:1 
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\MXU31\Unimodem]
        "Tsp"="Unimodem.dll"
        "DeviceType"=dword:0
        "DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,00,00, 08, 00, 00, 00,00,00,00
        "FriendlyName"="Serial Cable on COM 30:"   

    Monday, August 18, 2014 12:34 PM

All replies

  • When you look up error 55 in winerror.h you will find that it means that the driver that you requested isn't loaded.   That either means that the driver didn't load, or that you are trying to access the driver incorrectly.

    Step 1:  Determine if the drivers loaded, and if they did load what number was assigned to it.  See http://geekswithblogs.net/BruceEitman/archive/2008/06/10/windows-ce-listing-running-drivers.aspx  

    Step 2:  Look at how to use CreateFile with COM port number greater than 9.  see http://geekswithblogs.net/BruceEitman/archive/2008/06/23/windows-ce-device-driver-index-greater-than-9.aspx

     

    Bruce Eitman (eMVP) Senior Engineer Bruce.Eitman AT Eurotech DOT com My BLOG http://geekswithblogs.net/bruceeitman Eurotech Inc. www.Eurotech.com

    Monday, August 18, 2014 1:01 PM
    Moderator
  • Wolfgang,

    Did you recompile the CE6 driver under WEC2013, or did you simply add the DLL?

    If you did the later, the loader won't allow loading your DLL since it is compiled for an older OS.

    Regards,

    Mario

    Monday, August 18, 2014 1:32 PM
  • Hi Bruce,

    Thank you very much for your support, I had already found the "EnumerateRunningDrivers" function on your blog yesterday, so you already helped me then! :)

    I just made a new Subproject in my design, set "ReleaseType" to platform and made a small main to run the two functions from your blog, just to make sure I didn't miss anything before: The driver is not loaded. There is only the COM1 from the board itself (which is opend correctly by all 3 formats from CreateFile), but no sign of the MOXA ports...

    Monday, August 18, 2014 2:11 PM
  • Hi Mario,

    Thanks for your help!

    I downloaded an installer from MOXA wich created a folder with a VS-Project (mxserce6.pbpxml). I added this project as an existing project to my OS-Design, set its "ReleaseType" to platform and simply clicked on "build" ...I hoped, that this means, that the project was compiled for WEC2013?

    Regards

    Wolfgang

    Monday, August 18, 2014 2:29 PM
  • Hi Wolfgang,

    Just to check, I downloaded the driver from moxa.  Unfortunately, the driver is not recompiled, it just adds the CE6 compiled dll to your image.  

    So this is why your driver does not load.  Maybe you can ask moxa to either recompile a version for WEC2013, or ask them the source code so you can do it yourself.

    I wish I had better news,  sorry about that.

    Regards,

    Mario

    Monday, August 18, 2014 2:33 PM
  • Hi Mario,

    Uh, thats a very good point, but bad news. I just contacted MOXA and our distributor, I hope they'll react...

    Thank you very much for your help! I'll post the outcome :)

    Best Regards,

    Wolfgang

    Monday, August 18, 2014 3:07 PM