using desktop window for BBB console

Hi, all -

I’m running Jessie on my desktop (I can also boot Windows 7). I have Ethernet connectivity to my BBB, and am trying to set it up so I can direct BBB console output to a window on my desktop.

Oddly enough, this works using PuTTY under Windows, but when I apply the same settings to PuTTY under Debian, I get an error:

Unable to open connection to /dev/ttyS3

Unable to configure serial port

Since I can get this to work on Windows, I can rule out the serial-to-USB cable as a possible culprit, and I know that the connection is at least valid from a hardware sense. Also, I’m guessing the problem isn’t on the BBB, so I’m figuring it’s some kind of configuration issue on the desktop.

I thought this might be a permissions issue, but I added “dialout” to my user’s groups, and I’ve tried it from root, with the same results, so that’s not looking promising.

Any suggestions? I’m not married to using PuTTY. I started with it because I thought it would be easy since I already had it working under Windows, but I’m willing to use most anything.

I’m still new to Linux and BBB, so I’d appreciate fairly explicit answers.

Thanks!

So. . .

william@eee-pc:~$ ls -I “tty[0-9]*” /dev |grep tty
tty
ttyS0
ttyS1
ttyS2
ttyS3
ttyUSB0

william@eee-pc:~$ sudo screen /dev/ttyUSB0 115200
[sudo] password for william:

Press enter if you need a prompt, but this is mostly only good for viewing serial debug output from the kernel.

Press ctrl A + ctrl D to exit screen
[detached from 14104.pts-0.eee-pc]

cat is only about as useful as above. Except with screen you can actually interact with the serial interface. With cat, you only get a serial output “dump” Then minicom . . I’ve only used it a handful of times, and it’s not much better in the way of screen formatting than either of the above cases.

Anyway, /dev/ttyS3 is probably not the right interface for your serial device. Why don’;t you run the first command I demonstrated above and then show us the output.

By the way, I do not run a GUI on my Linux dev systems. I do have an older laptop which has Lubuntu 14.04 on it. But I hardly use it. The point being, I’ve never run puTTY on Linux. But I could probably help troubleshoot your issue. Since I have around ~20 years hands on with Linux, most of that with Debian. A little bit with Mandrake( Red Hat ), and a tiny bit with Sabayon Linux( a Gentoo fork ).

mzimmers@debian:~$ ls -I “tty[0-9]*” /dev |grep tty
tty
ttyS0
ttyS1
ttyS2
ttyS3
mzimmers@debian:~$

So, you serial interface does not seem to be showing up. Is it plugged into
the USB port ? What output do you get from running the following command ?

*william@eee-pc:~$* lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 058: ID 1ebf:7f29
Bus 001 Device 003: ID 13d3:5071 IMC Networks
Bus 003 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial
Port

mzimmers@debian:~$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 13d3:3404 IMC Networks
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 056e:8008 Elecom Co., Ltd
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 003 Device 005: ID 0556:0001 Asahi Kasei Microsystems Co., Ltd AK5370 I/F A/D Converter
Bus 003 Device 004: ID 04a9:1900 Canon, Inc. CanoScan LiDE 90
Bus 003 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
mzimmers@debian:~$

And the output you get from this ?
william@eee-pc:~$ lsmod |grep usbserial
usbserial 27365 5 pl2303
usbcore 104555 13 ehci_hcd,uhci_hcd,usbnet,cdc_subset,usb_storage,cdc_ether,usbserial,uvcvideo,pl2303,cdc_acm,rndis_host,rndis_wlan

mzimmers@debian:~$ lsmod | grep usbserial
usbserial 36293 1 ftdi_sio
usbcore 195468 11 btusb,snd_usb_audio,usb_storage,usbserial,snd_usbmidi_lib,ehci_hcd,ehci_pci,usbhid,ftdi_sio,xhci_hcd
mzimmers@debian:~$

Not sure what to make of this…

Just checking to make sure the driver is loaded. So here is what I can say
about your current situation. You serial device is detected byt the
operating system, the driver is loaded, but the serial interface is not
listed in the /dev/ directory. I can not say exactly why, but I do have a
pretty good idea of what's happening here. systemd has not been told what
to do with this device. e.g. With Wheezy, we had inittab we had to edit in
order to have the device show up the applications in Linux. Such as puTTY.

So . . . for me this would turn into a google session, which you can do as
easily as I. However give me a few minutes to look into this, as I know
what to look for.

Run this really quickly and show me the output.

$ find / -type f -name ttyUSB0

I had to run that with sudo:

mzimmers@debian:~$ sudo find / -type f -name ttyUSB0
[sudo] password for mzimmers:
mzimmers@debian:~$

And when running dmesg |tail you do not get something similar to this ?

dmesg | tail
 ...
 ftdi_sio 1-1.1:1.0: FTDI USB Serial Device converter detected
 usb 1-1.1: Detected FT232RL
 usb 1-1.1: Number of endpoints 2
 usb 1-1.1: Endpoint 1 MaxPacketSize 64
 usb 1-1.1: Endpoint 2 MaxPacketSize 64
 usb 1-1.1: Setting MaxPacketSize 64
 usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB0

No, I get this. Perhaps the tail isn’t long enough?

mzimmers@debian:~$ dmesg | tail
[ 5.141267] sd 5:0:0:1: [sdd] Attached SCSI removable disk
[ 6.671770] usb 3-3: usbfs: interface 0 claimed by ftdi_sio while ‘brltty’ sets config #1
[ 6.672343] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 6.672356] ftdi_sio 3-3:1.0: device disconnected
[ 21.729999] FAT-fs (sdd1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[ 22.678434] EXT4-fs (sdd2): mounted filesystem with ordered data mode. Opts: (null)
[ 386.665801] sdd: sdd1
[ 929.834194] EXT4-fs (sdd1): mounted filesystem with ordered data mode. Opts: (null)
[15294.661470] perf interrupt took too long (2517 > 2500), lowering kernel.perf_event_max_sample_rate to 50000
[78086.748608] traps: dleyna-renderer[4807] general protection ip:7fb7fb54dde8 sp:7ffc3b116ab0 error:0 in libdleyna-renderer-1.0.so.1.0.3[7fb7fb544000+16000]
mzimmers@debian:~$

Well you could run this command:

william@eee-pc:~$ dmesg | grep USB0
[9831384.302124] usb 3-1: pl2303 converter now attached to ttyUSB0

mzimmers@debian:~$ dmesg | grep USB0
[ 3.392399] usb 3-3: FTDI USB Serial Device converter now attached to ttyUSB0
[ 6.672343] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
mzimmers@debian:~$

So…do I correctly read this that first it connects, and then it disconnects a few seconds later?

So now the real troubleshooting begins.

  • First, is the serial end of the cable correctly connected to the beaglebone ?
  • Second, Is the beaglebone powered up and running ?
  • Third, if both of the above check out, are you using a USB hub between your PC and the converter ? If so, plug it directly into a USB port without the hub.
  • Fourth, change USB ports. Then see if converter is still behaving the same.

So now the real troubleshooting begins.

  • First, is the serial end of the cable correctly connected to the beaglebone ?

I’d assume so, as it worked under Windows.

  • Second, Is the beaglebone powered up and running ?

Yes.

  • Third, if both of the above check out, are you using a USB hub between your PC and the converter ? If so, plug it directly into a USB port without the hub.

Already a direct connection.

  • Fourth, change USB ports. Then see if converter is still behaving the same.

I can try this. Is there a way to translate the output of the lsusb command into a device name? For example, based on the output I got (posted above), I see that the bus/device I’m currently using is:

Bus 003 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

But I don’t know how that translates to a /dev/tty* name.

Thanks.

this looks to be either a kernel, cable or hub problem..

Regards,

Well, that’s not good news. There is no hub, the cable works fine under Windows, so that leaves the kernel. And, this neophyte isn’t ready to start mucking around in the kernel.

So…what’s a good fallback idea here? I don’t want to make this a big project, but it would be nice if I could get the BBB console output while my desktop is booted to Debian. I tried the “screen” command that William suggested, and that failed as well (gave a “[screen is terminating]” error and stopped).

Is this worthy of reporting as a bug to the keepers of Debian?

You can always retrograde to Wheezy, or use one of the Ubuntu 14.04 variants. Personally I lean towards Lubuntu when I need a Linux desktop. But I do not use a Linux desktop all that often. I like Lubuntu because its LXDE that is highly configurable, and fast due to the desktop being accelerated.