USB / Virtual serial port

Hello,

I developped a computer based system and I would like to put some functionalities directly on the hardware. I think your FEZ domino will do the job for the dev and I’ll will have to move on something more powerfull like EMX because I need TFT touchscreen. (I’m not crazy, no way to have a touch screen on fez…right?). But that was not my question just background info,

Today on my system, the device is connected to the host computer via USB but the PC recognised it as a virtual serial port which allow me to pass directly command to it using the IO.Ports lib. I saw that this librairy is available but is it possible to make fez recognised the USB as serial??? Just for information, the device is using FTDI chip to create the virtual serial port.

Thanks in advance.

In theory, you cam debug your device over serial port and then the USB port is free. Once it is free you can make FEZ emulate a mouse, mass storage, virtual com port and many more.
With standard NETMF services, you can almost do all that right now. But, it is not easy at all.

The good news is that GHI provides methods to configure the USB device very easily. For example, with couple lines of code, you can make FEZ’s USB device port become a virtual com port. Note that everything I am talking about here is for the USB device (client) not the USB host.

The bad new is that this awesome feature is not in the FEZ firmware yet. Should be added in the next month.

ok thanks for that. If I understood well Fez can be seen as a virtual serial port by the host computer via USB (that will be useful).
But unfortunately there is no way to connect a device directly to the fez via USB and access to it through a virtual com port (from Fez alone no PC connected). In that case I will have to change the hardware and find the same device with serial instead of USB in order to have the Fez driving the hardware. If your to do list is not to full I think it could be a good idea to see if it’s possible to add the FTDI drivers to the firmware because FTDI is the most deployed chip for virtual serial port via USB and many devices are using it as there is no more serial port on computer.

Another question, on the Fez domino you have a host USB, i understood you can connect and HID usb device (keyboard mouse etc ) & memory stick. Is that possible to connect other device type to the fez Domino?

Thanks in advance!

I am not sure what you need?! We already support FTDI in our drivers.
I can help you better if you tell me what you want to do.

  1. Are you trying to connect FEZ USB host to an FTDI device, like an FTDI RS232 cable? If so, yes you can do that right now. See documentation and book.
  2. Are you trying to connect FEZ USB client to a PC and you want the PC to see it as a serial device? If so, yes you can but this feature is not there yet. Will be in firmware next month

About your last question where you want to connect a FEZ Domino USB device port to another FEZ Domino USB host port, yes you can do that but why?!!! :confused:

arrgrr I just lost my post…

Thanks for the support. I realized that I’m not clear at all. I will try to explain what I would like to achieve. Please note that I don’t have the board I’ try to understand the capabilities before.

So, I have a .Net application using a USB RFID reader 13.56Mhz to read / write tag. Because the application is fairly simple and there is almost no user input I would like to move it to an embedded system. In order to save time I would like to keep the reader and then connect it directly to the host USB on FEZ. If I can do that I will convert and load my application to the board. All of that to be able to use the application + reader without a computer.

The functional process is the following:
1: Detect the RFID tag
2: Application read the tag
3 (optional): user select one option (3 in total)
4: Application update the RFID tag
5: application return success / failure (It will be a LED maybe with an LCD screen to give a message)

As you saw, it is a bit stupid to use a computer to do that. That is why I would like to use FEZ if it’s possible to command the RFID reader via the Host USB on FEZ.
Because you just told me before that FEZ can use the FTDI RS232 cable I think it is possible. I will go back to the documentation.

About the last question, forget about it I’m not trying or willing to connect 2 FEZ board, it was just to understand if for example you can connect a web cam etc…

I can wait now to buy your board. Thanks for your job. It is really cool now that .NET developers will be able to play with hardware without a computer.

Cheers

wooww I’m more that stupid. Sorry for wasting your Time I just double check the GHI doc and I don’t know how I missed the GHIElectronics.NETMF.USBHost, It is excatly what I need.

well done
Next time i’ll have a better look before asking a stupid question…!

Thanks again

No problem. We are here to help :slight_smile:

I can ping the FEZ Domino over the usb port, but the Tera Term from your website does not list a virtual serial port for the board. All that is listed in TeraTerm is the hardware Com1 on my pc. What am I missing or have overlooked?

bdrew:

Normally, the connection between the PC and the FEZ is via USB using the .NET debugging interface. In debugging mode, the FEZ will not appear as a COM port.

If you put the FEZ in bootloading mode, which is usually used for loading new firmware, the FEZ will appear as a COM port. See the e-book for instruction on how to load new firmware.

What I think you really want is the FEZ to appear as a COM port and be able to talk to your PC program. This feature will be coming from GHI soon. When this is available, you will have to move the debugging/program load functionality to a serial port.

I am trying to load the new firmware. I ping the board to see that I am talking to it using MFDeploy, then using TeraTerm I try to connect with the virtual serial channel to download the new firmware. I do not see anything but Com1 on my pc. What step am I missing?

Thanks.

You are missing the most important step…press LDR button on power up!

Please follow the documentation or the video…whichever easier for you.

Following docs will help you and help us from the extra unneeded work :slight_smile:

Just was not doing it in the right sequence. Thanks. I look forward to developing the software for my project.

Bernard

I have followed the video and documentation very closely. It does not seem to be repeatable. Sometime the virtual port is listed and sometimes it is not. When I did get a virtual port, I did get the new firmware downloaded!!

The good news is that you only have to update the firmware very rarely

Have you guys thought about just making a very simple program to load the firmware automatically? Would probably take less than 20 minutes in Visual C# or something. Jus ta simple form with file dialog an an upload. All the user would have to do is get the FEZ into the bootloader menu and then start the program ,browse for the firmware and hit the upgrade button.

Yes we thought about it and was also suggested by other customers. We will do it someday but now we are extremely busy.

By the way, he had problems with USB driver loading and so this has nothing to do with having a program or not.

When I loaded the new SDK to get the new math functions, I evidently replaced the bootloader driver or something else that was flaky. The hit and miss ability to download firmware has gone away. It works everytime now. I had almost memorized the tutorial on how to download new firmware.

Hi, I’m looking at using the FEZ board on a new project.
But I need to know if the USB host port on domino can deal with a multiple serial port devices, such as the FTDI FT4232H module. (ie. 4 x serial port via a single USB interface.)

Regards,

Jppx1967.

jppx1967, you have already asked this question B)

  1. your question is not related to this thread so start new thread for your question
  2. you already made new thread and we gave you an answer :wink:

I have just discovered the TinyCLR Wiki concerning UART-PC communication. To my delight it has provided the key to making the GHI USB serial module work for me on the FEZ Spider (I am totally inexperienced in such things). I thought it might be helpful to show other tyros how I got the Spider to send data to my PC running Realterm, via the USB serial module, quite fast (115200 baud), and with no hassle at all. I have attached a jpg of the program.cs and of the hardware.

Richard