Adds a console to your Fez. On the Fez side, use with the CDC debugger port. On the PC side, connect to the virtual comm port. Create your own “DOS” commands on the fez and invoke them from the terminal. Create your own scripting environment. Or just use as a debug or configuration tool.
Any chance you’ll port this to the FEZ Cerb family? I realize that we can’t do CDC with debugging, but we can do CDC, right? Is FezTermHost.WriteMessage simply another debug output? I’m looking for a quick and dirty way to get a Cerb40 up and running as an I/O board to read button and keyswitch inputs and output light control via a relay board. Later I’d like to add things such as basic serial printer and bill acceptor support, maybe some pots to control volume, brightness, etc., but my immediate need is simply to receive input states and post output states between the Cerb and the PC.
As far as I found out, you get two serial channels over one USB connection, so debugging and serial comand line interface would work with only one USB connection. quite perfect for the use with G400HDR.
I don’t want to replace the Debugger, I want to use the USB Connection I use for Debugging as an ordinary Serial line to have a command line Interface for my app. You described something like that in the commebt of this code, or did I misunderstood something completely?
With best regards
Gerhard
PS: Here is the text I found and pointed to:
///
/// Start the CDC (virtual comm) port on the current debug session.
/// This will stop the current session and restart with a new driver which will create the dual channel.
/// To reattach debugger channel, you need to hit “Break All” and then Continue. You should then have
/// a new V-Comm port on the PC and a comm port on the fez.
///
private void InitCDC()
{
Debug.Print(“Hit Break All in VS to reattach debugger to port, then Run Continue.”);
port = USBClientController.StandardDevices.StartCDC_WithDebugging();
port.ReadTimeout = -1; // Block waiting for chars.
while (true)
{
if (USBClientController.GetState() != USBClientController.State.Running)
{
Debug.Print("waiting to connect.");
Thread.Sleep(600);
… sorry, just surfing around and checking out whats already there and can fit my needs. Dont want to invent the wheel again.
Ok, no problem, there will another solution for that.