Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Unlock PIN method returning 101006 Unknown Error #224

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

Luigi31415
Copy link
Contributor

What was wrong:

The unlock_pin method was returning the error code 101006 Unknown Error and failing to unlock the PIN on certain modem models, including the E3372.

What you did to fix it:

The cause of this issue was identified as incorrectly typing the data provided to the /pin/operate endpoint. Additionally, The request was not encrypting the data sent.

Any additional testing or considerations:

I tested the fix on one modem model, The E3372.

This fix should resolve the issues detailed in Issue #223. Please review the changes and let me know if further adjustments are needed.

@@ -14,8 +14,8 @@ def simlock(self) -> GetResponseType:
def save_pin(self) -> GetResponseType:
return self._session.get('pin/save-pin')

def operate(self, operate_type: int = 0, current_pin: Optional[int] = None,
new_pin: Optional[int] = None, puk_code: Optional[int] = None) \
def operate(self, operate_type: str = 0, current_pin: Optional[str] = None,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default arg. for operate_type should be '0' (string) not 0 (int).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont know how I missed that :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Fix: Unlock PIN method returning 101006 Unknown Error
@Salamek Salamek merged commit a891722 into Salamek:master Aug 22, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants