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

SIM card with removed PIN #117

Open
Jancs-E opened this issue Jul 6, 2024 · 1 comment
Open

SIM card with removed PIN #117

Jancs-E opened this issue Jul 6, 2024 · 1 comment

Comments

@Jancs-E
Copy link

Jancs-E commented Jul 6, 2024

Hi!
I have an issue using your library with the PIN-disable/removed SIM card - the command AT+CPIN? gives response: +CPIN:READY /OK, but if I simply try to connect either by modem.connect(), modem.connect(pin=None), modem.connect(pin=''), I always get an error ('CME 11 (SIM card PIN is required)'.

How could it be solved?

@Jancs-E
Copy link
Author

Jancs-E commented Jul 6, 2024

I found a problem:
originally, the line #431 in modem.py looks so
if cpinResponse != '+CPIN: READY':
which means, it will fail if the response does no contain space.
I modified it so:
if cpinResponse.replace(' ', '') != '+CPIN:READY':
and now it works as it will accept any response - with or without spaces. It also solved my problem.

Would be nice, if you could release an update.

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

No branches or pull requests

1 participant