Python Script Development for Managing and Activating SIM Cards in a GSM Modem with Rotating SIM Banks

Job ID: 38544282

Budget: $250 – $750 USD

I need a Python developer to create a script that manages, activates, and retrieves data from 1,024 SIM cards connected to a GSM modem x32 with 4 SIM banks (256 SIM cards each). The script should handle SIM rotation, retrieve SIM ID and phone numbers using AT commands, and perform necessary resets and activations.

Key Feature:
Some SIM cards may not be able to retrieve their phone number via USSD. In such cases, the modem should automatically call other SIM cards that have successfully obtained a phone number. The script should ensure that there are SIM cards with existing phone numbers in the system to enable this process.

Project Details:

Device: GSM modem x32 with 4 connected SIM banks (256 SIM cards per SIM bank).
Main Requirement: Store the phone number and SIM ID for each connected SIM card.
AT Commands: Utilize AT commands such as AT+SWIT, AT+CFUN, AT+COPS, AT+CPBR, and ATD to manage, activate, and reset SIM cards, and to retrieve their details.
SIM Bank Rotation: The script should rotate through the SIM cards across the 4 ports, processing 32 SIM cards at a time.
Additional Functionality:
Automatically handle and retry failed calls or activations, especially for SIM cards that cannot retrieve phone numbers via USSD.
Manage up to 4 serial ports simultaneously (COM ports).
Log the results (SIM ID and phone number) into a text file or database.
Implement automated port resets using AT+CFUN commands when required.
Capture and save screenshots at specific points in the process for monitoring.
Retry failed SIM activations up to 3 times, logging any issues or errors.
Requirements:

The script must efficiently handle large volumes of data (1,024 SIM cards) and repeat the process every 2 hours, logging the extracted data.
Handle errors like “Permission Denied” or “Port Not Found” during the SIM card handling process.
Ensure that SIM cards can be activated using USSD codes like *103# where possible, and use phone calls between SIMs to retrieve phone numbers for SIMs that can't retrieve them via USSD.
Attached Files:

Logs and Console Output: Logs detailing how the modem assigns COM ports and SIM card activations are provided for context.
AT Command Examples: Sample code snippets with relevant AT commands to be used during the process.
Reference Script: An example Python script is included as a reference for how the process
Related categories: PHP Python Software Architecture Arduino Programming