Make USB virtual COM device persistent through reboots

4

EDIT: Having rethought the issue, perhaps my question can be summarized like this: Is there an existing COM terminal type program that will automatically detect when a COM port becomes unavailable and reconnect when it becomes available?

I have an embedded control that uses a STM32 Microcontroller which uses its USB port to communicate with the computer as a 'virtual COM port'. I am currently running a cycle test where the control is automatically cycled on for 5 minutes and off for 10 seconds. This is to catch an error that will appear every 50-200 restarts.

The device is already outputting debug messages through the Virtual COM Port, but when the device restarts, the USB device disconnects and reconnects. Then whatever program I was using to monitor the output (putty, Tera Term, etc.) loses connectivity and I must manually unplug and replug the USB cable and restart whatever COM application I am using.

My goal is to set up Tera Term or putty to keep the COM port open and just write the entire session to a log file, but because of the restart the USB device isn't persistent.

Is there any way that I can 'virtualize' the USB port or modify the .ini file in anyway to make the USB port persistent? Here is what I believe is the relevant section of the .ini file

[USBtoSer.nt.Services] 
AddService=usbser, 0x00000002, DriverService

[DriverService] 
DisplayName=%USBIOMport% 
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\usbser.sys 

I cannot modify the embedded application running on the STM32 and can only interact with it through a pre-programmed terminal via the USB

EDIT: Here is a link to information from Microsoft that explains what the above does. I haven't had any luck determining which change would work for my application, so I may start trial and error with different ErrorControl and StartType (though from what I read, I hardly doubt they will solve my issue)

windows
usb
drivers
putty
serial
asked on Super User Apr 9, 2014 by StephenH • edited Apr 9, 2014 by StephenH

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0