Use helper method to print available service in EF.SST

Change-Id: I375475e9f7210dae4e8da7258d6824dc2d54cf4c
This commit is contained in:
Supreeth Herle
2020-04-20 13:30:34 +02:00
parent 0c4d82d84a
commit d3b13d0c85
7 changed files with 244 additions and 243 deletions

View File

@@ -32,7 +32,7 @@ from pySim.ts_51_011 import EF, DF, EF_SST_map
from pySim.commands import SimCardCommands from pySim.commands import SimCardCommands
from pySim.cards import card_detect, Card from pySim.cards import card_detect, Card
from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, dec_msisdn, format_xplmn_w_act, dec_spn from pySim.utils import h2b, swap_nibbles, rpad, dec_imsi, dec_iccid, dec_msisdn, format_xplmn_w_act, dec_spn, dec_st
def parse_options(): def parse_options():
@@ -234,16 +234,11 @@ if __name__ == '__main__':
print("AD: Can't read, response code = %s" % (sw,)) print("AD: Can't read, response code = %s" % (sw,))
# EF.SST # EF.SST
(res, sw) = card.read_sst() (res, sw) = card.read_binary('SST')
if sw == '9000': if sw == '9000':
# (st_hex, avail_src_list) = res print("SIM Service Table: %s" % res)
# st_hex - Service Table in hex format
# avail_src_list - List of services available
print("SIM Service Table: %s" % res[0])
# Print those which are available # Print those which are available
for s in res[1]: print("%s" % dec_st(res))
if s in EF_SST_map:
print('\tService %d - %s: %s' % (s, EF_SST_map[s], s in res[1]))
else: else:
print("SIM Service Table: Can't read, response code = %s" % (sw,)) print("SIM Service Table: Can't read, response code = %s" % (sw,))

View File

@@ -44,46 +44,47 @@ ACC: 0008
MSISDN: Not available MSISDN: Not available
AD: 00000002 AD: 00000002
SIM Service Table: ff3cc3ff030fff0f000fff03f0c0 SIM Service Table: ff3cc3ff030fff0f000fff03f0c0
Service 1 - CHV1 disable function: True Service 1 - CHV1 disable function
Service 2 - Abbreviated Dialling Numbers (ADN): True Service 2 - Abbreviated Dialling Numbers (ADN)
Service 3 - Fixed Dialling Numbers (FDN): True Service 3 - Fixed Dialling Numbers (FDN)
Service 4 - Short Message Storage (SMS): True Service 4 - Short Message Storage (SMS)
Service 5 - Advice of Charge (AoC): True Service 5 - Advice of Charge (AoC)
Service 6 - Capability Configuration Parameters (CCP): True Service 6 - Capability Configuration Parameters (CCP)
Service 7 - PLMN selector: True Service 7 - PLMN selector
Service 8 - RFU: True Service 8 - RFU
Service 11 - Extension2: True Service 11 - Extension2
Service 12 - SMS Parameters: True Service 12 - SMS Parameters
Service 13 - Last Number Dialled (LND): True Service 13 - Last Number Dialled (LND)
Service 14 - Cell Broadcast Message Identifier: True Service 14 - Cell Broadcast Message Identifier
Service 17 - Service Provider Name: True Service 17 - Service Provider Name
Service 18 - Service Dialling Numbers (SDN): True Service 18 - Service Dialling Numbers (SDN)
Service 23 - enhanced Multi-Level Precedence and Pre-emption Service: True Service 23 - enhanced Multi-Level Precedence and Pre-emption Service
Service 24 - Automatic Answer for eMLPP: True Service 24 - Automatic Answer for eMLPP
Service 25 - Data download via SMS-CB: True Service 25 - Data download via SMS-CB
Service 26 - Data download via SMS-PP: True Service 26 - Data download via SMS-PP
Service 27 - Menu selection: True Service 27 - Menu selection
Service 28 - Call control: True Service 28 - Call control
Service 29 - Proactive SIM: True Service 29 - Proactive SIM
Service 30 - Cell Broadcast Message Identifier Ranges: True Service 30 - Cell Broadcast Message Identifier Ranges
Service 31 - Barred Dialling Numbers (BDN): True Service 31 - Barred Dialling Numbers (BDN)
Service 32 - Extension4: True Service 32 - Extension4
Service 33 - De-personalization Control Keys: True Service 33 - De-personalization Control Keys
Service 34 - Co-operative Network List: True Service 34 - Co-operative Network List
Service 41 - USSD string data object supported in Call Control: True Service 41 - USSD string data object supported in Call Control
Service 42 - RUN AT COMMAND command: True Service 42 - RUN AT COMMAND command
Service 43 - User controlled PLMN Selector with Access Technology: True Service 43 - User controlled PLMN Selector with Access Technology
Service 44 - Operator controlled PLMN Selector with Access Technology: True Service 44 - Operator controlled PLMN Selector with Access Technology
Service 49 - MExE: True Service 49 - MExE
Service 50 - Reserved and shall be ignored: True Service 50 - Reserved and shall be ignored
Service 51 - PLMN Network Name: True Service 51 - PLMN Network Name
Service 52 - Operator PLMN List: True Service 52 - Operator PLMN List
Service 53 - Mailbox Dialling Numbers: True Service 53 - Mailbox Dialling Numbers
Service 54 - Message Waiting Indication Status: True Service 54 - Message Waiting Indication Status
Service 55 - Call Forwarding Indication Status: True Service 55 - Call Forwarding Indication Status
Service 56 - Service Provider Display Information: True Service 56 - Service Provider Display Information
Service 57 - Multimedia Messaging Service (MMS): True Service 57 - Multimedia Messaging Service (MMS)
Service 58 - Extension 8: True Service 58 - Extension 8
Service 59 - MMS User Connectivity Parameters: True Service 59 - MMS User Connectivity Parameters
Done ! Done !

View File

@@ -51,44 +51,45 @@ ACC: abce
MSISDN: Not available MSISDN: Not available
AD: 00ffff02 AD: 00ffff02
SIM Service Table: ff33ff0f3c00ff0f000cf0c0f0030000 SIM Service Table: ff33ff0f3c00ff0f000cf0c0f0030000
Service 1 - CHV1 disable function: True Service 1 - CHV1 disable function
Service 2 - Abbreviated Dialling Numbers (ADN): True Service 2 - Abbreviated Dialling Numbers (ADN)
Service 3 - Fixed Dialling Numbers (FDN): True Service 3 - Fixed Dialling Numbers (FDN)
Service 4 - Short Message Storage (SMS): True Service 4 - Short Message Storage (SMS)
Service 5 - Advice of Charge (AoC): True Service 5 - Advice of Charge (AoC)
Service 6 - Capability Configuration Parameters (CCP): True Service 6 - Capability Configuration Parameters (CCP)
Service 7 - PLMN selector: True Service 7 - PLMN selector
Service 8 - RFU: True Service 8 - RFU
Service 9 - MSISDN: True Service 9 - MSISDN
Service 10 - Extension1: True Service 10 - Extension1
Service 13 - Last Number Dialled (LND): True Service 13 - Last Number Dialled (LND)
Service 14 - Cell Broadcast Message Identifier: True Service 14 - Cell Broadcast Message Identifier
Service 17 - Service Provider Name: True Service 17 - Service Provider Name
Service 18 - Service Dialling Numbers (SDN): True Service 18 - Service Dialling Numbers (SDN)
Service 19 - Extension3: True Service 19 - Extension3
Service 20 - RFU: True Service 20 - RFU
Service 21 - VGCS Group Identifier List (EFVGCS and EFVGCSS): True Service 21 - VGCS Group Identifier List (EFVGCS and EFVGCSS)
Service 22 - VBS Group Identifier List (EFVBS and EFVBSS): True Service 22 - VBS Group Identifier List (EFVBS and EFVBSS)
Service 23 - enhanced Multi-Level Precedence and Pre-emption Service: True Service 23 - enhanced Multi-Level Precedence and Pre-emption Service
Service 24 - Automatic Answer for eMLPP: True Service 24 - Automatic Answer for eMLPP
Service 25 - Data download via SMS-CB: True Service 25 - Data download via SMS-CB
Service 26 - Data download via SMS-PP: True Service 26 - Data download via SMS-PP
Service 27 - Menu selection: True Service 27 - Menu selection
Service 28 - Call control: True Service 28 - Call control
Service 35 - Short Message Status Reports: True Service 35 - Short Message Status Reports
Service 36 - Network's indication of alerting in the MS: True Service 36 - Network's indication of alerting in the MS
Service 37 - Mobile Originated Short Message control by SIM: True Service 37 - Mobile Originated Short Message control by SIM
Service 38 - GPRS: True Service 38 - GPRS
Service 49 - MExE: True Service 49 - MExE
Service 50 - Reserved and shall be ignored: True Service 50 - Reserved and shall be ignored
Service 51 - PLMN Network Name: True Service 51 - PLMN Network Name
Service 52 - Operator PLMN List: True Service 52 - Operator PLMN List
Service 53 - Mailbox Dialling Numbers: True Service 53 - Mailbox Dialling Numbers
Service 54 - Message Waiting Indication Status: True Service 54 - Message Waiting Indication Status
Service 55 - Call Forwarding Indication Status: True Service 55 - Call Forwarding Indication Status
Service 56 - Service Provider Display Information: True Service 56 - Service Provider Display Information
Service 57 - Multimedia Messaging Service (MMS): True Service 57 - Multimedia Messaging Service (MMS)
Service 58 - Extension 8: True Service 58 - Extension 8
Service 59 - MMS User Connectivity Parameters: True Service 59 - MMS User Connectivity Parameters
Done ! Done !

View File

@@ -18,39 +18,40 @@ ACC: ffff
MSISDN: Not available MSISDN: Not available
AD: 000000 AD: 000000
SIM Service Table: ff3fff0f0300f003000c SIM Service Table: ff3fff0f0300f003000c
Service 1 - CHV1 disable function: True Service 1 - CHV1 disable function
Service 2 - Abbreviated Dialling Numbers (ADN): True Service 2 - Abbreviated Dialling Numbers (ADN)
Service 3 - Fixed Dialling Numbers (FDN): True Service 3 - Fixed Dialling Numbers (FDN)
Service 4 - Short Message Storage (SMS): True Service 4 - Short Message Storage (SMS)
Service 5 - Advice of Charge (AoC): True Service 5 - Advice of Charge (AoC)
Service 6 - Capability Configuration Parameters (CCP): True Service 6 - Capability Configuration Parameters (CCP)
Service 7 - PLMN selector: True Service 7 - PLMN selector
Service 8 - RFU: True Service 8 - RFU
Service 9 - MSISDN: True Service 9 - MSISDN
Service 10 - Extension1: True Service 10 - Extension1
Service 11 - Extension2: True Service 11 - Extension2
Service 12 - SMS Parameters: True Service 12 - SMS Parameters
Service 13 - Last Number Dialled (LND): True Service 13 - Last Number Dialled (LND)
Service 14 - Cell Broadcast Message Identifier: True Service 14 - Cell Broadcast Message Identifier
Service 17 - Service Provider Name: True Service 17 - Service Provider Name
Service 18 - Service Dialling Numbers (SDN): True Service 18 - Service Dialling Numbers (SDN)
Service 19 - Extension3: True Service 19 - Extension3
Service 20 - RFU: True Service 20 - RFU
Service 21 - VGCS Group Identifier List (EFVGCS and EFVGCSS): True Service 21 - VGCS Group Identifier List (EFVGCS and EFVGCSS)
Service 22 - VBS Group Identifier List (EFVBS and EFVBSS): True Service 22 - VBS Group Identifier List (EFVBS and EFVBSS)
Service 23 - enhanced Multi-Level Precedence and Pre-emption Service: True Service 23 - enhanced Multi-Level Precedence and Pre-emption Service
Service 24 - Automatic Answer for eMLPP: True Service 24 - Automatic Answer for eMLPP
Service 25 - Data download via SMS-CB: True Service 25 - Data download via SMS-CB
Service 26 - Data download via SMS-PP: True Service 26 - Data download via SMS-PP
Service 27 - Menu selection: True Service 27 - Menu selection
Service 28 - Call control: True Service 28 - Call control
Service 33 - De-personalization Control Keys: True Service 33 - De-personalization Control Keys
Service 34 - Co-operative Network List: True Service 34 - Co-operative Network List
Service 53 - Mailbox Dialling Numbers: True Service 53 - Mailbox Dialling Numbers
Service 54 - Message Waiting Indication Status: True Service 54 - Message Waiting Indication Status
Service 55 - Call Forwarding Indication Status: True Service 55 - Call Forwarding Indication Status
Service 56 - Service Provider Display Information: True Service 56 - Service Provider Display Information
Service 57 - Multimedia Messaging Service (MMS): True Service 57 - Multimedia Messaging Service (MMS)
Service 58 - Extension 8: True Service 58 - Extension 8
Done ! Done !

View File

@@ -56,48 +56,49 @@ ACC: 0001
MSISDN (NPI=1 ToN=1): +1234 MSISDN (NPI=1 ToN=1): +1234
AD: 00000002 AD: 00000002
SIM Service Table: ff33ffff3f003f0f300cf0c3f00000 SIM Service Table: ff33ffff3f003f0f300cf0c3f00000
Service 1 - CHV1 disable function: True Service 1 - CHV1 disable function
Service 2 - Abbreviated Dialling Numbers (ADN): True Service 2 - Abbreviated Dialling Numbers (ADN)
Service 3 - Fixed Dialling Numbers (FDN): True Service 3 - Fixed Dialling Numbers (FDN)
Service 4 - Short Message Storage (SMS): True Service 4 - Short Message Storage (SMS)
Service 5 - Advice of Charge (AoC): True Service 5 - Advice of Charge (AoC)
Service 6 - Capability Configuration Parameters (CCP): True Service 6 - Capability Configuration Parameters (CCP)
Service 7 - PLMN selector: True Service 7 - PLMN selector
Service 8 - RFU: True Service 8 - RFU
Service 9 - MSISDN: True Service 9 - MSISDN
Service 10 - Extension1: True Service 10 - Extension1
Service 13 - Last Number Dialled (LND): True Service 13 - Last Number Dialled (LND)
Service 14 - Cell Broadcast Message Identifier: True Service 14 - Cell Broadcast Message Identifier
Service 17 - Service Provider Name: True Service 17 - Service Provider Name
Service 18 - Service Dialling Numbers (SDN): True Service 18 - Service Dialling Numbers (SDN)
Service 19 - Extension3: True Service 19 - Extension3
Service 20 - RFU: True Service 20 - RFU
Service 21 - VGCS Group Identifier List (EFVGCS and EFVGCSS): True Service 21 - VGCS Group Identifier List (EFVGCS and EFVGCSS)
Service 22 - VBS Group Identifier List (EFVBS and EFVBSS): True Service 22 - VBS Group Identifier List (EFVBS and EFVBSS)
Service 23 - enhanced Multi-Level Precedence and Pre-emption Service: True Service 23 - enhanced Multi-Level Precedence and Pre-emption Service
Service 24 - Automatic Answer for eMLPP: True Service 24 - Automatic Answer for eMLPP
Service 25 - Data download via SMS-CB: True Service 25 - Data download via SMS-CB
Service 26 - Data download via SMS-PP: True Service 26 - Data download via SMS-PP
Service 27 - Menu selection: True Service 27 - Menu selection
Service 28 - Call control: True Service 28 - Call control
Service 29 - Proactive SIM: True Service 29 - Proactive SIM
Service 30 - Cell Broadcast Message Identifier Ranges: True Service 30 - Cell Broadcast Message Identifier Ranges
Service 31 - Barred Dialling Numbers (BDN): True Service 31 - Barred Dialling Numbers (BDN)
Service 32 - Extension4: True Service 32 - Extension4
Service 33 - De-personalization Control Keys: True Service 33 - De-personalization Control Keys
Service 34 - Co-operative Network List: True Service 34 - Co-operative Network List
Service 35 - Short Message Status Reports: True Service 35 - Short Message Status Reports
Service 36 - Network's indication of alerting in the MS: True Service 36 - Network's indication of alerting in the MS
Service 37 - Mobile Originated Short Message control by SIM: True Service 37 - Mobile Originated Short Message control by SIM
Service 38 - GPRS: True Service 38 - GPRS
Service 49 - MExE: True Service 49 - MExE
Service 50 - Reserved and shall be ignored: True Service 50 - Reserved and shall be ignored
Service 51 - PLMN Network Name: True Service 51 - PLMN Network Name
Service 52 - Operator PLMN List: True Service 52 - Operator PLMN List
Service 53 - Mailbox Dialling Numbers: True Service 53 - Mailbox Dialling Numbers
Service 54 - Message Waiting Indication Status: True Service 54 - Message Waiting Indication Status
Service 57 - Multimedia Messaging Service (MMS): True Service 57 - Multimedia Messaging Service (MMS)
Service 58 - Extension 8: True Service 58 - Extension 8
Service 59 - MMS User Connectivity Parameters: True Service 59 - MMS User Connectivity Parameters
Done ! Done !

View File

@@ -56,50 +56,51 @@ ACC: 0008
MSISDN (NPI=1 ToN=1): +77776336143 MSISDN (NPI=1 ToN=1): +77776336143
AD: 00000002 AD: 00000002
SIM Service Table: ff3fffff3f003f1ff00c00c0f00000 SIM Service Table: ff3fffff3f003f1ff00c00c0f00000
Service 1 - CHV1 disable function: True Service 1 - CHV1 disable function
Service 2 - Abbreviated Dialling Numbers (ADN): True Service 2 - Abbreviated Dialling Numbers (ADN)
Service 3 - Fixed Dialling Numbers (FDN): True Service 3 - Fixed Dialling Numbers (FDN)
Service 4 - Short Message Storage (SMS): True Service 4 - Short Message Storage (SMS)
Service 5 - Advice of Charge (AoC): True Service 5 - Advice of Charge (AoC)
Service 6 - Capability Configuration Parameters (CCP): True Service 6 - Capability Configuration Parameters (CCP)
Service 7 - PLMN selector: True Service 7 - PLMN selector
Service 8 - RFU: True Service 8 - RFU
Service 9 - MSISDN: True Service 9 - MSISDN
Service 10 - Extension1: True Service 10 - Extension1
Service 11 - Extension2: True Service 11 - Extension2
Service 12 - SMS Parameters: True Service 12 - SMS Parameters
Service 13 - Last Number Dialled (LND): True Service 13 - Last Number Dialled (LND)
Service 14 - Cell Broadcast Message Identifier: True Service 14 - Cell Broadcast Message Identifier
Service 17 - Service Provider Name: True Service 17 - Service Provider Name
Service 18 - Service Dialling Numbers (SDN): True Service 18 - Service Dialling Numbers (SDN)
Service 19 - Extension3: True Service 19 - Extension3
Service 20 - RFU: True Service 20 - RFU
Service 21 - VGCS Group Identifier List (EFVGCS and EFVGCSS): True Service 21 - VGCS Group Identifier List (EFVGCS and EFVGCSS)
Service 22 - VBS Group Identifier List (EFVBS and EFVBSS): True Service 22 - VBS Group Identifier List (EFVBS and EFVBSS)
Service 23 - enhanced Multi-Level Precedence and Pre-emption Service: True Service 23 - enhanced Multi-Level Precedence and Pre-emption Service
Service 24 - Automatic Answer for eMLPP: True Service 24 - Automatic Answer for eMLPP
Service 25 - Data download via SMS-CB: True Service 25 - Data download via SMS-CB
Service 26 - Data download via SMS-PP: True Service 26 - Data download via SMS-PP
Service 27 - Menu selection: True Service 27 - Menu selection
Service 28 - Call control: True Service 28 - Call control
Service 29 - Proactive SIM: True Service 29 - Proactive SIM
Service 30 - Cell Broadcast Message Identifier Ranges: True Service 30 - Cell Broadcast Message Identifier Ranges
Service 31 - Barred Dialling Numbers (BDN): True Service 31 - Barred Dialling Numbers (BDN)
Service 32 - Extension4: True Service 32 - Extension4
Service 33 - De-personalization Control Keys: True Service 33 - De-personalization Control Keys
Service 34 - Co-operative Network List: True Service 34 - Co-operative Network List
Service 35 - Short Message Status Reports: True Service 35 - Short Message Status Reports
Service 36 - Network's indication of alerting in the MS: True Service 36 - Network's indication of alerting in the MS
Service 37 - Mobile Originated Short Message control by SIM: True Service 37 - Mobile Originated Short Message control by SIM
Service 38 - GPRS: True Service 38 - GPRS
Service 49 - MExE: True Service 49 - MExE
Service 50 - Reserved and shall be ignored: True Service 50 - Reserved and shall be ignored
Service 51 - PLMN Network Name: True Service 51 - PLMN Network Name
Service 52 - Operator PLMN List: True Service 52 - Operator PLMN List
Service 53 - Mailbox Dialling Numbers: True Service 53 - Mailbox Dialling Numbers
Service 54 - Message Waiting Indication Status: True Service 54 - Message Waiting Indication Status
Service 57 - Multimedia Messaging Service (MMS): True Service 57 - Multimedia Messaging Service (MMS)
Service 58 - Extension 8: True Service 58 - Extension 8
Service 59 - MMS User Connectivity Parameters: True Service 59 - MMS User Connectivity Parameters
Done ! Done !

View File

@@ -18,37 +18,38 @@ ACC: 0008
MSISDN: Not available MSISDN: Not available
AD: 000000 AD: 000000
SIM Service Table: ff3fff0f0f0000030000 SIM Service Table: ff3fff0f0f0000030000
Service 1 - CHV1 disable function: True Service 1 - CHV1 disable function
Service 2 - Abbreviated Dialling Numbers (ADN): True Service 2 - Abbreviated Dialling Numbers (ADN)
Service 3 - Fixed Dialling Numbers (FDN): True Service 3 - Fixed Dialling Numbers (FDN)
Service 4 - Short Message Storage (SMS): True Service 4 - Short Message Storage (SMS)
Service 5 - Advice of Charge (AoC): True Service 5 - Advice of Charge (AoC)
Service 6 - Capability Configuration Parameters (CCP): True Service 6 - Capability Configuration Parameters (CCP)
Service 7 - PLMN selector: True Service 7 - PLMN selector
Service 8 - RFU: True Service 8 - RFU
Service 9 - MSISDN: True Service 9 - MSISDN
Service 10 - Extension1: True Service 10 - Extension1
Service 11 - Extension2: True Service 11 - Extension2
Service 12 - SMS Parameters: True Service 12 - SMS Parameters
Service 13 - Last Number Dialled (LND): True Service 13 - Last Number Dialled (LND)
Service 14 - Cell Broadcast Message Identifier: True Service 14 - Cell Broadcast Message Identifier
Service 17 - Service Provider Name: True Service 17 - Service Provider Name
Service 18 - Service Dialling Numbers (SDN): True Service 18 - Service Dialling Numbers (SDN)
Service 19 - Extension3: True Service 19 - Extension3
Service 20 - RFU: True Service 20 - RFU
Service 21 - VGCS Group Identifier List (EFVGCS and EFVGCSS): True Service 21 - VGCS Group Identifier List (EFVGCS and EFVGCSS)
Service 22 - VBS Group Identifier List (EFVBS and EFVBSS): True Service 22 - VBS Group Identifier List (EFVBS and EFVBSS)
Service 23 - enhanced Multi-Level Precedence and Pre-emption Service: True Service 23 - enhanced Multi-Level Precedence and Pre-emption Service
Service 24 - Automatic Answer for eMLPP: True Service 24 - Automatic Answer for eMLPP
Service 25 - Data download via SMS-CB: True Service 25 - Data download via SMS-CB
Service 26 - Data download via SMS-PP: True Service 26 - Data download via SMS-PP
Service 27 - Menu selection: True Service 27 - Menu selection
Service 28 - Call control: True Service 28 - Call control
Service 33 - De-personalization Control Keys: True Service 33 - De-personalization Control Keys
Service 34 - Co-operative Network List: True Service 34 - Co-operative Network List
Service 35 - Short Message Status Reports: True Service 35 - Short Message Status Reports
Service 36 - Network's indication of alerting in the MS: True Service 36 - Network's indication of alerting in the MS
Service 57 - Multimedia Messaging Service (MMS): True Service 57 - Multimedia Messaging Service (MMS)
Service 58 - Extension 8: True Service 58 - Extension 8
Done ! Done !