# UIM card application state "illegal"

**URL:** <https://forum.sierrawireless.com/t/uim-card-application-state-illegal/21842>\
**Category:** MC/EM Series\
**Created:** [October 16, 2020, 8:59pm UTC](https://forum.sierrawireless.com/t/uim-card-application-state-illegal/21842 "2020-10-16T20:59:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleksander0m](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/aleksander0m/32/1774_2.png) [@aleksander0m](https://forum.sierrawireless.com/u/aleksander0m)\
**Post date:** [October 16, 2020, 8:59pm UTC](https://forum.sierrawireless.com/t/uim-card-application-state-illegal/21842/1 "2020-10-16T20:59:01Z")

</div>

Hey!

I’m trying to debug an issue with an EM7565 that doesn’t want to even register in the network, it ends up in “limited” registration state in 3G. The output of “UIM Get Card Status” reports “Application state” as “illegal” for USIM:  
# qmicli -d /dev/cdc-wdm0 -p --uim-get-card-status  
[/dev/cdc-wdm0] Successfully got card status  
Provisioning applications:  
Primary GW: slot ‘1’, application ‘1’  
Primary 1X: session doesn’t exist  
Secondary GW: session doesn’t exist  
Secondary 1X: session doesn’t exist  
Slot [1]:  
Card state: ‘present’  
UPIN state: ‘not-initialized’  
UPIN retries: ‘0’  
UPUK retries: ‘0’  
Application [1]:  
Application type: ‘usim (2)’  
Application state: ‘illegal’  
Application ID:  
A0:00:00:00:87:10:02:F2:30:FF:01:89:07:02:00:00  
Personalization state: ‘ready’  
UPIN replaces PIN1: ‘no’  
PIN1 state: ‘disabled’  
PIN1 retries: ‘3’  
PUK1 retries: ‘10’  
PIN2 state: ‘enabled-not-verified’  
PIN2 retries: ‘3’  
PUK2 retries: ‘10’  
Slot [2]:  
Card state: ‘absent’  
UPIN state: ‘not-initialized’  
UPIN retries: ‘0’  
UPUK retries: ‘0’

What does that “illegal” mean?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![aleksander0m](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/aleksander0m/32/1774_2.png) [@aleksander0m](https://forum.sierrawireless.com/u/aleksander0m)\
**Post date:** [October 18, 2020, 3:36pm UTC](https://forum.sierrawireless.com/t/uim-card-application-state-illegal/21842/2 "2020-10-18T15:36:23Z")

</div>

For future reference, the specific issue I saw was because the operator (Zain Bahrain) seems to have a list of IMEIs allowed for a certain SIM. To solve this, either ask for a new SIM without this limitation, or ask operator support to add your IMEI to the SIM account’s whitelist.
