# Solved: Visual C# Serial Port - Semaphore Timeout



## jfm429 (Jun 8, 2007)

I am trying to connect to a serial device. The sp.Open() method throws these two exceptions in the Output window:

The semaphore timeout period has expired
A first chance exception of type 'System.IO.IOException' occurred in System.dll

What's going on here? I'm running Windows 7, and using the exact same code that was already tested and worked perfectly on Windows XP. No code changed, and the hardware is identical - just the OS changed.


----------



## dock98 (Jun 1, 2007)

are you sure the device is supported by windows 7?


----------



## aya09 (Oct 16, 2009)

I'm also having problem sharing and setting up adhoc network in Windows 7. You may try checking out the Adapter properties
like what I do everytime I had problem in network.


----------



## jfm429 (Jun 8, 2007)

dock98 said:


> are you sure the device is supported by windows 7?


I think so. It's a very recent Bluetooth chip that WIndows 7 automatically found drivers for, so it (should) be compatible. However, I also read on Google that the semaphore timeout error can actually be related to a hard drive read/write error, and that deleting the errant file can solve the problem? I have no idea where to look for this error, so I can't say if it's the problem or not. See http://forums.techarena.in/windows-server-help/803210.htm for more info on that.


----------



## jfm429 (Jun 8, 2007)

Solved. Turns out the Bluetooth device was faulty.

Seriously. A brand-new $850 robot with a faulty Bluetooth chip. Go figure.


----------

