I have an application running on a Windows Embedded CE 6.0 device that establishes an internet connection via a GSM modem connected via SerialPort using port COM5. However if my application crashes and/or the device is turned off without properly disconnecting the GSM connection, I am unable to connect again when I turn the device back on, I get the error "Port unavailable, it may be in use by another program." The only way to solve this is too physically unplug the modem and cut the power, then plug everything back in and it works. However when we deploy these devices they will be installed in vehicles, and the modem cables etc will not be accessible to the driver to do this. So I need to be able to "free" the port and tell the device that it really isn't in use when this happens so that the GSM connection can be re-established. Is there anyway to do this? Are there any commands I can write to the serial port that will do this, or anything?