actually I've managed to connect the mobile phone and send sms with
NOKIA 5310. but, when I connect it back there is an error like the
following :

"java.net.SocketException: An existing connection was forcibly closed
by the remote host Error Code: 10054".

here is the code :

protected void testkoneksi_Click(object sender, EventArgs e)
        {
            Service srv;
            srv = Service.getInstance();

            Comm2IP.Comm2IP com1 = new Comm2IP.Comm2IP(new byte[]
{ 127, 0, 0, 1 }, 12000, "com7", 115200);

            try
            {

                new Thread(new ThreadStart(com1.Run)).Start();


                IPModemGateway gateway = new
IPModemGateway("modem.com7", "127.0.0.1", 12000, "Nokia", "5310");
 
gateway.setIpProtocol(ModemGateway.IPProtocols.BINARY);


                gateway.setProtocol(AGateway.Protocols.PDU);


                gateway.setInbound(true);


                gateway.setOutbound(true);


                gateway.setSimPin("0000");


                gateway.setSmscNumber("+25000000");


                srv.addGateway(gateway);

                srv.startService();


                infodevice.Text = " Pabrikan    : " +
gateway.getManufacturer().ToString();
                infodevice.Text += "\n Model    : " +
gateway.getModel().ToString();
                infodevice.Text += "\n Sinyal   : " +
gateway.getModel().ToString();
                infodevice.Text += "\n Battrey  : " +
gateway.getBatteryLevel().ToString() + " %";
            }
            catch (Exception f)
            {

                infodevice.Text = f.ToString();
            }
            finally
            {
                com1.Stop();
                srv.stopService();
            }
}

can anyone explain about this error ? thank you..

-- 
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