2020-07-29 12:31 AM
I am using board P-L496G-CELL0x and STM32CubeExpansion_Cloud_AZURE_V1.2.1 software. When I use a SIM card without a Pin Code, the program works fine and I can connect to Microsoft Azure. But the problem is that when the SIM card has a Pin Code, the program does not run and does not ask me for a Pin Code in the terminal.
What should I do to use the SIM card with Pin code?
There is a function in the program called:
at_status_t called fCmdBuild_CPIN (atparser_context_t * p_atp_ctxt, atcustom_modem_context_t * p_modem_ctxt)
That is related to the PIN code, but I do not know how to use it and what other functions may should use.
Solved! Go to Solution.
2020-07-31 04:46 AM
I've found one place where the PIN code seems to be set : it's in Middlewares\ST\STM32_Cellular\Core\Cellular_Service\Radio_Service\Cellular\Src\cellular_service_task.c where function CST_init_modem_mngt() calls osCDS_init_modem() with parameter GOOD_PIN_CODE. GOOD_PIN_CODE is defined as empty string "" at beginning of same file. You can try to change GOOD_PIN_CODE with your SIM card PIN code in this source file. Apparently there's no way to set it from upper levels (application).
2020-07-31 04:46 AM
I've found one place where the PIN code seems to be set : it's in Middlewares\ST\STM32_Cellular\Core\Cellular_Service\Radio_Service\Cellular\Src\cellular_service_task.c where function CST_init_modem_mngt() calls osCDS_init_modem() with parameter GOOD_PIN_CODE. GOOD_PIN_CODE is defined as empty string "" at beginning of same file. You can try to change GOOD_PIN_CODE with your SIM card PIN code in this source file. Apparently there's no way to set it from upper levels (application).
2020-08-03 05:22 AM
Thank you. It works:thumbs_up: