Main Site Documentation

Make interfaz with Windows Desktop app and Fez Domino App Througth usb client port


I need to create two applications:

  1. Windows desktop app (for have access to the data base)
  2. Fez Domino App (to control the board components)

I have a fez domino board just as it was delivered from the factory (without any adicional card), i want to send data trough the usb cable from my windows application for the board itself to manage that information and execute the right action (i need to receive too information from the board).

In Example:

-The windows app send the data “open port 1” -> The board application receive the information and send a digital signal to the number 1 port.
-The windows app send a request to know if there is any digital sign on port one <- The board application returns the data informing if there is or there is digital sign (True or false)


  1. The comunications usb port included on the board is useful to me to execute that action? or which one must i use? ( I read the begginers guide but i dont understand how to configure it )

  2. How should i make the interfaz between the desktop application and the board application? I have not found yet any information about it. ( Example codes for send data from desktop app and how can i recieve it from Domino app )

Thank you very much.


You interface the PC to FEZ using USB or serial port.

Serial port…that is easy but you need to add minimal circuitry

USB port…that is also easy, thanks to out exclusive CDC class support (virtual serial port). The only problem is that you are using USB already for debugging so you can’t use it for CDC as well. You will need to do debugging on serial so you can use CDC in your application.
Read the ebook under USB Client section.

But, I have a trick. You can load your application over USB as usual (CDC application) and then connect a jumper on MODE pin and reset the board. The FEZ will reset in serial mode but you do not care about that. You care that the USB port is now free.

FEZ community, can someone make a tutorial on how to use USB for deploying and make CDC at the same time? 500 points if someone makes it happen and another 300 for nicely done video tutorial :wink: Your CDC application will be a commander that can be used to control the on-board LED using commands you send from terminal program to FEZ CDC virtual serial port.


That sounds like a challenge to me Gus! 800 points… mm - i likey!

Reading the docs, it says you cannot set the mode pin and use the LED port at the same time. If you do, you risk damage.


Good point Mark. This should be in the tutorial.

You can pull down using 1K resistor instead of connecting to ground and then you will be able to use the LED. Also explain that if they do not have 1K resistor then connect to ground but then they can NOT use this pin anymore in the application

…So, do I add 800 points? :wink:


Hello guys,

What is the best way to use the ports:

  1. Use the USB client port to interface with the PC or use it for debugging?
  2. Add a serial port to the board and use it to interface with the PC or use it for debugging?

What is the recommendation of you to make my programming easier?

Note: My desktop application will be on a laptop, I have no serial ports there.


Debugging on serial is slower than USB.

Once you have serial added, all you need is a jumper to switch the interfaces easily.


So, do you recommend i must add a serial port and use the USB client port for debugging and Serial port for the interface with the pc?


When needing to use the FEZ as a USB client I just use a little USB<->TTL Level serial adapter made by Parallax ($15) for debugging. It works great with the only disadvantage being having two USB cables hooked up. For your end application a USB connection is typically much easier for a user to set up than a serial.


Done, making the video now :slight_smile:



This is something I thought of a couple of days ago.
My solution was to try and enumerate the FEZ Domino
as a compound device. Use the debug endpoints as usual and add
one in endpoint and one out endpoint for cdc class.
I do have some USB background but never as a compound device.
What do you think?



It’s mentioned in the eBook SBD that they used to have this, however due to support issues (users doing things incorrectly and breaking stuff) they discontinued it.



do you think that with your video we can finally find the answer to our problem with the USB client port for debugging and for making the interface ( at same time ) from a PC Application to Fez Domino?


Too bad… Breaking stuff is part of the fun :slight_smile: .
Is it possible to add this functionality back?
I think its time to read the ebook. RTFM.


The problem with supporting both is that if you were to make any mistake, you will basically corrupt the registry and will never be able to get it to work afterwards :frowning: … then how do we help you after you do that? :slight_smile:

We will look into options soon.


Sorry Jorge, but you can use the USB client or you can use the USB debugger. You can’t have both in the one application.

One thing which really confuses me about the USB CDC driver is it seems to work more like a socket than a SerialPort. I would be nice if the CDC class supported all the normal methods and events available on a SerialPort.


Ok well the video is uploading, you can download the solution and schematic here: (link removed)

Video here:


Hi MarkH.

About your video I have 2 questions.

  1. What are you using for making the jumper in the mode pin? i have a new fez domino and the mode-pin are just two holes. Can you explain me or show me one picture?

  2. Can you show me a C# code example for doing the connectivity from a Windows desktop app to the fez domino board? In the video you use a pre-developed app for the connectivity but in my project i must do the desktop app from scratch and i do not understand how can i send data to domino and receive data back to my desktop app.

Could you show me an example in which the windows desktop application send a signal to the board to turn on one led, and inmediatly the board send back one signal notifying that the led is turned on to the desktop app.


You can just solder some male header pins onto the Fez in those two holes (check on the Fez product site - they have headers listed) and then connect Mark’s circuit to that.

For the second question, you just have to write an app that handles a serial connection. In the case of Mark’s SAMPLE program you just need to press a key, so in your app you just need to SEND a key. Search the internet for a simple serial c# app and learn a bit from that - we can’t teach you to fish if we just write the whole code for you :wink:


Hello Brett,

The Mark’s sample show how you can send data througth usb client… can you tell me what is the way for recieve data from usb client port to fez? some event for listening the usb client port?


Did you look at USB Client -> CDC in ebook?