10
0
Fork 0

info_client completely ported

This commit is contained in:
Kevin Redon 2011-05-09 15:22:24 +02:00
parent 04a8046367
commit 864997046b
1 changed files with 361 additions and 365 deletions

View File

@ -29,6 +29,66 @@ class Info
include APDU
SERVICES = ["CHV1 disable function",
"Abbreviated Dialling Numbers (ADN)",
"Fixed Dialling Numbers (FDN)",
"Short Message Storage (SMS)",
"Advice of Charge (AoC)",
"Capability Configuration Parameters (CCP)",
"PLMN selector",
"RFU",
"MSISDN",
"Extension1",
"Extension2",
"SMS Parameters",
"Last Number Dialled (LND)",
"Cell Broadcast Message Identifier",
"Group Identifier Level 1",
"Group Identifier Level 2",
"Service Provider Name",
"Service Dialling Numbers (SDN)",
"Extension3",
"RFU",
"VGCS Group Identifier List (EFVGCS and EFVGCSS)",
"VBS Group Identifier List (EFVBS and EFVBSS)",
"enhanced Multi-Level Precedence and Pre-emption Service",
"Automatic Answer for eMLPP",
"Data download via SMS-CB",
"Data download via SMS-PP",
"Menu selection",
"Call control",
"Proactive SIM",
"Cell Broadcast Message Identifier Ranges",
"Barred Dialling Numbers (BDN)",
"Extension4",
"De-personalization Control Keys",
"Co-operative Network List",
"Short Message Status Reports",
"Network's indication of alerting in the MS",
"Mobile Originated Short Message control by SIM",
"GPRS",
"Image (IMG)",
"SoLSA (Support of Local Service Area)",
"USSD string data object supported in Call Control",
"RUN AT COMMAND command",
"User controlled PLMN Selector with Access Technology",
"Operator controlled PLMN Selector with Access Technology",
"HPLMN Selector with Access Technology",
"CPBCCH Information",
"Investigation Scan",
"Extended Capability Configuration Parameters",
"MExE",
"Reserved and shall be ignored",
"PLMN Network Name",
"Operator PLMN List",
"Mailbox Dialling Numbers",
"Message Waiting Indication Status",
"Call Forwarding Indication Status",
"Service Provider Display Information",
"Multimedia Messaging Service (MMS)",
"Extension 8",
"MMS User Connectivity Parameters"]
# provide the IO to the SAP server
def initialize(io)
@client = Client.new(io)
@ -45,19 +105,11 @@ class Info
def display
# get the ATR
puts "ATR : #{@client.atr.to_hex_disp}"
end
def close
@client.disconnect
end
end
=begin
# verify CHV1
while chv_enabled? do
print "enter PIN : "
$stdout.flush
pin = gets.chomp
# pin is between 4 and 8 digits
unless pin.length>=4 and pin.length<=8 and pin.gsub(/\d/,"").length==0 then
@ -287,66 +339,6 @@ else
end
# get EFsst
SERVICES = [
"CHV1 disable function",
"Abbreviated Dialling Numbers (ADN)",
"Fixed Dialling Numbers (FDN)",
"Short Message Storage (SMS)",
"Advice of Charge (AoC)",
"Capability Configuration Parameters (CCP)",
"PLMN selector",
"RFU",
"MSISDN",
"Extension1",
"Extension2",
"SMS Parameters",
"Last Number Dialled (LND)",
"Cell Broadcast Message Identifier",
"Group Identifier Level 1",
"Group Identifier Level 2",
"Service Provider Name",
"Service Dialling Numbers (SDN)",
"Extension3",
"RFU",
"VGCS Group Identifier List (EFVGCS and EFVGCSS)",
"VBS Group Identifier List (EFVBS and EFVBSS)",
"enhanced Multi-Level Precedence and Pre-emption Service",
"Automatic Answer for eMLPP",
"Data download via SMS-CB",
"Data download via SMS-PP",
"Menu selection",
"Call control",
"Proactive SIM",
"Cell Broadcast Message Identifier Ranges",
"Barred Dialling Numbers (BDN)",
"Extension4",
"De-personalization Control Keys",
"Co-operative Network List",
"Short Message Status Reports",
"Network's indication of alerting in the MS",
"Mobile Originated Short Message control by SIM",
"GPRS",
"Image (IMG)",
"SoLSA (Support of Local Service Area)",
"USSD string data object supported in Call Control",
"RUN AT COMMAND command",
"User controlled PLMN Selector with Access Technology",
"Operator controlled PLMN Selector with Access Technology",
"HPLMN Selector with Access Technology",
"CPBCCH Information",
"Investigation Scan",
"Extended Capability Configuration Parameters",
"MExE",
"Reserved and shall be ignored",
"PLMN Network Name",
"Operator PLMN List",
"Mailbox Dialling Numbers",
"Message Waiting Indication Status",
"Call Forwarding Indication Status",
"Service Provider Display Information",
"Multimedia Messaging Service (MMS)",
"Extension 8",
"MMS User Connectivity Parameters"]
puts "SIM service table :"
sst = read_ef([MF,DF_GSM,EF_SST])
sst.each_index do |i|
@ -414,5 +406,9 @@ else
"reserved"
end
puts status
end
=end
def close
@client.disconnect
end
end