# How to start ModemManager in debug mode?

## orion777

I need to play with AT commands, therefore the ModemManager should to be started with the --debug option.

I'm not sure how to do this, since the ModemManager is started via the NetworkManager as a child process (as far I know, because there are no ModemManager in the autostarts).

```
pi64 ~ # ps -ax | grep ModemManager

 2175 ?        Sl     0:05 /usr/sbin/ModemManager

 4562 pts/1    S+     0:00 grep --colour=auto ModemManager

pi64 ~ # rc-update | grep -i manager

       NetworkManager |      default

pi64 ~ #
```

Do somebody knows how to force the modemanager to be started in debug mode?

----------

## fedeliallalinea

Never tried but following this howto you can try with

```
# /etc/init.d/NetworkManager stop

# /usr/sbin/ModemManager --debug

# /usr/sbin/NetworkManager --debug --log-level=DEBUG

```

----------

## orion777

Thank You fedeliallalinea for the answer! 

The problem is that the Modemmanages is started by the Networkmanages as a child, its is NOT started from the init.d. 

Therefore, I have to kill the NetworkManager first, othervice it will restart killed ModemManager (and does not react on /etc/init.d/NetworkManager stop ):

1) kill -9 networkmanager's pid

2) kill -9 modemmanager's pid

3) /usr/sbin/ModemManager --debug

4) rc-service Networkmanager start

So yes, such approach is possible, but it can't be permanent... So, maybe some more legal approach exists?

----------

## orion777

Can we start something with options from init.d? E.g. ModemManager --debug 

However, the --debug option disables daemon mode...Last edited by orion777 on Mon Jan 06, 2020 10:46 am; edited 1 time in total

----------

## fedeliallalinea

Maybe something with NetworkManager.conf?

----------

