none
Please select a valid target machine for deployment from the project property page RRS feed

  • Question

  • Hello,

    I'm trying to write my first driver(so be genteel) for a switching board(modem). The only thing I want to do is to be able to send I message to the switching board(write to a specific address inside the board). I have already written the driver on Mac using the IOKit, but now I have to migrate to windows and I'm using Visual Studio Community 2015, WDK 10, on a Windows 7 64-bit machine

    I decided to use the UMDF 2 Driver template. What I have done so far is try to list all USB connected devices and iterate over them. Like http://www.velleman.eu/images/tmp/usbfind.c. I can build, but when I run it I get 

    Please select a valid target machine for deployment from the project property page

    How can I fix this error?

    Different question:

    I don't understand if I have to use the Queue.c and Device.c file that are in the template ? I have a device that is connected to my PC, I don't need to create one.(am I right ?). And also I'm the only one communicating to this board and I send one message at a time(wait for the message to be send, then send a new one) so I don't need the Queue file?

    The template look a git complicated and what I'm trying to do seems simpler. So here is what I have understand so far after days on the web: I use setupapi.h to find all connected usb devices, iterate over them find the path to the one I need, open a serial port, createFile, WriteFile, close the port and I'm done. Am I missing some steps? Do I need to have the DeviceEntry?

    I know my question are a bit confusing and a lot, sorry about that :(. But any help, clarification, example or recommendation of a good book or website is welcomed.

    Thanks

    Thursday, July 28, 2016 12:21 PM

All replies

  • So, is your device a USB modem? Does it comply to the USB CDC spec? Can you tell more about your OS/X driver, to which device class it belongs? What exactly means  "write to a address inside the board" in context of USB modem?

    -- pa

    Thursday, July 28, 2016 1:37 PM
  • Sorry, but I think I misunderstood what I was supposed to do. 

    Here is my real question: 

    It is a controller for a switching board(the only thing the board does is send signals to a hardware) that is connected throw a usb cable with a Windows 7 64-bits. 

    Here is what I did on Mac and it worked so now I have to do the same thing on Windows : https://developer.apple.com/library/mac/samplecode/SerialPortSample/Listings/SerialPortSample_SerialPortSample_c.html.

    I find the device using the code I posted before and for sending messages I use CreateFile, WriteFile.

    But what I don't know is how can I open a serial port so that I can talk to the device(like in openSerialPort(const char *bsdPath)) ?

    I can use the WDK 10  with Windows 7, right ?

    Thanks


    • Edited by sadasir Thursday, July 28, 2016 1:55 PM
    Thursday, July 28, 2016 1:54 PM
  • Yes you can use the Windows 10 WDK to create code for Windows 7.   On your question on Device.c you are confusing the hardware device (i.e. you USB device) with the DEVICE_OBJECT that Windows needs to talk to a device.   So yes you need Device.c and Queue.c or at least the code that is in them.  As Pavel asked does your device comply with the USB CDC spec?   If not you have a lot of work to do.


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Thursday, July 28, 2016 3:33 PM
  • In Windows the concept is very similar. And you even do not need WDK, it is part of the usual SDK.

    Please see here and  here for example. Device setup class is like "service class" in Darwin; DeviceInfoSet is like IOKit collection, and instead of "iterators" you call SetupDiEnumDeviceInfo with a running index value.

    -- pa

    Thursday, July 28, 2016 3:48 PM
  • does your device comply with the USB CDC spec?  

    Yes

    You are right I confused the hardware device with the device object. Thanks door the clarification.


    • Edited by sadasir Thursday, July 28, 2016 6:07 PM
    Thursday, July 28, 2016 6:07 PM
  • Thanks Pavel A. That helped
    Thursday, July 28, 2016 6:09 PM