Jump to content

serial via USB.


FRANK333

Recommended Posts

To control from terminal a remote orangepizeroplus in case of lockup, I connected the otg to the USB port of a second Opi0+ modifying a usb cable to which I disconnected the power cables (+red and -black).
I gave these commands on the orange to monitor:

# 	
echo "g_serial" >> /etc/modules
mkdir -p /etc/systemd/system/serial-getty@ttyGS0.service.d

nano /etc/systemd/system/serial-getty@ttyGS0.service.d/10-switch-role.conf
#add 2 lines save and exit
[Service]
ExecStartPre=-/bin/sh -c "echo 2 > /sys/bus/platform/devices/sunxi_usb_udc/otg_role"
	
systemctl --no-reload enable serial-getty@ttyGS0.service
echo "ttyGS0" >> /etc/securetty
reboot

on the second orange connected to the network, I made a simple script of serial activation:

simple script chmod +x,it disconnects with ctrl+a and then d

#!/bin/bash
dmesg | grep tty
sudo chmod 666 /dev/ttyACM0
echo "defscrollback 5000" > .screenrc  is 5,000 lines enough?
screen /dev/ttyACM0 115200

Everything works but in dmesg I have this warning:

cdc_acm 3-1:2.0: ttyACM0: USB ACM device
musb-hdrc musb-hdrc.2.auto: request 0000000019a4bba3 not queued to ep1in.

 

Sometimes after exiting the console I can't login again and I have to restart the service.

Someone, can explain me the problem or how to solve it?

 

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines