Author Topic: USB support in win ce.net  (Read 9487 times)

squirrel

  • Member
  • ***
  • Posts: 2
USB support in win ce.net
« on: February 07, 2012, 05:40:24 pm »
I'm looking for a device class to build a custom USB device on. The host will run Win CE.net. Ideally I want to do bulk transfers, but interrupt  transfers - in both directions - could be made to work. I also want to be able to connect to a Win7 host for testing.

I looked at WinUSB. That looks good, but did not have support in CE 4.2. Is that still true?

HID as a vendor specific device would be OK - if both interrupt transfers were available. CE used to support one way only. Is that still true?

Can some-one suggest a good starting point. Designing class and developing a complete driver and API doesn't appeal.

TIA

Simon

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB support in win ce.net
« Reply #1 on: February 07, 2012, 11:08:12 pm »
This might help:

http://msdn.microsoft.com/en-us/library/ms894087.aspx

Can you make the device a mass-storage device?

If you're willing to buy a driver, see MCCI, Jungo, theSycon.

Jan

squirrel

  • Member
  • ***
  • Posts: 2
Re: USB support in win ce.net
« Reply #2 on: February 08, 2012, 11:21:55 am »
Thanks for the ideas.

I'm not sure MSD would work for me - I also want to attach genuine MSD devices. Something identifying my device as an MSD would be unhelpful - it isn't going to respond properly. Even having my CE host sort the difference between 'proper' and 'lying' devices that claim to be MSDs seems inelegant from a design point-of-view.

I am trying not to start down the road of developing a full-blown driver - and by implication ad device class with client side support - if I can avoid it. That's why I was trying to leverage some standard support if I can.

The bigger picture is that I'm trying to do an RPC mechanism over USB - conceptually something like what CORBA, OPEN-ONC/RPC or SOAP does over ethernet. This will mostly be used to configure custom communication channels, and send/receive packet data through them. The sort of channels I'm dealing with are LONworks, MODbus, 6LOPAN and DALI - if these mean anything to you. Clearly some sort of bulk transfer would be best. Fragmenting the calls/responses/events through HID looked attactive, but without the outgoing INTERRUPT transfer it isn't that clear cut. Having response/event data on the incoming INTERRUPT is OK for both desktop and CE. As far as I can tell HID on CE would need to make the calls as control transfers (set report). This looks messy for calls with enough parameter data to be split over several transfers - might not even be reliable.

Any suggestions on how to do RPC over USB gratefully received.

Thanks


Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB support in win ce.net
« Reply #3 on: February 08, 2012, 12:15:35 pm »
A control transfer (such as HID Set_Report) can use multiple transactions for data, in theory up to 65535 bytes.

I don't know how much support WinCE currently has for generic HIDs (devices that aren't system keyboards, mice, etc.).

A virtual serial port would give you bulk transfers but again I don't know if you would need to use a third-party driver.

Jan