ttyS0 always present even when not defined

So I made an app recently using Elixir and I saw that I have 1 extra serial port on my device (ttyACM* is for Arduinos while ttyS0 is an additional unknown).

I am not proficient enough in Linux to use a terminal command to show the data for the serial ports but I can use the Elixir command line for a result.

This can be read as a JSON message:

  "ttyACM0" => %{
    description: "Arduino Leonardo",
    manufacturer: "Arduino LLC",
    product_id: 32822,
    vendor_id: 9025
  "ttyACM1" => %{
    description: "Arduino Leonardo",
    manufacturer: "Arduino LLC",
    product_id: 32822,
    vendor_id: 9025
  "ttyACM2" => %{
    description: "Arduino Leonardo",
    manufacturer: "Arduino LLC",
    product_id: 32822,
    vendor_id: 9025
  "ttyS0" => %{}

But as you can see no data is found for that serial port.

That is when there are 3 Arduino Leonardo's are connected. This is how it looks like when I have no devices connected:

%{"ttyS0" => %{}}

As you can see it is always present regardless if there are any other devices connected to the system.

Remembering when I tried to initially setup the ports when I was having permission issues I might have edited the permissions of ttyS0 but I have no idea whether I did it, and if I did how to fix it.

Welcome to Manjaro! Could you please follow this guide and get back to us with some more information?

Please help us help you...

:unicorn: :unicorn: :rainbow: :rainbow:

Okay the result of: inxi -Fxxxza --no-host is:

System:    Kernel: 4.19.102-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 
           parameters: BOOT_IMAGE=/boot/vmlinuz-4.19-x86_64 root=UUID=b099a123-4433-4f96-aae4-35f9b324d51f rw quiet apparmor=1 
           security=apparmor resume=UUID=90616033-9e8e-4d9f-a28d-05b31a2189f9 udev.log_priority=3 
           Desktop: Xfce 4.14.2 tk: Gtk 3.24.13 info: xfce4-panel wm: xfwm4 dm: LightDM 1.30.0 Distro: Manjaro Linux 
Machine:   Type: Laptop System: LENOVO product: 2542W1W v: ThinkPad W701 serial: <filter> Chassis: type: 10 serial: <filter> 
           Mobo: LENOVO model: 2542W1W serial: <filter> BIOS: LENOVO v: 6KET60WW (1.30 ) date: 10/24/2012 
Battery:   ID-1: BAT0 charge: 23.1 Wh condition: 23.1/84.2 Wh (27%) volts: 12.5/10.8 model: SANYO 42T4655 type: Li-ion 
           serial: <filter> status: Full 
CPU:       Topology: Quad Core model: Intel Core i7 Q 720 bits: 64 type: MT MCP arch: Nehalem family: 6 model-id: 1E (30) 
           stepping: 5 microcode: A L2 cache: 6144 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 25536 
           Speed: 1177 MHz min/max: 933/1600 MHz boost: enabled Core speeds (MHz): 1: 1350 2: 1191 3: 1094 4: 1187 5: 1600 
           6: 1582 7: 1127 8: 1413 
           Vulnerabilities: Type: itlb_multihit status: KVM: Split huge pages 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: NVIDIA G92GLM [Quadro FX 2800M] vendor: Lenovo driver: nouveau v: kernel bus ID: 01:00.0 
           chip ID: 10de:061d 
           Display: x11 server: X.Org 1.20.7 driver: nouveau unloaded: modesetting alternate: fbdev,nv,vesa 
           resolution: 1920x1200~60Hz, 1920x1080~60Hz 
           OpenGL: renderer: NV92 v: 3.3 Mesa 19.3.4 direct render: Yes 
Audio:     Device-1: Intel 5 Series/3400 Series High Definition Audio vendor: Lenovo driver: snd_hda_intel v: kernel 
           bus ID: 00:1b.0 chip ID: 8086:3b56 
           Device-2: Realtek type: USB driver: snd-usb-audio,uvcvideo bus ID: 3-1.8.6:6 chip ID: 0bda:58b0 serial: <filter> 
           Sound Server: ALSA v: k4.19.102-1-MANJARO 
Network:   Device-1: Intel 82577LM Gigabit Network vendor: Lenovo driver: e1000e v: 3.2.6-k port: 1820 bus ID: 00:19.0 
           chip ID: 8086:10ea 
           IF: enp0s25 state: up speed: 100 Mbps duplex: full mac: <filter> 
           Device-2: Intel Centrino Ultimate-N 6300 driver: iwlwifi v: kernel port: 2000 bus ID: 03:00.0 chip ID: 8086:4238 
           IF: wlp3s0 state: up mac: <filter> 
Drives:    Local Storage: total: 707.96 GiB used: 56.32 GiB (8.0%) 
           ID-1: /dev/sda vendor: Toshiba model: MK6475GSX size: 596.17 GiB block size: physical: 512 B logical: 512 B 
           speed: 3.0 Gb/s rotation: 5400 rpm serial: <filter> rev: 1M scheme: MBR 
           ID-2: /dev/sdb vendor: Kingston model: SA400S37120G size: 111.79 GiB block size: physical: 512 B logical: 512 B 
           speed: 3.0 Gb/s serial: <filter> rev: B1D1 scheme: MBR 
RAID:      Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci v: 3.0 port: 1840 bus ID: 00:1f.2 
           chip ID: 8086.282a rev: 06 
Partition: ID-1: / raw size: 102.99 GiB size: 100.87 GiB (97.94%) used: 56.32 GiB (55.8%) fs: ext4 dev: /dev/sdb1 
           ID-2: swap-1 size: 8.80 GiB used: 0 KiB (0.0%) fs: swap swappiness: 60 (default) cache pressure: 100 (default) 
           dev: /dev/sdb2 
Sensors:   System Temperatures: cpu: 48.0 C mobo: 0.0 C gpu: nouveau temp: 45 C 
           Fan Speeds (RPM): cpu: 2278 
Info:      Processes: 239 Uptime: 13h 08m Memory: 11.66 GiB used: 2.92 GiB (25.0%) Init: systemd v: 242 Compilers: gcc: 9.2.0 
           Shell: bash v: 5.0.11 running in: xfce4-terminal inxi: 3.0.37 

Honestly I don't know which more info to provide for this issue.

I was suspecting a COM port on a PC, but you have a laptop and I haven't seen a COM port on a laptop in ages, so /dev/ttyS0 just a virtual driver for a COM port you don't have...

(they used to be around 20 years ago for remote debugging)

If you changed the permissions it should show up differently with the other 3 standard COM ports, so what does:

ls --all -l /dev/ttyS*

give you?

This is the result of that command (sorry for the late response):

crw-rw---- 1 root uucp 4, 64 Feb 21 10:44 /dev/ttyS0
crw-rw---- 1 root uucp 4, 65 Feb 21 10:44 /dev/ttyS1
crw-rw---- 1 root uucp 4, 66 Feb 21 10:44 /dev/ttyS2
crw-rw---- 1 root uucp 4, 67 Feb 21 10:44 /dev/ttyS3

That looks normal.

Last thing I can think about is a coding issue: an off-by-one error in a for or while loop. Can you post the code you're using to get that result?

I'm not iterating in a loop or anything similar to that. I use a single line of code which just prints out that whole object (which looks similar to the JSON map).

Also it is present when I open the Arduino IDE:

So in this case it doesn't really matter which software I am using as it shows the same result in fundementally different languages.

All out of ideas then...


I think the follwing explanation makes sense:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by