0

I'm using the Rpi 3B+ and understand the hardware uart is used by the bluetooth. I'm OK to use the other uart

I've followed several threads and believed I've done all I can.

  1. Enabled the Uart in config.ini
  2. Set the 'core_freq=250'
  3. Disabled the Console in cmdline.txt

    (I've double checked using the config tool)

This command shows the serial ports

ls -l /dev/ttyS0 /dev/ttyAMA0

.. and shows

crw-rw---- 1 root dialout 204, 64 Feb 28 14:17 /dev/ttyAMA0
crw--w---- 1 root tty       4, 64 Feb 28 14:17 /dev/ttyS0

But this python command only shows one port.

python -m serial.tools.list_ports -v

/dev/ttyAMA0
    desc: ttyAMA0
    hwid: 3f201000.serial
1 ports found

What am I missing here.. ( inexperienced user )

Rob Field
  • 3
  • 2

1 Answers1

1

Undo everything you did and enable serial in raspi-config.

Write to /dev/serial0 (which is the default serial port).

PS I tried the python -m serial.tools.list_ports -v you listed.

It only shows 1 port, as you stated, despite my Pi being correctly configured with a serial port. The fault seems to be with the tool you used - nothing to do with the Pi.

Milliways
  • 59,890
  • 31
  • 101
  • 209
  • After I did all what I previously typed.. I did go to raspi config, I saw your other post suggesting that. What I saw was the uart enabled and the console disabled. I assumed that it was therefore done correctly. I see two serial ports with one command, and one serial port with the python command. I don't know why that is or the relevance, as if the bash command sees two ports but the python function doesn't. Accept that I may not know what I'm talking about. ;) – Robbo Feb 28 '19 at 23:00
  • I presume you are referring to How do I make serial work on the Raspberry Pi3 , Pi3B+, PiZeroW - the Foundation finally "fixed" this a year later. You can still use the error-prone multi-step process, but the post was updated to explain the simpler, more future-proof option. – Milliways Mar 01 '19 at 07:38