CME 12 Code PUK

Bonjour,

J’ai une clef 3G HSDPA que je souhaite utiliser avec le Plugin SMS et un forfait Free Mobile.
J’ai été un boulet à garder le code pin d’origine et donc verrouiller au bout de 3 essais de demarrage du demon.

[2022-07-21 22:21:42][INFO] : Start smsd
[2022-07-21 22:21:42][INFO] : Log level : debug
[2022-07-21 22:21:42][INFO] : Socket port : 55002
[2022-07-21 22:21:42][INFO] : Socket host : 127.0.0.1
[2022-07-21 22:21:42][INFO] : PID file : /tmp/jeedom/sms/deamon.pid
[2022-07-21 22:21:42][INFO] : Device : /dev/ttyUSB1
[2022-07-21 22:21:42][INFO] : Apikey : 4QO0sda4F1KWbUpD5IJiLsF3fmb6xCV25VdsTh683bMvlZchGJdt5ptdP0QemjR1
[2022-07-21 22:21:42][INFO] : Callback : http://127.0.0.1:80/plugins/sms/core/php/jeeSMS.php
[2022-07-21 22:21:42][INFO] : Cycle : 30.0
[2022-07-21 22:21:42][INFO] : Serial rate : 115200
[2022-07-21 22:21:42][INFO] : Pin : 1234
[2022-07-21 22:21:42][INFO] : Text mode : no
[2022-07-21 22:21:42][INFO] : SMSC : None
[2022-07-21 22:21:42][DEBUG] : Writing PID 21931 to /tmp/jeedom/sms/deamon.pid
[2022-07-21 22:21:42][DEBUG] : Init request module v2.21.0
[2022-07-21 22:21:42][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2022-07-21 22:21:42][DEBUG] : http://127.0.0.1:80 "GET /plugins/sms/core/php/jeeSMS.php?apikey=4QO0sda4F1KWbUpD5IJiLsF3fmb6xCV25VdsTh683bMvlZchGJdt5ptdP0QemjR1 HTTP/1.1" 200 0
[2022-07-21 22:21:42][DEBUG] : Socket interface started
[2022-07-21 22:21:42][DEBUG] : LoopNetServer Thread started
[2022-07-21 22:21:42][DEBUG] : Listening on: [127.0.0.1:55002]
[2022-07-21 22:21:42][DEBUG] : Start listening...
[2022-07-21 22:21:42][DEBUG] : Connecting to GSM Modem...
[2022-07-21 22:21:42][DEBUG] : Text mode false
[2022-07-21 22:21:42][DEBUG] : Enter pin code : 1234
[2022-07-21 22:21:42][INFO] : Connecting to modem on port /dev/ttyUSB1 at 115200bps
[2022-07-21 22:21:42][DEBUG] : write: ATZ
[2022-07-21 22:21:42][DEBUG] : response: ['OK']
[2022-07-21 22:21:42][DEBUG] : write: ATE0
[2022-07-21 22:21:42][DEBUG] : response: ['ATE0
', 'OK']
[2022-07-21 22:21:42][DEBUG] : write: AT+CFUN?
[2022-07-21 22:21:42][DEBUG] : response: ['+CFUN: 1', 'OK']
[2022-07-21 22:21:42][DEBUG] : write: AT+CMEE=1
[2022-07-21 22:21:42][DEBUG] : response: ['OK']
[2022-07-21 22:21:42][DEBUG] : write: AT+CPIN?
[2022-07-21 22:21:42][DEBUG] : response: ['+CPIN: SIM PIN', 'OK']
[2022-07-21 22:21:42][DEBUG] : write: AT+CPIN="1234"
[2022-07-21 22:21:42][DEBUG] : response: ['+CME ERROR: 12']
[2022-07-21 22:21:42][ERROR] : Exception: CME 12 (PUK required (SIM locked))
[2022-07-21 22:21:42][ERROR] : Exit 1 because this exeption is fatal
[2022-07-21 22:21:42][DEBUG] : Send to jeedom :  {'message': 'CME 12 (PUK required (SIM locked))', 'number': 'none'}
[2022-07-21 22:21:42][DEBUG] : Shutdown
[2022-07-21 22:21:42][DEBUG] : Removing PID file /tmp/jeedom/sms/deamon.pid
[2022-07-21 22:21:42][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2022-07-21 22:21:42][DEBUG] : http://127.0.0.1:80 "POST /plugins/sms/core/php/jeeSMS.php?apikey=4QO0sda4F1KWbUpD5IJiLsF3fmb6xCV25VdsTh683bMvlZchGJdt5ptdP0QemjR1 HTTP/1.1" 200 0
[2022-07-21 22:21:43][DEBUG] : LoopNetServer Thread stopped
[2022-07-21 22:21:43][DEBUG] : Exit 0
[2022-07-21 22:22:12][ERROR] : Impossible de lancer le démon sms, vérifiez le port

Je ne trouve pas comment saisir le code PUK à travers du plugin.
J’ai essayé la carte SIM sur un téléphone : Pas de problème, je peux utiliser le forfait avec le code PIN original (1234) et sans saisir le code PUK.

Quelqu’un a une idée pour réparer ma bêtise ?

Et en bloquant la carte SIM sur le téléphone pour pouvoir saisir le code PUK ?

Bonjour,

À travers le plug-in ce n’est pas possible.

Première option, sur un téléphone désactiver le code pin pour cette sim. Du coup je suppose qu’il ne le demandera plus sur le plug-in.

Deuxième option, le faire en ligne de commande si vous vous y connaissez un peu.

Merci pour vos retours.

Du coup, j’ai changé le code PIN (à défaut de pouvoir le supprimer).
Ca fonctionne … mais j’optien maintenant le code CME 13 … :-/

[2022-07-22 22:51:25][INFO] : Start smsd
[2022-07-22 22:51:25][INFO] : Log level : debug
[2022-07-22 22:51:25][INFO] : Socket port : 55002
[2022-07-22 22:51:25][INFO] : Socket host : 127.0.0.1
[2022-07-22 22:51:25][INFO] : PID file : /tmp/jeedom/sms/deamon.pid
[2022-07-22 22:51:25][INFO] : Device : /dev/ttyUSB1
[2022-07-22 22:51:25][INFO] : Apikey : 4QO0sda4F1KWbUpD5IJiLsF3fmb6xCV25VdsTh683bMvlZchGJdt5ptdP0QemjR1
[2022-07-22 22:51:25][INFO] : Callback : http://127.0.0.1:80/plugins/sms/core/php/jeeSMS.php
[2022-07-22 22:51:25][INFO] : Cycle : 30.0
[2022-07-22 22:51:25][INFO] : Serial rate : 115200
[2022-07-22 22:51:25][INFO] : Pin : 1234
[2022-07-22 22:51:25][INFO] : Text mode : no
[2022-07-22 22:51:25][INFO] : SMSC : None
[2022-07-22 22:51:25][DEBUG] : Writing PID 16531 to /tmp/jeedom/sms/deamon.pid
[2022-07-22 22:51:25][DEBUG] : Init request module v2.21.0
[2022-07-22 22:51:25][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2022-07-22 22:51:25][DEBUG] : http://127.0.0.1:80 "GET /plugins/sms/core/php/jeeSMS.php?apikey=4QO0sda4F1KWbUpD5IJiLsF3fmb6xCV25VdsTh683bMvlZchGJdt5ptdP0QemjR1 HTTP/1.1" 200 0
[2022-07-22 22:51:25][DEBUG] : Socket interface started
[2022-07-22 22:51:25][DEBUG] : LoopNetServer Thread started
[2022-07-22 22:51:25][DEBUG] : Start listening...
[2022-07-22 22:51:25][DEBUG] : Listening on: [127.0.0.1:55002]
[2022-07-22 22:51:25][DEBUG] : Connecting to GSM Modem...
[2022-07-22 22:51:25][DEBUG] : Text mode false
[2022-07-22 22:51:25][DEBUG] : Enter pin code : 1234
[2022-07-22 22:51:25][INFO] : Connecting to modem on port /dev/ttyUSB1 at 115200bps
[2022-07-22 22:51:25][DEBUG] : write: ATZ
[2022-07-22 22:51:25][DEBUG] : response: ['OK']
[2022-07-22 22:51:25][DEBUG] : write: ATE0
[2022-07-22 22:51:25][DEBUG] : response: ['ATE0
', 'OK']
[2022-07-22 22:51:25][DEBUG] : write: AT+CFUN?
[2022-07-22 22:51:25][DEBUG] : response: ['+CFUN: 1', 'OK']
[2022-07-22 22:51:25][DEBUG] : write: AT+CMEE=1
[2022-07-22 22:51:25][DEBUG] : response: ['OK']
[2022-07-22 22:51:25][DEBUG] : write: AT+CPIN?
[2022-07-22 22:51:25][DEBUG] : response: ['+CME ERROR: 13']
[2022-07-22 22:51:25][ERROR] : Exception: CME 13
[2022-07-22 22:51:25][ERROR] : Exit 1 because this exeption is fatal
[2022-07-22 22:51:25][DEBUG] : Send to jeedom :  {'message': 'CME 13', 'number': 'none'}
[2022-07-22 22:51:25][DEBUG] : Shutdown
[2022-07-22 22:51:25][DEBUG] : Removing PID file /tmp/jeedom/sms/deamon.pid
[2022-07-22 22:51:25][DEBUG] : Starting new HTTP connection (1): 127.0.0.1:80
[2022-07-22 22:51:25][DEBUG] : http://127.0.0.1:80 "POST /plugins/sms/core/php/jeeSMS.php?apikey=4QO0sda4F1KWbUpD5IJiLsF3fmb6xCV25VdsTh683bMvlZchGJdt5ptdP0QemjR1 HTTP/1.1" 200 0
[2022-07-22 22:51:26][DEBUG] : LoopNetServer Thread stopped
[2022-07-22 22:51:26][DEBUG] : Exit 0
[2022-07-22 22:51:55][ERROR] : Impossible de lancer le démon sms, vérifiez le port

Une idée ?

Ma piste serait que mon modem est blacklist chez Freemobile tant que je n’ai pas saisi le code PUK avec ce dernier.

CME ERROR: 13 	SIM failure

Oui, j’ai bien vu ça. Mais ça ne veut dire quoi concrètement ?
La SIM marche parfaitement dans un téléphone. :-/

Dans ton premier post le code pin dans le #plugin-sms est 1234.
Tu indiques après que tu as changé le code pin dans la sim.
Dans ton dernier post, tu relances le daemon avec dans le #plugin-sms, le code pin 1234.