# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

mm_plugin = '"Novatel LTE"'

state_machines = {
  'call_machine_e362',
}

at_to_wm_action_map = {
    'AT$NWMDN': ('network_identity_machine', 'read_mdn'),
    'AT$NWQMICONNECT=,,,,,,"vzwinternet",,,"",""': ('call_machine', 'connect_call'),
    'AT$NWQMISTATUS': ('call_machine', 'get_qmi_call_status'),
    'AT$NWQMIDISCONNECT': ('call_machine', 'disconnect_call'),
}

wm_response_to_at_map = {
    'wm_response_mdn': '*',
    'wm_response_network_registration_status_2': '+CEREG: 2, *, *, 21, *, *',
    'wm_response_qmi_call_result_success': '$NWQMISTATUS: QMI_RESULT_SUCCESS:QMI_ERR_NONE',
    'wm_response_qmi_call_state_connected': 'QMI State: CONNECTED',
    'wm_response_qmi_call_state_disconnected': 'QMI State: DISCONNECTED',
    'wm_response_qmi_call_end_reason': 'Call End Reason:*',
    'wm_response_qmi_call_duration': 'Call Duration: * seconds',
}

wm_request_response_map = {
    'ATI': ['Manufacturer: WardModem for Novatel',
            'Model: E362 WWAN Test Modem',
            'Revision: 0.00 Test Revision',
            'IMEI: 987654323456789',
            'GCAP: +GCAP: LTE2, +CGSM, +CIS707-A, CIS-856-A, +MS, +ES, +DS'],
    'AT+CGMI': ['Novatel Wireless Incorporated'],
    'AT+CGMM': ['E362 WWAN'],
    'AT+CGMR': ['0.00 Test Revision'],
    'AT+CGSN': ['987654323456789'],
    'AT+GCAP': ['+GCAP: LTE2, +CGSM, +CIS707-A, CIS-856-A, +MS, +ES, +DS'],
    'AT*CNTI=2': 'RING',

    # These are E362 specific extension to the AT command set.
    'AT$CNTI=2': ['GSM, GPRS, EDGE, UMTS, HSDPA, HSPA, LTE, 1xRTT, EvDO, EvDO '
                 'Rel0, EvDO RelA'],
    # Respond with the exact bitmask of bands reported by the actual modem.
    'AT$NWBAND?': ['cf80387'],
    # This restricts the modem to LTE. WardModem currently doesn't even try any
    # other bands.
    'AT$NWPREFMODE=30': 'OK',
    'AT$NWSYSMODE' : [' LTE '],

    # TODO(pprabhu) Implement SIM locking functionality.
    # Migrate this to that state machine then.
    'AT$NWPINR?': ['$NWPINR: PIN1, 3'],
}

# ##############################################################################
# Override specific state machine configurations.


#### modem_power_level_state_machine
modem_power_level_allowed_levels = ['MINIMUM', 'FULL', 'LOW', 'RESET']
