Documentation
¶
Index ¶
- Constants
- type AudioFormat
- type Bearer
- type BearerIpConfig
- type BearerProperty
- type BearerStats
- type Call
- type CdmaBsLocation
- type CdmaProperty
- type CurrentLocation
- type EventProperties
- type FirmwareProperty
- type GpsNmeaLocation
- type GpsRawLocation
- type MMBearerAllowedAuth
- type MMBearerIpFamily
- type MMBearerIpMethod
- type MMBearerType
- type MMCallDirection
- type MMCallState
- type MMCallStateReason
- type MMCdmaActivationError
- type MMConnectionError
- type MMCoreError
- type MMFirmwareImageType
- type MMKernelPropertyAction
- type MMLoggingLevel
- type MMMessageError
- type MMMobileEquipmentError
- type MMModem3gppEpsUeModeOperation
- type MMModem3gppFacility
- func (f MMModem3gppFacility) BitmaskToSlice(bitmask uint32) (facilities []MMModem3gppFacility)
- func (f MMModem3gppFacility) GetAllFacilities() []MMModem3gppFacility
- func (f MMModem3gppFacility) SliceToBitmask(facilities []MMModem3gppFacility) (bitmask uint32)
- func (i MMModem3gppFacility) String() string
- type MMModem3gppNetworkAvailability
- type MMModem3gppRegistrationState
- type MMModem3gppSubscriptionState
- type MMModem3gppUssdSessionState
- type MMModemAccessTechnology
- func (t MMModemAccessTechnology) BitmaskToSlice(bitmask uint32) (technologies []MMModemAccessTechnology)
- func (t MMModemAccessTechnology) GetAllTechnologies() []MMModemAccessTechnology
- func (t MMModemAccessTechnology) SliceToBitmask(technologies []MMModemAccessTechnology) (bitmask uint32)
- func (i MMModemAccessTechnology) String() string
- type MMModemBand
- type MMModemCapability
- type MMModemCdmaActivationState
- type MMModemCdmaRegistrationState
- type MMModemCdmaRmProtocol
- type MMModemContactsStorage
- type MMModemFirmwareUpdateMethod
- func (fu MMModemFirmwareUpdateMethod) BitmaskToSlice(bitmask uint32) (ipFamilies []MMModemFirmwareUpdateMethod)
- func (fu MMModemFirmwareUpdateMethod) GetAllUpdateMethods() []MMModemFirmwareUpdateMethod
- func (fu MMModemFirmwareUpdateMethod) SliceToBitmask(updateMethods []MMModemFirmwareUpdateMethod) (bitmask uint32)
- func (i MMModemFirmwareUpdateMethod) String() string
- type MMModemLocationAssistanceDataType
- func (ad MMModemLocationAssistanceDataType) BitmaskToSlice(bitmask uint32) (data []MMModemLocationAssistanceDataType)
- func (ad MMModemLocationAssistanceDataType) GetAllAssistanceData() []MMModemLocationAssistanceDataType
- func (ad MMModemLocationAssistanceDataType) SliceToBitmask(data []MMModemLocationAssistanceDataType) (bitmask uint32)
- func (i MMModemLocationAssistanceDataType) String() string
- type MMModemLocationSource
- func (ls MMModemLocationSource) BitmaskToSlice(bitmask uint32) (sources []MMModemLocationSource)
- func (ls MMModemLocationSource) GetAllSources() []MMModemLocationSource
- func (ls MMModemLocationSource) SliceToBitmask(sources []MMModemLocationSource) (bitmask uint32)
- func (i MMModemLocationSource) String() string
- type MMModemLock
- type MMModemMode
- type MMModemPortType
- type MMModemPowerState
- type MMModemState
- type MMModemStateChangeReason
- type MMModemStateFailedReason
- type MMOmaFeature
- type MMOmaSessionState
- type MMOmaSessionStateFailedReason
- type MMOmaSessionType
- type MMSerialError
- type MMSignalPropertyType
- type MMSmsCdmaServiceCategory
- type MMSmsCdmaTeleserviceId
- type MMSmsDeliveryState
- type MMSmsPduType
- type MMSmsState
- type MMSmsStorage
- type MMSmsValidityType
- type Mode
- type Modem
- type Modem3gpp
- type ModemCdma
- type ModemFirmware
- type ModemLocation
- type ModemManager
- type ModemMessaging
- type ModemOma
- type ModemOmaInitiatedSession
- type ModemSignal
- type ModemSimple
- type ModemTime
- type ModemTimeZone
- type ModemVoice
- type Network3Gpp
- type NetworkScanResult
- type Pair
- type Port
- type RawPcoData
- type SignalProperty
- type Sim
- type SimpleProperties
- type SimpleStatus
- type Sms
- type ThreeGppLacCiLocation
- type UpdateSettingsProperty
- type Ussd
Constants ¶
const ( BearerInterface = ModemManagerInterface + ".Bearer" /* Methods */ BearerConnect = BearerInterface + ".Connect" BearerDisconnect = BearerInterface + ".Disconnect" /* Property */ BearerPropertyInterface = BearerInterface + ".Interface" // readable s BearerPropertyConnected = BearerInterface + ".Connected" // readable b BearerPropertySuspended = BearerInterface + ".Suspended" // readable b BearerPropertyIp4Config = BearerInterface + ".Ip4Config" // readable a{sv} BearerPropertyIp6Config = BearerInterface + ".Ip6Config" // readable a{sv} BearerPropertyStats = BearerInterface + ".Stats" // readable a{sv} BearerPropertyIpTimeout = BearerInterface + ".IpTimeout" // readable u BearerPropertyBearerType = BearerInterface + ".BearerType" // readable u BearerPropertyProperties = BearerInterface + ".Properties" // readable a{sv} )
Paths of methods and properties
const ( CallInterface = ModemManagerInterface + ".Call" /* Methods */ CallStart = CallInterface + ".Start" CallAccept = CallInterface + ".Accept" CallDeflect = CallInterface + ".Deflect" CallJoinMultiparty = CallInterface + ".JoinMultiparty" CallLeaveMultiparty = CallInterface + ".LeaveMultiparty" CallHangup = CallInterface + ".Hangup" CallSendDtmf = CallInterface + ".SendDtmf" /* Property */ CallPropertyState = CallInterface + ".State" // readable i CallPropertyStateReason = CallInterface + ".StateReason" // readable i CallPropertyDirection = CallInterface + ".Direction" // readable i CallPropertyNumber = CallInterface + ".Number" // readable s CallPropertyMultiparty = CallInterface + ".Multiparty" // readable b CallPropertyAudioPort = CallInterface + ".AudioPort" // readable s CallPropertyAudioFormat = CallInterface + ".AudioFormat" // readable a{sv} /* Signal */ CallSignalDtmfReceived = "DtmfReceived" CallSignalStateChanged = "StateChanged" )
Paths of methods and properties
const ( ModemInterface = ModemManagerInterface + ".Modem" /* Methods */ ModemEnable = ModemInterface + ".Enable" ModemDisable = ModemEnable // Deprecated ModemListBearers = ModemInterface + ".ListBearers" ModemCreateBearer = ModemInterface + ".CreateBearer" ModemDeleteBearer = ModemInterface + ".DeleteBearer" ModemReset = ModemInterface + ".Reset" ModemFactoryReset = ModemInterface + ".FactoryReset" ModemSetPowerState = ModemInterface + ".SetPowerState" ModemSetCurrentCapabilities = ModemInterface + ".SetCurrentCapabilities" ModemSetCurrentModes = ModemInterface + ".SetCurrentModes" ModemSetCurrentBands = ModemInterface + ".SetCurrentBands" ModemCommand = ModemInterface + ".Command" ModemPropertySim = ModemInterface + ".Sim" // readable o ModemPropertyBearers = ModemInterface + ".Bearers" // readable ao ModemPropertySupportedCapabilities = ModemInterface + ".SupportedCapabilities" // readable au ModemPropertyCurrentCapabilities = ModemInterface + ".CurrentCapabilities" // readable u ModemPropertyMaxBearers = ModemInterface + ".MaxBearers" // readable u ModemPropertyMaxActiveBearers = ModemInterface + ".MaxActiveBearers" // readable u ModemPropertyManufacturer = ModemInterface + ".Manufacturer" // readable s ModemPropertyModel = ModemInterface + ".Model" // readable s ModemPropertyRevision = ModemInterface + ".Revision" // readable s ModemPropertyCarrierConfiguration = ModemInterface + ".CarrierConfiguration" // readable s ModemPropertyCarrierConfigurationRevision = ModemInterface + ".CarrierConfigurationRevision" // readable s ModemPropertyHardwareRevision = ModemInterface + ".HardwareRevision" // readable s ModemPropertyDeviceIdentifier = ModemInterface + ".DeviceIdentifier" // readable s ModemPropertyDevice = ModemInterface + ".Device" // readable s ModemPropertyDrivers = ModemInterface + ".Drivers" // readable as ModemPropertyPlugin = ModemInterface + ".Plugin" // readable s ModemPropertyPrimaryPort = ModemInterface + ".PrimaryPort" // readable s ModemPropertyPorts = ModemInterface + ".Ports" // readable a(su) ModemPropertyEquipmentIdentifier = ModemInterface + ".EquipmentIdentifier" // readable s ModemPropertyUnlockRequired = ModemInterface + ".UnlockRequired" // readable u ModemPropertyUnlockRetries = ModemInterface + ".UnlockRetries" // readable a{uu} ModemPropertyState = ModemInterface + ".State" // readable i ModemPropertyStateFailedReason = ModemInterface + ".StateFailedReason" // readable u ModemPropertyAccessTechnologies = ModemInterface + ".AccessTechnologies" // readable u ModemPropertySignalQuality = ModemInterface + ".SignalQuality" // readable (ub) ModemPropertyOwnNumbers = ModemInterface + ".OwnNumbers" // readable as ModemPropertyPowerState = ModemInterface + ".PowerState" // readable u ModemPropertySupportedModes = ModemInterface + ".SupportedModes" // readable a(uu) ModemPropertyCurrentModes = ModemInterface + ".CurrentModes" // readable (uu) ModemPropertySupportedBands = ModemInterface + ".SupportedBands" // readable au ModemPropertyCurrentBands = ModemInterface + ".CurrentBands" // readable au ModemPropertySupportedIpFamilies = ModemInterface + ".SupportedIpFamilies" // readable u /* Signal */ ModemSignalStateChanged = "StateChanged" )
Paths of methods and properties
const ( Modem3gppInterface = ModemInterface + ".Modem3gpp" /* Methods */ Modem3gppRegister = Modem3gppInterface + ".Register" Modem3gppScan = Modem3gppInterface + ".Scan" Modem3gppSetEpsUeModeOperation = Modem3gppInterface + ".SetEpsUeModeOperation" Modem3gppSetInitialEpsBearerSettings = Modem3gppInterface + ".SetInitialEpsBearerSettings" /* Property */ Modem3gppPropertyImei = Modem3gppInterface + ".Imei" // readable s Modem3gppPropertyRegistrationState = Modem3gppInterface + ".RegistrationState" // readable u Modem3gppPropertyOperatorCode = Modem3gppInterface + ".OperatorCode" // readable s Modem3gppPropertyOperatorName = Modem3gppInterface + ".OperatorName" // readable s Modem3gppPropertyEnabledFacilityLocks = Modem3gppInterface + ".EnabledFacilityLocks" // readable u // Deprecated Modem3gppPropertySubscriptionState = Modem3gppInterface + ".SubscriptionState " // readable u Modem3gppPropertyEpsUeModeOperation = Modem3gppInterface + ".EpsUeModeOperation" // readable u Modem3gppPropertyPco = Modem3gppInterface + ".Pco" // readable a(ubay) Modem3gppPropertyInitialEpsBearer = Modem3gppInterface + ".InitialEpsBearer" // readable o Modem3gppPropertyInitialEpsBearerSettings = Modem3gppInterface + ".InitialEpsBearerSettings" // readable a{sv} )
Paths of methods and properties of Modem3gpp
const ( ModemCdmaInterface = ModemInterface + ".ModemCdma" /* Methods */ ModemCdmaActivate = ModemCdmaInterface + ".Activate" ModemCdmaActivateManual = ModemCdmaInterface + ".ActivateManual" /* Property */ ModemCdmaPropertyActivationState = ModemCdmaInterface + ".ActivationState" // readable u ModemCdmaPropertyMeid = ModemCdmaInterface + ".Meid" // readable s ModemCdmaPropertyEsn = ModemCdmaInterface + ".Esn" // readable s ModemCdmaPropertySid = ModemCdmaInterface + ".Sid" // readable u ModemCdmaPropertyNid = ModemCdmaInterface + ".Nid" // readable u ModemCdmaPropertyCdma1xRegistrationState = ModemCdmaInterface + ".Cdma1xRegistrationState" // readable u ModemCdmaPropertyEvdoRegistrationState = ModemCdmaInterface + ".EvdoRegistrationState" // readable u /* Signal */ ModemCdmaSignalActivationStateChanged = "ActivationStateChanged" )
Paths of methods and properties
const ( ModemFirmwareInterface = ModemInterface + ".Firmware" /* Methods */ ModemFirmwareList = ModemFirmwareInterface + ".List" ModemFirmwareSelect = ModemFirmwareInterface + ".Select" /* Property */ ModemFirmwarePropertyUpdateSettings = ModemFirmwareInterface + ".UpdateSettings" // readable (ua{sv}) )
Paths of methods and properties
const ( ModemLocationInterface = ModemInterface + ".Location" /* Methods */ ModemLocationSetup = ModemLocationInterface + ".Setup" ModemLocationGetLocation = ModemLocationInterface + ".GetLocation" ModemLocationSetSuplServer = ModemLocationInterface + ".SetSuplServer" ModemLocationInjectAssistanceData = ModemLocationInterface + ".InjectAssistanceData" ModemLocationSetGpsRefreshRate = ModemLocationInterface + ".SetGpsRefreshRate" ModemLocationPropertyCapabilities = ModemLocationInterface + ".Capabilities" // readable u ModemLocationPropertySupportedAssistanceData = ModemLocationInterface + ".SupportedAssistanceData" // readable u ModemLocationPropertyEnabled = ModemLocationInterface + ".Enabled" // readable u ModemLocationPropertySignalsLocation = ModemLocationInterface + ".SignalsLocation" // readable b ModemLocationPropertyLocation = ModemLocationInterface + ".Location" // readable a{uv} ModemLocationPropertySuplServer = ModemLocationInterface + ".SuplServer" // readable s ModemLocationPropertyAssistanceDataServers = ModemLocationInterface + ".AssistanceDataServers" // readable as ModemLocationPropertyGpsRefreshRate = ModemLocationInterface + ".GpsRefreshRate" // readable u )
Paths of methods and properties
const ( ModemManagerInterface = "org.freedesktop.ModemManager1" ModemManagerObjectPath = "/org/freedesktop/ModemManager1" /* Methods */ ModemManagerScanDevices = ModemManagerInterface + ".ScanDevices" ModemManagerSetLogging = ModemManagerInterface + ".SetLogging" ModemManagerReportKernelEvent = ModemManagerInterface + ".ReportKernelEvent" ModemManagerInhibitDevice = ModemManagerInterface + ".InhibitDevice" /* Property */ ModemManagerPropertyVersion = ModemManagerInterface + ".Version" // readable s )
Paths of methods and properties
const ( ModemMessagingInterface = ModemInterface + ".Messaging" /* Methods */ ModemMessagingList = ModemMessagingInterface + ".List" ModemMessagingDelete = ModemMessagingInterface + ".Delete" ModemMessagingCreate = ModemMessagingInterface + ".Create" /* Property */ ModemMessagingPropertyMessages = ModemMessagingInterface + ".Messages" ModemMessagingPropertySupportedStorages = ModemMessagingInterface + ".SupportedStorages" ModemMessagingPropertyDefaultStorage = ModemMessagingInterface + ".DefaultStorage" /* Signal */ ModemMessagingSignalAdded = "Added" ModemMessagingSignalDeleted = "Deleted" )
Paths of methods and properties
const ( ModemOmaInterface = ModemInterface + ".Oma" /* Methods */ ModemOmaSetup = ModemOmaInterface + ".Setup" ModemOmaStartClientInitiatedSession = ModemOmaInterface + ".StartClientInitiatedSession" ModemOmaAcceptNetworkInitiatedSession = ModemOmaInterface + ".AcceptNetworkInitiatedSession" ModemOmaCancelSession = ModemOmaInterface + ".CancelSession" /* Property */ ModemOmaPropertyFeatures = ModemOmaInterface + ".Features" // readable u ModemOmaPropertyPendingNetworkInitiatedSessions = ModemOmaInterface + ".PendingNetworkInitiatedSessions" // readable a(uu) ModemOmaPropertySessionType = ModemOmaInterface + ".SessionType" // readable u ModemOmaPropertySessionState = ModemOmaInterface + ".SessionState" // readable i /* Signal */ ModemOmaSignalSessionStateChanged = "SessionStateChanged" )
Paths of methods and properties
const ( ModemSignalInterface = ModemInterface + ".Signal" /* Methods */ ModemSignalSetup = ModemSignalInterface + ".Setup" /* Property */ ModemSignalPropertyRate = ModemSignalInterface + ".Rate" ModemSignalPropertyCdma = ModemSignalInterface + ".Cdma" ModemSignalPropertyEvdo = ModemSignalInterface + ".Evdo" ModemSignalPropertyGsm = ModemSignalInterface + ".Gsm" ModemSignalPropertyUmts = ModemSignalInterface + ".Umts" ModemSignalPropertyLte = ModemSignalInterface + ".Lte" )
Paths of methods and properties
const ( ModemSimpleInterface = ModemInterface + ".Simple" /* Methods */ ModemSimpleConnect = ModemSimpleInterface + ".Connect" ModemSimpleDisconnect = ModemSimpleInterface + ".Disconnect" ModemSimpleGetStatus = ModemSimpleInterface + ".GetStatus" )
Paths of methods and properties
const ( ModemTimeInterface = ModemInterface + ".Time" /* Methods */ ModemTimeGetNetworkTime = ModemTimeInterface + ".GetNetworkTime" /* Property */ ModemTimePropertyNetworkTimezone = ModemTimeInterface + ".NetworkTimezone" // readable a{sv} /* Signal */ ModemTimeSignalNetworkTimeChanged = "NetworkTimeChanged" )
Paths of methods and properties of ModemTime
const ( Modem3gppUssdInterface = Modem3gppInterface + ".Ussd" /* Methods */ Modem3gppUssdInitiate = Modem3gppUssdInterface + ".Initiate" Modem3gppUssdRespond = Modem3gppUssdInterface + ".Respond" Modem3gppUssdCancel = Modem3gppUssdInterface + ".Cancel" /* Property */ Modem3gppUssdPropertyState = Modem3gppUssdInterface + ".State" // readable u Modem3gppUssdPropertyNetworkNotification = Modem3gppUssdInterface + ".NetworkNotification" // readable s Modem3gppUssdProperty = Modem3gppUssdInterface + ".NetworkRequest" // readable s )
Paths of methods and properties
const ( ModemVoiceInterface = ModemInterface + ".Voice" ModemVoiceObjectPath = ModemManagerObjectPath + "/Voice" /* Methods */ ModemVoiceListCalls = ModemVoiceInterface + ".ListCalls" ModemVoiceDeleteCall = ModemVoiceInterface + ".DeleteCall" ModemVoiceCreateCall = ModemVoiceInterface + ".CreateCall" ModemVoiceHoldAndAccept = ModemVoiceInterface + ".HoldAndAccept" ModemVoiceHangupAndAccept = ModemVoiceInterface + ".HangupAndAccept" ModemVoiceHangupAll = ModemVoiceInterface + ".HangupAll" ModemVoiceTransfer = ModemVoiceInterface + ".Transfer" ModemVoiceCallWaitingSetup = ModemVoiceInterface + ".CallWaitingSetup" ModemVoiceCallWaitingQuery = ModemVoiceInterface + ".CallWaitingQuery" /* Property */ ModemVoicePropertyCalls = ModemVoiceInterface + ".Calls" ModemVoicePropertyEmergencyOnly = ModemVoiceInterface + ".EmergencyOnly" /* Signal */ ModemVoiceSignalCallAdded = "CallAdded" ModemVoiceSignalCallDeleted = "CallDeleted" )
Paths of methods and properties of ModemVoice
const ( SimInterface = ModemManagerInterface + ".Sim" /* Methods */ SimSendPin = SimInterface + ".SendPin" SimSendSendPuk = SimInterface + ".SendPuk" SimEnablePin = SimInterface + ".EnablePin" SimChangePin = SimInterface + ".ChangePin" /* Property */ SimPropertySimIdentifier = SimInterface + ".SimIdentifier" // readable s SimPropertyImsi = SimInterface + ".Imsi" // readable s SimPropertyOperatorIdentifier = SimInterface + ".OperatorIdentifier" // readable s SimPropertyOperatorName = SimInterface + ".OperatorName" // readable s SimPropertyEmergencyNumbers = SimInterface + ".EmergencyNumbers" // readable as )
Paths of methods and properties
const ( SmsInterface = ModemManagerInterface + ".Sms" /* Methods */ SmsSend = SmsInterface + ".Send" SmsStore = SmsInterface + ".Store" /* Property */ SmsPropertyState = SmsInterface + ".State" // readable u SmsPropertyPduType = SmsInterface + ".PduType" // readable u SmsPropertyNumber = SmsInterface + ".Number" // readable s SmsPropertyText = SmsInterface + ".Text" // readable s SmsPropertyData = SmsInterface + ".Data" // readable ay SmsPropertySMSC = SmsInterface + ".SMSC" // readable s SmsPropertyValidity = SmsInterface + ".Validity" // readable (uv) SmsPropertyClass = SmsInterface + ".Class" // readable i SmsPropertyTeleserviceId = SmsInterface + ".TeleserviceId" // readable u SmsPropertyServiceCategory = SmsInterface + ".ServiceCategory" // readable u SmsPropertyDeliveryReportRequest = SmsInterface + ".DeliveryReportRequest" // readable b SmsPropertyMessageReference = SmsInterface + ".MessageReference" // readable u SmsPropertyTimestamp = SmsInterface + ".Timestamp" // readable s SmsPropertyDischargeTimestamp = SmsInterface + ".DischargeTimestamp" // readable s SmsPropertyDeliveryState = SmsInterface + ".DeliveryState" // readable u SmsPropertyStorage = SmsInterface + ".Storage" // readable u )
Paths of methods and properties
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioFormat ¶ added in v0.1.2
type AudioFormat struct { Encoding string `json:"encoding"` // The audio encoding format. For example, "pcm" for PCM audio. Resolution string `json:"resolution"` // The sampling precision and its encoding format. For example, "s16le" for signed 16-bit little-endian samples Rate uint32 `json:"rate"` // The sampling rate as an unsigned integer. For example, 8000 for 8000hz. }
func (AudioFormat) MarshalJSON ¶ added in v0.1.2
func (af AudioFormat) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (AudioFormat) String ¶ added in v0.1.2
func (af AudioFormat) String() string
type Bearer ¶
type Bearer interface { // Returns object path GetObjectPath() dbus.ObjectPath // Requests activation of a packet data connection with the network using this bearer's properties. Upon successful // activation, the modem can send and receive packet data and, depending on the addressing capability of the // modem, a connection manager may need to start PPP, perform DHCP, or assign the IP address returned by the // modem to the data interface. Upon successful return, the "Ip4Config" and/or "Ip6Config" properties become // valid and may contain IP configuration information for the data interface associated with this bearer. Connect() error // Disconnect and deactivate this packet data connection. // Any ongoing data session will be terminated and IP addresses become invalid when this method is called. Disconnect() error MarshalJSON() ([]byte, error) // The operating system name for the network data interface that provides packet data using this bearer. // Connection managers must configure this interface depending on the IP "method" given by the "Ip4Config" or // "Ip6Config" properties set by bearer activation. // If MM_BEARER_IP_METHOD_STATIC or MM_BEARER_IP_METHOD_DHCP methods are given, the interface will be an // ethernet-style interface suitable for DHCP or setting static IP configuration on, while if the // MM_BEARER_IP_METHOD_PPP method is given, the interface will be a serial TTY which must then have PPP // run over it. GetInterface() (string, error) // Indicates whether or not the bearer is connected and thus whether packet data communication using this bearer is possible. GetConnected() (bool, error) // In some devices, packet data service will be suspended while the device is handling other communication, // like a voice call. If packet data service is suspended (but not deactivated) this property will be TRUE. GetSuspended() (bool, error) // If the bearer was configured for IPv4 addressing, upon activation this property contains the // addressing details for assignment to the data interface. // Mandatory Item: method // If the bearer specifies configuration via PPP or DHCP, only the "method" item will be present. // Additional items which are only applicable when using the MM_BEARER_IP_METHOD_STATIC method are: // address, prefix, dns1, dns2, dns3 and gateway // This property may also include the following items when such information is available: mtu GetIp4Config() (BearerIpConfig, error) // If the bearer was configured for IPv6 addressing, upon activation this property contains the addressing // details for assignment to the data interface. // Mandatory Item: method // If the bearer specifies configuration via PPP or DHCP, often only the "method" item will be present. // IPv6 SLAAC should be used to retrieve correct addressing and DNS information via Router Advertisements // and DHCPv6. In some cases an IPv6 Link-Local "address" item will be present, which should be assigned // to the data port before performing SLAAC, as the mobile network may expect SLAAC setup to use this address. // Additional items which are usually only applicable when using the MM_BEARER_IP_METHOD_STATIC method are: // address, prefix, dns1, dns2, dns3 and gateway // This property may also include the following items when such information is available: mtu GetIp6Config() (BearerIpConfig, error) // If the modem supports it, this property will show statistics of the ongoing connection. // When the connection is disconnected automatically or explicitly by the user, the values in this // property will show the last values cached. The statistics are reset GetStats() (BearerStats, error) // Maximum time to wait for a successful IP establishment, when PPP is used. GetIpTimeout() (uint32, error) // A MMBearerType GetBearerType() (MMBearerType, error) // List of properties used when creating the bearer. GetProperties() (BearerProperty, error) // Listen to changed properties // returns []interface // index 0 = name of the interface on which the properties are defined // index 1 = changed properties with new values as map[string]dbus.Variant // index 2 = invalidated properties: changed properties but the new values are not send with them SubscribePropertiesChanged() <-chan *dbus.Signal // ParsePropertiesChanged parses the dbus signal ParsePropertiesChanged(v *dbus.Signal) (interfaceName string, changedProperties map[string]dbus.Variant, invalidatedProperties []string, err error) Unsubscribe() }
Bearer interface provides access to specific actions that may be performed on available bearers.
type BearerIpConfig ¶ added in v0.1.2
type BearerIpConfig struct { Method MMBearerIpMethod `json:"method"` // Mandatory: A MMBearerIpMethod, given as an unsigned integer value (signature "u"). Address string `json:"address"` // IP address, given as a string value (signature "s"). Prefix uint32 `json:"prefix"` // Numeric CIDR network prefix (ie, 24, 32, etc), given as an unsigned integer value (signature "u"). Dns1 string `json:"dns1"` // IP address of the first DNS server, given as a string value (signature "s"). Dns2 string `json:"dns2"` // IP address of the second DNS server, given as a string value (signature "s"). Dns3 string `json:"dns3"` // IP address of the third DNS server, given as a string value (signature "s"). Gateway string `json:"gateway"` // IP address of the default gateway, given as a string value (signature "s"). Mtu uint32 `json:"mtu"` // Maximum transmission unit (MTU), given as an unsigned integer value (signature "u"). IpFamily MMBearerIpFamily `json:"ip-family"` // The IpFamily, either ipv4 or ipv6 }
BearerIpConfig represents all available ip configuration properties
func (BearerIpConfig) MarshalJSON ¶ added in v0.1.2
func (bc BearerIpConfig) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (BearerIpConfig) String ¶ added in v0.1.2
func (bc BearerIpConfig) String() string
type BearerProperty ¶
type BearerProperty struct { APN string `json:"apn"` // Access Point Name, given as a string value (signature "s"). Required in 3GPP. IPType MMBearerIpFamily `json:"ip-type"` // Addressing type, given as a MMBearerIpFamily value (signature "u"). Optional in 3GPP and CDMA. AllowedAuth MMBearerAllowedAuth `json:"allowed-auth"` // The authentication method to use, given as a MMBearerAllowedAuth value (signature "u"). Optional in 3GPP. User string `json:"user"` // User name (if any) required by the network, given as a string value (signature "s"). Optional in 3GPP. Password string `json:"password"` // Password (if any) required by the network, given as a string value (signature "s"). Optional in 3GPP. AllowRoaming bool `json:"allow-roaming"` // Flag to tell whether connection is allowed during roaming, given as a boolean value (signature "b"). Optional in 3GPP. RMProtocol MMModemCdmaRmProtocol `json:"rm-protocol"` // Protocol of the Rm interface, given as a MMModemCdmaRmProtocol value (signature "u"). Optional in CDMA. Number string `json:"number"` // Telephone number to dial, given as a string value (signature "s"). Required in POTS. }
BearerProperty represents all properties of a bearer
func (BearerProperty) MarshalJSON ¶
func (bp BearerProperty) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (BearerProperty) String ¶
func (bp BearerProperty) String() string
type BearerStats ¶ added in v0.1.2
type BearerStats struct { RxBytes uint64 `json:"rx-bytes"` // Number of bytes received without error, given as an unsigned 64-bit integer value (signature "t"). TxBytes uint64 `json:"tx-bytes"` // Number bytes transmitted without error, given as an unsigned 64-bit integer value (signature "t"). Duration uint32 `json:"duration"` // Duration of the connection, in seconds, given as an unsigned integer value (signature "u"). }
BearerStats represents all stats according to the bearer
func (BearerStats) MarshalJSON ¶ added in v0.1.2
func (bs BearerStats) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (BearerStats) String ¶ added in v0.1.2
func (bs BearerStats) String() string
type Call ¶
type Call interface { // Returns object path GetObjectPath() dbus.ObjectPath // If the outgoing call has not yet been started, start it // Applicable only if state is MM_CALL_STATE_UNKNOWN and direction is MM_CALL_DIRECTION_OUTGOING. Start() error // Accept incoming call (answer). // Applicable only if state is MM_CALL_STATE_RINGING_IN and direction is MM_CALL_DIRECTION_INCOMING. Accept() error // Deflect an incoming or waiting call to a new number. This call will be considered terminated once the // deflection is performed. // Applicable only if state is MM_CALL_STATE_RINGING_IN or MM_CALL_STATE_WAITING and direction is // MM_CALL_DIRECTION_INCOMING. // number: new number where the call will be deflected. Deflect(number string) error // Join the currently held call into a single multiparty call with another already active call. // The calls will be flagged with the 'Multiparty' property while they are part of the multiparty call. // Applicable only if state is MM_CALL_STATE_HELD. JoinMultiparty() error // If this call is part of an ongoing multiparty call, detach it from the multiparty call, put the multiparty // call on hold, and activate this one alone. This operation makes this call private again between both ends of the call. // Applicable only if state is MM_CALL_STATE_ACTIVE or MM_CALL_STATE_HELD and the call is a multiparty call. LeaveMultiparty() error // Hangup the active call. // Applicable only if state is MM_CALL_STATE_UNKNOWN. Hangup() error // Send a DTMF tone (Dual Tone Multi-Frequency) (only on supported modem). // Applicable only if state is MM_CALL_STATE_ACTIVE. // IN s dtmf: DTMF tone identifier [0-9A-D*#]. SendDtmf(dtmf string) error /* PROPERTIES */ MarshalJSON() ([]byte, error) // A MMCallState value, describing the state of the call. GetState() (MMCallState, error) // A MMCallStateReason value, describing why the state is changed. GetStateReason() (MMCallStateReason, error) // A MMCallDirection value, describing the direction of the call. GetDirection() (MMCallDirection, error) // The remote phone number. GetNumber() (string, error) // Whether the call is currently part of a multiparty conference call. GetMultiparty() (bool, error) // If call audio is routed via the host, the name of the kernel device that provides the audio. // For example, with certain Huawei USB modems, this property might be "ttyUSB2" indicating audio is // available via ttyUSB2 in the format described by the AudioFormat property. GetAudioPort() (string, error) // If call audio is routed via the host, a description of the audio format supported by the audio port. GetAudioFormat() (AudioFormat, error) // DtmfReceived (s dtmf); //Emitted when a DTMF tone is received (only on supported modem) // s dtmf:DTMF tone identifier [0-9A-D*#]. SubscribeDtmfReceived() <-chan *dbus.Signal ParseDtmfReceived(v *dbus.Signal) (string, error) // StateChanged (i old, // i new, // u reason); // Emitted when call changes state // i old: Old state MMCallState // i new: New state MMCallState // u reason: A MMCallStateReason value, specifying the reason for this state change. SubscribeStateChanged() <-chan *dbus.Signal // ParseStateChanged returns the parsed dbus signal ParseStateChanged(v *dbus.Signal) (oldState MMCallState, newState MMCallState, reason MMCallStateReason, err error) // Listen to changed properties // returns []interface // index 0 = name of the interface on which the properties are defined // index 1 = changed properties with new values as map[string]dbus.Variant // index 2 = invalidated properties: changed properties but the new values are not send with them SubscribePropertiesChanged() <-chan *dbus.Signal // ParsePropertiesChanged parses the dbus signal ParsePropertiesChanged(v *dbus.Signal) (interfaceName string, changedProperties map[string]dbus.Variant, invalidatedProperties []string, err error) Unsubscribe() }
The Call interface Defines operations and properties of a single Call.
type CdmaBsLocation ¶ added in v0.1.2
type CdmaBsLocation struct { Latitude float64 `json:"latitude"` // (Required) Latitude in Decimal Degrees (positive numbers mean N quadrasphere, negative mean S quadrasphere), given as a double value (signature "d"). e.g. 38.889722, meaning 38d 53' 22" N. Longitude float64 `json:"longitude"` // (Required) Longitude in Decimal Degrees (positive numbers mean E quadrasphere, negative mean W quadrasphere), given as a double value (signature "d"). e.g. -77.008889, meaning 77d 0' 32" W. }
func (CdmaBsLocation) MarshalJSON ¶ added in v0.1.2
func (cdma CdmaBsLocation) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (CdmaBsLocation) String ¶ added in v0.1.2
func (cdma CdmaBsLocation) String() string
type CdmaProperty ¶
type CdmaProperty struct { Spc string `json:"spc"` // The Service Programming Code, given as a string of exactly 6 digit characters. Mandatory parameter. Sid uint16 `json:"sid"` // The System Identification Number, given as a 16-bit unsigned integer (signature "q"). Mandatory parameter. Mdn string `json:"mdn"` // The Mobile Directory Number, given as a string of maximum 15 characters. Mandatory parameter. Min string `json:"min"` // The Mobile Identification Number, given as a string of maximum 15 characters. Mandatory parameter. MnHaKey string `json:"mn-ha-key"` // The MN-HA key, given as a string of maximum 16 characters. MnAaaKey string `json:"mn-aaa-key"` // The MN-AAA key, given as a string of maximum 16 characters. Prl []byte `json:"prl"` // The Preferred Roaming List, given as an array of maximum 16384 bytes. }
CdmaProperty describes the parameters for activating manually the modem
func (CdmaProperty) MarshalJSON ¶
func (cdma CdmaProperty) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (CdmaProperty) String ¶
func (cdma CdmaProperty) String() string
type CurrentLocation ¶ added in v0.1.2
type CurrentLocation struct { ThreeGppLacCi ThreeGppLacCiLocation `json:"3gpp-lac-ci"` // Devices supporting this capability return a string in the format "MCC,MNC,LAC,CI,TAC" (without the quotes of course) GpsRaw GpsRawLocation `json:"gps-raw"` // Devices supporting this capability return a D-Bus dictionary (signature "a{sv}") mapping well-known keys to values with defined formats. GpsNmea GpsNmeaLocation `json:"gps-nmea"` // Devices supporting this capability return a string containing one or more NMEA sentences (D-Bus signature 's'). The manager will cache the most recent NMEA sentence of each type for a period of time not less than 30 seconds. When reporting multiple NMEA sentences, sentences shall be separated by an ASCII Carriage Return and Line Feed (<CR><LF>) sequence. CdmaBs CdmaBsLocation `json:"cdma-bs"` // Devices supporting this capability return a D-Bus dictionary (signature "a{sv}") mapping well-known keys to values with defined formats. }
CurrentLocation represents all available/activated locations of the modem
func (CurrentLocation) MarshalJSON ¶ added in v0.1.2
func (cl CurrentLocation) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (CurrentLocation) String ¶ added in v0.1.2
func (cl CurrentLocation) String() string
type EventProperties ¶
type EventProperties struct { Action MMKernelPropertyAction `json:"action"` // The type of action, given as a string value (signature "s"). This parameter is MANDATORY. Name string `json:"name"` // The device name, given as a string value (signature "s"). This parameter is MANDATORY. Subsystem string `json:"subsystem"` // The device subsystem, given as a string value (signature "s"). This parameter is MANDATORY. Uid string `json:"uid"` // The unique ID of the physical device, given as a string value (signature "s"). This parameter is OPTIONAL, if not given the sysfs path of the physical device will be used. This parameter must be the same for all devices exposed by the same physical device. }
EventProperties defines the properties which should be reported to the kernel
func (EventProperties) MarshalJSON ¶
func (ep EventProperties) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
type FirmwareProperty ¶ added in v0.1.2
type FirmwareProperty struct { ImageType MMFirmwareImageType `json:"image-type"` // (Required) Type of the firmware image, given as a MMFirmwareImageType value (signature "u"). Firmware images of type MM_FIRMWARE_IMAGE_TYPE_GENERIC will only expose only the mandatory properties. UniqueId string `json:"unique-id"` // (Required) A user-readable unique ID for the firmware image, given as a string value (signature "s"). GobiPriVersion string `json:"gobi-pri-version"` // (Optional) The version of the PRI firmware image, in images of type MM_FIRMWARE_IMAGE_TYPE_GOBI, given as a string value (signature "s"). GobiPriInfo string `json:"gobi-pri-info"` // (Optional) Additional information of the PRI image, in images of type MM_FIRMWARE_IMAGE_TYPE_GOBI, given as a string value (signature "s"). GobiBootVersion string `json:"gobi-boot-version"` // (Optional) The boot version of the PRI firmware image, in images of type MM_FIRMWARE_IMAGE_TYPE_GOBI, given as a string value (signature "s"). GobiPriUniqueId string `json:"gobi-pri-unique-id"` // (Optional) The unique ID of the PRI firmware image, in images of type MM_FIRMWARE_IMAGE_TYPE_GOBI, given as a string value (signature "s"). GobiModemUniqueId string `json:"gobi-modem-unique-id"` // (Optional) The unique ID of the Modem firmware image, in images of type MM_FIRMWARE_IMAGE_TYPE_GOBI, given as a string value (signature "s"). Selected bool `json:"selected"` // Shows if certain firmware is selected }
FirmwareProperty represents all properties of a firmware
func (FirmwareProperty) MarshalJSON ¶ added in v0.1.2
func (fp FirmwareProperty) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (FirmwareProperty) String ¶ added in v0.1.2
func (fp FirmwareProperty) String() string
type GpsNmeaLocation ¶ added in v0.1.2
type GpsNmeaLocation struct {
NmeaSentences []string `json:"nmea-sentances"` // Devices supporting this capability return a string containing one or more NMEA sentences (D-Bus signature 's'). The manager will cache the most recent NMEA sentence of each type for a period of time not less than 30 seconds. When reporting multiple NMEA sentences, sentences shall be separated by an ASCII Carriage Return and Line Feed (<CR><LF>) sequence. The manager may discard any cached sentences older than 30 seconds. This allows clients to read the latest positioning data as soon as possible after they start, even if the device is not providing frequent location data updates.
}
func (GpsNmeaLocation) MarshalJSON ¶ added in v0.1.2
func (ngps GpsNmeaLocation) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (GpsNmeaLocation) String ¶ added in v0.1.2
func (ngps GpsNmeaLocation) String() string
type GpsRawLocation ¶ added in v0.1.2
type GpsRawLocation struct { UtcTime time.Time `json:"utc-time"` // (Required) UTC time in ISO 8601 format, given as a string value (signature "s"). e.g. 203015. Latitude float64 `json:"latitude"` // (Required) Latitude in Decimal Degrees (positive numbers mean N quadrasphere, negative mean S quadrasphere), given as a double value (signature "d"). e.g. 38.889722, meaning 38d 53' 22" N. Longitude float64 `json:"longitude"` // (Required) Longitude in Decimal Degrees (positive numbers mean E quadrasphere, negative mean W quadrasphere), given as a double value (signature "d"). e.g. -77.008889, meaning 77d 0' 32" W. Altitude float64 `json:"altitude"` // (Optional) Altitude above sea level in meters, given as a double value (signature "d"). e.g. 33.5. }
func (GpsRawLocation) MarshalJSON ¶ added in v0.1.2
func (rgps GpsRawLocation) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (GpsRawLocation) String ¶ added in v0.1.2
func (rgps GpsRawLocation) String() string
type MMBearerAllowedAuth ¶
type MMBearerAllowedAuth uint32
MMBearerAllowedAuth Allowed authentication methods when authenticating with the network.
const ( MmBearerAllowedAuthUnknown MMBearerAllowedAuth = 0 // Unknown. /* bits 0..4 order match Ericsson device bitmap */ MmBearerAllowedAuthNone MMBearerAllowedAuth = 1 << 0 // None. MmBearerAllowedAuthPap MMBearerAllowedAuth = 1 << 1 // PAP. MmBearerAllowedAuthChap MMBearerAllowedAuth = 1 << 2 // CHAP. MmBearerAllowedAuthMschap MMBearerAllowedAuth = 1 << 3 // MS-CHAP. MmBearerAllowedAuthMschapv2 MMBearerAllowedAuth = 1 << 4 // MS-CHAP v2. MmBearerAllowedAuthEap MMBearerAllowedAuth = 1 << 5 // EAP. )
func (MMBearerAllowedAuth) String ¶
func (i MMBearerAllowedAuth) String() string
type MMBearerIpFamily ¶
type MMBearerIpFamily uint32
MMBearerIpFamily Type of IP family to be used in a given Bearer.
const ( MmBearerIpFamilyNone MMBearerIpFamily = 0 // None or unknown. MmBearerIpFamilyIpv4 MMBearerIpFamily = 1 << 0 // IPv4. MmBearerIpFamilyIpv6 MMBearerIpFamily = 1 << 1 // IPv6. MmBearerIpFamilyIpv4v6 MMBearerIpFamily = 1 << 2 // IPv4 and IPv6. MmBearerIpFamilyAny MMBearerIpFamily = 0xFFFFFFFF // Mask specifying all IP families. )
func (MMBearerIpFamily) BitmaskToSlice ¶
func (i MMBearerIpFamily) BitmaskToSlice(bitmask uint32) (ipFamilies []MMBearerIpFamily)
BitmaskToSlice bitmask to slice
func (MMBearerIpFamily) GetAllIPFamilies ¶
func (i MMBearerIpFamily) GetAllIPFamilies() []MMBearerIpFamily
GetAllIPFamilies returns all ip families
func (MMBearerIpFamily) SliceToBitmask ¶
func (i MMBearerIpFamily) SliceToBitmask(ipFamilies []MMBearerIpFamily) (bitmask uint32)
SliceToBitmask slice to bitmask
func (MMBearerIpFamily) String ¶
func (i MMBearerIpFamily) String() string
type MMBearerIpMethod ¶
type MMBearerIpMethod uint32
MMBearerIpMethod Type of IP method configuration to be used in a given Bearer.
const ( MmBearerIpMethodUnknown MMBearerIpMethod = 0 // Unknown method. MmBearerIpMethodPpp MMBearerIpMethod = 1 // Use PPP to get IP addresses and DNS information. For IPv6, use PPP to retrieve the 64-bit Interface Identifier, use the IID to construct an IPv6 link-local address by following RFC 5072, and then run DHCP over the PPP link to retrieve DNS settings. MmBearerIpMethodStatic MMBearerIpMethod = 2 // Use the provided static IP configuration given by the modem to configure the IP data interface. Note that DNS servers may not be provided by the network or modem firmware. MmBearerIpMethodDhcp MMBearerIpMethod = 3 // Begin DHCP or IPv6 SLAAC on the data interface to obtain any necessary IP configuration details that are not already provided by the IP configuration. For IPv4 bearers DHCP should be used. For IPv6 bearers SLAAC should be used, and the IP configuration may already contain a link-local address that should be assigned to the interface before SLAAC is started to obtain the rest of the configuration. )
func (MMBearerIpMethod) String ¶
func (i MMBearerIpMethod) String() string
type MMBearerType ¶
type MMBearerType uint32
MMBearerType Type of context (2G/3G) or bearer (4G).
const ( MmBearerTypeUnknown MMBearerType = 0 // Unknown bearer. MmBearerTypeDefault MMBearerType = 1 // Primary context (2G/3G) or default bearer (4G), defined by the user of the API. MmBearerTypeDefaultAttach MMBearerType = 2 // The initial default bearer established during LTE attach procedure, automatically connected as long as the device is registered in the LTE network. MmBearerTypeDedicated MMBearerType = 3 // Secondary context (2G/3G) or dedicated bearer (4G), defined by the user of the API. These bearers use the same IP address used by a primary context or default bearer and provide a dedicated flow for specific traffic with different QoS settings. )
func (MMBearerType) String ¶
func (i MMBearerType) String() string
type MMCallDirection ¶
type MMCallDirection int32
MMCallDirection Direction of the call.
const ( MmCallDirectionUnknown MMCallDirection = 0 // unknown. MmCallDirectionIncoming MMCallDirection = 1 // call from network. MmCallDirectionOutgoing MMCallDirection = 2 // call to network. )
func (MMCallDirection) String ¶
func (i MMCallDirection) String() string
type MMCallState ¶
type MMCallState int32
MMCallState State of Call.
const ( MmCallStateUnknown MMCallState = 0 // default state for a new outgoing call. MmCallStateDialing MMCallState = 1 // outgoing call started. Wait for free channel. MmCallStateRingingOut MMCallState = 2 // incoming call is waiting for an answer. MmCallStateRingingIn MMCallState = 3 // outgoing call attached to GSM network, waiting for an answer. MmCallStateActive MMCallState = 4 // call is active between two peers. MmCallStateHeld MMCallState = 5 // held call (by +CHLD AT command). MmCallStateWaiting MMCallState = 6 // waiting call (by +CCWA AT command). MmCallStateTerminated MMCallState = 7 // call is terminated. )
func (MMCallState) String ¶
func (i MMCallState) String() string
type MMCallStateReason ¶
type MMCallStateReason int32
MMCallStateReason Reason for the state change in the call.
const ( MmCallStateReasonUnknown MMCallStateReason = 0 // Default value for a new outgoing call. MmCallStateReasonOutgoingStarted MMCallStateReason = 1 // Outgoing call is started. MmCallStateReasonIncomingNew MMCallStateReason = 2 // Received a new incoming call. MmCallStateReasonAccepted MMCallStateReason = 3 // Dialing or Ringing call is accepted. MmCallStateReasonTerminated MMCallStateReason = 4 // Call is correctly terminated. MmCallStateReasonRefusedOrBusy MMCallStateReason = 5 // Remote peer is busy or refused call. MmCallStateReasonError MMCallStateReason = 6 // Wrong number or generic network error. MmCallStateReasonAudioSetupFailed MMCallStateReason = 7 // Error setting up audio channel. MmCallStateReasonTransferred MMCallStateReason = 8 // Call has been transferred. MmCallStateReasonDeflected MMCallStateReason = 9 // Call has been deflected to a new number. )
func (MMCallStateReason) String ¶
func (i MMCallStateReason) String() string
type MMCdmaActivationError ¶
type MMCdmaActivationError uint32
MMCdmaActivationError CDMA Activation errors
const ( MmCdmaActivationErrorNone MMCdmaActivationError = 0 // No error. MmCdmaActivationErrorUnknown MMCdmaActivationError = 1 // An error occurred. MmCdmaActivationErrorRoaming MMCdmaActivationError = 2 // Device cannot activate while roaming. MmCdmaActivationErrorWrongRadioInterface MMCdmaActivationError = 3 // Device cannot activate on this network type (eg EVDO vs 1xRTT). MmCdmaActivationErrorCouldNotConnect MMCdmaActivationError = 4 // Device could not connect to the network for activation. MmCdmaActivationErrorSecurityAuthenticationFailed MMCdmaActivationError = 5 // Device could not authenticate to the network for activation. MmCdmaActivationErrorProvisioningFailed MMCdmaActivationError = 6 // Later stages of device provisioning failed. MmCdmaActivationErrorNoSignal MMCdmaActivationError = 7 // No signal available. MmCdmaActivationErrorTimedOut MMCdmaActivationError = 8 // Activation timed out. MmCdmaActivationErrorStartFailed MMCdmaActivationError = 9 // API call for initial activation failed. )
func (MMCdmaActivationError) String ¶
func (i MMCdmaActivationError) String() string
type MMConnectionError ¶
type MMConnectionError uint32
MMConnectionError Connection errors that may be reported by ModemManager.
const ( MmConnectionErrorUnknown MMConnectionError = 0 // Unknown connection error. MmConnectionErrorNoCarrier MMConnectionError = 1 // No carrier. MmConnectionErrorNoDialtone MMConnectionError = 2 // No dialtone. MmConnectionErrorBusy MMConnectionError = 3 // Busy. MmConnectionErrorNoAnswer MMConnectionError = 4 // No answer. )
func (MMConnectionError) String ¶
func (i MMConnectionError) String() string
type MMCoreError ¶
type MMCoreError uint32
MMCoreError Common errors that may be reported by ModemManager.
const ( MmCoreErrorFailed MMCoreError = 0 // Operation failed. MmCoreErrorCancelled MMCoreError = 1 // Operation was cancelled. MmCoreErrorAborted MMCoreError = 2 // Operation was aborted. MmCoreErrorUnsupported MMCoreError = 3 // Operation is not supported. MmCoreErrorNoPlugins MMCoreError = 4 // Cannot operate without valid plugins. MmCoreErrorInvalidArgs MMCoreError = 6 // Invalid arguments given. MmCoreErrorInProgress MMCoreError = 7 // Operation is already in progress. MmCoreErrorWrongState MMCoreError = 8 // Operation cannot be executed in the current state. MmCoreErrorConnected MMCoreError = 9 // Operation cannot be executed while being connected. MmCoreErrorTooMany MMCoreError = 10 // Too many items. MmCoreErrorNotFound MMCoreError = 11 // Item not found. MmCoreErrorRetry MMCoreError = 12 // Operation cannot yet be performed, retry later. MmCoreErrorExists MMCoreError = 13 // Item already exists. )
func (MMCoreError) String ¶
func (i MMCoreError) String() string
type MMFirmwareImageType ¶
type MMFirmwareImageType uint32
MMFirmwareImageType Type of firmware image.
const ( MmFirmwareImageTypeUnknown MMFirmwareImageType = 0 // Unknown firmware type. MmFirmwareImageTypeGeneric MMFirmwareImageType = 1 // Generic firmware image. MmFirmwareImageTypeGobi MMFirmwareImageType = 2 // Firmware image of Gobi devices. )
func (MMFirmwareImageType) String ¶
func (i MMFirmwareImageType) String() string
type MMKernelPropertyAction ¶
type MMKernelPropertyAction string
MMKernelPropertyAction The type of action, given as a string value (signature "s"). This parameter is MANDATORY.
const ( MMKernelPropertyActionAdd MMKernelPropertyAction = "add" // A new kernel device has been added. MMKernelPropertyActionRemove MMKernelPropertyAction = "remove" // An existing kernel device has been removed. )
mm kernel property actions
type MMLoggingLevel ¶
type MMLoggingLevel string
MMLoggingLevel Logging Level of ModemManager
const ( MMLoggingLevelError MMLoggingLevel = "ERR" // logging level error. MMLoggingLevelWarning MMLoggingLevel = "WARN" // logging level warning. MMLoggingLevelDebug MMLoggingLevel = "DEBUG" // logging level debug. )
multiple logging levels for modem manager
type MMMessageError ¶
type MMMessageError uint32
MMMessageError Enumeration of message errors, as defined in 3GPP TS 27.005 version 10 section 3.2.5.
const ( /* 0 -> 127 per 3GPP TS 24.011 [6] clause E.2 */ /* 128 -> 255 per 3GPP TS 23.040 [3] clause 9.2.3.22 */ MmMessageErrorMeFailure MMMessageError = 300 // ME failure. MmMessageErrorSmsServiceReserved MMMessageError = 301 // SMS service reserved. MmMessageErrorNotAllowed MMMessageError = 302 // Operation not allowed. MmMessageErrorNotSupported MMMessageError = 303 // Operation not supported. MmMessageErrorInvalidPduParameter MMMessageError = 304 // Invalid PDU mode parameter. MmMessageErrorInvalidTextParameter MMMessageError = 305 // Invalid text mode parameter. MmMessageErrorSimNotInserted MMMessageError = 310 // SIM not inserted. MmMessageErrorSimPin MMMessageError = 311 // SIM PIN required. MmMessageErrorPhSimPin MMMessageError = 312 // PH-SIM PIN required. MmMessageErrorSimFailure MMMessageError = 313 // SIM failure. MmMessageErrorSimBusy MMMessageError = 314 // SIM busy. MmMessageErrorSimWrong MMMessageError = 315 // SIM wrong. MmMessageErrorSimPuk MMMessageError = 316 // SIM PUK required. MmMessageErrorSimPin2 MMMessageError = 317 // SIM PIN2 required. MmMessageErrorSimPuk2 MMMessageError = 318 // SIM PUK2 required. MmMessageErrorMemoryFailure MMMessageError = 320 // Memory failure. MmMessageErrorInvalidIndex MMMessageError = 321 // Invalid index. MmMessageErrorMemoryFull MMMessageError = 322 // Memory full. MmMessageErrorSmscAddressUnknown MMMessageError = 330 // SMSC address unknown. MmMessageErrorNoNetwork MMMessageError = 331 // No network. MmMessageErrorNetworkTimeout MMMessageError = 332 // Network timeout. MmMessageErrorNoCnmaAckExpected MMMessageError = 340 // No CNMA Acknowledgement expected. MmMessageErrorUnknown MMMessageError = 500 // Unknown error. )
func (MMMessageError) String ¶
func (i MMMessageError) String() string
type MMMobileEquipmentError ¶
type MMMobileEquipmentError uint32
MMMobileEquipmentError Enumeration of Mobile Equipment errors, as defined in 3GPP TS 07.07 version 7.8.0.
const ( /* General errors */ MmMobileEquipmentErrorPhoneFailure MMMobileEquipmentError = 0 // Phone failure. MmMobileEquipmentErrorNoConnection MMMobileEquipmentError = 1 // No connection to phone. MmMobileEquipmentErrorLinkReserved MMMobileEquipmentError = 2 // Phone-adaptor link reserved. MmMobileEquipmentErrorNotAllowed MMMobileEquipmentError = 3 // Operation not allowed. MmMobileEquipmentErrorNotSupported MMMobileEquipmentError = 4 // Operation not supported. MmMobileEquipmentErrorPhSimPin MMMobileEquipmentError = 5 // PH-SIM PIN required. MmMobileEquipmentErrorPhFsimPin MMMobileEquipmentError = 6 // PH-FSIM PIN required. MmMobileEquipmentErrorPhFsimPuk MMMobileEquipmentError = 7 // PH-FSIM PUK required. MmMobileEquipmentErrorSimNotInserted MMMobileEquipmentError = 10 // SIM not inserted. MmMobileEquipmentErrorSimPin MMMobileEquipmentError = 11 // SIM PIN required. MmMobileEquipmentErrorSimPuk MMMobileEquipmentError = 12 // SIM PUK required. MmMobileEquipmentErrorSimFailure MMMobileEquipmentError = 13 // SIM failure. MmMobileEquipmentErrorSimBusy MMMobileEquipmentError = 14 // SIM busy. MmMobileEquipmentErrorSimWrong MMMobileEquipmentError = 15 // SIM wrong. MmMobileEquipmentErrorIncorrectPassword MMMobileEquipmentError = 16 // Incorrect password. MmMobileEquipmentErrorSimPin2 MMMobileEquipmentError = 17 // SIM PIN2 required. MmMobileEquipmentErrorSimPuk2 MMMobileEquipmentError = 18 // SIM PUK2 required. MmMobileEquipmentErrorMemoryFull MMMobileEquipmentError = 20 // Memory full. MmMobileEquipmentErrorInvalidIndex MMMobileEquipmentError = 21 // Invalid index. MmMobileEquipmentErrorNotFound MMMobileEquipmentError = 22 // Not found. MmMobileEquipmentErrorMemoryFailure MMMobileEquipmentError = 23 // Memory failure. MmMobileEquipmentErrorTextTooLong MMMobileEquipmentError = 24 // Text string too long. MmMobileEquipmentErrorInvalidChars MMMobileEquipmentError = 25 // Invalid characters in text string. MmMobileEquipmentErrorDialStringTooLong MMMobileEquipmentError = 26 // Dial string too long. MmMobileEquipmentErrorDialStringInvalid MMMobileEquipmentError = 27 // Invalid characters in dial string. MmMobileEquipmentErrorNoNetwork MMMobileEquipmentError = 30 // No network service. MmMobileEquipmentErrorNetworkTimeout MMMobileEquipmentError = 31 // Network timeout. MmMobileEquipmentErrorNetworkNotAllowed MMMobileEquipmentError = 32 // Network not allowed - Emergency calls only. MmMobileEquipmentErrorNetworkPin MMMobileEquipmentError = 40 // Network personalisation PIN required. MmMobileEquipmentErrorNetworkPuk MMMobileEquipmentError = 41 // Network personalisation PUK required. MmMobileEquipmentErrorNetworkSubsetPin MMMobileEquipmentError = 42 // Network subset personalisation PIN required. MmMobileEquipmentErrorNetworkSubsetPuk MMMobileEquipmentError = 43 // Network subset personalisation PUK required. MmMobileEquipmentErrorServicePin MMMobileEquipmentError = 44 // Service provider personalisation PIN required. MmMobileEquipmentErrorServicePuk MMMobileEquipmentError = 45 // Service provider personalisation PUK required. MmMobileEquipmentErrorCorpPin MMMobileEquipmentError = 46 // Corporate personalisation PIN required. MmMobileEquipmentErrorCorpPuk MMMobileEquipmentError = 47 // Corporate personalisation PUK required. MmMobileEquipmentErrorHiddenKeyRequired MMMobileEquipmentError = 48 // Hidden key required. Since: 1.8. MmMobileEquipmentErrorEapMethodNotSupported MMMobileEquipmentError = 49 // EAP method not supported. Since: 1.8. MmMobileEquipmentErrorIncorrectParameters MMMobileEquipmentError = 50 // Incorrect parameters. Since: 1.8. MmMobileEquipmentErrorUnknown MMMobileEquipmentError = 100 // Unknown. /* GPRS related errors */ MmMobileEquipmentErrorGprsImsiUnknownInHlr MMMobileEquipmentError = 102 // IMSI unknown in HLR. MmMobileEquipmentErrorGprsIllegalMs MMMobileEquipmentError = 103 // IMSI unknown in VLR. MmMobileEquipmentErrorGprsImsiUnknownInVlr MMMobileEquipmentError = 104 // Illegal MS. MmMobileEquipmentErrorGprsIllegalMe MMMobileEquipmentError = 106 // Illegal ME. MmMobileEquipmentErrorGprsServiceNotAllowed MMMobileEquipmentError = 107 // GPRS service not allowed. MmMobileEquipmentErrorGprsAndNonGprsServicesNotAllowed MMMobileEquipmentError = 108 // GPRS and non-GPRS services not allowed. Since: 1.8. MmMobileEquipmentErrorGprsPlmnNotAllowed MMMobileEquipmentError = 111 // PLMN not allowed. MmMobileEquipmentErrorGprsLocationNotAllowed MMMobileEquipmentError = 112 // Location area not allowed. MmMobileEquipmentErrorGprsRoamingNotAllowed MMMobileEquipmentError = 113 // Roaming not allowed in this location area. MmMobileEquipmentErrorGprsNoCellsInLocationArea MMMobileEquipmentError = 115 // No cells in this location area. MmMobileEquipmentErrorGprsNetworkFailure MMMobileEquipmentError = 117 // Network failure. MmMobileEquipmentErrorGprsCongestion MMMobileEquipmentError = 122 // Congestion. MmMobileEquipmentErrorGprsNotAuthorizedForCsg MMMobileEquipmentError = 125 // GPRS not authorized for CSG. Since: 1.8. MmMobileEquipmentErrorGprsInsufficientResources MMMobileEquipmentError = 126 // Insufficient resources. Since 1.4. MmMobileEquipmentErrorGprsMissingOrUnknownApn MMMobileEquipmentError = 127 // Missing or unknown APN. Since 1.4. MmMobileEquipmentErrorGprsUnknownPdpAddressOrType MMMobileEquipmentError = 128 // Unknown PDP address or type. Since: 1.8. MmMobileEquipmentErrorGprsUserAuthenticationFailed MMMobileEquipmentError = 129 // User authentication failed. Since 1.4. MmMobileEquipmentErrorGprsActivationRejectedByGgsnOrGw MMMobileEquipmentError = 130 // Activation rejected by GGSN or gateway. Since: 1.8. MmMobileEquipmentErrorGprsActivationRejectedUnspecified MMMobileEquipmentError = 131 // Activation rejected (reason unspecified). Since: 1.8. MmMobileEquipmentErrorGprsServiceOptionNotSupported MMMobileEquipmentError = 132 // Service option not supported. MmMobileEquipmentErrorGprsServiceOptionNotSubscribed MMMobileEquipmentError = 133 // Requested service option not subscribed. MmMobileEquipmentErrorGprsServiceOptionOutOfOrder MMMobileEquipmentError = 134 // Service option temporarily out of order. MmMobileEquipmentErrorGprsFeatureNotSupported MMMobileEquipmentError = 140 // Feature not supported. Since: 1.8. MmMobileEquipmentErrorGprsSemanticErrorInTftOperation MMMobileEquipmentError = 141 // Semantic error in TFT operation. Since: 1.8. MmMobileEquipmentErrorGprsSyntacticalErrorInTftOperation MMMobileEquipmentError = 142 // Syntactical error in TFT operation. Since: 1.8. MmMobileEquipmentErrorGprsUnknownPdpContext MMMobileEquipmentError = 143 // Unknown PDP context. Since: 1.8. MmMobileEquipmentErrorGprsSemanticErrorsInPacketFilter MMMobileEquipmentError = 144 // Semantic errors in packet filter. Since: 1.8. MmMobileEquipmentErrorGprsSyntacticalErrorInPacketFilter MMMobileEquipmentError = 145 // Syntactical error in packet filter. Since: 1.8. MmMobileEquipmentErrorGprsPdpContextWithoutTftAlreadyActivated MMMobileEquipmentError = 146 // PDP context witout TFT already activated. Since: 1.8. MmMobileEquipmentErrorGprsUnknown MMMobileEquipmentError = 148 // Unspecified GPRS error. MmMobileEquipmentErrorGprsPdpAuthFailure MMMobileEquipmentError = 149 // PDP authentication failure. MmMobileEquipmentErrorGprsInvalidMobileClass MMMobileEquipmentError = 150 // Invalid mobile class. MmMobileEquipmentErrorGprsLastPdnDisconnectionNotAllowedLegacy MMMobileEquipmentError = 151 // Last PDN disconnection not allowed (legacy value defined before 3GPP Rel-11). Since: 1.14. MmMobileEquipmentErrorGprsLastPdnDisconnectionNotAllowed MMMobileEquipmentError = 171 // Last PDN disconnection not allowed. Since: 1.8. MmMobileEquipmentErrorGprsSemanticallyIncorrectMessage MMMobileEquipmentError = 172 // Semantically incorrect message. Since: 1.8. MmMobileEquipmentErrorGprsMandatoryIeError MMMobileEquipmentError = 173 // Mandatory IE error. Since: 1.8. MmMobileEquipmentErrorGprsIeNotImplemented MMMobileEquipmentError = 174 // IE not implemented. Since: 1.8. MmMobileEquipmentErrorGprsConditionalIeError MMMobileEquipmentError = 175 // Conditional IE error. Since: 1.8. MmMobileEquipmentErrorGprsUnspecifiedProtocolError MMMobileEquipmentError = 176 // Unspecified protocol error. Since: 1.8. MmMobileEquipmentErrorGprsOperatorDeterminedBarring MMMobileEquipmentError = 177 // Operator determined barring. Since: 1.8. MmMobileEquipmentErrorGprsMaximumNumberOfPdpContextsReached MMMobileEquipmentError = 178 // Maximum number of PDP contexts reached. Since: 1.8. MmMobileEquipmentErrorGprsRequestedApnNotSupported MMMobileEquipmentError = 179 // Requested APN not supported. Since: 1.8. MmMobileEquipmentErrorGprsRequestRejectedBcmViolation MMMobileEquipmentError = 180 // Request rejected (BCM violation). Since: 1.8. )
func (MMMobileEquipmentError) String ¶
func (i MMMobileEquipmentError) String() string
type MMModem3gppEpsUeModeOperation ¶
type MMModem3gppEpsUeModeOperation uint32
MMModem3gppEpsUeModeOperation UE mode of operation for EPS, as per 3GPP TS 24.301.
const ( MmModem3gppEpsUeModeOperationUnknown MMModem3gppEpsUeModeOperation = 0 // Unknown or not applicable. MmModem3gppEpsUeModeOperationPs1 MMModem3gppEpsUeModeOperation = 1 // PS mode 1 of operation: EPS only, voice-centric. MmModem3gppEpsUeModeOperationPs2 MMModem3gppEpsUeModeOperation = 2 // PS mode 2 of operation: EPS only, data-centric. MmModem3gppEpsUeModeOperationCsps1 MMModem3gppEpsUeModeOperation = 3 // CS/PS mode 1 of operation: EPS and non-EPS, voice-centric. MmModem3gppEpsUeModeOperationCsps2 MMModem3gppEpsUeModeOperation = 4 // CS/PS mode 2 of operation: EPS and non-EPS, data-centric. )
func (MMModem3gppEpsUeModeOperation) String ¶
func (i MMModem3gppEpsUeModeOperation) String() string
type MMModem3gppFacility ¶
type MMModem3gppFacility uint32
MMModem3gppFacility A bitfield describing which facilities have a lock enabled, i.e., requires a pin or unlock code. The facilities include the personalizations (device locks) described in 3GPP spec TS 22.022, and the PIN and PIN2 locks, which are SIM locks.
const ( MmModem3gppFacilityNone MMModem3gppFacility = 0 // No facility. MmModem3gppFacilitySim MMModem3gppFacility = 1 << 0 // SIM lock. MmModem3gppFacilityFixedDialing MMModem3gppFacility = 1 << 1 // Fixed dialing (PIN2) SIM lock. MmModem3gppFacilityPhSim MMModem3gppFacility = 1 << 2 // Device is locked to a specific SIM. MmModem3gppFacilityPhFsim MMModem3gppFacility = 1 << 3 // Device is locked to first SIM inserted. MmModem3gppFacilityNetPers MMModem3gppFacility = 1 << 4 // Network personalization. MmModem3gppFacilityNetSubPers MMModem3gppFacility = 1 << 5 // Network subset personalization. MmModem3gppFacilityProviderPers MMModem3gppFacility = 1 << 6 // Service provider personalization. MmModem3gppFacilityCorpPers MMModem3gppFacility = 1 << 7 // Corporate personalization. )
func (MMModem3gppFacility) BitmaskToSlice ¶
func (f MMModem3gppFacility) BitmaskToSlice(bitmask uint32) (facilities []MMModem3gppFacility)
BitmaskToSlice bitmask to slice
func (MMModem3gppFacility) GetAllFacilities ¶
func (f MMModem3gppFacility) GetAllFacilities() []MMModem3gppFacility
GetAllFacilities returns all facilities
func (MMModem3gppFacility) SliceToBitmask ¶
func (f MMModem3gppFacility) SliceToBitmask(facilities []MMModem3gppFacility) (bitmask uint32)
SliceToBitmask slice to bitmask
func (MMModem3gppFacility) String ¶
func (i MMModem3gppFacility) String() string
type MMModem3gppNetworkAvailability ¶
type MMModem3gppNetworkAvailability uint32
MMModem3gppNetworkAvailability Network availability status as defined in 3GPP TS 27.007 section 7.3.
const ( MmModem3gppNetworkAvailabilityUnknown MMModem3gppNetworkAvailability = 0 // Unknown availability. MmModem3gppNetworkAvailabilityAvailable MMModem3gppNetworkAvailability = 1 // Network is available. MmModem3gppNetworkAvailabilityCurrent MMModem3gppNetworkAvailability = 2 // Network is the current one. MmModem3gppNetworkAvailabilityForbidden MMModem3gppNetworkAvailability = 3 // Network is forbidden. )
func (MMModem3gppNetworkAvailability) String ¶
func (i MMModem3gppNetworkAvailability) String() string
type MMModem3gppRegistrationState ¶
type MMModem3gppRegistrationState uint32
MMModem3gppRegistrationState GSM registration code as defined in 3GPP TS 27.007.
const ( MmModem3gppRegistrationStateIdle MMModem3gppRegistrationState = 0 // Not registered, not searching for new operator to register. MmModem3gppRegistrationStateHome MMModem3gppRegistrationState = 1 // Registered on home network. MmModem3gppRegistrationStateSearching MMModem3gppRegistrationState = 2 // Not registered, searching for new operator to register with. MmModem3gppRegistrationStateDenied MMModem3gppRegistrationState = 3 // Registration denied. MmModem3gppRegistrationStateUnknown MMModem3gppRegistrationState = 4 // Unknown registration status. MmModem3gppRegistrationStateRoaming MMModem3gppRegistrationState = 5 // Registered on a roaming network. MmModem3gppRegistrationStateHomeSmsOnly MMModem3gppRegistrationState = 6 // Registered for "SMS only", home network (applicable only when on LTE). MmModem3gppRegistrationStateRoamingSmsOnly MMModem3gppRegistrationState = 7 // Registered for "SMS only", roaming network (applicable only when on LTE). MmModem3gppRegistrationStateEmergencyOnly MMModem3gppRegistrationState = 8 // Emergency services only. MmModem3gppRegistrationStateHomeCsfbNotPreferred MMModem3gppRegistrationState = 9 // Registered for "CSFB not preferred", home network (applicable only when on LTE). MmModem3gppRegistrationStateRoamingCsfbNotPreferred MMModem3gppRegistrationState = 10 // Registered for "CSFB not preferred", roaming network (applicable only when on LTE). )
func (MMModem3gppRegistrationState) String ¶
func (i MMModem3gppRegistrationState) String() string
type MMModem3gppSubscriptionState ¶
type MMModem3gppSubscriptionState uint32
MMModem3gppSubscriptionState Describes the current subscription status of the SIM. This value is only available after the modem attempts to register with the network.
const ( MmModem3gppSubscriptionStateUnknown MMModem3gppSubscriptionState = 0 // The subscription state is unknown. MmModem3gppSubscriptionStateUnprovisioned MMModem3gppSubscriptionState = 1 // The account is unprovisioned. MmModem3gppSubscriptionStateProvisioned MMModem3gppSubscriptionState = 2 // The account is provisioned and has data available. MmModem3gppSubscriptionStateOutOfData MMModem3gppSubscriptionState = 3 // The account is provisioned but there is no data left. )
func (MMModem3gppSubscriptionState) String ¶
func (i MMModem3gppSubscriptionState) String() string
type MMModem3gppUssdSessionState ¶
type MMModem3gppUssdSessionState uint32
MMModem3gppUssdSessionState State of a USSD session.
const ( MmModem3gppUssdSessionStateUnknown MMModem3gppUssdSessionState = 0 // Unknown state. MmModem3gppUssdSessionStateIdle MMModem3gppUssdSessionState = 1 // No active session. MmModem3gppUssdSessionStateActive MMModem3gppUssdSessionState = 2 // A session is active and the mobile is waiting for a response. MmModem3gppUssdSessionStateUserResponse MMModem3gppUssdSessionState = 3 // The network is waiting for the client's response. )
func (MMModem3gppUssdSessionState) String ¶
func (i MMModem3gppUssdSessionState) String() string
type MMModemAccessTechnology ¶
type MMModemAccessTechnology uint32
MMModemAccessTechnology Describes various access technologies that a device uses when registered with or connected to a network.
const ( MmModemAccessTechnologyUnknown MMModemAccessTechnology = 0 // The access technology used is unknown. MmModemAccessTechnologyPots MMModemAccessTechnology = 1 << 0 // Analog wireline telephone. MmModemAccessTechnologyGsm MMModemAccessTechnology = 1 << 1 // GSM. MmModemAccessTechnologyGsmCompact MMModemAccessTechnology = 1 << 2 // Compact GSM. MmModemAccessTechnologyGprs MMModemAccessTechnology = 1 << 3 // GPRS. MmModemAccessTechnologyEdge MMModemAccessTechnology = 1 << 4 // EDGE (ETSI 27.007: "GSM w/EGPRS"). MmModemAccessTechnologyUmts MMModemAccessTechnology = 1 << 5 // UMTS (ETSI 27.007: "UTRAN"). MmModemAccessTechnologyHsdpa MMModemAccessTechnology = 1 << 6 // HSDPA (ETSI 27.007: "UTRAN w/HSDPA"). MmModemAccessTechnologyHsupa MMModemAccessTechnology = 1 << 7 // HSUPA (ETSI 27.007: "UTRAN w/HSUPA"). MmModemAccessTechnologyHspa MMModemAccessTechnology = 1 << 8 // HSPA (ETSI 27.007: "UTRAN w/HSDPA and HSUPA"). MmModemAccessTechnologyHspaPlus MMModemAccessTechnology = 1 << 9 // HSPA+ (ETSI 27.007: "UTRAN w/HSPA+"). MmModemAccessTechnology1xrtt MMModemAccessTechnology = 1 << 10 // CDMA2000 1xRTT. MmModemAccessTechnologyEvdo0 MMModemAccessTechnology = 1 << 11 // CDMA2000 EVDO revision 0. MmModemAccessTechnologyEvdoa MMModemAccessTechnology = 1 << 12 // CDMA2000 EVDO revision A. MmModemAccessTechnologyEvdob MMModemAccessTechnology = 1 << 13 // CDMA2000 EVDO revision B. MmModemAccessTechnologyLte MMModemAccessTechnology = 1 << 14 // LTE (ETSI 27.007: "E-UTRAN") MmModemAccessTechnologyAny MMModemAccessTechnology = 0xFFFFFFFF // Mask specifying all access technologies. )
func (MMModemAccessTechnology) BitmaskToSlice ¶
func (t MMModemAccessTechnology) BitmaskToSlice(bitmask uint32) (technologies []MMModemAccessTechnology)
BitmaskToSlice bitmask to slice
func (MMModemAccessTechnology) GetAllTechnologies ¶
func (t MMModemAccessTechnology) GetAllTechnologies() []MMModemAccessTechnology
GetAllTechnologies returns all technologies
func (MMModemAccessTechnology) SliceToBitmask ¶
func (t MMModemAccessTechnology) SliceToBitmask(technologies []MMModemAccessTechnology) (bitmask uint32)
SliceToBitmask slice to bitmask
func (MMModemAccessTechnology) String ¶
func (i MMModemAccessTechnology) String() string
type MMModemBand ¶
type MMModemBand uint32
MMModemBand Radio bands supported by the device when connecting to a mobile network.
const ( MmModemBandUnknown MMModemBand = 0 // Unknown or invalid band. /* GSM/UMTS bands */ MmModemBandEgsm MMModemBand = 1 // GSM/GPRS/EDGE 900 MHz. MmModemBandDcs MMModemBand = 2 // GSM/GPRS/EDGE 1800 MHz. MmModemBandPcs MMModemBand = 3 // GSM/GPRS/EDGE 1900 MHz. MmModemBandG850 MMModemBand = 4 // GSM/GPRS/EDGE 850 MHz. MmModemBandUtran1 MMModemBand = 5 // UMTS 2100 MHz (IMT, UTRAN band 1). MmModemBandUtran3 MMModemBand = 6 // UMTS 1800 MHz (DCS, UTRAN band 3). MmModemBandUtran4 MMModemBand = 7 // UMTS 1700 MHz (AWS A-F, UTRAN band 4). MmModemBandUtran6 MMModemBand = 8 // UMTS 800 MHz (UTRAN band 6). MmModemBandUtran5 MMModemBand = 9 // UMTS 850 MHz (CLR, UTRAN band 5). MmModemBandUtran8 MMModemBand = 10 //UMTS 900 MHz (E-GSM, UTRAN band 8). MmModemBandUtran9 MMModemBand = 11 // UMTS 1700 MHz (UTRAN band 9). MmModemBandUtran2 MMModemBand = 12 // UMTS 1900 MHz (PCS A-F, UTRAN band 2). MmModemBandUtran7 MMModemBand = 13 // UMTS 2600 MHz (IMT-E, UTRAN band 7). MmModemBandG450 MMModemBand = 14 // GSM/GPRS/EDGE 450 MHz. MmModemBandG480 MMModemBand = 15 // GSM/GPRS/EDGE 480 MHz. MmModemBandG750 MMModemBand = 16 // GSM/GPRS/EDGE 750 MHz. MmModemBandG380 MMModemBand = 17 // GSM/GPRS/EDGE 380 MHz. MmModemBandG410 MMModemBand = 18 // GSM/GPRS/EDGE 410 MHz. MmModemBandG710 MMModemBand = 19 // GSM/GPRS/EDGE 710 MHz. MmModemBandG810 MMModemBand = 20 // GSM/GPRS/EDGE 810 MHz. /* LTE bands */ MmModemBandEutran1 MMModemBand = 31 // E-UTRAN band 1. MmModemBandEutran2 MMModemBand = 32 // E-UTRAN band 2. MmModemBandEutran3 MMModemBand = 33 // E-UTRAN band 3. MmModemBandEutran4 MMModemBand = 34 // E-UTRAN band 4. MmModemBandEutran5 MMModemBand = 35 // E-UTRAN band 5. MmModemBandEutran6 MMModemBand = 36 // E-UTRAN band 6. MmModemBandEutran7 MMModemBand = 37 // E-UTRAN band 7. MmModemBandEutran8 MMModemBand = 38 // E-UTRAN band 8. MmModemBandEutran9 MMModemBand = 39 // E-UTRAN band 9. MmModemBandEutran10 MMModemBand = 40 // E-UTRAN band 10. MmModemBandEutran11 MMModemBand = 41 // E-UTRAN band 11. MmModemBandEutran12 MMModemBand = 42 // E-UTRAN band 12. MmModemBandEutran13 MMModemBand = 43 // E-UTRAN band 13. MmModemBandEutran14 MMModemBand = 44 // E-UTRAN band 14. MmModemBandEutran17 MMModemBand = 47 // E-UTRAN band 17. MmModemBandEutran18 MMModemBand = 48 // E-UTRAN band 18. MmModemBandEutran19 MMModemBand = 49 // E-UTRAN band 19. MmModemBandEutran20 MMModemBand = 50 // E-UTRAN band 20. MmModemBandEutran21 MMModemBand = 51 // E-UTRAN band 21. MmModemBandEutran22 MMModemBand = 52 // E-UTRAN band 22. MmModemBandEutran23 MMModemBand = 53 // E-UTRAN band 23. MmModemBandEutran24 MMModemBand = 54 // E-UTRAN band 24. MmModemBandEutran25 MMModemBand = 55 // E-UTRAN band 25. MmModemBandEutran26 MMModemBand = 56 // E-UTRAN band 26. MmModemBandEutran27 MMModemBand = 57 // E-UTRAN band 27. MmModemBandEutran28 MMModemBand = 58 // E-UTRAN band 28. MmModemBandEutran29 MMModemBand = 59 // E-UTRAN band 29. MmModemBandEutran30 MMModemBand = 60 // E-UTRAN band 30. MmModemBandEutran31 MMModemBand = 61 // E-UTRAN band 31. MmModemBandEutran32 MMModemBand = 62 // E-UTRAN band 32. MmModemBandEutran33 MMModemBand = 63 // E-UTRAN band 33. MmModemBandEutran34 MMModemBand = 64 // E-UTRAN band 34. MmModemBandEutran35 MMModemBand = 65 // E-UTRAN band 35. MmModemBandEutran36 MMModemBand = 66 // E-UTRAN band 36. MmModemBandEutran37 MMModemBand = 67 // E-UTRAN band 37. MmModemBandEutran38 MMModemBand = 68 // E-UTRAN band 38. MmModemBandEutran39 MMModemBand = 69 // E-UTRAN band 39. MmModemBandEutran40 MMModemBand = 70 // E-UTRAN band 40 MmModemBandEutran41 MMModemBand = 71 // E-UTRAN band 41. MmModemBandEutran42 MMModemBand = 72 // E-UTRAN band 42. MmModemBandEutran43 MMModemBand = 73 // E-UTRAN band 43. MmModemBandEutran44 MMModemBand = 74 // E-UTRAN band 44. MmModemBandEutran45 MMModemBand = 75 // E-UTRAN band 45. MmModemBandEutran46 MMModemBand = 76 // E-UTRAN band 46. MmModemBandEutran47 MMModemBand = 77 // E-UTRAN band 47. MmModemBandEutran48 MMModemBand = 78 // E-UTRAN band 48. MmModemBandEutran49 MMModemBand = 79 // E-UTRAN band 49. MmModemBandEutran50 MMModemBand = 80 // E-UTRAN band 50. MmModemBandEutran51 MMModemBand = 81 // E-UTRAN band 51. MmModemBandEutran52 MMModemBand = 82 // E-UTRAN band 52. MmModemBandEutran53 MMModemBand = 83 // E-UTRAN band 53. MmModemBandEutran54 MMModemBand = 84 // E-UTRAN band 54. MmModemBandEutran55 MMModemBand = 85 // E-UTRAN band 55. MmModemBandEutran56 MMModemBand = 86 // E-UTRAN band 56. MmModemBandEutran57 MMModemBand = 87 // E-UTRAN band 57. MmModemBandEutran58 MMModemBand = 88 // E-UTRAN band 58. MmModemBandEutran59 MMModemBand = 89 // E-UTRAN band 59. MmModemBandEutran60 MMModemBand = 90 // E-UTRAN band 60. MmModemBandEutran61 MMModemBand = 91 // E-UTRAN band 61. MmModemBandEutran62 MMModemBand = 92 // E-UTRAN band 62. MmModemBandEutran63 MMModemBand = 93 // E-UTRAN band 63. MmModemBandEutran64 MMModemBand = 94 // E-UTRAN band 64. MmModemBandEutran65 MMModemBand = 95 // E-UTRAN band 65. MmModemBandEutran66 MMModemBand = 96 // E-UTRAN band 66. MmModemBandEutran67 MMModemBand = 97 // E-UTRAN band 67. MmModemBandEutran68 MMModemBand = 98 // E-UTRAN band 68. MmModemBandEutran69 MMModemBand = 99 // E-UTRAN band 69. MmModemBandEutran70 MMModemBand = 100 // E-UTRAN band 70. MmModemBandEutran71 MMModemBand = 101 // E-UTRAN band 71. /* CDMA Band Classes (see 3GPP2 C.S0057-C) */ MmModemBandCdmaBc0 MMModemBand = 128 // CDMA Band Class 0 (US Cellular 850MHz). MmModemBandCdmaBc1 MMModemBand = 129 // CDMA Band Class 1 (US PCS 1900MHz). MmModemBandCdmaBc2 MMModemBand = 130 // CDMA Band Class 2 (UK TACS 900MHz). MmModemBandCdmaBc3 MMModemBand = 131 // CDMA Band Class 3 (Japanese TACS). MmModemBandCdmaBc4 MMModemBand = 132 // CDMA Band Class 4 (Korean PCS). MmModemBandCdmaBc5 MMModemBand = 134 // CDMA Band Class 5 (NMT 450MHz). MmModemBandCdmaBc6 MMModemBand = 135 // CDMA Band Class 6 (IMT2000 2100MHz). MmModemBandCdmaBc7 MMModemBand = 136 // CDMA Band Class 7 (Cellular 700MHz). MmModemBandCdmaBc8 MMModemBand = 137 // CDMA Band Class 8 (1800MHz). MmModemBandCdmaBc9 MMModemBand = 138 // CDMA Band Class 9 (900MHz). MmModemBandCdmaBc10 MMModemBand = 139 // (US Secondary 800). MmModemBandCdmaBc11 MMModemBand = 140 // (European PAMR 400MHz). MmModemBandCdmaBc12 MMModemBand = 141 // (PAMR 800MHz). MmModemBandCdmaBc13 MMModemBand = 142 // (IMT2000 2500MHz Expansion). MmModemBandCdmaBc14 MMModemBand = 143 // (More US PCS 1900MHz). MmModemBandCdmaBc15 MMModemBand = 144 // (AWS 1700MHz). MmModemBandCdmaBc16 MMModemBand = 145 // (US 2500MHz). MmModemBandCdmaBc17 MMModemBand = 146 // (US 2500MHz Forward Link Only). MmModemBandCdmaBc18 MMModemBand = 147 // (US 700MHz Public Safety). MmModemBandCdmaBc19 MMModemBand = 148 // (US Lower 700MHz). /* Additional UMTS bands: * 15-18 reserved * 23-24 reserved * 27-31 reserved */ MmModemBandUtran10 MMModemBand = 210 // UMTS 1700 MHz (EAWS A-G, UTRAN band 10). MmModemBandUtran11 MMModemBand = 211 // UMTS 1500 MHz (LPDC, UTRAN band 11). MmModemBandUtran12 MMModemBand = 212 // UMTS 700 MHz (LSMH A/B/C, UTRAN band 12) MmModemBandUtran13 MMModemBand = 213 // UMTS 700 MHz (USMH C, UTRAN band 13) MmModemBandUtran14 MMModemBand = 214 // UMTS 700 MHz (USMH D, UTRAN band 14) MmModemBandUtran19 MMModemBand = 219 // UMTS 800 MHz (UTRAN band 19). MmModemBandUtran20 MMModemBand = 220 // UMTS 800 MHz (EUDD, UTRAN band 20). MmModemBandUtran21 MMModemBand = 221 // UMTS 1500 MHz (UPDC, UTRAN band 21). MmModemBandUtran22 MMModemBand = 222 // UMTS 3500 MHz (UTRAN band 22). MmModemBandUtran25 MMModemBand = 225 // UMTS 1900 MHz (EPCS A-G, UTRAN band 25). MmModemBandUtran26 MMModemBand = 226 // UMTS 850 MHz (ECLR, UTRAN band 26). MmModemBandUtran32 MMModemBand = 232 // UMTS 1500 MHz (L-band, UTRAN band 32). /* All/Any */ MmModemBandAny MMModemBand = 256 // For certain operations, allow the modem to select a band automatically. )
func (MMModemBand) String ¶
func (i MMModemBand) String() string
type MMModemCapability ¶
type MMModemCapability uint32
MMModemCapability Flags describing one or more of the general access technology families that a modem supports.
const ( MmModemCapabilityNone MMModemCapability = 0 // Modem has no capabilities. MmModemCapabilityPots MMModemCapability = 1 << 0 // Modem supports the analog wired telephone network (ie 56k dialup) and does not have wireless/cellular capabilities. MmModemCapabilityCdmaEvdo MMModemCapability = 1 << 1 // Modem supports at least one of CDMA 1xRTT, EVDO revision 0, EVDO revision A, or EVDO revision B. MmModemCapabilityGsmUmts MMModemCapability = 1 << 2 // Modem supports at least one of GSM, GPRS, EDGE, UMTS, HSDPA, HSUPA, or HSPA+ packet switched data capability. MmModemCapabilityLte MMModemCapability = 1 << 3 // Modem has LTE data capability. MmModemCapabilityLteAdvanced MMModemCapability = 1 << 4 // Modem has LTE Advanced data capability. MmModemCapabilityIridium MMModemCapability = 1 << 5 //Modem has Iridium capabilities. MmModemCapabilityAny MMModemCapability = 0xFFFFFFFF // Mask specifying all capabilities. )
func (MMModemCapability) BitmaskToSlice ¶
func (c MMModemCapability) BitmaskToSlice(bitmask uint32) (capabilities []MMModemCapability)
BitmaskToSlice bitmask to slice
func (MMModemCapability) GetAllCapabilities ¶
func (c MMModemCapability) GetAllCapabilities() []MMModemCapability
GetAllCapabilities returns all capabilities
func (MMModemCapability) SliceToBitmask ¶
func (c MMModemCapability) SliceToBitmask(capabilities []MMModemCapability) (bitmask uint32)
SliceToBitmask slice to bitmask
func (MMModemCapability) String ¶
func (i MMModemCapability) String() string
type MMModemCdmaActivationState ¶
type MMModemCdmaActivationState uint32
MMModemCdmaActivationState Activation state of a CDMA modem.
const ( MmModemCdmaActivationStateUnknown MMModemCdmaActivationState = 0 // Unknown activation state. MmModemCdmaActivationStateNotActivated MMModemCdmaActivationState = 1 // Device is not activated MmModemCdmaActivationStateActivating MMModemCdmaActivationState = 2 // Device is activating MmModemCdmaActivationStatePartiallyActivated MMModemCdmaActivationState = 3 // Device is partially activated; carrier-specific steps required to continue. MmModemCdmaActivationStateActivated MMModemCdmaActivationState = 4 // Device is ready for use. )
func (MMModemCdmaActivationState) String ¶
func (i MMModemCdmaActivationState) String() string
type MMModemCdmaRegistrationState ¶
type MMModemCdmaRegistrationState uint32
MMModemCdmaRegistrationState Registration state of a CDMA modem.
const ( MmModemCdmaRegistrationStateUnknown MMModemCdmaRegistrationState = 0 // Registration status is unknown or the device is not registered. MmModemCdmaRegistrationStateRegistered MMModemCdmaRegistrationState = 1 // Registered, but roaming status is unknown or cannot be provided by the device. The device may or may not be roaming. MmModemCdmaRegistrationStateHome MMModemCdmaRegistrationState = 2 // Currently registered on the home network. MmModemCdmaRegistrationStateRoaming MMModemCdmaRegistrationState = 3 // Currently registered on a roaming network. )
func (MMModemCdmaRegistrationState) String ¶
func (i MMModemCdmaRegistrationState) String() string
type MMModemCdmaRmProtocol ¶
type MMModemCdmaRmProtocol uint32
MMModemCdmaRmProtocol Protocol of the Rm interface in modems with CDMA capabilities.
const ( MmModemCdmaRmProtocolUnknown MMModemCdmaRmProtocol = 0 // Unknown protocol. MmModemCdmaRmProtocolAsync MMModemCdmaRmProtocol = 1 // Asynchronous data or fax. MmModemCdmaRmProtocolPacketRelay MMModemCdmaRmProtocol = 2 // Packet data service, Relay Layer Rm interface. MmModemCdmaRmProtocolPacketNetworkPpp MMModemCdmaRmProtocol = 3 // Packet data service, Network Layer Rm interface, PPP. MmModemCdmaRmProtocolPacketNetworkSlip MMModemCdmaRmProtocol = 4 // Packet data service, Network Layer Rm interface, SLIP. MmModemCdmaRmProtocolStuIii MMModemCdmaRmProtocol = 5 // STU-III service. )
func (MMModemCdmaRmProtocol) String ¶
func (i MMModemCdmaRmProtocol) String() string
type MMModemContactsStorage ¶
type MMModemContactsStorage uint32
MMModemContactsStorage Specifies different storage locations for contact information.
const ( MmModemContactsStorageUnknown MMModemContactsStorage = 0 // Unknown location. MmModemContactsStorageMe MMModemContactsStorage = 1 // Device's local memory. MmModemContactsStorageSm MMModemContactsStorage = 2 // Card inserted in the device (like a SIM/RUIM). MmModemContactsStorageMt MMModemContactsStorage = 3 // Combined device/ME and SIM/SM phonebook. )
func (MMModemContactsStorage) String ¶
func (i MMModemContactsStorage) String() string
type MMModemFirmwareUpdateMethod ¶
type MMModemFirmwareUpdateMethod uint32
MMModemFirmwareUpdateMethod Type of firmware update method supported by the module.
const ( MmModemFirmwareUpdateMethodNone MMModemFirmwareUpdateMethod = 0 // No method specified. MmModemFirmwareUpdateMethodFastboot MMModemFirmwareUpdateMethod = 1 << 0 // Device supports fastboot-based update. MmModemFirmwareUpdateMethodQmiPdc MMModemFirmwareUpdateMethod = 1 << 1 // Device supports QMI PDC based update. )
func (MMModemFirmwareUpdateMethod) BitmaskToSlice ¶
func (fu MMModemFirmwareUpdateMethod) BitmaskToSlice(bitmask uint32) (ipFamilies []MMModemFirmwareUpdateMethod)
BitmaskToSlice bitmask to slice
func (MMModemFirmwareUpdateMethod) GetAllUpdateMethods ¶
func (fu MMModemFirmwareUpdateMethod) GetAllUpdateMethods() []MMModemFirmwareUpdateMethod
GetAllUpdateMethods returns all update methods
func (MMModemFirmwareUpdateMethod) SliceToBitmask ¶
func (fu MMModemFirmwareUpdateMethod) SliceToBitmask(updateMethods []MMModemFirmwareUpdateMethod) (bitmask uint32)
SliceToBitmask slice to bitmask
func (MMModemFirmwareUpdateMethod) String ¶
func (i MMModemFirmwareUpdateMethod) String() string
type MMModemLocationAssistanceDataType ¶
type MMModemLocationAssistanceDataType uint32
MMModemLocationAssistanceDataType Type of assistance data that may be injected to the GNSS module.
const ( MmModemLocationAssistanceDataTypeNone MMModemLocationAssistanceDataType = 0 // None. MmModemLocationAssistanceDataTypeXtra MMModemLocationAssistanceDataType = 1 << 0 // Qualcomm gpsOneXTRA. )
func (MMModemLocationAssistanceDataType) BitmaskToSlice ¶
func (ad MMModemLocationAssistanceDataType) BitmaskToSlice(bitmask uint32) (data []MMModemLocationAssistanceDataType)
BitmaskToSlice bitmask to slice
func (MMModemLocationAssistanceDataType) GetAllAssistanceData ¶
func (ad MMModemLocationAssistanceDataType) GetAllAssistanceData() []MMModemLocationAssistanceDataType
GetAllAssistanceData returns all assistance data
func (MMModemLocationAssistanceDataType) SliceToBitmask ¶
func (ad MMModemLocationAssistanceDataType) SliceToBitmask(data []MMModemLocationAssistanceDataType) (bitmask uint32)
SliceToBitmask slice to bitmask
func (MMModemLocationAssistanceDataType) String ¶
func (i MMModemLocationAssistanceDataType) String() string
type MMModemLocationSource ¶
type MMModemLocationSource uint32
MMModemLocationSource Sources of location information supported by the modem.
const ( MmModemLocationSourceNone MMModemLocationSource = 0 // None. MmModemLocationSource3gppLacCi MMModemLocationSource = 1 << 0 // Location Area Code and Cell ID. MmModemLocationSourceGpsRaw MMModemLocationSource = 1 << 1 // GPS location given by predefined keys. MmModemLocationSourceGpsNmea MMModemLocationSource = 1 << 2 // GPS location given as NMEA traces. MmModemLocationSourceCdmaBs MMModemLocationSource = 1 << 3 // CDMA base station position. MmModemLocationSourceGpsUnmanaged MMModemLocationSource = 1 << 4 // No location given, just GPS module setup. MmModemLocationSourceAgpsMsa MMModemLocationSource = 1 << 5 // Mobile Station Assisted A-GPS location requested. MmModemLocationSourceAgpsMsb MMModemLocationSource = 1 << 6 // Mobile Station Based A-GPS location requested. )
func (MMModemLocationSource) BitmaskToSlice ¶
func (ls MMModemLocationSource) BitmaskToSlice(bitmask uint32) (sources []MMModemLocationSource)
BitmaskToSlice bitmask to slice
func (MMModemLocationSource) GetAllSources ¶
func (ls MMModemLocationSource) GetAllSources() []MMModemLocationSource
GetAllSources returns all sources
func (MMModemLocationSource) SliceToBitmask ¶
func (ls MMModemLocationSource) SliceToBitmask(sources []MMModemLocationSource) (bitmask uint32)
SliceToBitmask slice to bitmask
func (MMModemLocationSource) String ¶
func (i MMModemLocationSource) String() string
type MMModemLock ¶
type MMModemLock uint32
MMModemLock Possible lock reasons.
const ( MmModemLockUnknown MMModemLock = 0 // Lock reason unknown. MmModemLockNone MMModemLock = 1 // Modem is unlocked. MmModemLockSimPin MMModemLock = 2 // SIM requires the PIN code. MmModemLockSimPin2 MMModemLock = 3 // SIM requires the PIN2 code. MmModemLockSimPuk MMModemLock = 4 // SIM requires the PUK code. MmModemLockSimPuk2 MMModemLock = 5 // SIM requires the PUK2 code. MmModemLockPhSpPin MMModemLock = 6 // Modem requires the service provider PIN code. MmModemLockPhSpPuk MMModemLock = 7 // Modem requires the service provider PUK code. MmModemLockPhNetPin MMModemLock = 8 // Modem requires the network PIN code. MmModemLockPhNetPuk MMModemLock = 9 // Modem requires the network PUK code. MmModemLockPhSimPin MMModemLock = 10 // Modem requires the PIN code. MmModemLockPhCorpPin MMModemLock = 11 // Modem requires the corporate PIN code. MmModemLockPhCorpPuk MMModemLock = 12 // Modem requires the corporate PUK code. MmModemLockPhFsimPin MMModemLock = 13 // Modem requires the PH-FSIM PIN code. MmModemLockPhFsimPuk MMModemLock = 14 // Modem requires the PH-FSIM PUK code. MmModemLockPhNetsubPin MMModemLock = 15 // Modem requires the network subset PIN code. MmModemLockPhNetsubPuk MMModemLock = 16 // Modem requires the network subset PUK code. )
func (MMModemLock) String ¶
func (i MMModemLock) String() string
type MMModemMode ¶
type MMModemMode uint32
MMModemMode Bitfield to indicate which access modes are supported, allowed or preferred in a given device.
const ( MmModemModeNone MMModemMode = 0 // None MmModemModeCs MMModemMode = 1 << 0 // CSD, GSM, and other circuit-switched technologies. MmModemMode2g MMModemMode = 1 << 1 // GPRS, EDGE. MmModemMode3g MMModemMode = 1 << 2 // UMTS, HSxPA. MmModemMode4g MMModemMode = 1 << 3 // LTE. MmModemModeAny MMModemMode = 0xFFFFFFFF // Any mode can be used (only this value allowed for POTS modems). )
func (MMModemMode) BitmaskToSlice ¶
func (m MMModemMode) BitmaskToSlice(bitmask uint32) (modes []MMModemMode)
BitmaskToSlice bitmask to slice
func (MMModemMode) GetAllModes ¶
func (m MMModemMode) GetAllModes() []MMModemMode
GetAllModes returns all modes
func (MMModemMode) SliceToBitmask ¶
func (m MMModemMode) SliceToBitmask(modes []MMModemMode) (bitmask uint32)
SliceToBitmask slice to bitmask
func (MMModemMode) String ¶
func (i MMModemMode) String() string
type MMModemPortType ¶
type MMModemPortType uint32
MMModemPortType Type of modem port.
const ( MmModemPortTypeUnknown MMModemPortType = 1 // Unknown. MmModemPortTypeNet MMModemPortType = 2 // Net port. MmModemPortTypeAt MMModemPortType = 3 // AT port. MmModemPortTypeQcdm MMModemPortType = 4 // QCDM port. MmModemPortTypeGps MMModemPortType = 5 // GPS port. MmModemPortTypeQmi MMModemPortType = 6 // QMI port. MmModemPortTypeMbim MMModemPortType = 7 // MBIM port. MmModemPortTypeAudio MMModemPortType = 8 // Audio port. )
func (MMModemPortType) String ¶
func (i MMModemPortType) String() string
type MMModemPowerState ¶
type MMModemPowerState uint32
MMModemPowerState Power state of the modem.
const ( MmModemPowerStateUnknown MMModemPowerState = 0 // Unknown power state. MmModemPowerStateOff MMModemPowerState = 1 // Off. MmModemPowerStateLow MMModemPowerState = 2 // Low-power mode. MmModemPowerStateOn MMModemPowerState = 3 // Full power mode. )
func (MMModemPowerState) String ¶
func (i MMModemPowerState) String() string
type MMModemState ¶
type MMModemState int32
MMModemState Possible modem states.
const ( MmModemStateFailed MMModemState = -1 // The modem is unusable. MmModemStateUnknown MMModemState = 0 // State unknown or not reportable. MmModemStateInitializing MMModemState = 1 // The modem is currently being initialized. MmModemStateLocked MMModemState = 2 // The modem needs to be unlocked. MmModemStateDisabled MMModemState = 3 // The modem is not enabled and is powered down. MmModemStateDisabling MMModemState = 4 // The modem is currently transitioning to the @MmModemStateDisabled state. MmModemStateEnabling MMModemState = 5 // The modem is currently transitioning to the @MmModemStateEnabled state. MmModemStateEnabled MMModemState = 6 // The modem is enabled and powered on but not registered with a network provider and not available for data connections. MmModemStateSearching MMModemState = 7 // The modem is searching for a network provider to register with. MmModemStateRegistered MMModemState = 8 // The modem is registered with a network provider, and data connections and messaging may be available for use. MmModemStateDisconnecting MMModemState = 9 // The modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated. MmModemStateConnecting MMModemState = 10 // The modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered. MmModemStateConnected MMModemState = 11 // One or more packet data bearers is active and connected. )
func (MMModemState) String ¶
func (i MMModemState) String() string
type MMModemStateChangeReason ¶
type MMModemStateChangeReason uint32
MMModemStateChangeReason Possible reasons to have changed the modem state.
const ( MmModemStateChangeReasonUnknown MMModemStateChangeReason = 0 // Reason unknown or not reportable. MmModemStateChangeReasonUserRequested MMModemStateChangeReason = 1 // State change was requested by an interface user. MmModemStateChangeReasonSuspend MMModemStateChangeReason = 2 // State change was caused by a system suspend. MmModemStateChangeReasonFailure MMModemStateChangeReason = 3 // State change was caused by an unrecoverable error. )
func (MMModemStateChangeReason) String ¶
func (i MMModemStateChangeReason) String() string
type MMModemStateFailedReason ¶
type MMModemStateFailedReason uint32
MMModemStateFailedReason Power state of the modem.
const ( MmModemStateFailedReasonNone MMModemStateFailedReason = 0 // No error. MmModemStateFailedReasonUnknown MMModemStateFailedReason = 1 // Unknown error. MmModemStateFailedReasonSimMissing MMModemStateFailedReason = 2 // SIM is required but missing. MmModemStateFailedReasonSimError MMModemStateFailedReason = 3 // SIM is available, but unusable (e.g. permanently locked). MmModemStateFailedReasonUnknownCapabilities MMModemStateFailedReason = 4 // Unknown modem capabilities. MmModemStateFailedReasonEsimWithoutProfiles MMModemStateFailedReason = 5 // eSIM is not initialized )
func (MMModemStateFailedReason) String ¶
func (i MMModemStateFailedReason) String() string
type MMOmaFeature ¶
type MMOmaFeature uint32
MMOmaFeature Features that can be enabled or disabled in the OMA device management support.
const ( MmOmaFeatureNone MMOmaFeature = 0 // None. MmOmaFeatureDeviceProvisioning MMOmaFeature = 1 << 0 // Device provisioning service. MmOmaFeaturePrlUpdate MMOmaFeature = 1 << 1 // PRL update service. MmOmaFeatureHandsFreeActivation MMOmaFeature = 1 << 2 // Hands free activation service. )
func (MMOmaFeature) BitmaskToSlice ¶
func (mmo MMOmaFeature) BitmaskToSlice(bitmask uint32) (features []MMOmaFeature)
BitmaskToSlice bitmask to slice
func (MMOmaFeature) GetAllFeatures ¶
func (mmo MMOmaFeature) GetAllFeatures() []MMOmaFeature
GetAllFeatures returns all features
func (MMOmaFeature) SliceToBitmask ¶
func (mmo MMOmaFeature) SliceToBitmask(features []MMOmaFeature) (bitmask uint32)
SliceToBitmask slice to bitmask
func (MMOmaFeature) String ¶
func (i MMOmaFeature) String() string
type MMOmaSessionState ¶
type MMOmaSessionState int32
MMOmaSessionState State of the OMA device management session.
const ( MmOmaSessionStateFailed MMOmaSessionState = -1 // Failed. MmOmaSessionStateUnknown MMOmaSessionState = 0 // Unknown. MmOmaSessionStateStarted MMOmaSessionState = 1 // Started. MmOmaSessionStateRetrying MMOmaSessionState = 2 // Retrying. MmOmaSessionStateConnecting MMOmaSessionState = 3 // Connecting. MmOmaSessionStateConnected MMOmaSessionState = 4 // Connected. MmOmaSessionStateAuthenticated MMOmaSessionState = 5 // Authenticated. MmOmaSessionStateMdnDownloaded MMOmaSessionState = 10 // MDN downloaded. MmOmaSessionStateMsidDownloaded MMOmaSessionState = 11 // MSID downloaded. MmOmaSessionStatePrlDownloaded MMOmaSessionState = 12 // PRL downloaded. MmOmaSessionStateMipProfileDownloaded MMOmaSessionState = 13 // MIP profile downloaded. MmOmaSessionStateCompleted MMOmaSessionState = 20 // Session completed. )
func (MMOmaSessionState) String ¶
func (i MMOmaSessionState) String() string
type MMOmaSessionStateFailedReason ¶
type MMOmaSessionStateFailedReason uint32
MMOmaSessionStateFailedReason Reason of failure in the OMA device management session.
const ( MmOmaSessionStateFailedReasonUnknown MMOmaSessionStateFailedReason = 0 // No reason or unknown. MmOmaSessionStateFailedReasonAuthenticationFailed MMOmaSessionStateFailedReason = 3 // Authentication failed. MmOmaSessionStateFailedReasonMaxRetryExceeded MMOmaSessionStateFailedReason = 4 // Maximum retries exceeded. MmOmaSessionStateFailedReasonSessionCancelled MMOmaSessionStateFailedReason = 5 // Session cancelled. )
func (MMOmaSessionStateFailedReason) String ¶
func (i MMOmaSessionStateFailedReason) String() string
type MMOmaSessionType ¶
type MMOmaSessionType uint32
MMOmaSessionType Type of OMA device management session.
const ( MmOmaSessionTypeUnknown MMOmaSessionType = 0 // Unknown session type. MmOmaSessionTypeClientInitiatedDeviceConfigure MMOmaSessionType = 10 // Client-initiated device configure. MmOmaSessionTypeClientInitiatedPrlUpdate MMOmaSessionType = 11 // Client-initiated PRL update. MmOmaSessionTypeClientInitiatedHandsFreeActivation MMOmaSessionType = 12 // Client-initiated hands free activation. MmOmaSessionTypeNetworkInitiatedDeviceConfigure MMOmaSessionType = 20 // Network-initiated device configure. MmOmaSessionTypeNetworkInitiatedPrlUpdate MMOmaSessionType = 21 // Network-initiated PRL update. MmOmaSessionTypeDeviceInitiatedPrlUpdate MMOmaSessionType = 30 // Device-initiated PRL update. MmOmaSessionTypeDeviceInitiatedHandsFreeActivation MMOmaSessionType = 31 // Device-initiated hands free activation. )
func (MMOmaSessionType) String ¶
func (i MMOmaSessionType) String() string
type MMSerialError ¶
type MMSerialError uint32
MMSerialError Serial errors that may be reported by ModemManager.
const ( MmSerialErrorUnknown MMSerialError = 0 // Unknown serial error. MmSerialErrorOpenFailed MMSerialError = 1 // Could not open the serial device. MmSerialErrorSendFailed MMSerialError = 2 // Could not write to the serial device. MmSerialErrorResponseTimeout MMSerialError = 3 // A response was not received on time. MmSerialErrorOpenFailedNoDevice MMSerialError = 4 // Could not open the serial port, no device. MmSerialErrorFlashFailed MMSerialError = 5 // Could not flash the device. MmSerialErrorNotOpen MMSerialError = 6 // The serial port is not open. MmSerialErrorParseFailed MMSerialError = 7 // The serial port specific parsing failed. MmSerialErrorFrameNotFound MMSerialError = 8 // The serial port reported that the frame marker wasn't found (e.g. for QCDM). Since 1.6. )
func (MMSerialError) String ¶
func (i MMSerialError) String() string
type MMSignalPropertyType ¶
type MMSignalPropertyType uint32
MMSignalPropertyType SignalProperty Type
const ( MMSignalPropertyTypeCdma MMSignalPropertyType = 0 // Signal Type Cdma. MMSignalPropertyTypeEvdo MMSignalPropertyType = 1 // Signal Type Evdo. MMSignalPropertyTypeGsm MMSignalPropertyType = 2 // Signal Type Gsm. MMSignalPropertyTypeUmts MMSignalPropertyType = 3 // Signal Type Umts. MMSignalPropertyTypeLte MMSignalPropertyType = 4 // Signal Type Lte. )
func (MMSignalPropertyType) String ¶
func (i MMSignalPropertyType) String() string
type MMSmsCdmaServiceCategory ¶
type MMSmsCdmaServiceCategory uint32
MMSmsCdmaServiceCategory Service category for CDMA SMS, as defined in 3GPP2 C.R1001-D (section 9.3).
const ( MmSmsCdmaServiceCategoryUnknown MMSmsCdmaServiceCategory = 0x0000 // Unknown. MmSmsCdmaServiceCategoryEmergencyBroadcast MMSmsCdmaServiceCategory = 0x0001 // Emergency broadcast. MmSmsCdmaServiceCategoryAdministrative MMSmsCdmaServiceCategory = 0x0002 // Administrative. MmSmsCdmaServiceCategoryMaintenance MMSmsCdmaServiceCategory = 0x0003 // Maintenance. MmSmsCdmaServiceCategoryGeneralNewsLocal MMSmsCdmaServiceCategory = 0x0004 // General news (local). MmSmsCdmaServiceCategoryGeneralNewsRegional MMSmsCdmaServiceCategory = 0x0005 // General news (regional). MmSmsCdmaServiceCategoryGeneralNewsNational MMSmsCdmaServiceCategory = 0x0006 // General news (national). MmSmsCdmaServiceCategoryGeneralNewsInternational MMSmsCdmaServiceCategory = 0x0007 // General news (international). MmSmsCdmaServiceCategoryBusinessNewsLocal MMSmsCdmaServiceCategory = 0x0008 // Business/Financial news (local). MmSmsCdmaServiceCategoryBusinessNewsRegional MMSmsCdmaServiceCategory = 0x0009 // Business/Financial news (regional). MmSmsCdmaServiceCategoryBusinessNewsNational MMSmsCdmaServiceCategory = 0x000A // Business/Financial news (national). MmSmsCdmaServiceCategoryBusinessNewsInternational MMSmsCdmaServiceCategory = 0x000B // Business/Financial news (international). MmSmsCdmaServiceCategorySportsNewsLocal MMSmsCdmaServiceCategory = 0x000C // Sports news (local). MmSmsCdmaServiceCategorySportsNewsRegional MMSmsCdmaServiceCategory = 0x000D // Sports news (regional). MmSmsCdmaServiceCategorySportsNewsNational MMSmsCdmaServiceCategory = 0x000E // Sports news (national). MmSmsCdmaServiceCategorySportsNewsInternational MMSmsCdmaServiceCategory = 0x000F // Sports news (international). MmSmsCdmaServiceCategoryEntertainmentNewsLocal MMSmsCdmaServiceCategory = 0x0010 // Entertainment news (local). MmSmsCdmaServiceCategoryEntertainmentNewsRegional MMSmsCdmaServiceCategory = 0x0011 // Entertainment news (regional). MmSmsCdmaServiceCategoryEntertainmentNewsNational MMSmsCdmaServiceCategory = 0x0012 // Entertainment news (national). MmSmsCdmaServiceCategoryEntertainmentNewsInternational MMSmsCdmaServiceCategory = 0x0013 // Entertainment news (international). MmSmsCdmaServiceCategoryLocalWeather MMSmsCdmaServiceCategory = 0x0014 // Local weather. MmSmsCdmaServiceCategoryTrafficReport MMSmsCdmaServiceCategory = 0x0015 // Area traffic report. MmSmsCdmaServiceCategoryFlightSchedules MMSmsCdmaServiceCategory = 0x0016 // Local airport flight schedules. MmSmsCdmaServiceCategoryRestaurants MMSmsCdmaServiceCategory = 0x0017 // Restaurants. MmSmsCdmaServiceCategoryLodgings MMSmsCdmaServiceCategory = 0x0018 // Lodgings. MmSmsCdmaServiceCategoryRetailDirectory MMSmsCdmaServiceCategory = 0x0019 // Retail directory. MmSmsCdmaServiceCategoryAdvertisements MMSmsCdmaServiceCategory = 0x001A // Advertisements. MmSmsCdmaServiceCategoryStockQuotes MMSmsCdmaServiceCategory = 0x001B // Stock quotes. MmSmsCdmaServiceCategoryEmployment MMSmsCdmaServiceCategory = 0x001C // Employment. MmSmsCdmaServiceCategoryHospitals MMSmsCdmaServiceCategory = 0x001D // Medical / Health / Hospitals. MmSmsCdmaServiceCategoryTechnologyNews MMSmsCdmaServiceCategory = 0x001E // Technology news. MmSmsCdmaServiceCategoryMulticategory MMSmsCdmaServiceCategory = 0x001F // Multi-category. MmSmsCdmaServiceCategoryCmasPresidentialAlert MMSmsCdmaServiceCategory = 0x1000 // Presidential alert. MmSmsCdmaServiceCategoryCmasExtremeThreat MMSmsCdmaServiceCategory = 0x1001 // Extreme threat. MmSmsCdmaServiceCategoryCmasSevereThreat MMSmsCdmaServiceCategory = 0x1002 // Severe threat. MmSmsCdmaServiceCategoryCmasChildAbductionEmergency MMSmsCdmaServiceCategory = 0x1003 // Child abduction emergency. MmSmsCdmaServiceCategoryCmasTest MMSmsCdmaServiceCategory = 0x1004 // CMAS test. )
func (MMSmsCdmaServiceCategory) String ¶
func (i MMSmsCdmaServiceCategory) String() string
type MMSmsCdmaTeleserviceId ¶
type MMSmsCdmaTeleserviceId uint32
MMSmsCdmaTeleserviceId Teleservice IDs supported for CDMA SMS, as defined in 3GPP2 X.S0004-550-E (section 2.256) and 3GPP2 C.S0015-B (section 3.4.3.1).
const ( MmSmsCdmaTeleserviceIdUnknown MMSmsCdmaTeleserviceId = 0x0000 // Unknown. MmSmsCdmaTeleserviceIdCmt91 MMSmsCdmaTeleserviceId = 0x1000 // IS-91 Extended Protocol Enhanced Services. MmSmsCdmaTeleserviceIdWpt MMSmsCdmaTeleserviceId = 0x1001 // Wireless Paging Teleservice. MmSmsCdmaTeleserviceIdWmt MMSmsCdmaTeleserviceId = 0x1002 // Wireless Messaging Teleservice. MmSmsCdmaTeleserviceIdVmn MMSmsCdmaTeleserviceId = 0x1003 // Voice Mail Notification. MmSmsCdmaTeleserviceIdWap MMSmsCdmaTeleserviceId = 0x1004 // Wireless Application Protocol. MmSmsCdmaTeleserviceIdWemt MMSmsCdmaTeleserviceId = 0x1005 // Wireless Enhanced Messaging Teleservice. MmSmsCdmaTeleserviceIdScpt MMSmsCdmaTeleserviceId = 0x1006 // Service Category Programming Teleservice MmSmsCdmaTeleserviceIdCatpt MMSmsCdmaTeleserviceId = 0x1007 // Card Application Toolkit Protocol Teleservice. )
func (MMSmsCdmaTeleserviceId) String ¶
func (i MMSmsCdmaTeleserviceId) String() string
type MMSmsDeliveryState ¶
type MMSmsDeliveryState uint32
MMSmsDeliveryState Known SMS delivery states as defined in 3GPP TS 03.40 and 3GPP2 N.S0005-O, section 6.5.2.125. States out of the known ranges may also be valid (either reserved or SC-specific).
const ( /* Completed deliveries */ MmSmsDeliveryStateCompletedReceived MMSmsDeliveryState = 0x00 // Delivery completed, message received by the SME. MmSmsDeliveryStateCompletedForwardedUnconfirmed MMSmsDeliveryState = 0x01 // Forwarded by the SC to the SME but the SC is unable to confirm delivery. MmSmsDeliveryStateCompletedReplacedBySc MMSmsDeliveryState = 0x02 // Message replaced by the SC. /* Temporary failures */ MmSmsDeliveryStateTemporaryErrorCongestion MMSmsDeliveryState = 0x20 // Temporary error, congestion. MmSmsDeliveryStateTemporaryErrorSmeBusy MMSmsDeliveryState = 0x21 // Temporary error, SME busy. MmSmsDeliveryStateTemporaryErrorNoResponseFromSme MMSmsDeliveryState = 0x22 // Temporary error, no response from the SME. MmSmsDeliveryStateTemporaryErrorServiceRejected MMSmsDeliveryState = 0x23 // Temporary error, service rejected. MmSmsDeliveryStateTemporaryErrorQosNotAvailable MMSmsDeliveryState = 0x24 // Temporary error, QoS not available. MmSmsDeliveryStateTemporaryErrorInSme MMSmsDeliveryState = 0x25 // Temporary error in the SME. /* Permanent failures */ MmSmsDeliveryStateErrorRemoteProcedure MMSmsDeliveryState = 0x40 // Permanent remote procedure error. MmSmsDeliveryStateErrorIncompatibleDestination MMSmsDeliveryState = 0x41 // Permanent error, incompatible destination. MmSmsDeliveryStateErrorConnectionRejected MMSmsDeliveryState = 0x42 // Permanent error, connection rejected by the SME. MmSmsDeliveryStateErrorNotObtainable MMSmsDeliveryState = 0x43 // Permanent error, not obtainable. MmSmsDeliveryStateErrorQosNotAvailable MMSmsDeliveryState = 0x44 // Permanent error, QoS not available. MmSmsDeliveryStateErrorNoInterworkingAvailable MMSmsDeliveryState = 0x45 // Permanent error, no interworking available. MmSmsDeliveryStateErrorValidityPeriodExpired MMSmsDeliveryState = 0x46 // Permanent error, message validity period expired. MmSmsDeliveryStateErrorDeletedByOriginatingSme MMSmsDeliveryState = 0x47 // Permanent error, deleted by originating SME. MmSmsDeliveryStateErrorDeletedByScAdministration MMSmsDeliveryState = 0x48 // Permanent error, deleted by SC administration. MmSmsDeliveryStateErrorMessageDoesNotExist MMSmsDeliveryState = 0x49 // Permanent error, message does no longer exist. /* Temporary failures that became permanent */ MmSmsDeliveryStateTemporaryFatalErrorCongestion MMSmsDeliveryState = 0x60 // Permanent error, congestion. MmSmsDeliveryStateTemporaryFatalErrorSmeBusy MMSmsDeliveryState = 0x61 // Permanent error, SME busy. MmSmsDeliveryStateTemporaryFatalErrorNoResponseFromSme MMSmsDeliveryState = 0x62 // Permanent error, no response from the SME. MmSmsDeliveryStateTemporaryFatalErrorServiceRejected MMSmsDeliveryState = 0x63 // Permanent error, service rejected. MmSmsDeliveryStateTemporaryFatalErrorQosNotAvailable MMSmsDeliveryState = 0x64 // Permanent error, QoS not available. MmSmsDeliveryStateTemporaryFatalErrorInSme MMSmsDeliveryState = 0x65 // Permanent error in SME. /* Unknown, out of any possible valid value [0x00-0xFF] */ MmSmsDeliveryStateUnknown MMSmsDeliveryState = 0x100 // Unknown state. /* Network problems */ MmSmsDeliveryStateNetworkProblemAddressVacant MMSmsDeliveryState = 0x200 // Permanent error in network, address vacant. MmSmsDeliveryStateNetworkProblemAddressTranslationFailure MMSmsDeliveryState = 0x201 // Permanent error in network, address translation failure. MmSmsDeliveryStateNetworkProblemNetworkResourceOutage MMSmsDeliveryState = 0x202 // Permanent error in network, network resource outage. MmSmsDeliveryStateNetworkProblemNetworkFailure MMSmsDeliveryState = 0x203 // Permanent error in network, network failure. MmSmsDeliveryStateNetworkProblemInvalidTeleserviceId MMSmsDeliveryState = 0x204 // Permanent error in network, invalid teleservice id. MmSmsDeliveryStateNetworkProblemOther MMSmsDeliveryState = 0x205 // Permanent error, other network problem. /* Terminal problems */ MmSmsDeliveryStateTerminalProblemNoPageResponse MMSmsDeliveryState = 0x220 // Permanent error in terminal, no page response. MmSmsDeliveryStateTerminalProblemDestinationBusy MMSmsDeliveryState = 0x221 // Permanent error in terminal, destination busy. MmSmsDeliveryStateTerminalProblemNoAcknowledgment MMSmsDeliveryState = 0x222 // Permanent error in terminal, no acknowledgement. MmSmsDeliveryStateTerminalProblemDestinationResourceShortage MMSmsDeliveryState = 0x223 // Permanent error in terminal, destination resource shortage. MmSmsDeliveryStateTerminalProblemSmsDeliveryPostponed MMSmsDeliveryState = 0x224 // Permanent error in terminal, SMS delivery postponed. MmSmsDeliveryStateTerminalProblemDestinationOutOfService MMSmsDeliveryState = 0x225 // Permanent error in terminal, destination out of service. MmSmsDeliveryStateTerminalProblemDestinationNoLongerAtThisAddress MMSmsDeliveryState = 0x226 // Permanent error in terminal, destination no longer at this address. MmSmsDeliveryStateTerminalProblemOther MMSmsDeliveryState = 0x227 // Permanent error, other terminal problem. /* Radio problems */ MmSmsDeliveryStateRadioInterfaceProblemResourceShortage MMSmsDeliveryState = 0x240 // Permanent error in radio interface, resource shortage. MmSmsDeliveryStateRadioInterfaceProblemIncompatibility MMSmsDeliveryState = 0x241 // Permanent error in radio interface, problem incompatibility. MmSmsDeliveryStateRadioInterfaceProblemOther MMSmsDeliveryState = 0x242 // Permanent error, other radio interface problem. /* General problems */ MmSmsDeliveryStateGeneralProblemEncoding MMSmsDeliveryState = 0x260 // Permanent error, encoding. MmSmsDeliveryStateGeneralProblemSmsOriginationDenied MMSmsDeliveryState = 0x261 // Permanent error, SMS origination denied. MmSmsDeliveryStateGeneralProblemSmsTerminationDenied MMSmsDeliveryState = 0x262 // Permanent error, SMS termination denied. MmSmsDeliveryStateGeneralProblemSupplementaryServiceNotSupported MMSmsDeliveryState = 0x263 // Permanent error, supplementary service not supported. MmSmsDeliveryStateGeneralProblemSmsNotSupported MMSmsDeliveryState = 0x264 // Permanent error, SMS not supported. MmSmsDeliveryStateGeneralProblemMissingExpectedParameter MMSmsDeliveryState = 0x266 // Permanent error, missing expected parameter. MmSmsDeliveryStateGeneralProblemMissingMandatoryParameter MMSmsDeliveryState = 0x267 // Permanent error, missing mandatory parameter. MmSmsDeliveryStateGeneralProblemUnrecognizedParameterValue MMSmsDeliveryState = 0x268 // Permanent error, unrecognized parameter value. MmSmsDeliveryStateGeneralProblemUnexpectedParameterValue MMSmsDeliveryState = 0x269 // Permanent error, unexpected parameter value. MmSmsDeliveryStateGeneralProblemUserDataSizeError MMSmsDeliveryState = 0x26A // Permanent error, user data size error. MmSmsDeliveryStateGeneralProblemOther MMSmsDeliveryState = 0x26B // Permanent error, other general problem. /* Temporary network problems */ MmSmsDeliveryStateTemporaryNetworkProblemAddressVacant MMSmsDeliveryState = 0x300 // Temporary error in network, address vacant. MmSmsDeliveryStateTemporaryNetworkProblemAddressTranslationFailure MMSmsDeliveryState = 0x301 // Temporary error in network, address translation failure. MmSmsDeliveryStateTemporaryNetworkProblemNetworkResourceOutage MMSmsDeliveryState = 0x302 // Temporary error in network, network resource outage. MmSmsDeliveryStateTemporaryNetworkProblemNetworkFailure MMSmsDeliveryState = 0x303 // Temporary error in network, network failure. MmSmsDeliveryStateTemporaryNetworkProblemInvalidTeleserviceId MMSmsDeliveryState = 0x304 // Temporary error in network, invalid teleservice id. MmSmsDeliveryStateTemporaryNetworkProblemOther MMSmsDeliveryState = 0x305 // Temporary error, other network problem. /* Temporary terminal problems */ MmSmsDeliveryStateTemporaryTerminalProblemNoPageResponse MMSmsDeliveryState = 0x320 // Temporary error in terminal, no page response. MmSmsDeliveryStateTemporaryTerminalProblemDestinationBusy MMSmsDeliveryState = 0x321 // Temporary error in terminal, destination busy. MmSmsDeliveryStateTemporaryTerminalProblemNoAcknowledgment MMSmsDeliveryState = 0x322 // Temporary error in terminal, no acknowledgement. MmSmsDeliveryStateTemporaryTerminalProblemDestinationResourceShortage MMSmsDeliveryState = 0x323 // Temporary error in terminal, destination resource shortage. MmSmsDeliveryStateTemporaryTerminalProblemSmsDeliveryPostponed MMSmsDeliveryState = 0x324 // Temporary error in terminal, SMS delivery postponed. MmSmsDeliveryStateTemporaryTerminalProblemDestinationOutOfService MMSmsDeliveryState = 0x325 // Temporary error in terminal, destination out of service. MmSmsDeliveryStateTemporaryTerminalProblemDestinationNoLongerAtThisAddress MMSmsDeliveryState = 0x326 // Temporary error in terminal, destination no longer at this address. MmSmsDeliveryStateTemporaryTerminalProblemOther MMSmsDeliveryState = 0x327 // Temporary error, other terminal problem. /* Temporary radio problems */ MmSmsDeliveryStateTemporaryRadioInterfaceProblemResourceShortage MMSmsDeliveryState = 0x340 // Temporary error in radio interface, resource shortage. MmSmsDeliveryStateTemporaryRadioInterfaceProblemIncompatibility MMSmsDeliveryState = 0x341 // Temporary error in radio interface, problem incompatibility. MmSmsDeliveryStateTemporaryRadioInterfaceProblemOther MMSmsDeliveryState = 0x342 // Temporary error, other radio interface problem. /* Temporary general problems */ MmSmsDeliveryStateTemporaryGeneralProblemEncoding MMSmsDeliveryState = 0x360 // Temporary error, encoding. MmSmsDeliveryStateTemporaryGeneralProblemSmsOriginationDenied MMSmsDeliveryState = 0x361 // Temporary error, SMS origination denied. MmSmsDeliveryStateTemporaryGeneralProblemSmsTerminationDenied MMSmsDeliveryState = 0x362 // Temporary error, SMS termination denied. MmSmsDeliveryStateTemporaryGeneralProblemSupplementaryServiceNotSupported MMSmsDeliveryState = 0x363 // Temporary error, supplementary service not supported. MmSmsDeliveryStateTemporaryGeneralProblemSmsNotSupported MMSmsDeliveryState = 0x364 // Temporary error, SMS not supported. MmSmsDeliveryStateTemporaryGeneralProblemMissingExpectedParameter MMSmsDeliveryState = 0x366 // Temporary error, missing expected parameter. MmSmsDeliveryStateTemporaryGeneralProblemMissingMandatoryParameter MMSmsDeliveryState = 0x367 // Temporary error, missing mandatory parameter. MmSmsDeliveryStateTemporaryGeneralProblemUnrecognizedParameterValue MMSmsDeliveryState = 0x368 // Temporary error, unrecognized parameter value. MmSmsDeliveryStateTemporaryGeneralProblemUnexpectedParameterValue MMSmsDeliveryState = 0x369 // Temporary error, unexpected parameter value. MmSmsDeliveryStateTemporaryGeneralProblemUserDataSizeError MMSmsDeliveryState = 0x36A // Temporary error, user data size error. MmSmsDeliveryStateTemporaryGeneralProblemOther MMSmsDeliveryState = 0x36B // Temporary error, other general problem. )
func (MMSmsDeliveryState) String ¶
func (i MMSmsDeliveryState) String() string
type MMSmsPduType ¶
type MMSmsPduType uint32
MMSmsPduType Type of PDUs used in the SMS.
const ( MmSmsPduTypeUnknown MMSmsPduType = 0 // Unknown type. MmSmsPduTypeDeliver MMSmsPduType = 1 // 3GPP Mobile-Terminated (MT) message. MmSmsPduTypeSubmit MMSmsPduType = 2 // 3GPP Mobile-Originated (MO) message. MmSmsPduTypeStatusReport MMSmsPduType = 3 // 3GPP status report (MT). MmSmsPduTypeCdmaDeliver MMSmsPduType = 32 // 3GPP2 Mobile-Terminated (MT) message. MmSmsPduTypeCdmaSubmit MMSmsPduType = 33 // 3GPP2 Mobile-Originated (MO) message. MmSmsPduTypeCdmaCancellation MMSmsPduType = 34 // 3GPP2 Cancellation (MO) message. MmSmsPduTypeCdmaDeliveryAcknowledgement MMSmsPduType = 35 // 3GPP2 Delivery Acknowledgement (MT) message. MmSmsPduTypeCdmaUserAcknowledgement MMSmsPduType = 36 // 3GPP2 User Acknowledgement (MT or MO) message. MmSmsPduTypeCdmaReadAcknowledgement MMSmsPduType = 37 // 3GPP2 Read Acknowledgement (MT or MO) message. )
func (MMSmsPduType) String ¶
func (i MMSmsPduType) String() string
type MMSmsState ¶
type MMSmsState uint32
MMSmsState State of a given SMS.
const ( MmSmsStateUnknown MMSmsState = 0 // State unknown or not reportable. MmSmsStateStored MMSmsState = 1 // The message has been neither received nor yet sent. MmSmsStateReceiving MMSmsState = 2 // The message is being received but is not yet complete. MmSmsStateReceived MMSmsState = 3 // The message has been completely received. MmSmsStateSending MMSmsState = 4 // The message is queued for delivery. MmSmsStateSent MMSmsState = 5 // The message was successfully sent. )
func (MMSmsState) String ¶
func (i MMSmsState) String() string
type MMSmsStorage ¶
type MMSmsStorage uint32
MMSmsStorage Storage for SMS messages.
const ( MmSmsStorageUnknown MMSmsStorage = 0 // Storage unknown. MmSmsStorageSm MMSmsStorage = 1 // SIM card storage area. MmSmsStorageMe MMSmsStorage = 2 // Mobile equipment storage area. MmSmsStorageMt MMSmsStorage = 3 // Sum of SIM and Mobile equipment storages MmSmsStorageSr MMSmsStorage = 4 // Status report message storage area. MmSmsStorageBm MMSmsStorage = 5 // Broadcast message storage area. MmSmsStorageTa MMSmsStorage = 6 // Terminal adaptor message storage area. )
func (MMSmsStorage) String ¶
func (i MMSmsStorage) String() string
type MMSmsValidityType ¶
type MMSmsValidityType uint32
MMSmsValidityType Type of SMS validity value.
const ( MmSmsValidityTypeUnknown MMSmsValidityType = 0 // Validity type unknown. MmSmsValidityTypeRelative MMSmsValidityType = 1 // Relative validity. MmSmsValidityTypeAbsolute MMSmsValidityType = 2 // Absolute validity. MmSmsValidityTypeEnhanced MMSmsValidityType = 3 // Enhanced validity. )
func (MMSmsValidityType) String ¶
func (i MMSmsValidityType) String() string
type Mode ¶
type Mode struct { AllowedModes []MMModemMode // allowed modes. PreferredMode MMModemMode // preferred access technology }
Mode represents the modem access technology modes
func (Mode) MarshalJSON ¶
MarshalJSON returns a byte array
type Modem ¶
type Modem interface { // Returns object path GetObjectPath() dbus.ObjectPath // Returns ModemSimple Interface GetSimpleModem() (ModemSimple, error) // Returns Modem3gpp Interface Get3gpp() (Modem3gpp, error) // Return ModemCdma Interface GetCdma() (ModemCdma, error) // Return ModemTime Interface GetTime() (ModemTime, error) // Return ModemFirmware Interface GetFirmware() (ModemFirmware, error) // Return ModemSignal Interface GetSignal() (ModemSignal, error) // Return ModemSignal Interface GetOma() (ModemOma, error) // Return ModemLocation Interface GetLocation() (ModemLocation, error) // Return ModemMessaging Interface GetMessaging() (ModemMessaging, error) // Return ModemVoice Interface GetVoice() (ModemVoice, error) // Enables the Modem: When enabled, the modem's radio is powered on and data sessions, voice calls, // location services, and Short Message Service may be available. Enable() error // Disable the Modem: When disabled, the modem enters low-power state and no network-related operations are available. Disable() error // 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. // see BearerProperty struct // // Some properties are only applicable to a bearer of certain access technologies, for example the "apn" property is // not applicable to CDMA2000 Packet Data Session bearers. CreateBearer(BearerProperty) (Bearer, error) // If the bearer is currently active and providing packet data server, it will be disconnected and that packet data service will terminate. DeleteBearer(bearer Bearer) error // Clear non-persistent configuration and state, and return the device to a newly-powered-on state. // This command may power-cycle the device. Reset() error // Clear the modem's configuration (including persistent configuration and state), and return the device to a // factory-default state. // If not required by the modem, code may be ignored. This command may or may not power-cycle the device. FactoryReset(code string) error // Set the power state of the modem. This action can only be run when the modem is in MM_MODEM_STATE_DISABLED state. SetPowerState(MMModemPowerState) error // Set the capabilities of the device. A restart of the modem may be required. Bitmask of MMModemCapability values, to specify the capabilities to use. SetCurrentCapabilities([]MMModemCapability) error // Set the access technologies (e.g. 2G/3G/4G preference) the device is currently allowed to use when connecting to a network. // The given combination should be supported by the modem, as specified in the "SupportedModes" property. // A pair of MMModemMode values, where the first one is a bitmask of allowed modes, and the second one the preferred mode, if any. SetCurrentModes(Mode) error // Set the radio frequency and technology bands the device is currently allowed to use when connecting to a network. // List of MMModemBand values, to specify the bands to be used. SetCurrentBands([]MMModemBand) error // AT command for the Modem: // to enable either start mm in debug mode (ModemManager --debug) or with ModemManager --with-at-command-via-dbus Command(cmd string, timeout uint32) (string, error) // The path of the SIM object available in this device, if any. GetSim() (Sim, error) // The list of bearer object paths (EPS Bearers, PDP Contexts, or CDMA2000 Packet Data Sessions) as requested by the user. // This list does not include the initial EPS bearer details (see "InitialEpsBearer"). GetBearers() ([]Bearer, error) // List of MMModemCapability values, specifying the combinations of generic family of access technologies the modem supports. // If the modem doesn't allow changing the current capabilities, a single entry with MM_MODEM_CAPABILITY_ANY will be given. // It's an array of bitmasks because the modem may support different combinations // (E.g. "gsm/umts+lte" or "cdma/evdo+lte" or "gsm/umts+cdma/evdo+lte". // This property gives you the list of combinations supported, Then, you have CurrentCapabilities, which gives you the actual combination in use currently. GetSupportedCapabilities() ([][]MMModemCapability, error) // Bitmask of MMModemCapability values, specifying the generic family of access technologies the modem currently supports without a firmware reload or reinitialization. GetCurrentCapabilities() ([]MMModemCapability, error) // The maximum number of defined packet data bearers the modem supports. // This is not the number of active/connected bearers the modem supports, // but simply the number of bearers that may be defined at any given time. // For example, POTS and CDMA2000-only devices support only one bearer, while GSM/UMTS devices // typically support three or more, and any LTE-capable device (whether LTE-only, GSM/UMTS-capable, // and/or CDMA2000-capable) also typically support three or more. GetMaxBearers() (uint32, error) // The maximum number of active MM_BEARER_TYPE_DEFAULT bearers that may be explicitly enabled by the user. // POTS and CDMA2000-only devices support one active bearer, while GSM/UMTS and LTE-capable devices //(including LTE/CDMA devices) typically support at least two active bearers. GetMaxActiveBearers() (uint32, error) // The equipment manufacturer, as reported by the modem. GetManufacturer() (string, error) // The equipment model, as reported by the modem. GetModel() (string, error) // The revision identification of the software, as reported by the modem. GetRevision() (string, error) // The description of the carrier-specific configuration (MCFG) in use by the modem. GetCarrierConfiguration() (string, error) // The revision identification of the carrier-specific configuration (MCFG) in use by the modem. GetCarrierConfigurationRevision() (string, error) // The revision identification of the hardware, as reported by the modem. GetHardwareRevision() (string, error) // A best-effort device identifier based on various device information like model name, firmware // revision, USB/PCI/PCMCIA IDs, and other properties. // This ID is not guaranteed to be unique and may be shared between identical devices with the same firmware, // but is intended to be "unique enough" for use as a casual device identifier for various user experience operations. // his is not the device's IMEI or ESN since those may not be available before unlocking the device via a PIN. GetDeviceIdentifier() (string, error) // The physical modem device reference (ie, USB, PCI, PCMCIA device), which may be dependent upon the operating system. // In Linux for example, this points to a sysfs path of the usb_device object. // This value may also be set by the user using the MM_ID_PHYSDEV_UID udev tag (e.g. binding the tag to a // specific sysfs path). GetDevice() (string, error) // The Operating System device drivers handling communication with the modem hardware. GetDrivers() ([]string, error) // The name of the plugin handling this modem. GetPlugin() (string, error) // The name of the primary port using to control the modem. GetPrimaryPort() (string, error) // The list of ports in the modem, given as an array of string and unsigned integer pairs. // The string is the port name or path, and the integer is the port type given as a MMModemPortType value. GetPorts() ([]Port, error) // The identity of the device. This will be the IMEI number for GSM devices and the hex-format ESN/MEID for CDMA devices. GetEquipmentIdentifier() (string, error) // Current lock state of the device, given as a MMModemLock value. GetUnlockRequired() (MMModemLock, error) // A dictionary in which the keys are MMModemLock flags, and the values are integers giving the number of PIN tries // remaining before the code becomes blocked (requiring a PUK) or permanently blocked. Dictionary entries exist // only for the codes for which the modem is able to report retry counts. GetUnlockRetries() ([]Pair, error) // Overall state of the modem, given as a MMModemState value. // If the device's state cannot be determined, MM_MODEM_STATE_UNKNOWN will be reported. GetState() (MMModemState, error) // Error specifying why the modem is in MM_MODEM_STATE_FAILED state, given as a MMModemStateFailedReason value. GetStateFailedReason() (MMModemStateFailedReason, error) // Bitmask of MMModemAccessTechnology values, specifying the current network access technologies used by the device // to communicate with the network. // If the device's access technology cannot be determined, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN will be reported. GetAccessTechnologies() ([]MMModemAccessTechnology, error) // Signal quality in percent (0 - 100) of the dominant access technology the device is using to communicate with the network. Always 0 for POTS devices. // The additional boolean value indicates if the quality value given was recently taken. GetSignalQuality() (percent uint32, recent bool, err error) // List of numbers (e.g. MSISDN in 3GPP) being currently handled by this modem. GetOwnNumbers() ([]string, error) // A MMModemPowerState value specifying the current power state of the modem. GetPowerState() (MMModemPowerState, error) // This property exposes the supported mode combinations, given as an array of unsigned integer pairs, where: // The first integer is a bitmask of MMModemMode values, specifying the allowed modes. // The second integer is a single MMModemMode, which specifies the preferred access technology, among the ones defined in the allowed modes. GetSupportedModes() ([]Mode, error) // A pair of MMModemMode values, where the first one is a bitmask specifying the access technologies (eg 2G/3G/4G) the device is currently allowed to use when connecting to a network, and the second one is the preferred mode of those specified as allowed. // The pair must be one of those specified in "SupportedModes". GetCurrentModes() (Mode, error) // List of MMModemBand values, specifying the radio frequency and technology bands supported by the device. // For POTS devices, only the MM_MODEM_BAND_ANY mode will be returned. GetSupportedBands() ([]MMModemBand, error) // List of MMModemBand values, specifying the radio frequency and technology bands the device is currently using when connecting to a network. // It must be a subset of "SupportedBands". GetCurrentBands() ([]MMModemBand, error) // Bitmask of MMBearerIpFamily values, specifying the IP families supported by the device. GetSupportedIpFamilies() ([]MMBearerIpFamily, error) MarshalJSON() ([]byte, error) // StateChanged (i old, i new, u reason); // The modem's state (see "State") changed. // i old: A MMModemState value, specifying the new state. // i new: A MMModemState value, specifying the new state. // u reason: A MMModemStateChangeReason value, specifying the reason for this state change. SubscribeStateChanged() <-chan *dbus.Signal // ParseStateChanged returns the parsed dbus signal ParseStateChanged(v *dbus.Signal) (oldState MMModemState, newState MMModemState, reason MMModemStateChangeReason, err error) // Listen to changed properties // returns []interface // index 0 = name of the interface on which the properties are defined // index 1 = changed properties with new values as map[string]dbus.Variant // index 2 = invalidated properties: changed properties but the new values are not send with them SubscribePropertiesChanged() <-chan *dbus.Signal // ParsePropertiesChanged parses the dbus signal ParsePropertiesChanged(v *dbus.Signal) (interfaceName string, changedProperties map[string]dbus.Variant, invalidatedProperties []string, err error) Unsubscribe() }
The Modem interface controls the status and actions in a given modem object. This interface will always be available as long a the modem is considered valid.
type Modem3gpp ¶
type Modem3gpp interface { // Returns object path GetObjectPath() dbus.ObjectPath // Returns the Ussd Interface GetUssd() (Ussd, error) // The operator ID (ie, "MCCMNC", like "310260") to register. An empty string can be used to register to the home network. Register(operatorId string) error // results is an array of dictionaries with each array element describing a mobile network found in the scan. // takes up to 1 min Scan() (networks []Network3Gpp, err error) // Request a network scan (async) RequestScan() // Get latest scan result GetScanResults() (NetworkScanResult, error) // Sets the UE mode of operation for EPS. SetEpsUeModeOperation(mode MMModem3gppEpsUeModeOperation) error // Updates the default settings to be used in the initial default EPS bearer when registering to the LTE network. SetInitialEpsBearerSettings(property BearerProperty) error // The IMEI of the device. GetImei() (string, error) // A MMModem3gppRegistrationState value specifying the mobile registration status as defined in 3GPP TS 27.007 section 10.1.19. GetRegistrationState() (MMModem3gppRegistrationState, error) // Code of the operator to which the mobile is currently registered. // Returned in the format "MCCMNC", where MCC is the three-digit ITU E.212 Mobile Country Code and MNC is the two- or three-digit GSM Mobile Network Code. e.g. e"31026" or "310260". // If the MCC and MNC are not known or the mobile is not registered to a mobile network, this property will be a zero-length (blank) string. GetOperatorCode() (string, error) // parsed from operator code GetMcc() (string, error) GetMnc() (string, error) // Name of the operator to which the mobile is currently registered. // If the operator name is not known or the mobile is not registered to a mobile network, this property will be a zero-length (blank) string. GetOperatorName() (string, error) // Bitmask of MMModem3gppFacility values for which PIN locking is enabled. GetEnabledFacilityLocks() ([]MMModem3gppFacility, error) // A MMModem3gppEpsUeModeOperation value representing the UE mode of operation for EPS, given as an unsigned integer (signature "u"). GetEpsUeModeOperation() (MMModem3gppEpsUeModeOperation, error) // The raw PCOs received from the network, given as array of PCO elements (signature "a(ubay)"). // Each PCO is defined as a sequence of 3 fields: // - The session ID associated with the PCO, given as an unsigned integer value (signature "u"). // - The flag that indicates whether the PCO data contains the complete PCO structure received from the network, given as a boolean value (signature"b"). // - The raw PCO data, given as an array of bytes (signature "ay"). // Currently it's only implemented for MBIM modems that support "Microsoft Basic Connect Extensions" and for the Altair LTE plugin GetPco() ([]RawPcoData, error) // The object path for the initial default EPS bearer. GetInitialEpsBearer() (Bearer, error) // List of properties requested by the device for the initial EPS bearer during LTE network attach procedure. // The network may decide to use different settings during the actual device attach procedure, e.g. if the device is roaming or no explicit settings were requested, so the properties shown in the org.freedesktop.ModemManager1.Modem.Modem3gpp.InitialEpsBearer:InitialEpsBearer may be totally different. // This is a read-only property, updating these settings should be done using the SetInitialEpsBearerSettings() method. GetInitialEpsBearerSettings() (property BearerProperty, err error) MarshalJSON() ([]byte, error) }
Modem3gpp interface provides access to specific actions that may be performed in modems with 3GPP capabilities. This interface will only be available once the modem is ready to be registered in the cellular network. 3GPP devices will require a valid unlocked SIM card before any of the features in the interface can be used.
func NewModem3gpp ¶
NewModem3gpp returns new Modem3gppInterface
type ModemCdma ¶
type ModemCdma interface { // get object path GetObjectPath() dbus.ObjectPath //Provisions the modem for use with a given carrier using the modem's Over-The-Air (OTA) activation functionality, if any. //Some modems will reboot after this call is made. // IN s carrier_code: Name of carrier, or carrier-specific code. Activate(carrierCode string) error // Sets the modem provisioning data directly, without contacting the carrier over the air. // Some modems will reboot after this call is made. ActivateManual(property CdmaProperty) error // A MMModemCdmaActivationState value specifying the state of the activation in the 3GPP2 network. GetActivationState() (MMModemCdmaActivationState, error) // The modem's Mobile Equipment Identifier. GetMeid() (string, error) // The modem's Electronic Serial Number (superceded by MEID but still used by older devices). GetEsn() (string, error) // The System Identifier of the serving CDMA 1x network, if known, and if the modem is registered with a CDMA 1x network. // See ifast.org or the mobile broadband provider database for mappings of SIDs to network providers. GetSid() (uint32, error) // The Network Identifier of the serving CDMA 1x network, if known, and if the modem is registered with a CDMA 1x network. GetNid() (uint32, error) // A MMModemCdmaRegistrationState value specifying the CDMA 1x registration state. GetCdma1xRegistrationState() (MMModemCdmaRegistrationState, error) // A MMModemCdmaRegistratiCdmaProperty onState value specifying the EVDO registration state. GetEvdoRegistrationState() (MMModemCdmaRegistrationState, error) MarshalJSON() ([]byte, error) // The device activation state changed. // u activation_state: Current activation state, given as a MMModemCdmaActivationState. // u activation_error: Carrier-specific error code, given as a MMCdmaActivationError. // a{sv} status_changes:Properties that have changed as a result of this activation state change, including "mdn" and "min". The dictionary may be empty if the changed properties are unknown. SubscribeActivationStateChanged() <-chan *dbus.Signal // ParsePropertiesChanged parses the dbus signal ParseActivationStateChanged(v *dbus.Signal) (activationState MMModemCdmaActivationState, activationError MMCdmaActivationError, changedProperties map[string]dbus.Variant, err error) Unsubscribe() }
ModemCdma interface provides access to specific actions that may be performed in modems with CDMA capabilities. This interface will only be available once the modem is ready to be registered in the cellular network. Mixed 3GPP+3GPP2 devices will require a valid unlocked SIM card before any of the features in the interface can be used.
func NewModemCdma ¶
NewModemCdma returns new ModemCdma Interface
type ModemFirmware ¶
type ModemFirmware interface { // Returns object path GetObjectPath() dbus.ObjectPath List() ([]FirmwareProperty, error) // Selects a different firmware image to use, and immediately resets the modem so that it begins using the new firmware image. // The method will fail if the identifier does not match any of the names returned by List(), or if the image could not be selected for some reason. // Installed images can be selected non-destructively. // IN s uniqueid: The unique ID of the firmware image to select. Select(string) error MarshalJSON() ([]byte, error) /* PROPERTIES */ // Detailed settings that provide information about how the module should be updated. GetUpdateSettings() (UpdateSettingsProperty, error) }
ModemFirmware provides access to perform different firmware-related operations in the modem, including listing the available firmware images in the module and selecting which of them to use. This interface does not provide direct access to perform firmware updates in the device. Instead, it exposes information about the expected firmware update method as well as method-specific details required for the upgrade to happen. The actual firmware upgrade may be performed via the Linux Vendor Firmware Service and the fwupd daemon. This interface will always be available as long a the modem is considered valid.
func NewModemFirmware ¶
func NewModemFirmware(objectPath dbus.ObjectPath) (ModemFirmware, error)
NewModemFirmware returns new ModemFirmware Interface
type ModemLocation ¶
type ModemLocation interface { // Returns object path GetObjectPath() dbus.ObjectPath MarshalJSON() ([]byte, error) // Configure the location sources to use when gathering location information. Also enable or disable location // information gathering. This method may require the client to authenticate itself. // When signals are emitted, any client application (including malicious ones!) // can listen for location updates unless D-Bus permissions restrict these signals frolo certain users. If further // security is desired, the signal_location argument can be set to FALSE to disable location updates // via D-Bus signals and require applications to call authenticated APIs (like GetLocation() ) to get location information. // The optional MM_MODEM_LOCATION_SOURCE_AGPS_MSA and MM_MODEM_LOCATION_SOURCE_AGPS_MSB allow to // request MSA/MSB A-GPS operation, and they must be given along with either // MM_MODEM_LOCATION_SOURCE_GPS_RAW or MM_MODEM_LOCATION_SOURCE_GPS_NMEA. // //Both MM_MODEM_LOCATION_SOURCE_AGPS_MSA and MM_MODEM_LOCATION_SOURCE_AGPS_MSB cannot be given at the same time, // and if none given, standalone GPS is assumed. // IN u sources: Bitmask of MMModemLocationSource flags, specifying which sources should get enabled or disabled. MM_MODEM_LOCATION_SOURCE_NONE will disable all location gathering. // IN b signal_location: Flag to control whether the device emits signals with the new location information. This argument is ignored when disabling location information gathering. Setup(sources []MMModemLocationSource, signalLocation bool) error // Return current location information, if any. If the modelo supports multiple location types it may return more than one. See the "Location" property for more information on the dictionary returned at location. // This method may require the client to authenticate itself. GetCurrentLocation() (CurrentLocation, error) // Configure the SUPL server for A-GPS. // IN s supl: SUPL server configuration, given either as IP:PORT or as FQDN:PORT. SetSuplServer(supl string) error // Inject assistance data to the GNSS module. The data files should be downloaded using external means // frolo the URLs specified in the AssistanceDataServers property. // The user does not need to specify the assistance data type being given. // There is no maximulo data size limit specified, default DBus systelo bus limits apply. InjectAssistanceData([]byte) error // Set the refresh rate of the GPS information in the API. If not explicitly set, a default of 30s will be used. // The refresh rate can be set to 0 to disable it, so that every update reported by the modelo is published in the interface. // IN u rate: Rate, in seconds. SetGpsRefreshRate(rate uint32) error // Bitmask of MMModemLocationSource values, specifying the supported location sources. GetCapabilities() ([]MMModemLocationSource, error) // Bitmask of MMModemLocationAssistanceDataType values, specifying the supported types of assistance data. GetSupportedAssistanceData() ([]MMModemLocationAssistanceDataType, error) // Bitmask specifying which of the supported MMModemLocationSource location sources is currently enabled in the device. GetEnabledLocationSources() ([]MMModemLocationSource, error) // TRUE if location updates will be emitted via D-Bus signals, FALSE if location updates will not be emitted. // See the Setup() method for more information. GetSignalsLocation() (bool, error) // Dictionary of available location information when location information gathering is enabled. If the modem // supports multiple location types it may return more than one here. // Note that if the device was told not to emit updated location information when location information // gathering was initially enabled, this property may not return any location information for security reasons. GetLocation() (CurrentLocation, error) // SUPL server configuration for A-GPS, given either as IP:PORT or FQDN:PORT. GetSuplServer() (string, error) // URLs from where the user can download assistance data files to inject with InjectAssistanceData(). GetAssistanceDataServers() ([]string, error) // Rate of refresh of the GPS information in the interface. GetGpsRefreshRate() (uint32, error) }
The ModemLocation interface allows devices to provide location information to client applications. Not all devices can provide this information, or even if they do, they may not be able to provide it while a data session is active. This interface will only be available once the modelo is ready to be registered in the cellular network. 3GPP devices will require a valid unlocked SIM card before any of the features in the interface can be used (including GNSS module management).
func NewModemLocation ¶
func NewModemLocation(objectPath dbus.ObjectPath) (ModemLocation, error)
NewModemLocation returns new ModemLocation Interface
type ModemManager ¶
type ModemManager interface { // Start a new scan for connected modem devices. ScanDevices() error // List modem devices. renamed from ListDevices to GetModems GetModems() ([]Modem, error) // Set logging verbosity. SetLogging(level MMLoggingLevel) error // Event Properties. // Reports a kernel event to ModemManager. // This method is only available if udev is not being used to report kernel events. // The properties dictionary is composed of key/value string pairs. The possible keys are: // see EventProperty and MMKernelPropertyAction ReportKernelEvent(EventProperties) error // org.freedesktop.ModemManager1.Modem:Device property. inhibit: TRUE to inhibit the modem and FALSE to uninhibit it. // Inhibit or uninhibit the device. // When the modem is inhibited ModemManager will close all its ports and unexport it from the bus, so that users of the interface are no longer able to operate with it. // This operation binds the inhibition request to the existence of the caller in the DBus bus. If the caller disappears from the bus, the inhibition will automatically removed. // IN s uid: the unique ID of the physical device, given in the // IN b inhibit: InhibitDevice(uid string, inhibit bool) error // The runtime version of the ModemManager daemon. GetVersion() (string, error) MarshalJSON() ([]byte, error) // Listen to changed properties // returns []interface // index 0 = name of the interface on which the properties are defined // index 1 = changed properties with new values as map[string]dbus.Variant // index 2 = invalidated properties: changed properties but the new values are not send with them SubscribePropertiesChanged() <-chan *dbus.Signal // ParsePropertiesChanged parses the dbus signal ParsePropertiesChanged(v *dbus.Signal) (interfaceName string, changedProperties map[string]dbus.Variant, invalidatedProperties []string, err error) Unsubscribe() }
The ModemManager interface allows controlling and querying the status of the ModemManager daemon.
func NewModemManager ¶
func NewModemManager() (ModemManager, error)
NewModemManager returns new ModemManager Interface
type ModemMessaging ¶
type ModemMessaging interface { /* METHODS */ // Returns object path GetObjectPath() dbus.ObjectPath MarshalJSON() ([]byte, error) // Retrieve all SMS messages. This method should only be used once and subsequent information retrieved either // by listening for the "Added" signal, or by querying the specific SMS object of interest. List() ([]Sms, error) // Delete an SMS message. Delete(Sms) error CreateSms(number string, text string, optionalParameters ...Pair) (Sms, error) CreateMms(number string, data []byte, optionalParameters ...Pair) (Sms, error) // The list of SMS object paths. GetMessages() ([]Sms, error) // A list of MMSmsStorage values, specifying the storages supported by this modem for storing and receiving SMS. GetSupportedStorages() ([]MMSmsStorage, error) // A MMSmsStorage value, specifying the storage to be used when receiving or storing SMS. GetDefaultStorage() (MMSmsStorage, error) // Added (o path, // b received); // Emitted when any part of a new SMS has been received or added (but not for subsequent parts, if any). // For messages received from the network, not all parts may have been received and the message may not be complete. // Check the 'State' property to determine if the message is complete. // o path: Object path of the new SMS. // b received: TRUE if the message was received from the network, as opposed to being added locally. // SubscribeAdded() <-chan *dbus.Signal ParseAdded(v *dbus.Signal) (Sms, bool, error) // Deleted (o path); // Emitted when a message has been deleted. // o path: Object path of the now deleted SMS. SubscribeDeleted() <-chan *dbus.Signal Unsubscribe() }
The ModemMessaging interface handles sending SMS messages and notification of new incoming messages. This interface will only be available once the modem is ready to be registered in the cellular network. 3GPP devices will require a valid unlocked SIM card before any of the features in the interface can be used (including listing stored messages).
func NewModemMessaging ¶
func NewModemMessaging(objectPath dbus.ObjectPath) (ModemMessaging, error)
NewModemMessaging returns new ModemMessagingInterface
type ModemOma ¶
type ModemOma interface { /* METHODS */ // Returns object path GetObjectPath() dbus.ObjectPath MarshalJSON() ([]byte, error) // Configures which OMA device management features should be enabled. // Bitmask of MMModemOmaFeature flags, specifying which device management // features should get enabled or disabled. MM_OMA_FEATURE_NONE will disable all features. Setup(features []MMOmaFeature) error // Starts a client-initiated device management session. // Type of client-initiated device management session,given as a MMModemOmaSessionType StartClientInitiatedSession(sessionType MMOmaSessionType) error // Accepts or rejects a network-initiated device management session. // IN u session_id: Unique ID of the network-initiated device management session. // IN b accept: Boolean specifying whether the session is accepted or rejected. AcceptNetworkInitiatedSession(sessionId uint32, accept bool) error // Cancels the current on-going device management session. CancelSession() error // Bitmask of MMModemOmaFeature flags, specifying which device management features are enabled or disabled. GetFeatures() ([]MMOmaFeature, error) // List of network-initiated sessions which are waiting to be accepted or rejected, given as an array of unsigned integer pairs, where: // The first integer is a MMOmaSessionType. // The second integer is the unique session ID. GetPendingNetworkInitiatedSessions() ([]ModemOmaInitiatedSession, error) // Type of the current on-going device management session, given as a MMOmaSessionType. GetSessionType() (MMOmaSessionType, error) // State of the current on-going device management session, given as a MMOmaSessionState. GetSessionState() (MMOmaSessionState, error) // The session state changed. // i old_session_state: Previous session state, given as a MMOmaSessionState. // i new_session_state: Current session state, given as a MMOmaSessionState. // u session_state_failed_reason: Reason of failure, given as a MMOmaSessionStateFailedReason, if session_state is MM_OMA_SESSION_STATE_FAILED. SubscribeSessionStateChanged() <-chan *dbus.Signal ParseSessionStateChanged(v *dbus.Signal) (oldState MMOmaSessionState, newState MMOmaSessionState, failureReason MMOmaSessionStateFailedReason, err error) Unsubscribe() }
ModemOma allows clients to handle device management operations as specified by the Open Mobile Alliance (OMA). Device management sessions are either on-demand (client-initiated), or automatically initiated by either the device itself or the network. This interface will only be available once the modem is ready to be registered in the cellular network. 3GPP devices will require a valid unlocked SIM card before any of the features in the interface can be used.
func NewModemOma ¶
NewModemOma returns new ModemOma Interface
type ModemOmaInitiatedSession ¶ added in v0.1.2
type ModemOmaInitiatedSession struct { SessionType MMOmaSessionType `json:"session-type"` // network-initiated session type SessionId uint32 `json:"session-id"` // network-initiated session id }
func (ModemOmaInitiatedSession) MarshalJSON ¶ added in v0.1.2
func (mois ModemOmaInitiatedSession) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (ModemOmaInitiatedSession) String ¶ added in v0.1.2
func (mois ModemOmaInitiatedSession) String() string
type ModemSignal ¶
type ModemSignal interface { // Returns object path GetObjectPath() dbus.ObjectPath MarshalJSON() ([]byte, error) // Setup extended signal quality information retrieval. // refresh rate to set, in seconds. 0 to disable retrieval. Setup(rate uint32) error /* PROPERTIES */ //Refresh rate for the extended signal quality information updates, in seconds. A value of 0 disables the retrieval of the values. GetRate() (rate uint32, err error) // Returns all available cmda,evdo, gsm,umts or lte signal properties objects where rssi is set GetCurrentSignals() (sp []SignalProperty, err error) // The CDMA1x access technology. GetCdma() (SignalProperty, error) // The CDMA EV-DO access technology. GetEvdo() (SignalProperty, error) // The GSM/GPRS access technology. GetGsm() (SignalProperty, error) // The UMTS (WCDMA) access technology. GetUmts() (SignalProperty, error) // The LTE access technology. GetLte() (SignalProperty, error) }
ModemSignal provides access to extended signal quality information. This interface will only be available once the modem is ready to be registered in the cellular network. 3GPP devices will require a valid unlocked SIM card before any of the features in the interface can be used.
func NewModemSignal ¶
func NewModemSignal(objectPath dbus.ObjectPath) (ModemSignal, error)
NewModemSignal returns new ModemSignal Interface
type ModemSimple ¶
type ModemSimple interface { // Returns object path GetObjectPath() dbus.ObjectPath // Do everything needed to connect the modem using the given properties. //This method will attempt to find a matching packet data bearer and activate it if necessary, //returning the bearer's IP details. If no matching bearer is found, a new bearer will be created and activated, but this operation may fail if no resources are available to complete this connection attempt (ie, if a conflicting bearer is already active). //This call may make a large number of changes to modem configuration based on properties passed in. //For example, given a PIN-locked, disabled GSM/UMTS modem, this call may unlock the SIM PIN, alter the //access technology preference, wait for network registration (or force registration to a specific provider), //create a new packet data bearer using the given "apn", and connect that bearer. Connect(properties SimpleProperties) (Bearer, error) // Disconnect an active packet data connection. while if "/" (ie, no object given) this method will disconnect all active packet data bearers. Disconnect(bearer Bearer) error // Get the general modem status. GetStatus() (SimpleStatus, error) }
The ModemSimple interface allows controlling and querying the status of Modems. This interface will only be available once the modem is ready to be registered in the cellular network. 3GPP devices will require a valid unlocked SIM card before any of the features in the interface can be used.
func NewModemSimple ¶
func NewModemSimple(objectPath dbus.ObjectPath) (ModemSimple, error)
NewModemSimple returns new ModemSimple Interface
type ModemTime ¶
type ModemTime interface { // get object path GetObjectPath() dbus.ObjectPath // time, and (if available) UTC offset in ISO 8601 format. If the network time is unknown, the empty string. // Gets the current network time in local time. // This method will only work if the modem tracks, or can request, the current network time; it will not attempt to use previously-received network time updates on the host to guess the current network time. // OUT s time: If the network time is known, a string containing local date, GetNetworkTime() (time.Time, error) MarshalJSON() ([]byte, error) /* PROPERTIES */ // The timezone data provided by the network. GetNetworkTimezone() (ModemTimeZone, error) /* SIGNALS */ // Sent when the network time is updated. // s time: A string containing date and time in ISO 8601 format. SubscribeNetworkTimeChanged() <-chan *dbus.Signal ParseNetworkTimeChanged(v *dbus.Signal) (networkTime time.Time, err error) Unsubscribe() }
ModemTime interface allows clients to receive network time and timezone updates broadcast by mobile networks. This interface will only be available once the modem is ready to be registered in the cellular network. 3GPP devices will require a valid unlocked SIM card before any of the features in the interface can be used.
func NewModemTime ¶
NewModemTime returns new ModemTime Interface
type ModemTimeZone ¶ added in v0.1.2
type ModemTimeZone struct { Offset int32 `json:"offset"` // Offset of the timezone from UTC, in minutes (including DST, if applicable), given as a signed integer value (signature "i"). DstOffset int32 `json:"dst-offset"` // Amount of offset that is due to DST (daylight saving time), given as a signed integer value (signature "i"). LeapSeconds int32 `json:"leap-seconds"` // Number of leap seconds included in the network time, given as a signed integer value (signature "i"). }
Represents the TimeZone of the Modem
func (ModemTimeZone) MarshalJSON ¶ added in v0.1.2
func (mtz ModemTimeZone) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (ModemTimeZone) String ¶ added in v0.1.2
func (mtz ModemTimeZone) String() string
type ModemVoice ¶
type ModemVoice interface { /* METHODS */ // Returns object path GetObjectPath() dbus.ObjectPath // Retrieve all Calls // This method should only be used once and subsequent information retrieved either by listening for // the org.freedesktop.ModemManager1.Modem.Voice::Added signal, or by querying the specific Call object of interest. ListCalls() ([]Call, error) // Delete a Call from the list of calls. // The call will be hangup if it is still active. DeleteCall(Call) error // Creates a new call object for a new outgoing call. // The 'Number' is the only expected property to set by the user. CreateCall(number string, optionalParameters ...Pair) (Call, error) // Place all active calls on hold, if any, and accept the next call. // Waiting calls have preference over held calls, so the next call being active will be any waiting call, or otherwise, any held call. // The user should monitor the state of all available ongoing calls to be reported of which one becomes active. // No error is returned if there are no waiting or held calls. HoldAndAccept() error // Hangup all active calls, if any, and accept the next call. // Waiting calls have preference over held calls, so the next call being active will be any waiting call, or otherwise, any held call. // The user should monitor the state of all available ongoing calls to be reported of which one becomes active. // No error is returned if there are no waiting or held calls. In this case, this method would be equivalent to calling Hangup() on the active call. HangupAndAccept() error // Hangup all active calls. // Depending on how the device implements the action, calls on hold or in waiting state may also be terminated. // No error is returned if there are no ongoing calls. HangupAll() error // Join the currently active and held calls together into a single multiparty call, but disconnects from them. // The affected calls will be considered terminated from the point of view of the subscriber. Transfer() error // Activates or deactivates the call waiting network service, as per 3GPP TS 22.083. // This operation requires communication with the network in order to complete, so the modem must be successfully registered. CallWaitingSetup(enable bool) error // Queries the status of the call waiting network service, as per 3GPP TS 22.083. // This operation requires communication with the network in order to complete, so the modem must be successfully registered. CallWaitingQuery(status bool) error MarshalJSON() ([]byte, error) // The list of calls object paths. GetCalls() ([]Call, error) // A flag indicating whether emergency calls are the only allowed ones. // If this flag is set, users should only attempt voice calls to emergency numbers, as standard voice calls will likely fail. GetEmergencyOnly() (bool, error) // CallAdded (o path); // Emitted when a call has been added. // o path:Object path of the new call. SubscribeCallAdded() <-chan *dbus.Signal // CallDeleted (o path); // Emitted when a call has been deleted. // o path:Object path of the now deleted Call. SubscribeCallDeleted() <-chan *dbus.Signal ParseCallAdded(v *dbus.Signal) (Call, error) Unsubscribe() }
ModemVoice interface handles Calls. This interface will only be available once the modem is ready to be registered in the cellular network. 3GPP devices will require a valid unlocked SIM card before any of the features in the interface can be used.
func NewModemVoice ¶
func NewModemVoice(objectPath dbus.ObjectPath, modem modem) (ModemVoice, error)
NewModemVoice returns new ModemVoice Interface
type Network3Gpp ¶ added in v0.1.2
type Network3Gpp struct { Status MMModem3gppNetworkAvailability `json:"status"` // A MMModem3gppNetworkAvailability value representing network availability status, given as an unsigned integer (signature "u"). This key will always be present. OperatorLong string `json:"operator-long"` // Long-format name of operator, given as a string value (signature "s"). If the name is unknown, this field should not be present. OperatorShort string `json:"operator-short"` // Short-format name of operator, given as a string value (signature "s"). If the name is unknown, this field should not be present. OperatorCode string `json:"operator-code"` // Mobile code of the operator, given as a string value (signature "s"). Returned in the format "MCCMNC", where MCC is the three-digit ITU E.212 Mobile Country Code and MNC is the two- or three-digit GSM Mobile Network Code. e.g. "31026" or "310260". Mcc string // parsed from OperatorCode Mnc string // parsed from OperatorCode AccessTechnology MMModemAccessTechnology `json:"access-technology"` // A MMModemAccessTechnology value representing the generic access technology used by this mobile network, given as an unsigned integer (signature "u"). }
Network3Gpp describes a mobile network found in the scan
func (Network3Gpp) MarshalJSON ¶ added in v0.1.2
func (n Network3Gpp) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (Network3Gpp) String ¶ added in v0.1.2
func (n Network3Gpp) String() string
type NetworkScanResult ¶ added in v0.1.2
type NetworkScanResult struct { Networks []Network3Gpp LastScan time.Time ScanDuration float64 Recent bool }
NetworkScanResult represents the results of a scanned network
func (NetworkScanResult) MarshalJSON ¶ added in v0.1.2
func (nsr NetworkScanResult) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (NetworkScanResult) String ¶ added in v0.1.2
func (nsr NetworkScanResult) String() string
type Pair ¶
type Pair struct {
// contains filtered or unexported fields
}
Pair represents two interface values (left and right side)
func (Pair) MarshalJSON ¶
MarshalJSON returns a byte array
type Port ¶ added in v0.1.2
type Port struct { PortName string // Port Name or Path PortType MMModemPortType // Modem Port Type }
Represents the modem port (name and type)
func (Port) MarshalJSON ¶ added in v0.1.2
MarshalJSON returns a byte array
type RawPcoData ¶ added in v0.1.2
type RawPcoData struct { SessionId uint32 // The session ID associated with the PCO, given as an unsigned integer value (signature "u"). Complete bool // The flag that indicates whether the PCO data contains the complete PCO structure received from the network, given as a boolean value (signature"b"). RawData []byte // The raw PCO data, given as an array of bytes (signature "ay"). }
func (RawPcoData) MarshalJSON ¶ added in v0.1.2
func (r RawPcoData) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
type SignalProperty ¶ added in v0.1.2
type SignalProperty struct { Type MMSignalPropertyType `json:"property-type"` // define the Signal Property Type Rssi float64 `json:"rssi"` // The CDMA1x / CDMA EV-DO / GSM / UMTS / LTE RSSI (Received Signal Strength Indication), in dBm, given as a floating point value (Applicable for all types). Ecio float64 `json:"ecio"` // The CDMA1x Ec/Io / CDMA EV-DO Ec/Io / UMTS Ec/Io level in dBm, given as a floating point value (Only applicable for type Cdma, Evdo, Umts). Sinr float64 `json:"sinr"` // CDMA EV-DO SINR level, in dB, given as a floating point value (Only applicable for type Evdo). Io float64 `json:"io"` // The CDMA EV-DO Io, in dBm, given as a floating point value (Only applicable for type Evdo). Rscp float64 `json:"rscp"` // The UMTS RSCP (Received Signal Code Power), in dBm, given as a floating point value (Only applicable for type Umts). Rsrq float64 `json:"rsrq"` // The LTE RSRP (Reference Signal Received Power), in dBm, given as a floating point value (Only applicable for type LTE). Rsrp float64 `json:"rsrp"` // The LTE RSRP (Reference Signal Received Power), in dBm, given as a floating point value (Only applicable for type LTE). Snr float64 `json:"snr"` // The LTE S/R ratio, in dB, given as a floating point value (Only applicable for type LTE). }
SignalProperty represents all available signal properties
func (SignalProperty) MarshalJSON ¶ added in v0.1.2
func (sp SignalProperty) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (SignalProperty) String ¶ added in v0.1.2
func (sp SignalProperty) String() string
type Sim ¶
type Sim interface { // Returns object path GetObjectPath() dbus.ObjectPath // Send the PIN to unlock the SIM card. SendPin(pin string) error // Send the PUK and a new PIN to unlock the SIM card. SendPuk(pin string, puk string) error // Enable or disable the PIN checking. // IN s pin: A string containing the PIN code. // IN b enabled: TRUE to enable PIN checking, FALSE otherwise. EnablePin(pin string, enable bool) error // Change the PIN code. // IN s old_pin: A string containing the current PIN code. // I N s new_pin: A string containing the new PIN code. ChangePin(oldPin string, newPin string) error // The ICCID of the SIM card. // This may be available before the PIN has been entered depending on the device itself. GetSimIdentifier() (string, error) // The IMSI of the SIM card, if any. GetImsi() (string, error) // The OperatorIdentifier GetOperatorIdentifier() (string, error) // The name of the network operator, as given by the SIM card, if known. GetOperatorName() (string, error) // List of emergency numbers programmed in the SIM card. // These numbers should be treated as numbers for emergency calls in addition to 112 and 911. GetEmergencyNumbers() ([]string, error) MarshalJSON() ([]byte, error) // Listen to changed properties // returns []interface // index 0 = name of the interface on which the properties are defined // index 1 = changed properties with new values as map[string]dbus.Variant // index 2 = invalidated properties: changed properties but the new values are not send with them SubscribePropertiesChanged() <-chan *dbus.Signal // ParsePropertiesChanged parses the dbus signal ParsePropertiesChanged(v *dbus.Signal) (interfaceName string, changedProperties map[string]dbus.Variant, invalidatedProperties []string, err error) Unsubscribe() }
The Sim interface handles communication with SIM, USIM, and RUIM (CDMA SIM) cards.
type SimpleProperties ¶
type SimpleProperties struct { Pin string `json:"pin"` // SIM-PIN unlock code, given as a string value (signature "s"). OperatorId string `json:"operator-id"` // ETSI MCC-MNC of a network to force registration with, given as a string value (signature "s"). Apn string `json:"apn"` // For GSM/UMTS and LTE devices the APN to use, given as a string value (signature "s"). IpType MMBearerIpFamily `json:"ip-type"` // For GSM/UMTS and LTE devices the IP addressing type to use, given as a MMBearerIpFamily value (signature "u"). AllowedAuth MMBearerAllowedAuth `json:"allowed-auth"` // The authentication method to use, given as a MMBearerAllowedAuth value (signature "u"). Optional in 3GPP. User string `json:"user"` // User name (if any) required by the network, given as a string value (signature "s"). Optional in 3GPP. Password string `json:"password"` // Password (if any) required by the network, given as a string value (signature "s"). Optional in 3GPP. Number string `json:"number"` // For POTS devices the number to dial,, given as a string value (signature "s"). AllowedRoaming bool `json:"allow-roaming"` // FALSE to allow only connections to home networks, given as a boolean value (signature "b"). RmProtocol MMModemCdmaRmProtocol `json:"rm-protocol"` // For CDMA devices, the protocol of the Rm interface, given as a MMModemCdmaRmProtocol value (signature "u"). }
SimpleProperties defines all available properties
func (SimpleProperties) MarshalJSON ¶
func (sp SimpleProperties) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (SimpleProperties) String ¶
func (sp SimpleProperties) String() string
type SimpleStatus ¶ added in v0.1.2
type SimpleStatus struct { State MMModemState `json:"state"` // A MMModemState value specifying the overall state of the modem, given as an unsigned integer value (signature "u") SignalQuality uint32 `json:"signal-quality"` // Signal quality value, given only when registered, as an unsigned integer value (signature "u"). CurrentBands []MMModemBand `json:"current-bands"` // List of MMModemBand values, given only when registered, as a list of unsigned integer values (signature "au"). AccessTechnology MMModemAccessTechnology `json:"access-technologies"` // A MMModemAccessTechnology value, given only when registered, as an unsigned integer value (signature "u"). M3GppRegistrationState MMModem3gppRegistrationState `json:"m3gpp-registration-state"` // A MMModem3gppRegistrationState value specifying the state of the registration, given only when registered in a 3GPP network, as an unsigned integer value (signature "u"). M3GppOperatorCode string `json:"m3gpp-operator-code"` // Operator MCC-MNC, given only when registered in a 3GPP network, as a string value (signature "s"). M3GppOperatorName string `json:"m3gpp-operator-name"` // Operator name, given only when registered in a 3GPP network, as a string value (signature "s"). CdmaCdma1xRegistrationState MMModemCdmaRegistrationState `json:"cdma-cdma1x-registration-state"` // A MMModemCdmaRegistrationState value specifying the state of the registration, given only when registered in a CDMA1x network, as an unsigned integer value (signature "u"). CdmaEvdoRegistrationState MMModemCdmaRegistrationState `json:"cdma-evdo-registration-state"` // A MMModemCdmaRegistrationState value specifying the state of the registration, given only when registered in a EV-DO network, as an unsigned integer value (signature "u"). CdmaSid uint32 `json:"cdma-sid"` // The System Identifier of the serving network, if registered in a CDMA1x network and if known. Given as an unsigned integer value (signature "u"). CdmaNid uint32 `json:"cdma-nid"` // The Network Identifier of the serving network, if registered in a CDMA1x network and if known. Given as an unsigned integer value (signature "u"). }
SimpleStatus represents all properties of the current connection state
func (SimpleStatus) MarshalJSON ¶ added in v0.1.2
func (ss SimpleStatus) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (SimpleStatus) String ¶ added in v0.1.2
func (ss SimpleStatus) String() string
type Sms ¶
type Sms interface { // Returns object path GetObjectPath() dbus.ObjectPath // If the message has not yet been sent, queue it for delivery. Send() error // This method requires a MMSmsStorage value, describing the storage where this message is to be kept; or // MM_SMS_STORAGE_UNKNOWN if the default storage should be used. Store(MMSmsStorage) error // A MMSmsState value, describing the state of the message. GetState() (MMSmsState, error) // A MMSmsPduType value, describing the type of PDUs used in the SMS message. GetPduType() (MMSmsPduType, error) // Number to which the message is addressed. GetNumber() (string, error) // Message text, in UTF-8. // When sending, if the text is larger than the limit of the technology or modem, the message will be broken // into multiple parts or messages. // Note that Text and Data are never given at the same time. GetText() (string, error) // Message data. // When sending, if the data is larger than the limit of the technology or modem, the message will be broken // into multiple parts or messages. // Note that Text and Data are never given at the same time. GetData() ([]byte, error) // Indicates the SMS service center number. // Always empty for 3GPP2/CDMA. GetSMSC() (string, error) // Indicates when the SMS expires in the SMSC. // This value is composed of a MMSmsValidityType key, with an associated data which contains type-specific validity information: // MM_SMS_VALIDITY_TYPE_RELATIVE: The value is the length of the validity period in minutes, given as an unsigned integer (D-Bus signature 'u'). GetValidity() (map[MMSmsValidityType]interface{}, error) // 3GPP message class (-1..3). -1 means class is not available or is not used for this message, otherwise the 3GPP SMS message class. // Always -1 for 3GPP2/CDMA. GetClass() (int32, error) // A MMSmsCdmaTeleserviceId value. // Always MM_SMS_CDMA_TELESERVICE_ID_UNKNOWN for 3GPP. GetTeleserviceId() (MMSmsCdmaTeleserviceId, error) // A MMSmsCdmaServiceCategory value. // Always MM_SMS_CDMA_SERVICE_CATEGORY_UNKNOWN for 3GPP. GetServiceCategory() (MMSmsCdmaServiceCategory, error) // #TRUE if delivery report request is required, #FALSE otherwise. GetDeliveryReportRequest() (bool, error) // Message Reference of the last PDU sent/received within this SMS. // If the PDU type is MM_SMS_PDU_TYPE_STATUS_REPORT, this field identifies the Message Reference of the // PDU associated to the status report. GetMessageReference() (MMSmsPduType, error) // Time when the first PDU of the SMS message arrived the SMSC, in ISO8601 format. This field is only applicable if // the PDU type is MM_SMS_PDU_TYPE_DELIVER. or MM_SMS_PDU_TYPE_STATUS_REPORT. GetTimestamp() (time.Time, error) // Time when the first PDU of the SMS message left the SMSC, in ISO8601 format. // This field is only applicable if the PDU type is MM_SMS_PDU_TYPE_STATUS_REPORT. GetDischargeTimestamp() (time.Time, error) // A MMSmsDeliveryState value, describing the state of the delivery reported in the Status Report message. // This field is only applicable if the PDU type is MM_SMS_PDU_TYPE_STATUS_REPORT. GetDeliveryState() (MMSmsDeliveryState, error) // A MMSmsStorage value, describing the storage where this message is kept. GetStorage() (MMSmsStorage, error) MarshalJSON() ([]byte, error) // Listen to changed properties // returns []interface // index 0 = name of the interface on which the properties are defined // index 1 = changed properties with new values as map[string]dbus.Variant // index 2 = invalidated properties: changed properties but the new values are not send with them SubscribePropertiesChanged() <-chan *dbus.Signal // ParsePropertiesChanged parses the dbus signal ParsePropertiesChanged(v *dbus.Signal) (interfaceName string, changedProperties map[string]dbus.Variant, invalidatedProperties []string, err error) Unsubscribe() }
The Sms interface Defines operations and properties of a single SMS message.
type ThreeGppLacCiLocation ¶ added in v0.1.2
type ThreeGppLacCiLocation struct { Mcc string `json:"MCC"` // This is the three-digit ITU E.212 Mobile Country Code of the network provider to which the mobile is currently registered. e.g. "310". Mnc string `json:"MNC"` // This is the two- or three-digit GSM Mobile Network Code of the network provider to which the mobile is currently registered. e.g. "26" or "260". Lac string `json:"LAC"` // This is the two-byte Location Area Code of the GSM/UMTS base station with which the mobile is registered, in upper-case hexadecimal format without leading zeros, as specified in 3GPP TS 27.007. E.g. "84CD". Ci string `json:"CI"` // This is the two- or four-byte Cell Identifier with which the mobile is registered, in upper-case hexadecimal format without leading zeros, as specified in 3GPP TS 27.007. e.g. "2BAF" or "D30156". Tac string `json:"TAC"` // This is the two-byte Location Area Code of the LTE base station with which the mobile is registered, in upper-case hexadecimal format without leading zeros, as specified in 3GPP TS 27.007. E.g. "6FFE". }
func (ThreeGppLacCiLocation) MarshalJSON ¶ added in v0.1.2
func (tgp ThreeGppLacCiLocation) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (ThreeGppLacCiLocation) String ¶ added in v0.1.2
func (tgp ThreeGppLacCiLocation) String() string
type UpdateSettingsProperty ¶ added in v0.1.2
type UpdateSettingsProperty struct { UpdateMethods []MMModemFirmwareUpdateMethod `json:"update-methods"` // The settings are given as a bitmask of MMModemFirmwareUpdateMethod values specifying the type of firmware update procedures DeviceIds []string `json:"device-ids"` // (Required) This property exposes the list of device IDs associated to a given device, from most specific to least specific. (signature 'as'). E.g. a list containing: "USB\VID_413C&PID_81D7&REV_0001", "USB\VID_413C&PID_81D7" and "USB\VID_413C" Version string `json:"version"` // (Required) This property exposes the current firmware version string of the module. If the module uses separate version numbers for firmware version and carrier configuration, this version string will be a combination of both, and so it may be different to the version string showed in the "Revision" property. (signature 's') FastbootAt string `json:"fastboot-at"` // only if update method fastboot: (Required) This property exposes the AT command that should be sent to the module to trigger a reset into fastboot mode (signature 's') }
UpdateSettingsProperty represents all available update settings
func (UpdateSettingsProperty) MarshalJSON ¶ added in v0.1.2
func (us UpdateSettingsProperty) MarshalJSON() ([]byte, error)
MarshalJSON returns a byte array
func (UpdateSettingsProperty) String ¶ added in v0.1.2
func (us UpdateSettingsProperty) String() string
type Ussd ¶
type Ussd interface { // Returns object path GetObjectPath() dbus.ObjectPath // Sends a USSD command string to the network initiating a USSD session. // When the request is handled by the network, the method returns the response or an appropriate error. The network may be awaiting further response from the ME after returning from this method and no new command can be initiated until this one is cancelled or ended. // IN s command: The command to start the USSD session with. // OUT s reply:The network response to the command which started the USSD session. Initiate(command string) (reply string, err error) // Respond to a USSD request that is either initiated by the mobile network, or that is awaiting // further input after Initiate() was called. // IN s response: // The response to network-initiated USSD command, or a response to a request for further input. // OUT s reply: // The network reply to this response to the network-initiated USSD command. The reply may require // further responses. Respond(response string) (reply string, err error) // Cancel an ongoing USSD session, either mobile or network initiated. Cancel() error MarshalJSON() ([]byte, error) // A MMModem3gppUssdSessionState value, indicating the state of any ongoing USSD session. GetState() (MMModem3gppUssdSessionState, error) // Contains any network-initiated request to which no USSD response is required. // When no USSD session is active, or when there is no network- initiated request, this property will be a zero-length string. GetNetworkNotification() (string, error) // Contains any pending network-initiated request for a response. Client should call Respond() with the // appropriate response to this request. // When no USSD session is active, or when there is no pending network-initiated request, this property will be // a zero-length string. GetNetworkRequest() (string, error) }
The Ussd interface provides access to actions based on the USSD protocol. This interface will only be available once the modem is ready to be registered in the cellular network. 3GPP devices will require a valid unlocked SIM card before any of the features in the interface can be used. Todo: Untested, USSD via QMI not available: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/26
Source Files
¶
- Bearer.go
- Call.go
- Modem.go
- Modem3gpp.go
- ModemCdma.go
- ModemFirmware.go
- ModemLocation.go
- ModemManager.go
- ModemMessaging.go
- ModemOma.go
- ModemSignal.go
- ModemSimple.go
- ModemTime.go
- ModemUssd.go
- ModemVoice.go
- Sim.go
- Sms.go
- enums.go
- mmbearerallowedauth_string.go
- mmbeareripfamily_string.go
- mmbeareripmethod_string.go
- mmbearertype_string.go
- mmcalldirection_string.go
- mmcallstate_string.go
- mmcallstatereason_string.go
- mmcdmaactivationerror_string.go
- mmconnectionerror_string.go
- mmcoreerror_string.go
- mmfirmwareimagetype_string.go
- mmmessageerror_string.go
- mmmobileequipmenterror_string.go
- mmmodem3gppepsuemodeoperation_string.go
- mmmodem3gppfacility_string.go
- mmmodem3gppnetworkavailability_string.go
- mmmodem3gppregistrationstate_string.go
- mmmodem3gppsubscriptionstate_string.go
- mmmodem3gppussdsessionstate_string.go
- mmmodemaccesstechnology_string.go
- mmmodemband_string.go
- mmmodemcapability_string.go
- mmmodemcdmaactivationstate_string.go
- mmmodemcdmaregistrationstate_string.go
- mmmodemcdmarmprotocol_string.go
- mmmodemcontactsstorage_string.go
- mmmodemfirmwareupdatemethod_string.go
- mmmodemlocationassistancedatatype_string.go
- mmmodemlocationsource_string.go
- mmmodemlock_string.go
- mmmodemmode_string.go
- mmmodemporttype_string.go
- mmmodempowerstate_string.go
- mmmodemstate_string.go
- mmmodemstatechangereason_string.go
- mmmodemstatefailedreason_string.go
- mmomafeature_string.go
- mmomasessionstate_string.go
- mmomasessionstatefailedreason_string.go
- mmomasessiontype_string.go
- mmserialerror_string.go
- mmsignalpropertytype_string.go
- mmsmscdmaservicecategory_string.go
- mmsmscdmateleserviceid_string.go
- mmsmsdeliverystate_string.go
- mmsmspdutype_string.go
- mmsmsstate_string.go
- mmsmsstorage_string.go
- mmsmsvaliditytype_string.go
- utils.go