0

I am trying to connect Raspberry Pi with a TTL serial cable.I couldn't get it to work. My Debian packages are up to date.I activated serial and gpio connections via raspi-config.

I try this command on linux but only a black screen appears.

sudo screen /dev/ttyUSB0 115200

Additional informations:

Manjaro:

red@manjaro ~$ lsusb                                                                                                       
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 13d3:3496 IMC Networks 
Bus 001 Device 004: ID 13d3:5a01 IMC Networks USB2.0 VGA UVC WebCam
Bus 001 Device 003: ID 1bcf:08a6 Sunplus Innovation Technology Inc. Gaming Mouse
Bus 001 Device 002: ID 1a2c:2124 China Resource Semico Co., Ltd USB Keyboard
Bus 001 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

red@manjaro ~$ ls /dev
acpi_thermal_rel  cuse         hidraw2    loop-control  ptmx      snd     tty12  tty23  tty34  tty45  tty56  ttyS0    vboxdrvu    vcsa2  vfio
autofs            disk         hidraw3    mapper        pts       sr0     tty13  tty24  tty35  tty46  tty57  ttyS1    vboxnetctl  vcsa3  vga_arbiter
block             dri          hidraw4    media0        random    stderr  tty14  tty25  tty36  tty47  tty58  ttyS2    vboxusb     vcsa4  vhci
bsg               drm_dp_aux0  hpet       mei0          rfkill    stdin   tty15  tty26  tty37  tty48  tty59  ttyS3    vcs         vcsa5  vhost-net
btrfs-control     drm_dp_aux1  hugepages  mem           rtc       stdout  tty16  tty27  tty38  tty49  tty6   ttyUSB0  vcs1        vcsa6  vhost-vsock
bus               fb0          hwrng      mqueue        rtc0      tpm0    tty17  tty28  tty39  tty5   tty60  udmabuf  vcs2        vcsu   video0
cdrom             fd           initctl    net           sda       tpmrm0  tty18  tty29  tty4   tty50  tty61  uhid     vcs3        vcsu1  video1
char              full         input      null          sda1      tty     tty19  tty3   tty40  tty51  tty62  uinput   vcs4        vcsu2  watchdog
console           fuse         kmsg       nvram         sda2      tty0    tty2   tty30  tty41  tty52  tty63  urandom  vcs5        vcsu3  watchdog0
core              gpiochip0    kvm        port          serial    tty1    tty20  tty31  tty42  tty53  tty7   userio   vcs6        vcsu4  zero
cpu               hidraw0      lightnvm   ppp           shm       tty10   tty21  tty32  tty43  tty54  tty8   v4l      vcsa        vcsu5
cpu_dma_latency   hidraw1      log        psaux         snapshot  tty11   tty22  tty33  tty44  tty55  tty9   vboxdrv  vcsa1       vcsu6

Raspberry Pi

OS: Raspbian GNU/Linux 10 (buster) armv7l 
Host: Raspberry Pi 3 Model B Plus Rev 1.3

My cable connection: enter image description here

  • 1
    Your Question is unclear BUT you appear to have connected the 5V pin to what is presumably USB serial interface - REMOVE it! – Milliways Mar 24 at 11:13
  • learn.adafruit.com/assets/35695 I followed the connection diagram here.I followed the connection diagram here.I remove the pink cable and power it from the usb again, the problem continues. – Red20 Mar 24 at 11:28
  • The adafruit tutorial omits the 5V connection - which was what I was warning about. I see NO Pi related question. – Milliways Mar 24 at 11:31
  • Thank you. I removed the 5v cable. What should I do now? – Red20 Mar 24 at 11:40
  • 2
    It's not /dev/ttyUB0, it's /dev/ttyUSB0 – joan Mar 24 at 12:25
1

First of all, you connected the USB/TTL cable wrong. You should not connect the red line. It must be connected as shown here: connect USB to TTL (RS232) serial cable.

I do not know Manjoro, but on Raspbian you have to add this line to /boot/config.txt:

enable_uart=1

and you (user pi) should be a member of group dialout so you do not have to use sudo. You must also have an entry console=serial0,115200 in /boot/cmdline.txt, so it looks similar to this (don't touch your other settings):

console=serial0,115200 root=PARTUUID=738a4d67-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet

Using screen is normally OK but it is a fairly complex program and at first not made to connect to serial lines. I like to use a simple program tio (terminal IO) that is just made for serial connections like this. Just install it with:

mngmt ~$ sudo apt install tio
mngmt ~$ tio /dev/ttyUSB0   # be member in group dialout

If you still get a black screen then you have a problem with the hardware.

| improve this answer | |
  • pi@raspberrypi:~ $ groups pi pi : pi adm dialout cdrom sudo audio video plugdev games users input netdev spi i2c gpio I add enable_uart=1 to /boot/config.txt. But problem is continuous. – Red20 Mar 24 at 14:13
  • @Red20 I have updated my answer at the end. – Ingo Mar 24 at 14:56
  • red@manjaro ~$ sudo tio /dev/ttyUSB0 [sudo] password for red: [tio 18:46:12] tio v1.32 [tio 18:46:12] Press ctrl-t q to quit [tio 18:46:12] Connected – Red20 Mar 24 at 15:46
  • @Red20 No need to use sudo. Does the RasPi responds when you hit Enter? – Ingo Mar 24 at 16:20
  • "Connected" is gone when you try without typing Sudo.When I press enter, it doesn't respond. – Red20 Mar 24 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.