I’m doing some testing on the XBC-V1-UT (LTE CAT1). Often, when I query IM or S#, all I get back is an ‘OK’, not the actual IMEI or SIM/ICCID value. Even the DB does this, returning ‘OK’ instead of a value. Is there some other status value (AI?) which needs to be in a specific value before IM is readable? I’d like to suppress trying to read things when they can’t be read.
Those values are not available from system boot as you’ve discovered. Technically they’ll be available after AI has read 0x23. However, that state typically does not last long and AI is not ordered so you can’t infer that you’ve gotten there simply from that.
However, it’s best simply to wait until AI=0 indicating full network association and you should be able to read all of them.