;=========================================================================
;                   LG Electronics, Ltd.
;                   Mobile Communications Research Lab.
;                   Development Soft Ware Group
;
;=========================================================================
;  File name: RD670Fxx_xx_RELIANCE.SCR 
;  Made by  : LGE
;  Version  : V01
;  Date     : 2008/04/04
;
;=========================================================================
;
; NV-items are programmed using the nv_write command:
;
;   nv_write itemname { [nam index,] val1, val2, ..., valn }
;
; Only NAM 0 has meaningful values.  Values for NAMs 1-3 are
; zeroed out or set to default values.
;
; Some items require a nam index (0-1). The curly braces
; are required and they surround the values to be written.
; You must supply every value the item expects. Hex values
; you supply need the 0x prefix.
;
; Semi-colons introduce comments. Whole line and
; to-end-of-line comments are possible.
;
; THE FOLLOWING PARAMETERS SHOULD BE SET FOR EACH PHONE:
;-------------------------------------------------------------------------
;
;   1. CDMA preferred serving system (Automatic A or Automatic B)
;   2. Analog preferred serving system (System A or System B)
;   3. Analog Home SID (the SID of the preferred serving system)
;   4. Analog first paging channel (for system A or system B)
;   5. CDMA primary and seconday channels (including PCN, if in use)
;   6. CDMA SID/NID pairs (the SID of the preferred serving system)
;   7. MIN1 and MIN2 parameters.
;   8. Default settings for RD6250
;=========================================================================
;print "Start Service Programming"
; Enter the Service Programming Code (factory defaulted to 000000)
; If you don't have version 116 or later, this command will fail.
; This allows access to the SP items (both reading _and_ writing)

spc "000000"

wait 2

; Put the DMSS in offline mode
mode offline-d

;=========================================================================
; SYSTEM ITEM
;=========================================================================
; Display the ESN and permanent physical station
; configuration parameters
nv_read esn
nv_read verno_maj
nv_read verno_min
nv_read scm
nv_read slot_cycle_index
nv_read mob_firm_rev
nv_read mob_model

wait 2

; MIN items
; The 2 MIN1s for each NAM, in order from 0 to 1
; THESE ITEMS MUST BE SUPPLIED FOR EACH USE
; Notice that because the MIN1 contains a '-', it is actually a
; string, not a number. The double quotes distinguish it from a
; number.
;
; The first MIN in each NAM is the analog MIN, the second MIN in each NAM is
; the CDMA MIN
;


; PRI No 4.
; User-selectable name for each NAM
; To PHONE
nv_write name_nam {0, "    Reliance    "}


; PRI No 10.
; CDMA SID(s) and NID(s) to lockout.
; Not Required
; To PHONE --> New Item
nv_write sid_nid_lock {0,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535,0,65535}


; PRI No 11.
; Primary CDMA Channels for A/B band
; To PHONE
nv_write pcdmach {0, 239, 553}


; PRI No 12.
; Secondary CDMA Channel for A/B band
; To PHONE
nv_write scdmach {0, 280, 594}



; PRI No 18.
; Whether or not the roaming list is enabled
; To PHONE
nv_write prl_enabled {0, 1} 


; PRI No 19. EVRC Capable ; TRUE(1), FALSE(0)
; PRI No 20. Home Page SO ; EVRC(3), IS-733 13K Voice(17), Qualcomm 13K Voice(32768)
; PRI No 21. Home Orig SO 
; PRI No 22. Roam Orig SO
; To PHONE
nv_write pref_voice_so {0,  1, 0x0003, 0x0003, 0x0003}


; PRI No 23.
; Digital/Analog mode preference
;
; NV_MODE_DIGITAL_PREF,     /* CDMA then Analog */
; NV_MODE_DIGITAL_ONLY,     /* CDMA only */
; NV_MODE_ANALOG_PREF,      /* Analog then CDMA */
; NV_MODE_ANALOG_ONLY,      /* Analog only */
; NV_MODE_AUTOMATIC,        /* Determine mode automatically */
; NV_MODE_E911,             /* Emergency mode */
; NV_MODE_HOME_ONLY,        /* Restrict to home only */
; NV_MODE_PCS_CDMA_ONLY,    /* Restrict to PCS home only */
; NV_MODE_CELL_CDMA_ONLY,   /* Restrict to cellular home only */
; NV_MODE_CDMA_ONLY,
; NV_MODE_HDR_ONLY,
; NV_MODE_CDMA_AMPS_ONLY,
; NV_MODE_GPS_ONLY,
; NV_MODE_GSM_ONLY,         /* Service is limited to GSM only */
; NV_MODE_WCDMA_ONLY,       /* Service is limited to WCDMA only */
; NV_MODE_ENUM_PAD = 0x7FFF /* Pad to 16 bits on ARM */
; To PHONE                                           
nv_write pref_mode {0, 0x0009}


; PRI No 25.
; Slot Cycle Index
; To RUIM
nv_write slot_cycle_index {2}


; PRI No 28.
; SPASM Protection for the active NAM
; To RUIM
nv_write nam_lock {0, 1}

;=========================================================================
;  SYSTEM ITEM, some extra variables.
;=========================================================================


; PRI No 30.
; Stores the band class preference on a per NAM basis
;
;  typedef enum {
;    NV_BAND_PREF_BC0_A = 0x0001, /* Acquire band class 0, A-Side systems only */
;    NV_BAND_PREF_BC0_B = 0x0002, /* Acquire band class 0, B-Side systems only */
;    NV_BAND_PREF_BC0   = 0x0003, /* Acquire band class 0 systems only */            
;    NV_BAND_PREF_BC1   = 0x0004, /* Acquire band class 1 systems only */
;    NV_BAND_PREF_BC3   = 0x0010, /* Acquire band class 3 systems only */
;    NV_BAND_PREF_BC4   = 0x0020, /* Acquire band class 4 systems only */
;    NV_BAND_PREF_ANY   = 0xFFFF, /* Acquire any band class systems */
;  } nv_band_pref_enum_type;
; To PHONE
nv_write band_pref {0, 0xffff}


; PRI No 31.
; Stores the roaming preference on a per NAM basis
; 0: Roaming Indicator off
;  
;  typedef enum {
;    NV_ROAM_PREF_HOME  = 0x01, /* Acquire band class 0, A-Side systems only */
;    NV_ROAM_PREF_AFFIL = 0x03, /* Acquire band class 0, B-Side systems only */
;    NV_ROAM_PREF_ANY   = 0xFF, /* Acquire band class 0 systems only */            
;    NV_ROAM_PREF_ENUM_PAD = 0x7FFF               /* Pad to 16 bits on ARM */
;  } nv_roam_pref_enum_type;
; To PHONE
nv_write roam_pref {0, 0xff}
   
   
; PRI No 32.
; System preference, per NAM
;  
;  typedef enum {
;    NV_SP_A_ONLY=0,          /* A only */
;    NV_SP_B_ONLY,            /* B only */
;    NV_SP_HOME_ONLY,         /* Home only */
;    NV_SP_STANDARD,          /* Home preferred */
;    NV_SYS_PREF_ENUM_PAD = 0x7FFF /* Pad to 16 bits on ARM */
;  } nv_sys_pref_enum_type;
; To PHONE
nv_write system_pref {0, 0x0003}
        

; PRI No 34.
; To Clear MRU tables
; To PHONE
nv_write mru2_table {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}


; PRI No 35.
; Length of IMSI
; Range : 0xFF or between 0 - 7
; To RUIM
nv_write imsi_addr_num {0, 255}


; PRI No 42.
; Current NAM
; To PHONE
nv_write curr_nam {0}


; PRI No 43.
; IS-2000 CAI radio configuration RC preference
; To PHONE
nv_write pref_for_rc {3} 


; PRI No 44.
; voice privacy, 0=Standard  1=Enhanced
; To PHONE
nv_write voice_priv {0}

; PRI No
; SO68(4GV)
; To PHONE
nv_write cdma_so68_enabled {1}

;=========================================================================
;UI  ITEM 
;=========================================================================

;print "Programming defaults value for Features"


;nv_write stack_idx {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}
                                          ; Call history          == clear!

;nv_write lock_code {"0000"}      ; Lock code string

;=========================================================================
;F/W ITEM
;=========================================================================


; NAM Checksums must all be 0xffff
;print "Programming NAM Checksums"
;
;nv_write nam_chksum {0, 0xffff}


; MIN checksum
;print "Programming MIN checksums"
;
;nv_write min_chksum {0, 0xffff, 0xffff}


; RF Configuration
;print "Programming RF config"
nv_write rf_config {6}


;qdsp_snd_ctrl
;nv_write qdsp_snd_ctrl {23, 2024, -3, 11500, 0, 2, 0, 0, 0, 2, 6, 0, 4, -54, 0, 0}

;audio_adj_phone
;nv_write audio_adj_phone {0, 4096, -768, -12, 2048, -1024, -8, 2048, -1024}

;audio_adj_earjack
;nv_write audio_adj_earjack {8, 4096, 0, -6, 8192, 0, -8, 8192, 0}

;audio_adj_hfk
;nv_write audio_adj_hfk {0, 0, 0, -768, 2048, -1024, -8, 2048, -1024}

;audio_adj_speaker
;nv_write audio_adj_speaker {2, 8192, 0, 12, 8192, 0, -3, 0, 0}

;audio_gain_scr
;nv_write audio_volume_scr {6, 0, 5, 6, 6, 4, 5, 6, 7, 5, 7, 7, 5, 4, 5, 5, 5, 4, 5, 5}

;audio_miditab_volume
nv_write audio_miditab_volume {1,-1,-2,4,-1,1,-3,1,0,0,-1,-1,-2,-4,-1,-3,-1,-4,-2,-1,-2,-4,-2,-1,-5,-5,-4,-3,0,-2,-1,-5,-2,-1,-1,0,0,0,-1,8,-3,0,3,8,-7,-4,-4,0,0,0}
nv_write audio_miditab_volume_2 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,-2,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,3,0,0,0,0,0,0,0} 
 
;audio_tx_pcm_filter 
nv_write audio_tx_pcm_filter {322,186,999,598,62036,65323,20982}
;audio_rx_pcm_filter
nv_write audio_rx_pcm_filter {0,0,0,0,0,0,0}
;print "Test mode for RUIM"
nv_write spare_1 {0x01}           ; Normal Mode

;print "mru table enable"
nv_write spare_2 {0x01}           ; MRU Table enable

;=========================================================================
; BREW ITEM
;=========================================================================
print "Brew NV Items"
nv_write brew_ads1 {"adsprepay.wdsap.ricinfo.com"} 		; byte[64] (char)
nv_write brew_ads2 {""}					; byte[64] (char)
nv_write brew_dns1 {0,0,0,0}				; byte[4] (digit)
nv_write brew_dns2 {0,0,0,0}				; byte[4] (digit)
nv_write brew_carrier_id {75}				; word
nv_write brew_platform_id {1265}				; word
nv_write brew_bkey {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}	; byte[16]
nv_write brew_wflags {0x304}				; word
nv_write brew_user_auth {1}				; byte
nv_write brew_app_policy	{3}				; byte
nv_write brew_ppp_id 		{27,"LG6700@wap.relianceinfo.com"}; 64 byte characters	LG6700@relianceinfo.com
nv_write brew_ppp_pwd 		{10,"Xt9zvApwbf"}; 64 byte characters	Xt9zvApwbf

;=========================================================================
; SMS ITEM
;=========================================================================
;nv_write sms_to_email_dial {"2222"}

;=========================================================================
;MMS  ITEM 
;=========================================================================
nv_write mms_mmsc_url 		{"http://mms.wdsap.ricinfo.com:6081"}; 64 byte characters
nv_write mms_mmsc_gateway_url 	{"http://mms.wdsap.ricinfo.com:6081"}; 64 byte characters
nv_write mms_ppp_id 		{"LG6700@wap.relianceinfo.com"}; 64 byte characters
nv_write mms_ppp_pwd 		{"Xt9zvApwbf"}; 64 byte characters
nv_write mms_mmsc_uaprof_url 	{"http://mms.wdsap.ricinfo.com/uaprof/rd6700.xml"}; 64 byte characters
nv_write mms_mmsc_post_url 	{"/mms"} ;64 byte characters 
nv_write mms_test_authorization {0x00}; byte
nv_write mms_test_gateway 	{0}; boolean
;=========================================================================
;=========================================================================
; DATA ITEM
;=========================================================================
; Default Setting for Data Service
;print "Programming Data Service Items"
nv_write data_qnc_enabled {0}             ; 0-QNC Disable  1-QNC Enable
nv_write data_so_set {2}                  ; DS_SO_SET_PRE707 =  0     IS-707.0 (pre-707) service option numbers
                                          ; DS_SO_SET_PROPTRY = 1     Qualcomm proprietary service option numbers
                                          ; DS_SO_SET_IS707 =   2     IS-707 service option numbers
nv_write data_mdr_mode {3}                ; DS_MDR_MODE_MDR_ONLY = 0  Use only MDR packet data services
                                          ; DS_MDR_MODE_IF_AVAIL = 1  Use MDR if available, else use low-speed
                                          ; DS_MDR_MODE_NO_MDR   = 2  Use only low-speed packet data services
                                          ; DS_MDR_MODE_SO33_PREF= 3  Service Option 33 (1x channel)
nv_write data_pkt_orig_str {5, "#777"}    ; {length,"dialstring"}  valu range 1-16   default value #777
nv_write data_auto_packet_detection {0}   ; 0-Disable   1-Enable

;=========================================================================
;print "End of Service Programming"

mode reset

