meta data for this page
Reading contact stored on the SIM card
Sorry, not possible. Hold on, this is a hacker's phone! Of course you can whip up something! The following is based on
https://www.traud.de/gsm/numbers.htm and https://www.quectel.com/UploadImage/Downlad/Quectel_EC25&EC21_AT_Commands_Manual_V1.3.pdf
Ask your modem about the possible phone book storages
mmcli -m any --command='AT+CPBS=?' response: '+CPBS: ("ME","SM","FD","ON","EN","MC","DC","RC")'
These are the supported values for the +CPBS command of your phone (see the quectel manual for an explanation of the values. It contains interesting things as the last-dialed numbers, missed calls etc. You want to select the SIM phonebook (SM) for the future queries:
mmcli -m any --command='AT+CPBS="SM"'
(AT+CSCS=“GSM” would set a charset to be used, feel free to ignore it, but be prepared to lose special chars.)
Ask for the number of phone entries and their max length. The response is +CPBR: (list of supported <index>s),<nlength>,<tlength> so e.g.
mmcli -m any --command='AT+CPBR=?' response: '+CPBR: (1-100),40,18'
The first number is the range of entries which this storage supports, here 1 to 100 entries.
mmcli -m any --command='AT+CPBR=1' # send first entry mmcli -m any --command='AT+CPBR=1,100' # send entries 1-100
The result is a list with numbers and their names. If your storage supports another range of entries enter that, for example: 1,500 or 1,80. It can take a while until all information is loaded, be patient. From this point, the rest of the task, to transform the data into .vcf files that can be imported is left as an excercise for the reader.
Your effort needed
If the above does not sound like sth you would want your grandfather to type in, why don't you create a nice user-friendly app which reads contacts and stores them in .vcf files. We need you to improve things!