# Custom udev rules for modem & modem connection setup

**URL:** <https://forums.balena.io/t/custom-udev-rules-for-modem-modem-connection-setup/2300>\
**Category:** Product support\
**Created:** [December 15, 2017, 10:20am UTC](https://forums.balena.io/t/custom-udev-rules-for-modem-modem-connection-setup/2300 "2017-12-15T10:20:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RDB](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@RDB](https://forums.balena.io/u/RDB)\
**Post date:** [December 15, 2017, 10:20am UTC](https://forums.balena.io/t/custom-udev-rules-for-modem-modem-connection-setup/2300/1 "2017-12-15T10:20:27Z")

</div>

Hi All,  
I have a SIMCOM 7100 modem with udev rules that i want to deploy. The device is seen as multiple usb devices like:

```
ttyUSB0
ttyUSB1
ttyUSB2
ttyUSB3
ttyUSB4

```

I have a container running based on the node red resin io container: [https://github.com/resin-io-projects/resin-node-red](https://github.com/resin-io-projects/resin-node-red)

Now i have followed the script on: [https://resin.io/blog/where-are-my-devices/](https://resin.io/blog/where-are-my-devices/) and added this to the docker file with loading the script named startdev:

```
#!/bin/bash
mount -t devtmpfs none /dev  
udevd &  
udevadm trigger  

```

With this line:

```
# copy udev rules
COPY ./app/udev-rules/* /etc/udev/rules.d/

# start dev
CMD ["bash", "/usr/src/app/startdev.sh"]

```

When i check it doesn’t look like the udev rules are deployed because i don’t see the following symlinks:

/dev/modemS0  
/dev/modemS1 and/or /dev/modemGPS  
/dev/modemS2 and/or /dev/modemAT  
/dev/modemS3 and/or /dev/modemPPP

Also i have added a config with the right APN in system-connections folder in img like the default from the documentation.

Is there something that goes wrong and how can I test if the modem is working at all, with or without the symlinks?

---

<div class="post-metadata">

**Author:** ![sqweelygig](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/sqweelygig/32/150_2.png) [@sqweelygig](https://forums.balena.io/u/sqweelygig)\
**Post date:** [January 8, 2018, 6:38pm UTC](https://forums.balena.io/t/custom-udev-rules-for-modem-modem-connection-setup/2300/4 "2018-01-08T18:38:53Z")

</div>

Are you running a `-dev` version of resinOS? This will allow unsecured access to the Host OS, and so is great for debugging this kind of issue, where the configuration happens at the Host rather than Application level.

---

<div class="post-metadata">

**Author:** ![RDB](https://avatars.discourse-cdn.com/v4/letter/r/8baadc/32.png) [@RDB](https://forums.balena.io/u/RDB)\
**Post date:** [January 18, 2018, 8:00am UTC](https://forums.balena.io/t/custom-udev-rules-for-modem-modem-connection-setup/2300/6 "2018-01-18T08:00:23Z")

</div>

We are running the dev version of the OS and we are able to get the modem to connect with qmi on the host OS  
But how can we achieve to have the configuration be adopted to the container or the host OS so it will be easy scalable deployed? Do we need to make a custom host image?

---

<div class="post-metadata">

**Author:** ![lucianbuzzo](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/lucianbuzzo/32/615_2.png) [@lucianbuzzo](https://forums.balena.io/u/lucianbuzzo)\
**Post date:** [February 19, 2018, 1:04pm UTC](https://forums.balena.io/t/custom-udev-rules-for-modem-modem-connection-setup/2300/14 "2018-02-19T13:04:56Z")

</div>

Can you try running this project --\> [https://github.com/resin-io-projects/cellular-test](https://github.com/resin-io-projects/cellular-test) on your device, with a network config file added to the boot file partition ( see [https://docs.resin.io/deployment/network/2.x/#cellular-modem-setup](https://docs.resin.io/deployment/network/2.x/#cellular-modem-setup) ).

If your modem doesn’t connect with this, can you try connecting the device via ethernet and run `mmcli -L` on the host OS to see if the modem is recognised.

You shouldn’t need to use any udev rules here as the modem should always enumerate with the same ttyUSB\* numbers at every boot.
