What do I have to consider with my own implementation for communication with the SIM card to avoid errors?
Please make sure that you open a separate APDU channel to communicate with the applet on the SIM. Communication on the base channel (channel 0) may cause problems, because the modem hardware may already be communicating with the SIM on this channel. To open a separate channel please use the "MANAGE CHANNEL" APDU command and encode the channel assigned by the SIM in all subsequent commands in the CLA byte. (Details can be found in ISO 7816 Part 4 Sections 5.4.1 and 6.16.)
Also remember to close the channel if you no longer use the SIM or want to perform a reset. If you are using an ubirch testkit, opening a channel is automatically done by the micropython library.
Also note that for some hardware, resetting the main microcontroller does not automatically reset the modem hardware. This is because on some boards, the modem and microcontroller are implemented as quasi-separate systems. The reason for this is that such a configuration allows, for example, the modem to wake up a microcontroller that has been switched off to save power, depending on e.g. an SMS. However, this may also mean that your modem may need to perform a separate reset of its own in order to correctly reset it to its basic state before you start communication. Please refer to the documentation of your chosen board/modem to determine if and how you need to perform such a separate modem reset and, depending on the default configuration of your modem, AT status messages such as "+CEREG" may disturb your SIM communication if they occur while you are waiting for an AT+CSIM command response.
1NCE 商店

立即購買1NCE IoT Lifetime Flat

造訪 1NCE 商店並開始輕鬆連接您的 IoT 設備。只需訂購您的 SIM 卡、選擇所需的 SIM 卡類型並填寫所有必需的表格即可。付款獲得確認後,您將在5到7個工作天內收到卡片。