The reason it’s not giving you the result you expect is that the MSISDN has not been written to the SIM card. It’s not needed there except for “documentation” purposes.
The SIM provider looks up the MSISDN in their own records as required from the IMSI.
You will need to write it as the first entry in the Own Numbers phonebook, using a phone or another modem.
From what I’ve seen the AT+CPBS and other phone book commands are not supported on the BG95-M3.
Is there another way to read out the phone number that is linked to the SIM connected to the BG95-M3 ?
We would like to make it as easy as possible for the end-user and display the phone number on an LCD display, so that the user knows to which phone number it has to send command SMS message to operate our device remotely.
The only other way I can think of, is giving the customer the option to make our device send out an Info SMS message to his phone number to see what the phone number of the device is.
If AT+CNUM can’t read it, then it’s simply not on the SIM.
If you have the SIM and know the number before you deliver your kit to a customer, you can investigate using another device to write it. Some phones allow the writing of “own number” - I had one.
And other modem brands support opening the “ON” phonebook and writing entries.
That’s exactly what I do if there is no other way.
Some networks/providers allow sending a free SMS to enquire on balance or other account details. The replies to these generally include the MSISDN.
Although I have not tried before, the command “AT+CRSM” allows you to read contents on the SIM card. You however need to read through the appropriate ETSI documents to understand the SIM card directories.