First, modem enumerates, so USB is OK, looks like a USB MBIM connection coz cdc_wdm / wwan0.
Second, the SIM is not detected.
Reason may be the hardware on BPI R4. The function of the SIM tray holder is inverse to what is stated in schematic. So following the described logic will always lead to indicating SIM not present in case of inserted SIM. With SIM removed, the logic tells SIM inserted, but there is no response from the removed SIM in case of init command. So dead end.
This is definitively an issue in the hardware of the produced BPI R4, a SIM tray holder with inverse switch was used instead of the one intended in the schematic.
To check the current logic, one may follow by measuring the level at a available pull-up resistor for the SIM Detect signal, or just measure level at the pad if resistor not mounted,
There are two ways to solve the issue:
by the modem, some modems allow to disable SIM detection via the SIM Detect pin by command. In this case they will just follow the commands given to the SIM for reset.
Some modem allow to change the logic of SIM detection by command, means switch open or closed when SIM inserted.
Check your modem manual whether such options exist.
isolate the SIM Detect pin in M.2 or miniPCIe module, so module likely will always assume SIM inserted and try to initialize it Do the tape at the module side, check whether other pins covered are functionally in use by checking the pinout. We did this successfully on M.2 EM9191 in PCIe mode. There is very thin polyimide isolation tape available, typically available for PCB work. This tape is heat resistant as well.
Be careful not to break on of the pins/fingers in the connector. This happens if the tape is too thick.
Again, BananaPi manufacturing should check, whether right SIM holder is used and whether the logic of the builtin switch is according the schematic.
NB. there are modems which don’t care about the SIM detect pin or are configured ootb not to follow SIM Detect pin. These modems would work without issues. May be as well, that BPi R4 board are produced using different versions of the SIM holder.
Recommendation is to measure at the available (resistor-)pad on the PCB of BPI R4 which logic is implemented on this exact BPI R4.