I have some modems that needs to restart sometimes. I can detect when
and can do programmaticaly the routine to restart them. All I need now
is to stop the gateway that manages the modem (including the COM port
used). I do something like this:

{
gateway.stopGateway();
sleep some seconds...
com1.Stop();
sleep some seconds...

connect to com port with languaje library (C#) and perform modem
restart routine (CFUN......)
sleep some seconds...

com1 = new Comm2IP.Comm2IP(new byte[] { 127, 0, 0, 1 },
portConfig.IpPort, "comX",
comThread = new Thread(new ThreadStart(com1.Run));
comThread.Start();
sleep some seconds...
gateway.startGateway();
}

But this doesn't work always. Sometimes I get some IOException, or the
gateway can't start properly. I have to shutdown my program and run it
again and then the gateway starts correctly. I think I should be doing
something whit the Service object. I have 3 or 4 gateways up and they
should keep working while I restart one of them.

What is the proper routine to restart a gateway (and do some extra
things in between).


-- 
You received this message because you are subscribed to the Google Groups 
"SMSLib Discussion Group" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/smslib?hl=en.

Reply via email to