Для перезагрузки модема, можно использовать эту прогу
http://www.filehoster.ru/files/ep1439 Вот её исходник на языке PureBasic
Код: InitNetwork()
Procedure.s SendModemData(Connect, Command.s)
Protected Result.s="", Count=0, x
Command=Command+Chr(13)+Chr(10)
SendNetworkData(Connect, @Command, Len(Command))
Repeat
Delay(20)
If NetworkClientEvent(Connect)=#PB_NetworkEvent_Data
*mem=AllocateMemory(10000)
If *mem
ReceiveNetworkData(Connect,*mem,10000)
In.s=PeekS(*mem)
FreeMemory(*mem)
Result=Result+In
EndIf
EndIf
Count+1
Until Count>=40
ProcedureReturn Result
EndProcedure
Connect=OpenNetworkConnection("192.168.1.1", 23)
If Connect
Delay(50)
SendModemData(Connect, "admin")
SendModemData(Connect, "admin")
Delay(400)
SendModemData(Connect, "reboot")
Delay(1000)
CloseNetworkConnection(Connect)
EndIf