mCore™ .NET SMS Library 1.2

mCore.SMS.Manufacturer Property

Description:

The Manufacturer property gets the manufacturer name of the GSM Modem or Phone as a string. In certain cases it returns the chipset manufacturer name which may be different from the manufacturer label printed on the modem or its packaging. Returns blank string if the modem does not support reading of manufacturer information.

Namespace: mCore
Assembly: mCoreLib (in mCoreLib.dll)

Exceptions:

mCore.GeneralException

Usage Example:

Visual Basic
Public Class MyClass
   Public WithEvents objSMS As New mCore.SMS
   Public Sub ModemInformation()
      Try
         SetCommParameters()

         ' It is not necessary to execute the 'Connect' method.
         ' Connection state is detected internally by mCore and
         ' the 'Connect' method is executed accordingly.
         objSMS.Connect()

         Console.WriteLine("******************************")
         Console.WriteLine(" MODEM INFORMATION")
         Console.WriteLine("******************************")
         Console.WriteLine(" Manufacturer: " & objSMS.Manufacturer)
         Console.WriteLine(" Model: " & objSMS.Model)
         Console.WriteLine(" Firmare Rev: " & objSMS.Revision)
         Console.WriteLine(" IMEI: " & objSMS.IMEI)
         Console.WriteLine(" IMSI: " & objSMS.IMSI)
         Console.WriteLine(" Battery Level: " & objSMS.BatteryLevel.ToString())
         Console.WriteLine(" Phone No.: " & objSMS.OwnNumber)

      Catch ex As mCore.GeneralException
         Console.WriteLine(ex.Message)
      Catch ex As Exception
      End Try
   End Sub

   Public Sub SetCommParameters()
      Try
         objSMS.Port = "COM1"
         objSMS.BaudRate = mCore.BaudRate.BaudRate_19200
         objSMS.DataBits = mCore.DataBits.Eight
         objSMS.StopBits = mCore.StopBits.One
         objSMS.Parity = mCore.Parity.None
         objSMS.FlowControl = mCore.FlowControl.RTS_CTS

      Catch ex As mCore.GeneralException
         Console.WriteLine(ex.Message)
      Catch ex As Exception
      End Try
   End Function
End Class

 
C#
class MyClass
{
   public mCore.SMS objSMS = new mCore.SMS();
   public static void ModemInformation()
   {
      try
      {

         SetCommParameters();

         // It is not necessary to execute the 'Connect' method.
         // Connection state is detected internally by mCore and
         // the 'Connect' method is executed accordingly.
         objSMS.Connect();

         Console.WriteLine("******************************");
         Console.WriteLine(" MODEM INFORMATION");
         Console.WriteLine("******************************");
         Console.WriteLine(" Manufacturer: " + objSMS.Manufacturer);
         Console.WriteLine(" Model: " + objSMS.Model);
         Console.WriteLine(" Firmare Rev: " + objSMS.Revision);
         Console.WriteLine(" IMEI: " + objSMS.IMEI);
         Console.WriteLine(" IMSI: " + objSMS.IMSI);
         Console.WriteLine(" Battery Level: " + objSMS.BatteryLevel.ToString());
         Console.WriteLine(" Phone No.: " + objSMS.OwnNumber);
      }

      catch (mCore.GeneralException e)
      {
         Console.WriteLine(e.ToString());
      }
      catch (Exception e)
      {
      }
   }

   public static void SetCommParameters()
   {
      try
      {
         objSMS.Port = "COM1";
         objSMS.BaudRate = mCore.BaudRate.BaudRate_19200;
         objSMS.DataBits = mCore.DataBits.Eight;
         objSMS.StopBits = mCore.StopBits.One;
         objSMS.Parity = mCore.Parity.None;
         objSMS.FlowControl = mCore.FlowControl.RTS_CTS;
      }

      catch (mCore.GeneralException e)
      {
         Console.WriteLine(e.ToString());
      }
      catch (Exception e)
      {
      }
   }
}

See Also:

mCore.SMS.Model
mCore.SMS.IMEI
mCore.SMS.Revision
mCore.SMS.OwnNumber
mCore.SMS.BatteryLevel
mCore.SMS.IMSI Property

 

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved