Using a Console Cable

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 clone project, and container’s sshd lets me in via local network. But screen /dev/cu.usbserial 115200 gives

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.

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

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. :rofl:

If you:

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:

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?

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.

1 Like

@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.

Just replied on the other thread for this :slight_smile:

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.