View previous topic :: View next topic |
Author |
Message |
start n00b
Joined: 06 Nov 2020 Posts: 19
|
Posted: Wed Nov 25, 2020 2:26 pm Post subject: Why is there no ttyS* in the /dev directory? |
|
|
Other linux distributions seem to have ttyS*.
How to use the serial port to communicate with the development board under gentoo?
Minicom installed.
kernel .confignetwork address:
[/url]https://github.com/startfan/gentoo/blob/master/config.gentoo
Is there a configuration problem?
Last edited by start on Thu Nov 26, 2020 3:17 pm; edited 2 times in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54815 Location: 56N 3W
|
Posted: Wed Nov 25, 2020 2:33 pm Post subject: |
|
|
start,
Do you have a real physical serial port on your system?
If you do, it will be either 5v or 12v signalling, so its a very bad idea to connect it to most things without using level shifters as most of the things you would want to connect it to are 3.3v. You may well know this. :)
Does your kernel have serial post support?
Is your hardware 16550 compatible or is it something else?
dmesg may have something to say.
Code: | $ dmesg | grep 16550
[ 5.018949] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 5.019061] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A |
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9890 Location: almost Mile High in the USA
|
Posted: Wed Nov 25, 2020 2:40 pm Post subject: |
|
|
If you are using udev (eudev, mdev, ...) device file creator is working, then you don't have the right driver installed.
If you aren't using udev, then you need to create the device file yourself. But the proper entry depends on the actual device you're trying to use (what io port, etc.) and you still need to have the proper driver installed. In your dmesg you should see something like :
Code: | Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
0000:00:03.3: ttyS1 at I/O 0xf1c0 (irq = 17, base_baud = 115200) is a 16550A |
which should normally tell udev to automatically create the /dev entries.
Note that serial ports these days could be connected via USB and show up as /dev/ttyUSB* or /dev/ttyACM* so knowing what exact hardware you have is important. ttyS* is specifically for the legacy 16550A's connected via ISA or now LPC. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
start n00b
Joined: 06 Nov 2020 Posts: 19
|
Posted: Thu Nov 26, 2020 1:12 am Post subject: I've tried using Minicom on other Linux distributions. |
|
|
Delete unwanted information
Last edited by start on Fri Nov 27, 2020 4:04 am; edited 4 times in total |
|
Back to top |
|
|
start n00b
Joined: 06 Nov 2020 Posts: 19
|
Posted: Thu Nov 26, 2020 4:01 am Post subject: |
|
|
Delete unwanted information
Last edited by start on Fri Nov 27, 2020 4:03 am; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54815 Location: 56N 3W
|
Posted: Thu Nov 26, 2020 1:28 pm Post subject: |
|
|
start,
Take a deep breath. We will start at the beginning and work through this logically, checking that each step is correct before we move onto the next step.
Code: | [ 0.931487] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 5.314490] usb 3-4: ch341-uart converter now attached to ttyUSB0 |
Shows that you have a real 16550A serial port and a single port USB to serial converter.
Step 1 is your kernel.
Post the output of lsusb, so we can see exactly which USB/Serial converter you have. There are lots in the kernel.
Make friends with wgetpaste and put your entire kernel .config file onto a pastebin site. Post the link.
Its far too big for a post. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
start n00b
Joined: 06 Nov 2020 Posts: 19
|
Posted: Fri Nov 27, 2020 4:02 am Post subject: I have found out what the problem is. |
|
|
Now that you have ttyUSB0 in the /dev directory, you can use Minicom as normal.I didn't expect to find the CH341 serial driver in the Linux source USB configuration options。
I think just need to enable "CONFIG_SERIO" and "CONFIG_SERIO_SERPORT".
You actually need to enable "CONFIG_USB_SERIAL" and then select the corresponding driver[/topic]。
If you want to run Linux in a peripheral, you must turn on "CONFIG_USB_GADGET", and then you need to configure a hardware driver for the bus controller in the peripheral segment, as well as a" accessory driver "for the peripheral protocol. |
|
Back to top |
|
|
|