Show / Hide Table of Contents

    Class SIM800H

    Class with methods, properties and events to work with a SIM800H module.

    Inheritance
    System.Object
    SIM800H
    Implements
    System.IDisposable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Eclo.nF.SIM800H
    Assembly: cs.temp.dll.dll
    Syntax
    public class SIM800H : IDisposable

    Fields

    AccessPointConfiguration

    GPRS access point configuration (APN)

    note

    This APN configuration is used in HTTP calls, SNTP and other IP applications. For MMS set MmsAccessPointConfiguration.

    Declaration
    public static AccessPointConfiguration AccessPointConfiguration
    Field Value
    Type Description
    AccessPointConfiguration

    MmsAccessPointConfiguration

    Access point configuration (APN) for MMS

    note

    This APN configuration is used exclusively for MMS send. For other IP applications set AccessPointConfiguration.

    Declaration
    public static AccessPointConfiguration MmsAccessPointConfiguration
    Field Value
    Type Description
    AccessPointConfiguration

    Properties

    FileStorage

    FileStorage property with all the methods required to access the internal file storage

    Declaration
    public static FileStorage FileStorage { get; set; }
    Property Value
    Type Description
    FileStorage

    GprsIpAppsBearerIsOpen

    Status of IP apps bearer in profile 1 of GPRS context

    Declaration
    public static bool GprsIpAppsBearerIsOpen { get; }
    Property Value
    Type Description
    System.Boolean

    GprsMmsBearerIsOpen

    Status of MMS bearer in profile 2 of GPRS context

    Declaration
    public static bool GprsMmsBearerIsOpen { get; }
    Property Value
    Type Description
    System.Boolean

    GprsNetworkRegistration

    GPRS network registration state of module

    Declaration
    public static NetworkRegistrationState GprsNetworkRegistration { get; }
    Property Value
    Type Description
    NetworkRegistrationState

    GprsProvider

    GprsProvider property with all the methods required to use the GPRS features

    Declaration
    public static GprsProvider GprsProvider { get; set; }
    Property Value
    Type Description
    GprsProvider

    GprsSocketsBearerIsOpen

    Status of sockets bearer in profile 0 of GPRS context

    Declaration
    public static bool GprsSocketsBearerIsOpen { get; }
    Property Value
    Type Description
    System.Boolean

    GsmNetworkRegistration

    GSM network registration state of module

    Declaration
    public static NetworkRegistrationState GsmNetworkRegistration { get; }
    Property Value
    Type Description
    NetworkRegistrationState

    HttpClient

    HttpClient property with all the methods required to perform HTTP requests

    Declaration
    public static HttpClient HttpClient { get; set; }
    Property Value
    Type Description
    HttpClient

    IMEI

    Retrieves the device's IMEI

    Declaration
    public static string IMEI { get; }
    Property Value
    Type Description
    System.String

    IMEI of the device

    IpAddress

    IP address of module

    Declaration
    public static string IpAddress { get; }
    Property Value
    Type Description
    System.String

    MaxSockets

    Maximum number of sockets supported. SIM800H module supports up to 6. When setting this properties, any existing socket will be closed and becomes unavailable.

    Declaration
    public static int MaxSockets { get; set; }
    Property Value
    Type Description
    System.Int32

    MmsClient

    MmsClient property with all the methods required to use the MMS (Multimedia Messaging Service) client

    Declaration
    public static MmsClient MmsClient { get; set; }
    Property Value
    Type Description
    MmsClient

    MmsConfiguration

    MMS center configuration

    Declaration
    public static MmsConfiguration MmsConfiguration { get; set; }
    Property Value
    Type Description
    MmsConfiguration

    ModelIdentification

    Module model identification

    Declaration
    public string ModelIdentification { get; }
    Property Value
    Type Description
    System.String

    PowerStatus

    Power status of SIM800H device

    Declaration
    public static PowerStatus PowerStatus { get; }
    Property Value
    Type Description
    PowerStatus

    SerialInterfaceBaudRate

    Retrieves baud rate for serial interface

    Declaration
    public int SerialInterfaceBaudRate { get; }
    Property Value
    Type Description
    System.Int32

    An integer with the serial port baud rate (-1 when this command couldn't be executed)

    SIMCardStatus

    Get SIM card status

    Declaration
    public SimCardStatus SIMCardStatus { get; }
    Property Value
    Type Description
    SimCardStatus

    SIMCardStatus

    SmsProvider

    SmsProvider property with all the methods required to send SMS (text) messages

    Declaration
    public static SmsProvider SmsProvider { get; set; }
    Property Value
    Type Description
    SmsProvider

    SmsStatusReport

    Enable Sms status report

    Declaration
    public bool SmsStatusReport { set; }
    Property Value
    Type Description
    System.Boolean

    SntpClient

    SntpClient property with all the methods required to user the SNTP (Simple Network Time Protocol) client

    Declaration
    public static SntpClient SntpClient { get; set; }
    Property Value
    Type Description
    SntpClient

    SoftwareRelease

    Module software release

    Declaration
    public static string SoftwareRelease { get; }
    Property Value
    Type Description
    System.String

    SupplyVoltage

    Retrieves supply voltage.

    Declaration
    public static ushort SupplyVoltage { get; }
    Property Value
    Type Description
    System.UInt16

    Supply voltage in mV

    Methods

    Configure(Devices.Gpio.GpioPin, ref SerialDevice)

    Configure hardware interface with the device.

    Declaration
    public static void Configure(Devices.Gpio.GpioPin powerKey, ref SerialDevice serialPort)
    Parameters
    Type Name Description
    Windows.Devices.Gpio.GpioPin powerKey

    The I/O signal that will be used to control the device's power key

    SerialDevice serialPort

    The serial port that will be used to comunicate with the device

    Dispose()

    Declaration
    public void Dispose()

    Finalize()

    Declaration
    protected void Finalize()

    GetDateTime()

    Retrieves date time from device's clock. For correct date time the clock must be set either programatically or using SNTP service

    Declaration
    public static DateTime GetDateTime()
    Returns
    Type Description
    System.DateTime

    Date time from device's clock

    GetTimeAndLocation(Boolean)

    Retrieves time and optionally location of the device, as reported by the time and location service. Needs to have GPRS connection active.

    Declaration
    public static LocationAndTime GetTimeAndLocation(bool getLocation = true)
    Parameters
    Type Name Description
    System.Boolean getLocation

    True to return also the location of the device.

    Returns
    Type Description
    LocationAndTime

    The device's time and location

    OnCallReady()

    Raises the CallReady event.

    Declaration
    protected static void OnCallReady()

    OnGprsNetworkRegistrationChanged(NetworkRegistrationState)

    Raises the GprsNetworkRegistrationChanged event.

    Declaration
    protected virtual void OnGprsNetworkRegistrationChanged(NetworkRegistrationState networkState)
    Parameters
    Type Name Description
    NetworkRegistrationState networkState

    Current state of the GPRS network registration

    OnGsmNetworkRegistrationChanged(NetworkRegistrationState)

    Raises the GsmNetworkRegistrationChanged event.

    Declaration
    protected virtual void OnGsmNetworkRegistrationChanged(NetworkRegistrationState networkState)
    Parameters
    Type Name Description
    NetworkRegistrationState networkState

    Current state of the GSM network registration

    OnPowerStatusChanged(PowerStatus)

    Raises the PowerStatusChanged event.

    Declaration
    protected virtual void OnPowerStatusChanged(PowerStatus powerStatus)
    Parameters
    Type Name Description
    PowerStatus powerStatus

    new power status of the device

    OnSimCardStatusChanged(SimCardStatus)

    Raises the SimCardStatusChanged event.

    Declaration
    protected virtual void OnSimCardStatusChanged(SimCardStatus simCardStatus)
    Parameters
    Type Name Description
    SimCardStatus simCardStatus

    new status of the SIM card

    OnSmsReady()

    Raises the SmsReady event.

    Declaration
    protected virtual void OnSmsReady()

    OnSmsSentReferenceReceived(Int32)

    Raises the SmsSentReferenceReceived event.

    Declaration
    protected virtual void OnSmsSentReferenceReceived(int reference)
    Parameters
    Type Name Description
    System.Int32 reference

    reference of the Sms sent

    OnWarningConditionTriggered(WarningCondition)

    Raises the WarningConditionTriggered event.

    Declaration
    protected virtual void OnWarningConditionTriggered(WarningCondition warningCondition)
    Parameters
    Type Name Description
    WarningCondition warningCondition

    The warning condition that was triggered

    PowerOff()

    Powers off the SIM800H module

    Declaration
    public static void PowerOff()

    PowerOnAsync(AsyncCallback, Object)

    Starts an asynchronous operation to run the power on sequence

    Declaration
    public static PowerOnAsyncResult PowerOnAsync(AsyncCallback asyncCallback = null, object asyncState = null)
    Parameters
    Type Name Description
    System.AsyncCallback asyncCallback

    The callback to be invoked upon completion, optional

    System.Object asyncState

    The state object to be stored against the ReadMessageAsyncResult, optional

    Returns
    Type Description
    PowerOnAsyncResult

    The PowerSatus result of the power on sequence

    RetrieveOperator()

    Retrieves the operator wich the device is registered to

    Declaration
    public static string RetrieveOperator()
    Returns
    Type Description
    System.String

    The operator which the device is registered to

    RetrievePinState()

    Retrieves the pin state of the SIM

    Declaration
    public static PinState RetrievePinState()
    Returns
    Type Description
    PinState

    An instance of PinState with the current state of the PIN

    RetrieveSignalStrength()

    Get the signal strength (RSSI) of the cellular network

    Declaration
    public static SignalStrength RetrieveSignalStrength()
    Returns
    Type Description
    SignalStrength

    An instance of SignalStrength which contains a representation of the strength of the network signal

    SetPhoneFuncionality(PhoneFuncionality, Boolean)

    Set phone funcionality

    Declaration
    public static AtCommandResult SetPhoneFuncionality(PhoneFuncionality mode, bool resetBeforeChange = false)
    Parameters
    Type Name Description
    PhoneFuncionality mode

    See phone funcionality options

    System.Boolean resetBeforeChange

    True to reset device before changes are made effective

    Returns
    Type Description
    AtCommandResult

    returns ATCommandResult

    Events

    CallReady

    Event raised when the device reports that is ready for calls.

    Declaration
    public static event SIM800H.CallReadyHandler CallReady
    Event Type
    Type Description
    SIM800H.CallReadyHandler

    GprsNetworkRegistrationChanged

    Event raised when the status of the GPRS registration changes.

    Declaration
    public static event SIM800H.GprsNetworkRegistrationChangedHandler GprsNetworkRegistrationChanged
    Event Type
    Type Description
    SIM800H.GprsNetworkRegistrationChangedHandler

    GsmNetworkRegistrationChanged

    Event raised when the status of the GSM network registration changes.

    Declaration
    public static event SIM800H.GsmNetworkRegistrationChangedHandler GsmNetworkRegistrationChanged
    Event Type
    Type Description
    SIM800H.GsmNetworkRegistrationChangedHandler

    PowerStatusChanged

    Event raised when the power status of the device changes.

    Declaration
    public static event SIM800H.PowerStatusChangedHandler PowerStatusChanged
    Event Type
    Type Description
    SIM800H.PowerStatusChangedHandler

    SimCardStatusChanged

    Event raised when the status of the SIM card changes.

    Declaration
    public static event SIM800H.SimCardStatusChangedHandler SimCardStatusChanged
    Event Type
    Type Description
    SIM800H.SimCardStatusChangedHandler

    SmsReady

    Event raised when the device reports that the SMS features are ready.

    Declaration
    public static event SIM800H.SmsReadyHandler SmsReady
    Event Type
    Type Description
    SIM800H.SmsReadyHandler

    SmsSentReferenceReceived

    Event raised when the device receives a new SMS message.

    Declaration
    public static event SIM800H.SmsSentReferenceReceivedHandler SmsSentReferenceReceived
    Event Type
    Type Description
    SIM800H.SmsSentReferenceReceivedHandler

    WarningConditionTriggered

    Event raised when there is a warning condition reported by the device.

    Declaration
    public static event SIM800H.WarningConditionTriggeredHandler WarningConditionTriggered
    Event Type
    Type Description
    SIM800H.WarningConditionTriggeredHandler

    Implements

    System.IDisposable
    Back to top Copyright © 2018 Eclo Solutions
    Generated by DocFX