- SIM7600G-H: USB ID
1e0e:9001(Qualcomm/Option) - SIM7080: USB ID
1e0e:9205(Qualcomm/Option SimTech)
When ModemManager restarts or the USB connection resets, the modem may be re-enumerated with a different ID:
# Before restart
$ mmcli -L
/org/freedesktop/ModemManager1/Modem/0 [QUALCOMM INCORPORATED] SIMCOM_SIM7600G-H
# After restart
$ mmcli -L
/org/freedesktop/ModemManager1/Modem/1 [QUALCOMM INCORPORATED] SIMCOM_SIM7600G-HAll scripts now automatically detect the current modem ID:
- connect-cellular-dynamic.sh - Automatically finds modem ID
- cellular-debug.sh - Automatically finds modem ID
- cellular-recover.sh - Automatically finds modem ID
- get-modem-id.sh - Returns current modem ID
Just run the scripts normally - they handle the ID detection:
# These work regardless of modem ID (0, 1, 2, etc.)
sudo /opt/cellular/connect-cellular-dynamic.sh
sudo /opt/cellular/cellular-debug.sh status
sudo /opt/cellular/cellular-recover.shIf you need to know the current modem ID:
# Method 1: Using the helper script
./get-modem-id.sh
# Method 2: Using mmcli directly
mmcli -L | grep -oP 'Modem/\K[0-9]+'
# Method 3: List all modems
mmcli -LThe bearer ID is automatically calculated as:
BEARER_ID = MODEM_ID + 1
So:
- Modem 0 → Bearer 1
- Modem 1 → Bearer 2
- Modem 2 → Bearer 3
The scripts use this pattern:
# Find the first (and usually only) modem
MODEM_ID=$(mmcli -L 2>/dev/null | grep -oP 'Modem/\K[0-9]+' | head -1)
# If not found, default to 0
if [[ -z "$MODEM_ID" ]]; then
MODEM_ID=0
fi
# Calculate bearer ID
BEARER_ID=$((MODEM_ID + 1))If auto-detection fails:
# Check if ModemManager is running
sudo systemctl status ModemManager
# Restart ModemManager
sudo systemctl restart ModemManager
sleep 3
# Try again
mmcli -LIf you have multiple modems, the scripts will use the first one found. To use a specific modem:
# List all modems
mmcli -L
# Use specific modem (e.g., modem 2)
sudo mmcli -m 2Before auto-detection, scripts had hardcoded modem IDs:
# Old way (doesn't work after re-enumeration)
MODEM_ID=0
BEARER_ID=1
# New way (works with any modem ID)
MODEM_ID=$(mmcli -L | grep -oP 'Modem/\K[0-9]+' | head -1)
BEARER_ID=$((MODEM_ID + 1))Modem ID changes when:
- ModemManager restarts - System reboot, service restart
- USB connection resets - Unplugging/replugging USB cable
- Modem firmware update - Modem updates its firmware
- Multiple modems - Adding/removing other modems
The auto-detection handles all these cases automatically.
To verify auto-detection is working:
# Run the debug script
sudo /opt/cellular/cellular-debug.sh status
# It will show the detected modem ID in the output
# Example output:
# [INFO] Modem 0 details:
# [INFO] Modem 0 status:Or check the connection script output:
sudo /opt/cellular/connect-cellular-dynamic.sh
# Output will show:
# [INFO] Step 1: Enabling modem 1...
# [INFO] Step 2: Creating bearer with APN=ereseller, IP-Type=ipv4v6...✅ All scripts now auto-detect modem ID ✅ Works with any modem ID (0, 1, 2, etc.) ✅ No manual configuration needed ✅ Handles re-enumeration automatically
Just use the scripts normally - they handle the modem ID detection for you!