Windows desktop app (for have access to the data base)
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)
Questions:
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 )
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 )
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 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.
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
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.
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?
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 … then how do we help you after you do that?
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.
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?
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
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?