{"id":9406,"date":"2019-03-31T10:24:29","date_gmt":"2019-03-31T10:24:29","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=9406"},"modified":"2019-03-31T10:24:29","modified_gmt":"2019-03-31T10:24:29","slug":"linux-find-all-serial-ports-ttys-ttyusb","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=9406","title":{"rendered":"Linux Find all Serial Ports (ttyS, ttyUSB, &#8230;)"},"content":{"rendered":"<p><a href=\"https:\/\/www.cyberciti.biz\/faq\/find-out-linux-serial-ports-with-setserial\/\">How To Check and Use Serial Ports Under Linux<\/a><br \/>\n<a href=\"https:\/\/unix.stackexchange.com\/questions\/125183\/how-to-find-which-serial-port-is-in-use\">How to find which serial port is in use?<\/a><br \/>\n<a href=\"https:\/\/stackoverflow.com\/questions\/2530096\/how-to-find-all-serial-devices-ttys-ttyusb-on-linux-without-opening-them\">How to find all serial devices (ttyS, ttyUSB, ..) on Linux without opening them?<\/a><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ dmesg | grep ttyS\r\n&#x5B;    0.686269] 00:05: ttyS0 at I\/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A\r\n&#x5B;    0.687681] ttyS4: detected caps 00000700 should be 00000500\r\n&#x5B;    0.687695] 0000:01:00.0: ttyS4 at MMIO 0xf7c01000 (irq = 16, base_baud = 4000000) is a 16C950\/954\r\n&#x5B;    0.687800] ttyS5: detected caps 00000700 should be 00000500\r\n&#x5B;    0.687813] 0000:01:00.0: ttyS5 at MMIO 0xf7c01200 (irq = 16, base_baud = 4000000) is a 16C950\/954\r\n\r\n$ ll \/sys\/class\/tty\/*\/device\/driver | grep -v bus\/platform\r\nlrwxrwxrwx 1 root root 0 Mar 31 11:43 \/sys\/class\/tty\/ttyS0\/device\/driver -&gt; ..\/..\/..\/bus\/pnp\/drivers\/serial\/\r\nlrwxrwxrwx 1 root root 0 Mar 31 11:43 \/sys\/class\/tty\/ttyS4\/device\/driver -&gt; ..\/..\/..\/..\/bus\/pci\/drivers\/serial\/\r\nlrwxrwxrwx 1 root root 0 Mar 31 11:43 \/sys\/class\/tty\/ttyS5\/device\/driver -&gt; ..\/..\/..\/..\/bus\/pci\/drivers\/serial\/\r\n\r\n$ sudo apt install setserial\r\n$ sudo setserial -g \/dev\/ttyS&#x5B;0123456789]\r\n\/dev\/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4\r\n\/dev\/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3\r\n\/dev\/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4\r\n\/dev\/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3\r\n\/dev\/ttyS4, UART: 16950\/954, Port: 0x0000, IRQ: 16\r\n\/dev\/ttyS5, UART: 16950\/954, Port: 0x0000, IRQ: 16\r\n\/dev\/ttyS6, UART: unknown, Port: 0x0000, IRQ: 0\r\n\r\n$ sudo cat \/proc\/tty\/driver\/serial\r\nserinfo:1.0 driver revision:\r\n0: uart:16550A port:000003F8 irq:4 tx:0 rx:0\r\n1: uart:unknown port:000002F8 irq:3\r\n2: uart:unknown port:000003E8 irq:4\r\n3: uart:unknown port:000002E8 irq:3\r\n4: uart:16C950\/954 mmio:0xF7C01000 irq:16 tx:30 rx:0\r\n5: uart:16C950\/954 mmio:0xF7C01200 irq:16 tx:30 rx:0\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>How To Check and Use Serial Ports Under Linux How to find which serial port is in use? How to find all serial devices (ttyS, ttyUSB, ..) on Linux without opening them? $ dmesg | grep ttyS &#x5B; 0.686269] 00:05: ttyS0 at I\/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A &#x5B; 0.687681] [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9406","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/9406","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9406"}],"version-history":[{"count":1,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/9406\/revisions"}],"predecessor-version":[{"id":9407,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/9406\/revisions\/9407"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}