http://m-embedded.blogspot.com/2015/03/embedded-serial-over-usb-on-beaglebone.html (this is old, but simpler now)
sudo modprobe g_serial stty -F /dev/ttyGS0 raw stty -F /dev/ttyGS0 -echo cat /dev/ttyGS0
Then connect to available com port:
Not perfect, but it will do.
BBB:
import serial
comm = serial.Serial("/dev/ttyGS0", 9600)
while True:
data = comm.read_until(b'\r\n')
print(data)
comm.write(data)
PC:
import serial
comm = serial.Serial("COM21", 9600)
while True:
comm.write(b"This is a test.\r\n")
data = comm.read_until(b'\r\n')
print(data)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.