# Using a Console Cable

**URL:** <https://forums.balena.io/t/using-a-console-cable/1573>\
**Category:** Product support\
**Tags:** ssh\
**Created:** [August 4, 2017, 8:45am UTC](https://forums.balena.io/t/using-a-console-cable/1573 "2017-08-04T08:45:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/michael/32/521_2.png) [@Michael](https://forums.balena.io/u/Michael)\
**Post date:** [August 4, 2017, 8:45am UTC](https://forums.balena.io/t/using-a-console-cable/1573/1 "2017-08-04T08:45:58Z")

</div>

I try to access resinified Raspberry Pi 3 using USB serial cable.

It works on vanilla Raspberry Pi jessie OS: I have installed the cable drivers, have `/dev/cu.usbserial` appeared and after enabling serial port via `raspi-config` I am able to log in with `screen /dev/cu.usbserial 115200`.

But I can’t make it work on resinOS.

I created [https://github.com/resin-io-projects/resin-openssh](https://github.com/resin-io-projects/resin-openssh) clone project, and container’s sshd lets me in via local network. But `screen /dev/cu.usbserial 115200` gives

```auto
Cannot open line '/dev/cu.usbserial' for R/W: Resource busy
Sorry, could not find a PTY.

```

I do have `RESIN_HOST_CONFIG_enable_uart=1` set.

There is also `/dev/tty.usbserial` device (I’m not sure what’s the difference), but `screen /dev/tty.usbserial 115200` doesn’t help either.

---

<div class="post-metadata">

**Author:** ![imrehg](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imrehg/32/36_2.png) [@imrehg](https://forums.balena.io/u/imrehg)\
**Post date:** [August 4, 2017, 10:26am UTC](https://forums.balena.io/t/using-a-console-cable/1573/2 "2017-08-04T10:26:30Z")

</div>

Are you trying to access the hostOS or the application container over the USB serial?

---

<div class="post-metadata">

**Author:** ![Michael](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/michael/32/521_2.png) [@Michael](https://forums.balena.io/u/Michael)\
**Post date:** [August 4, 2017, 12:59pm UTC](https://forums.balena.io/t/using-a-console-cable/1573/3 "2017-08-04T12:59:21Z")

</div>

As soon as I succeeded connecting to container sshd over ethernet and couldn’t connect to host OS sshd, I don’t expect that host OS sshd this time will let me in.

But, frankly speaking, I don’t really understand what should I do to connect to to either of them. I just have `screen /dev/<something about usb> 115200` command at hand. 🤣

---

<div class="post-metadata">

**Author:** ![imrehg](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imrehg/32/36_2.png) [@imrehg](https://forums.balena.io/u/imrehg)\
**Post date:** [August 4, 2017, 1:24pm UTC](https://forums.balena.io/t/using-a-console-cable/1573/4 "2017-08-04T13:24:56Z")

</div>

If you:

- have a `.dev` image,
- have a USB-serial (USB-TTL) cable [like this](https://thepihut.com/products/adafruit-usb-to-ttl-serial-cable?variant=758600325&gclid=Cj0KCQjwtpDMBRC4ARIsADhz5O5gSHiJCSx5bkkKET9YOazjT2aJGhAcQvx-miQ3Wte__BJRDyhIK_AaAlv9EALw_wcB#fo_c=1889&fo_k=0aab69a9da230ddd5e94b291068deaa0&fo_s=gplauk), or similar
- connected the USB-serial cable like [shown in the wiki here](http://elinux.org/RPi_Serial_Connection#Connections_and_signal_levels)

then you should able to connect with `screen` as you mentioned before. Is this what you have tried? Just checking for clarity.

* * *

The other comment:

> [@Michael](#):
>
> As soon as I succeeded connecting to container sshd over ethernet and couldn’t connect to host OS sshd, I don’t expect that host OS sshd this time will let me in.

I’m not sure what do you mean by this. Regardless of what you are running in the user container, the host runs its ssh server on port `22222`, which is closed down on the `.prod` system, and open on a `.dev` system. Is there something we are missing about what you’ve tried?

---

<div class="post-metadata">

**Author:** ![Michael](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/michael/32/521_2.png) [@Michael](https://forums.balena.io/u/Michael)\
**Post date:** [August 4, 2017, 2:15pm UTC](https://forums.balena.io/t/using-a-console-cable/1573/5 "2017-08-04T14:15:54Z")

</div>

When I tried .dev image (just now), the problem dissolved. Thanks!

I’m OK with being able to log in with a cable only into a .dev device.

---

<div class="post-metadata">

**Author:** ![Michael](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/michael/32/521_2.png) [@Michael](https://forums.balena.io/u/Michael)\
**Post date:** [August 4, 2017, 2:25pm UTC](https://forums.balena.io/t/using-a-console-cable/1573/6 "2017-08-04T14:25:19Z")

</div>

@imrehg how do you examine logs when connected to offline .dev device with a cable? I’m using `journalctl -ef` and the output includes only system stuff and does not include my app’s logs that I’m eager to see.

---

<div class="post-metadata">

**Author:** ![imrehg](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imrehg/32/36_2.png) [@imrehg](https://forums.balena.io/u/imrehg)\
**Post date:** [August 4, 2017, 2:27pm UTC](https://forums.balena.io/t/using-a-console-cable/1573/7 "2017-08-04T14:27:05Z")

</div>

Just replied on the [other thread for this](https://forums.balena.io/t/raspberry-pi-resets-every-40-seconds-if-offline/1556/17) 🙂

Run it with `journalctl -efa` and the `docker` logs contain your application log. It’s a quirk in docker’s logging with containers run with certain settings.
