thank you very much, you are correct 100% I still trying find out how to do what you wrote, because I dont have good experience with Modems
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.
You can find the AT command manual for your module here:
Quectel AT Command Manual
In section 5.10 (page 68), it details the steps you need to follow:
Disable SIM pin detection:
AT+QSIMDET=0,0
Restart the module:
AT+CFUN=1,1
Send these commands using minicom, picocom, or any other serial communication tool. This should most likely resolve your issue.
- Disable SIM PIN detection:
AT+QSIMDET=0,0 - Restart the module:
AT+CFUN=1,1
I’ve tried using these commands through minicom, but I’m encountering the following results:
- When I send
AT+QSIMDET=0,0, I receive:
OK
- After sending
AT+CFUN=1,1, I receive:
+CME ERROR: 3
Additional Details:
- The modem responds to basic AT commands like
ATandAT+CSQ, but it fails to change the functionality when sending the restart command (AT+CFUN=1,1). - The SIM is not PIN-locked, and I’ve confirmed this with
AT+CPIN?which returnsREADY. - I’m using a Banana Pi R4 and have connected the modem through
/dev/ttyUSB0.
What I’ve Tried:
- Ensured the SIM card is not locked (by checking
AT+CPIN?). - Sent
AT+QSIMDET=0,0to disable PIN detection. - Tried restarting the module with
AT+CFUN=1,1, but encountered the error +CME ERROR: 3.
Questions:
- What could be causing the
+CME ERROR: 3when trying to restart the module withAT+CFUN=1,1? - Is there any alternative command to properly restart or reset the module without encountering errors?
- Is there any additional configuration I might be missing on my setup (e.g., serial port configuration or modem drivers)?
Any help or suggestions would be greatly appreciated!
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
Thank you very much for support
sudo mmcli -m 0
Status | lock: sim-puk2
| unlock retries: sim-puk2 (10)
| state: disabled
| power state: low
----------------------------------
Modes | supported: allowed: 3g, 4g; preferred: none
| current: allowed: 3g, 4g; preferred: none
----------------------------------
IP | supported: ipv4, ipv6, ipv4v6
----------------------------------
3GPP |
| enabled locks: fixed-dialing
| packet service state: detached
----------------------------------
3GPP EPS | ue mode of operation: csps-2
| initial bearer ip type: ipv4v6
----------------------------------
SIM | primary sim path: /org/freedesktop/ModemManager1/SIM/0
| sim slot paths: slot 1: /org/freedesktop/ModemManager1/SIM/0 (active)
| slot 2: /org/freedesktop/ModemManager1/SIM/1
AT+CREG?
+CREG: 0,0
OK
sim state: disabled
AT+CSQ
+CSQ: 99,99
OK
sudo mmcli -m 0 --enable
error: couldn't enable the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Retry: Invalid transition'
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:
Modem Manager FCC Unlock Documentation (Archived)
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
from commands provided minicom
+CMTI: "ME",0
+CMTI: ,3
OK
OK
OK
OK
OK
+CCLK: "80/01/06,20:53:32"
OK
root@:# sudo mmcli -m 0 --enable
successfully enabled the modem
root@:# ping -I wwan0 google.com
ping: Warning: source address might be selected on device other than: wwan0
PING (142.250.180.142) from 192.168.115.200 wwan0: 56(84) bytes of data.
^C
--- ping statistics ---
21 packets transmitted, 0 received, 100% packet loss, time 20485ms
the interface wwan0 not getting IP address after enable And ping 0 received, 100% packet loss,
From Network Mananger cdc-wdm0 gsm disconnected
root@:~# nmcli device
DEVICE TYPE STATE CONNECTION
lan0 ethernet connected Wired connection 4
wlan0 wifi connected wlan0
lo loopback connected (externally) lo
eth0 ethernet connected Wired connection 1
lan1 ethernet connected (externally) lan1
ISP_Mikrotik iptunnel connected (externally) ISP_Mikrotik
ipip_Mikrotik iptunnel connected (externally) ipip_Mikrotik
cdc-wdm0 gsm disconnected --
p2p-dev-wlan0 wifi-p2p disconnected --
eth1 ethernet unavailable --
eth2 ethernet unavailable --
lan2 ethernet unavailable --
lan3 ethernet unavailable --
bond0 bond unmanaged --
erspan0 erspan unmanaged --
gre0 iptunnel unmanaged --
gre2 iptunnel unmanaged --
gretap0 iptunnel unmanaged --
tunl0 iptunnel unmanaged --
vlan18 vlan unmanaged --
wlan1 wifi unmanaged --
root@almaos:~#
Edited By using nmcli
root@almaos:~# sudo nmcli connection add type gsm ifname “*” con-name “4G Connection” apn “APN” sudo nmcli connection up “4G Connection” Connection ‘4G Connection’ successfully added. Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/10)
But ping not working
ping -I wwan0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 10.141.239.243 wwan0: 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
62 packets transmitted, 0 received, 100% packet loss, time 62469ms
Last time you tried to enable the modem with:
sudo mmcli -m 0 --enable
You got this error:
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.
root@:~# sudo mmcli -m 0
----------------------------------
General | path: /org/freedesktop/ModemManager1/Modem/0
|
----------------------------------
Hardware | manufacturer: Quectel
| model: Quectel EM05-G
| firmware revision: EM05GFAR07A07M1G
| h/w revision: QUECTEL Mobile Broadband Modul
| supported: gsm-umts, lte
| current: gsm-umts, lte
|
----------------------------------
System | device: /sys/devices/platform/11200000.xhci/usb1/1-1/1-1.1
| drivers: option, cdc_mbim
| plugin: quectel
| primary port: cdc-wdm0
| ports: cdc-wdm0 (mbim), ttyUSB0 (at), wwan0 (net)
----------------------------------
Numbers | own:
----------------------------------
Status | lock: sim-puk2
| unlock retries: sim-puk2 (10)
| state: connected
| power state: on
| access tech: lte
| signal quality: 70% (recent)
----------------------------------
Modes | supported: allowed: 3g, 4g; preferred: none
| current: allowed: 3g, 4g; preferred: none
----------------------------------
IP | supported: ipv4, ipv6, ipv4v6
----------------------------------
3GPP |
| enabled locks: fixed-dialing
|
| operator name:
| registration: home
| packet service state: attached
----------------------------------
3GPP EPS | ue mode of operation: csps-2
| initial bearer path: /org/freedesktop/ModemManager1/Bearer/0
| initial bearer ip type: ipv4v6
----------------------------------
SIM | primary sim path: /org/freedesktop/ModemManager1/SIM/0
| sim slot paths: slot 1: /org/freedesktop/ModemManager1/SIM/0 (active)
| slot 2: /org/freedesktop/ModemManager1/SIM/1
----------------------------------
Bearer | paths: /org/freedesktop/ModemManager1/Bearer/1
root@almaos:~#
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.
The opertator is Ilaid
root@:~# sudo mmcli -m 0
----------------------------------
General | path: /org/freedesktop/ModemManager1/Modem/0
| device id: fbb3545aa050654a3ccd0132e3460f27f636e384
----------------------------------
Hardware | manufacturer: Quectel
| model: Quectel EM05-G
| firmware revision: EM05GFAR07A07M1G
| h/w revision: QUECTEL Mobile Broadband Modul
| supported: gsm-umts, lte
| current: gsm-umts, lte
| equipment id: 869****************
----------------------------------
System | device: /sys/devices/platform/11200000.xhci/usb1/1-1/1-1.1
| drivers: option, cdc_mbim
| plugin: quectel
| primary port: cdc-wdm0
| ports: cdc-wdm0 (mbim), ttyUSB0 (at), wwan0 (net)
----------------------------------
Numbers | own: +3**************
----------------------------------
Status | lock: sim-puk2
| unlock retries: sim-puk2 (10)
| state: connected
| power state: on
| access tech: lte
| signal quality: 70% (recent)
----------------------------------
Modes | supported: allowed: 3g, 4g; preferred: none
| current: allowed: 3g, 4g; preferred: none
----------------------------------
IP | supported: ipv4, ipv6, ipv4v6
----------------------------------
3GPP | imei: 869***********
| enabled locks: fixed-dialing
| operator id: 22***
| operator name: Iliad
| registration: home
| packet service state: attached
----------------------------------
3GPP EPS | ue mode of operation: csps-2
| initial bearer path: /org/freedesktop/ModemManager1/Bearer/0
| initial bearer ip type: ipv4v6
----------------------------------
SIM | primary sim path: /org/freedesktop/ModemManager1/SIM/0
| sim slot paths: slot 1: /org/freedesktop/ModemManager1/SIM/0 (active)
| slot 2: /org/freedesktop/ModemManager1/SIM/1
----------------------------------
Bearer | paths: /org/freedesktop/ModemManager1/Bearer/1
For user name and password are not needed
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.
sudo nmcli connection modify "4G Connection" gsm.apn "Iliad" gsm.number "*99#"
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.
I modified with uppercase and lowercase of “i” and wrote phone numebr correctly but the same I interface wwan0 not reciving data from internet
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 267 bytes 24112 (23.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
even ping not working
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.
Modify that please:
sudo nmcli connection modify "4G Connection" gsm.number "*99#"
then restart the connection:
sudo nmcli connection down "4G Connection"
sudo nmcli connection up "4G Connection"
Yes I tried in begaining using sudo nmcli connection modify “4G Connection” gsm.number “*99#”
but it the same
I will delet connection and try from the very new step maybe somthing missed in routing and firewall rules
Do that. At this point, you’re very close to getting it to work.
I’d bet the issue now is with the carrier settings, everything else seems to be fine.
Thank you very much for support
I have similar issues with a Quectel RM520N-GL on OpenWRT latest release w/ModemManager 1.22:
- Using the OSS wwan and mhi_wwan_mbim kernel modules, not the Quectel ones
/dev/wwan0mbim0was the device I had to use viaqmbimat(had to build it myself) in order to send commands- Inverted SIM detection as above to bypass it, SIM now detected successfully
- Used
AT+QMBNCFG="list"to validate that an MBN for my network was available on-SIM and usedAT+QMBNCFG="AutoSel",1to enable autoselection of it. Now IP and route is assigned to the interface setup with ModemManager. - I can’t establish any connectivity through the created interface,
mhi_hwip0(ping -I mhi_hwip0 1.1.1.1for example increments TX without any RX and nor can I ping the default route). This looks exactly like the issue you have. - That said,
AT+QPING=4,"1.1.1.1"responds OK for me. I wonder if instructing the modem to ping would work for you?
That’s as far as I’ve got so far. It’s enough to validate, I think, that connectivity is working on the modem side so something else is misbehaving - I hope that you manage to get it working and can report back on how you managed it!
Ref. Banana Pi BPI-R4 4G/5G Module sim card missing in modem manager - #42 by pkern as it looks like a similar issue.