Author Topic: Cannot connect to USB virtual COM port  (Read 19756 times)

DanK

  • Member
  • ***
  • Posts: 2
Cannot connect to USB virtual COM port
« on: January 10, 2014, 11:28:31 am »
Hi,
On a recently purchased Arduino MEGA2560 R3 clone (Hiduino) board, I cannot connect to the virtual COM port its USB interface provides. The board appears to properly enumerate and a COM port is shown (in Windows Device Manager, USB View, USBDeview, Hyperterm, and any number of other applications that provide access to a PC serial port).

When attempting to open the COM port in Hyperterm, it reports
Quote
"Unable to open COMxx. Please check your port settings"
When attempting to open the COM port with the Win32 API function "CreateFile()", it fails and the "GetLastWin32Error()" function returns error code 2
Quote
"The system cannot find the file specified."
When attempting to open the COM port with .Net's SerialPort.Open(), the exception returns
Quote
"The port COMxx does not exist."

I do not have this problem with another Arduino MEGA2560 R3 board that I have.
In order to try to resolve this problem, I have uninstalled and re-installed the USB driver for this device. I have also used Atmel's Flip tool to reprogram the firmware into the ATmega16U2 USB microcontroller on the Hiduino board with the firmware delivered with the Arduino development environment, but the results are the same - a COM port enumerates but cannot be connected to with any application.
I have also confirmed that the ATmega2560 microcontroller is properly working by programming code into it via its ICSP programming port. I have measured the +5V and the +3.3V voltages with both USB power and external power and the voltages are correct. From what I can tell, everything on the board is functioning correctly except for the ability to connect to the virtual COM port it presents.

I am not a USB expert, but how is it that the USB communications can work correctly to apparently enumerate properly, reprogram the USB device via USB using DFU, but not provide the implemented CDC (virtual COM port) functionality?
The question I have is: Is this a hardware problem with this new board?

Thanks,
Dan

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Cannot connect to USB virtual COM port
« Reply #1 on: January 10, 2014, 04:30:15 pm »
Once a device has enumerated successfully, it must also successfully perform the communications needed to carry out its function, in this case, serial communications. A hardware protocol analyzer would show what is happening on the bus and might offer a clue. But since this appears to be an "off the shelf" product that you are just trying to use, have you tried contacting the device vendor or their support forum, etc.?

DanK

  • Member
  • ***
  • Posts: 2
Re: Cannot connect to USB virtual COM port
« Reply #2 on: January 14, 2014, 08:31:00 pm »
The device vendor suggested trying to use the board on another computer. Hooking the board up to a Windows 7 computer (the original computer was a Windows XP machine), it worked!!! Additionally, following that, it now works properly on the original computer. This really makes no sense!? I can't seem to make it fail anymore. I don't like problems that mysteriously go away!

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Cannot connect to USB virtual COM port
« Reply #3 on: January 15, 2014, 09:37:45 am »
Agree!

EagleWolf

  • Member
  • ***
  • Posts: 8
Re: Cannot connect to USB virtual COM port
« Reply #4 on: January 16, 2014, 02:11:30 pm »
I think its more likely the handshaking lines that one side or the other was locking until it got the response it needed.
Once it got the response then the problem went away.