Cannot View Serial Monitor

Status
Not open for further replies.

conklijo

New member
The problem that I am having is that when I try to run a simple program like "HelloWorld" in the Arduino IDE, it displays 'Serial port COM 27' not found. So I check my Device Manager and the teensy is showing up as "Unknown Device". So it must be a missing driver. I rerun teensyduino.exe and it says "USB Serial driver is installed". I also installed the Windows Serial Installer and it says it is already installed. As a last effort I uninstalled all of the arduino and teensy applications and tried to start over. Same result as before...

So any ideas?

Also I am able to load a program fine. I tested this with the blinking program among others.

Specs:
Teensy++2.0
Windows 7 x64
Arduino 1.0.4
(please let me know if any other information would be helpful)

Any pointers are greatly appreciated! Thanks in advanced!

(EDIT: I also installed everything on a different computer and the serial monitor worked fine, so it must be something wrong with the computer but I'm not sure where to look)
 
Last edited:
Ugh, Windows.

When the installer says the driver is installed, that really means an INF file has been installed into Windows which tells it to use a driver when the device appears. The actual driver is part of Windows (or should be, unless you have a very special stripped-down Windows install which doesn't have all the default stuff), but the driver doesn't load for your device until the INF file tell it to load.

So at this point, you want to get the New Hardware Wizard to run again, so it will read that INF and start using the driver. How exactly you do this is a good question. Windows is weird like that. Perhaps in the device manager use "update driver" (the installer tries to do this, but obviously it didn't work). Another possibility is simply unplugging the USB cable and plugging it back in, perhaps to different USB ports (Windows keeps separate registry entries for each port).

Just keep an eye on the device manager. When the driver loads properly, you'll see the unknown device become a USB serial communication class device, abstract control model.
 
Thanks for the quick response!

I got the New Hardware Wizard to run a couple times and it always says "Unidentified Device No driver found". The computer that it works on says it is using the usbser.sys driver file, which is also installed on the computer its not working on. I'm kind of running out of time to keep mess around with this but it is really bothering me. Is it possible that teensyduino application thinks that the .inf file is installed but it is not? In my arduino folder there is an arduino.inf but I do not see a teensy.inf? Could you possibly give an insight as to where the inf file for the teensy is installed at?
 
Is it possible that teensyduino application thinks that the .inf file is installed but it is not?

Well, Teensyduino is using the WIN32 function SetupCopyOEMInf, so really this question could be asked, is it possible the Windows SetupCopyOEMInf is returning true, indicating the file is installed but it isn't?

The sad part is I just don't know. Windows is really difficult like this. Individual Windows machines seem to get have all sorts of strange problems that are difficult to understand. The worst part is almost everyone fixes them by randomly trying stuff. On Linux far more things go wrong, but solving them usually involves digging into config files and developing a solid understanding of exactly what's wrong and why (which really helps long-term). But with Windows, I almost never hear what actually caused a problem like this.

In my arduino folder there is an arduino.inf but I do not see a teensy.inf? Could you possibly give an insight as to where the inf file for the teensy is installed at?

Here is a copy of the INF. I had to change it to .txt to post here, so just rename it back to .inf.

So far, I've never heard of manually installing the INF working where the installer failed, but who knows, maybe this will help? Please let me know if you ever do get to the bottom of what's wrong with the Windows install.
 

Attachments

  • cdc_acm_class.txt
    1.1 KB · Views: 280
Fixed missing Port

On my Windows 7 machine the Teensy 3.2 port was suddenly gone.
Unplugging and pugging in the USB cable did not fix the problem. Restarting Arduino IDE did not fix it either

I 'fixed' this by
i) removing the teensy dir under Arduino hardware
ii) re-installing teensy add on
iii) moving to a different USB port
iv) run Compile Verify on a sketch
v) press the board program button -> code uploaded to board
then windows started installing USB driver and port now available.

Actually this is the code that I added to my SD logging program killed the USB serial
Not sure why?

Code:
void yield() {
  // Only count cardBusy time.
  if (!sdBusy()) {
    return;
  }
  uint32_t m = micros();
  yieldCalls++;
//  while (sdBusy()) {
//    // Do something here.
//  }
  m = micros() - m;
  if (m > yieldMaxUsec) {
    yieldMaxUsec = m;
  }
  yieldMicros += m;
}
 
Last edited by a moderator:
It seems my Teensy under Win 7 got lost a time or two - in that case it came back after programming a second Teensy somehow. Sometimes just changing the USB port used was enough. I never had to do anything dramatic like uninstall or reinstall. Unless you had some install corruption. Been using Win 10 for years since and not seen such things.

That isn't a full sketch - just a yield() replacement for some instrumentation - so not sure what else the sketch is doing?

If anything confuses/breaks the USB operation within the Teensy - it won't present a consistent valid interface and Windows can get confused/mad about that - more so under Win 7 IIRC.
 
Actually this is the code that I added to my SD logging program killed the USB serial
Not sure why?

I don't know why either, though I suspect it had nothing to do with the specific code.

But if you want anyone to give it a try on Windows 7 to see if it happens again, you'll need to provide a complete program to copy into Arduino and upload to a Teensy.


I 'fixed' this by
i) removing the teensy dir under Arduino hardware
ii) re-installing teensy add on
iii) moving to a different USB port
iv) run Compile Verify on a sketch
v) press the board program button -> code uploaded to board
then windows started installing USB driver and port now available.

Very likely those first 2 steps had no influence.

Rebooting your PC probably also would have solved the problem.

Perhaps unrelated, but maybe worth mentioning, there's a known bug in Windows 7 where USB Serial fails to work the *next* time you use it, if you have unplugged the cable or pressed the button on Teensy while the serial monitor or any other program has the COM port open. Normally this isn't an issue, because Arduino closes the serial monitor when you click Upload. But if you press the button on Teensy, or unplug the cable, while the COM port is open, you'll hit this very confusing Windows 7 driver bug. It's hard to understand because problems manifest later, the next time Teensy appears.

Microsoft fixed that bug in Windows 10, so it's only an issue if you use an older version of Windows like 7, 8 or XP. Windows 10 also fixed a number of minor USB issues, especially slowness in detecting certain types of USB composite devices. I personally hope we will soon see the day when Windows 7 usage drops as low as Vista.
 
in January 2020, Microsoft will end support for Windows 7

With a downloaded Win 10 ISO on 8GB USB FLASH - and a fresh hard drive - Windows 10 will install and license on a machine that shows up in MSFT database (?) as having had Windows 7 or Windows 8. If it was PRO - you get Pro - if not you get Home.
 
Status
Not open for further replies.
Back
Top