Banana Pi BPI-R4 4G/5G Module sim card missing in modem manager

From what I see in PCIE mode, there’s no AT interface on the EM120R or I’m missing something in my setup.

Had no luck with mbimcli ATR as well.

Hi,

thanks for the answer,

i also was hit by this problem (at R3 with EC25).

It is possible with AT commands to turn the detection around. First time I played with it, I thought, is “just” for the status indication.

BUT it is not just for notification. If detection is wrong set, you get immidiatly after turning in the SIM card, a information that there is no SIM-Card inside (if notification is activated). The software is not even trying to connect because there is no SIM Card inside (in the systems view).

PS: I thing the notification “SIM not detected” can also be caused by other problems. After my first trys, i came to the conclusion, that it is may better not to install all packages … just what you want to try.

if you manage to get the AT Command, for EM120R you have to disable sim pin detection. According to the AT Command document by Quectel, EM120R sim pin detection was enable by default.

To disable the sim pin detection run these AT command then restart the module.:

1.Switch to sim slot 1:
AT+QUIMSLOT=1

2.Disable sim pin detection:
AT+QSIMDET=0,0

3.Restart Module:
AT+CFUN=1,1
1 Like

Thank you. I’ll try this out. Hopefully I can get an AT interface up.

Thanks. This resolved the issue on the EM060K-GL.

The EM120R-GL is still a problem with no AT interface. Still hunting for a way to set it up. :crossed_fingers:

  -----------------------------------
  SIM      |        primary sim path: /org/freedesktop/ModemManager1/SIM/0
           |          sim slot paths: slot 1: /org/freedesktop/ModemManager1/SIM/0 (active)
           |                          slot 2: none
  -----------------------------------

This worked after getting an AT interface using Quectel’s MHI driver.

And persisted on OpenWRT using mhi* drivers.

FCC locking can also be turned off using:

AT+QCFG="fcc_enable",0
1 Like

@hideyuki

How did you send commands to the RM520-GLAP in openwrt with modem manager?

You cannot send AT-Command with modemmanager. For RM520-GLAP it need quectel driver to work. In my case with GLAP i’ve using this firmware for manage the module mobile network connection and AT Command.

Firmware:

  1. Banana BPIR4
  2. Banana BPIR4 POE
  3. Banana BPIR3 Mini

Thank you so much! I was able to get this image going : ). I was able to get the AT commands figured out to the DUN port. But cannot figure out how to set up the internet connect and also set up my TTL values.

To enhance user experience, I recommend starting by changing the theme to “Argon” for a more user-friendly interface.

Setting Up an Internet Connection:

  1. Open the Modem Configuration
    Go to the menu: Network > Modem. This will open the luci-app-modem interface, where you can access all necessary functions for configuring your modem connection, including AT Commands, connection settings, and more.

  2. Configure the Dial Settings

    • Select the Dial tab. Here, you can set up your Internet connection profile, add the ISP’s APN (Access Point Name), and other settings.
    • Enter your ISP’s APN manually in the APN Selection section.
    • For GLAP, choose Quectel CM as the connection manager.
  3. Activate the APN Profile
    Once you’ve finished adding your APN profile, enable it. The Quectel CM connection manager will handle the rest of the connection process automatically.

For TTL you have to change it manually inside the file(10-custom-filter-chains.nft). You can edit the TTL using Tiny File Manager(user:admin:pass:admin). By default the TTL was set to 64. You also can add any interface you want to the file.

Changing TTL Settings:

  1. Locate the Configuration File
    Navigate to the file named 10-custom-filter-chains.nft in the directory: etc/nftables.d.

  2. Find the TTL Chains
    Look for the following lines in the file:

    chain mangle_postrouting_ttl64 {
      type filter hook postrouting priority 300; policy accept;
      oifname {"rmnet_mhi0.1","wwan0"} counter ip ttl set 64
    }
    
    chain mangle_prerouting_ttl64 {
      type filter hook prerouting priority 300; policy accept;
      iifname {"rmnet_mhi0.1","wwan0"} counter ip ttl set 64
    }
    
  3. Add Additional Interfaces (If Needed)
    To add additional interfaces, include them within the curly braces in both oifname and iifname sections. For example:

    {"rmnet_mhi0.1","wwan0","interface1","interface2"}
    
  4. Save and Reload the Firewall
    After saving the changes, reload the firewall with the following command:

    fw4 reload
    

@hideyuki

Thank you so much! Just found out my BPI-R4 is missing pins on Sim 1, so gotta get another one coming : (

This is so helpful and should have me up and going after i resolve the sim issue.

Would I add these lines to cover IPv6 also?

chain mangle_postrouting_ttl64 {
  type filter hook postrouting priority 300; policy accept;
  oifname {"rmnet_mhi0.1","wwan0"} counter ip6 hoplimit set 65
}

chain mangle_prerouting_ttl64 {
  type filter hook prerouting priority 300; policy accept;
  iifname {"rmnet_mhi0.1","wwan0"} counter ip6 hoplimit set 65
}

Or would something like this be better:

chain mangle_postrouting_ttl64 {
  type filter hook postrouting priority 300; policy accept;
  oifname {"rmnet_mhi0.1","wwan0"} counter ip ttl set 65 counter ip6 hoplimit set 65
}

chain mangle_prerouting_ttl64 {
  type filter hook prerouting priority 300; policy accept;
  iifname {"rmnet_mhi0.1","wwan0"} counter ip ttl set 65 counter ip6 hoplimit set 65
}

This one is for ipv6. But for the interface name i think you need to add based on what has been created in interfaces menu.

anon43124895:

Use the official commands written on the OpenWrt Wiki:

Or change the TTL and IPv6 hop limit in nftables with these commands:

# Modify TTL and IPv6 hop limit for egress traffic on written devices
WAN_TTL="64"
WAN_HLIM="64"
WAN_DEV="eth1, ppp0, ppp1, usb0, usb1, wwan0, wwan1, rmnet_mhi0.1"

# Add TTL, IPv6 hop limit and firewall rules for egress traffic
cat << EOF > /etc/nftables.d/ttl_and_hlim.sh
nft add rule inet fw4 mangle_postrouting oifname { $WAN_DEV } ip ttl set $WAN_TTL
nft add rule inet fw4 mangle_postrouting oifname { $WAN_DEV } ip6 hoplimit set $WAN_HLIM
EOF
uci -q del firewall.ttl_and_hlim
uci set firewall.ttl_and_hlim="include"
uci set firewall.ttl_and_hlim.path="/etc/nftables.d/ttl_and_hlim.sh"
# Saving modified values of firewall
uci commit firewall
service firewall restart

# Check the rules of the chain "mangle_postrouting"
nft list chain inet fw4 mangle_postrouting

Source:

Ahh I see, thank you so much!

Do I need to change that to:

chain mangle_postrouting_ttl65

@Thanks

Thank you! I will look this over

1 Like

The chain name (mangle_postrouting_ttl64 in this case) is just a label.

Thank you for the valuable advice to use an adapter. Works. Has there been a solution to working with the native SIM slot?

[ 9.932739] pps_core: LinuxPPS API ver. 1 registered [ 9.937711] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti [email protected] [ 9.948186] PTP clock support registered

In this log i see PTP, some body know how i can use PTP 1588 an this board or MT7988A CPU?

i want use PTP client for SFP and masters for LAN’s…