MC7304 : debug mode failed

Hi,

I have to execute the following commands to force the Modem to accept IPV6 SIM cards.

In first, I deactivate ModemManager.service
and I execute the following command to force the Modem in debug mode : ModemManager --debug

Below, the results after the command execution :

ModemManager[3925]: [1611080998.950036] [mm-plugin-manager.c:1584] load_plugins(): [plugin manager] loaded plugin ‘Dell’
ModemManager[3925]: [1611080998.950965] [mm-plugin-manager.c:1584] load_plugins(): [plugin manager] loaded plugin ‘Linktop’
ModemManager[3925]: [1611080998.951133] [mm-plugin-manager.c:1609] load_plugins(): [plugin manager] successfully loaded 30 plugins
ModemManager[3925]: [1611080998.953093] [main.c:123] name_lost_cb(): Could not acquire the ‘org.freedesktop.ModemManager1’ service name
ModemManager[3925]: [1611080998.953318] [mm-base-manager.c:849] set_property(): Stopping connection in object manager server
ModemManager[3925]: [1611080998.958846] [main.c:218] main(): ModemManager is shut down
ModemManager[3925]: [1611080998.959242] [mm-sleep-monitor.c:245] _singleton_instance_weak_ref_cb(): disposing MMSleepMonitor singleton (0x78d27cc0)

After, I need to execute the commands :

mmcli -m 0 --command=‘AT+CGDCONT=1,“IP”,""’
mmcli -m 0 --command=‘AT!RESET’

But I have this answer:
error: command failed: ‘GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Unauthorized: Cannot send AT command to modem: operation only allowed in debug mode’

I think the Modem can’t switch to debug mode, I don’t understand why

Ok I will try. Thank you

The above error just means that there is already a ModemManager service running, so you cannot run it manually. How did you attempt to stop the MM sevice? in a systemd-based distribution you would do “sudo systemctl stop ModemManager” for example, although it could also be that you’re not using systemd and then MM is being DBus-autostarted by some other process, and if so it would be a bit more complex. What distribution are you using?

Oh, so what you need to do is actually change the initial EPS bearer settings. If you have a new enough ModemManager you could probably do that without needing to use --command, e.g. the equivalent command would be using `mmcli --3gpp-set-initial-eps-bearer-settings=“apn=,iptype=ipv4” (apn string empty and ip-type ipv4 equivalent to the “IP” in the CGDCONT command). MM 1.14 supports this for MBIM modems and MM 1.16 for QMI modems.

That error means you cannot use the --command option in mmcli while ModemManager is not running with --debug. It has nothing to do with the modem being put in debug mode or anything like that, this is exclusively a ModemManager limitation imposed artificially to avoid having users run AT commands without care :slight_smile:

If you do want to use the CGDCONT command, make sure you stop ModemManager completely first in your setup. E.g. once you stop it, mmcli would fail like this:

$ mmcli -L
error: couldn't find the ModemManager process in the bus

Then, you should be able to run MM in debug mode, e.g.:

sudo /usr/sbin/ModemManager --debug

And while MM is running like this, in another terminal, you could try to run the mmcli --command actions.

Thank you for your help