Class Modem

Hierarchy

  • Modem

Methods

  • Creates a new Modem object. Typically Modem objects will be created automatically when a ModemManager object is instantiated. They can be accessed from modems

    Returns

    A Promise containing a Modem object found using objectPath

    Parameters

    • bus: DBusConnection

      A DBus system bus instance (ie dbus.getBus('system')), a single bus instance should be used for all objects created with this library.

    • objectPath: string

      A modem object path (ie "/org/freedesktop/ModemManager1/Modem/0").

    Returns Promise<Modem>

  • Returns void

  • Requires root access, depending on user permissions and ModemManager policy configuration.

    Send an arbitrary AT command to a modem and get the response. Note that using this interface call is only allowed when running ModemManager in debug mode, or if the ModemManager was built using the with-at-command-via-dbus configure option.

    Returns

    Promise of the modem's response

    Parameters

    • cmd: string

      String: The command string, e.g. "AT+GCAP" or "+GCAP" (leading AT is inserted if necessary)

    • timeout: number = 5

      optional - Integer: The number of seconds to wait for a response. Defaults to 5.

    Returns Promise<unknown>

  • Create a new packet data bearer using the given characteristics. This request may fail if the modem does not support additional bearers, if too many bearers are already defined, or if properties are invalid. The properties allowed are any of the ones defined in the bearer properties.

    Returns

    Promise of the new Bearer object, or null on a failure

    Parameters

    • bearerProperties: Partial<BearerProperties>

      Object: Dictionary of properties needed to get the bearer connected

    Returns Promise<Bearer>

  • Returns void

  • Returns

    a Promise containing a new AdvancedSignal interface for the Modem

    Returns Promise<undefined | AdvancedSignal>

  • Returns

    a Promise containing a new Location interface for the Modem

    Returns Promise<undefined | Location>

  • Returns

    a Promise containing a new Modem3gpp interface for the Modem

    Returns Promise<undefined | Modem3gpp>

Properties

_advancedSignal: undefined | AdvancedSignal
_bearers: Bearer[]
_bus: DBusConnection
_location: undefined | Location
_modem3gpp: undefined | Modem3gpp
_modemInterface: DBusInterface<AnyInterfaceMethod>
_objectPath: string
_properties: ModemProperties
_propertiesInterface: DBusInterface<AnyInterfaceMethod>
_propertiesSubject: BehaviorSubject<ModemProperties>
_sim: null | Sim
properties$: Observable<ModemProperties>

An RxJS observable for the Modems properties. Properties are updated by listening to the org.freedesktop.DBus.Properties PropertiesChanged signal

Accessors

  • get bearers(): Bearer[]
  • An array of Bearers for the Modem

    Returns Bearer[]

  • get prettyProperties(): any
  • The current properties for the Modem, but translates the enums and reformats some fields to be more human readable.

    Returns any

  • get sim(): null | Sim
  • The primary Sim object for the Modem

    Returns null | Sim

Constructors

  • Parameters

    • bus: DBusConnection
    • objectPath: string
    • sim: null | Sim
    • bearers: Bearer[]
    • modemInterface: DBusInterface<AnyInterfaceMethod>
    • propertiesInterface: DBusInterface<AnyInterfaceMethod>
    • initialProperties: any

    Returns Modem

Generated using TypeDoc