# Docker access serial device from host and container?

**URL:** <https://forums.docker.com/t/docker-access-serial-device-from-host-and-container/41835>\
**Category:** General\
**Tags:** docker\
**Created:** [November 23, 2017, 2:46am UTC](https://forums.docker.com/t/docker-access-serial-device-from-host-and-container/41835 "2017-11-23T02:46:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![timx](https://avatars.discourse-cdn.com/v4/letter/t/8e7dd6/32.png) [@timx](https://forums.docker.com/u/timx)\
**Post date:** [November 23, 2017, 2:46am UTC](https://forums.docker.com/t/docker-access-serial-device-from-host-and-container/41835/1 "2017-11-23T02:46:48Z")

</div>

I have a serial device `/dev/ttyACM0`, that I would like to access it from the host and inside the docker container and this serial device is connected in a loop back mode (meaning i send a data, it will receive the same data)

I pass the serial device into the container as follow:

```auto
docker run -v /dev/ttyACM0:/dev/ttyACM0 node

```

I have an application inside the docker container that sends a message every 1 second,

In my host, I have the same application that receives the message send from the application inside container, and resend the message.

I found that, there is a some problem when I did this, sometimes I will get data corruption,

- i) is it possible to share the serial device and open it at same time from host and container?
- ii) what are the disadvantage of doing this?
- iii) how can i solve the data corruption problems?
