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.
There is a high probability that your issue is exactly what Konrad explained. The first thing you should try, as mentioned is disabling SIM detection via AT commands.
The +CME ERROR: 3 means the modem canāt perform the operation. Try rebooting the module manually. ItĀ“s not a big deal if the other AT commands are working properly.
First, turn off the BPi-R4 and power it back on. Make sure the SIM is in the SIM1 slot before turning it on.
After powering up, use the mmcli -L command to check if the sim is recognized in the right slot. If it shows up, thatās it.
If the modem shows up but the SIM doesnāt, try checking the SIM status with AT commands. check if the SIM is properly registered and if the modem is picking up a signal. Using minicom, try sending AT+CREG? to check network registration and AT+CSQ for signal quality.
LetĀ“s see what you find after trying these steps.
Edit:
After restarting, run the command mmcli -m 0 as well
Youāve made great progress. After disabling SIM detection, ModemManager now correctly reads the SIM, and the āSIM missingā error is gone, which is great news.
Just to make sure the new issue isnāt FCC lock, try the following:
Open minicom and send the following command:
AT+QCFG="fcc_enable",0
Then, manually restart the BPi-R4.
Try enabling the modem again:
sudo mmcli -m 0 --enable
Check the modem status with:
sudo mmcli -m 0
Post the output here so we can take a look.
Edit: The more I think about it, the more convinced I am that your modem has the FCC lock. I suggest you take a look at the Modem Manager documentation (removed but still accessible through the internet cache) at the following link:
The response from your modem to the AT command AT+CFUN=1,1 closely matches the behavior described for devices with the FCC lock and same goes for the response to sudo mmcli -m 0 --enable with an Invalid transition
error: couldn't enable the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Retry: Invalid transition'
Now, after disabling the FCC lock, the response is:
successfully enabled the modem
Thatās great! Now you were able to activate the modem.
Just to make sure everything is working correctly up to this point, please provide the output of:
sudo mmcli -m 0
This will help us easily compare with previous responses and see what has changed.
At this stage, I believe you only need to configure the APN, but Iād still like to check the Modem Managerās response to sudo mmcli -m 0 to confirm.
Well, so far so good, everything seems fine with the modem being activated without issues.
At this point, I believe youāre not receiving data because the operatorās settings might not be configured correctly. I noticed that you created a connection and only set the APN as āAPNā. Is just āAPNā your apn data, donĀ“t also need to include a username and/or password?
Could you please share the complete carrier information? Not the ones youāre using right now, but the official ones your carrier provides to customers for internet connectivity.
Iām not familiar with that carrier, but after searching online, I found that if your carrier is Iliad Italy, the APN you entered is definitely wrong. It should be āiliadā instead of āAPN.ā Itās also recommended to include a number to dial.
You can modify both the APN and the phone number in a single command using nmcli.
After modifying the connection, restart it to apply the new settings:
sudo nmcli connection down "4G Connection"
sudo nmcli connection up "4G Connection"
To check if the changes were applied correctly, use:
nmcli connection show "4G Connection"
This will display the current configuration, including the APN and phone number.
Edit: I just edited it because apparently the APN is Iliad, with the first āIā in uppercase. If itās not working, try both uppercase and lowercase.
For the phone number, are you entering your own number? you donāt need to enter your actual number, just use the generic *99# which is the same for all countries.