# Prevent modem manager to capture usb serial devices

**URL:** <https://linux-tips.com/t/prevent-modem-manager-to-capture-usb-serial-devices/284>\
**Category:** Embedded\
**Created:** [October 1, 2015, 2:09pm UTC](https://linux-tips.com/t/prevent-modem-manager-to-capture-usb-serial-devices/284 "2015-10-01T14:09:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaskoX](https://linux-tips.com/user_avatar/linux-tips.com/raskox/32/92_2.png) [@RaskoX](https://linux-tips.com/u/RaskoX)\
**Post date:** [October 1, 2015, 2:09pm UTC](https://linux-tips.com/t/prevent-modem-manager-to-capture-usb-serial-devices/284/1 "2015-10-01T14:09:12Z")

</div>

I’m working with an embedded device which has an USB serial debug interface.

When I plug usb cable to my Debian box, device registered as `/dev/ttyACM0` and `ModemManager` process, automatically opens the device and I couldn’t use it for a while.

Is it possible to disable ModemManager for this type of devices?

---

<div class="post-metadata">

**Author:** ![demirten](https://linux-tips.com/user_avatar/linux-tips.com/demirten/32/64_2.png) [@demirten](https://linux-tips.com/u/demirten)\
**Post date:** [October 1, 2015, 2:24pm UTC](https://linux-tips.com/t/prevent-modem-manager-to-capture-usb-serial-devices/284/2 "2015-10-01T14:24:30Z")

</div>

It is possible to disable `ModemManager` on specific device through `udev`. You need to write a new udev rule to skip some devices.

First of all, you have to get your usb vendor id and product id from the output of `lsusb`:

```
$ lsusb
Bus 001 Device 003: ID 05ac:8511 Apple, Inc. 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 032: ID 0ca6:a050 Castles Technology Co., Ltd 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
...

```

**VendorID:ProductID** combination comes in front of the human readable device name above.

If your VendorID is `0c06` and ProductId is `a050`, you can write following rules into a new udev rule file like `/etc/udev/rules.d/99-ttyacms.rules`:

```
ATTRS{idVendor}=="0ca6" ATTRS{idProduct}=="a050", ENV{ID_MM_DEVICE_IGNORE}="1"

```

The magic job is here setting `ID_MM_DEVICE_IGNORE` environment value to inform ModemManager to skip device.

After new udev rules written you need to reload your udev rules again:

```
$ sudo udevadm control --reload-rules
```
