[SOLVED] /dev/ttySx problem 20 June 2021, 17:40:14 I have Artix installed on a homebrew computer, based on Asus mobo PRIME B450-PLUS. Asus motherboards often come with built in serial port. On top of that, I bought a PCIe to 2S+1P expansion card based on ubiquitous WCH CH382 chip.These all are needed to conect to some legacy homemade hardware. The computer hardware though (MB and adapter card) is new to me. My previous late computer was bit dated (and 32 bit) and had all legacy ports on MB. I gave up on it because I failed to strap a new SATA HDD to it (not even with PATA <-> SATA convertor adapter), and couldn't buy a new ATA disk anywhere.At the moment, my printer port (from the card) works fine, but neither of the ttySx transmit or receive anything. I checked the voltages on pins, and they seem fine. The ttyS devices are recognized and I see them in dmesg output. I can open and close picocom on /dev/ttyS0, although it is mute and deaf, but using it on /dev/ttyS4 or /dev/ttyS5 also adds an insult to injury - they cause picocom to hang on exit.Suspecting that perhaps there could be multiple drivers contending for controlling all serial devices, I took the 2S+1P card out and checked /dev/ttyS0 alone, but it dosn't work just the same.An USB to serial saved the day, it worked fine as /dev/ttyUSB0, but I need multiple serial ports. These pcie devices are hopefuly physically fine and functional - but I need a way to determine that.So, dear fellow Artixans, I need help with ideas for, first, troubleshooting and then, solving this problem. Sorry if this post lacks some detail, I will provide more on demand. Last Edit: 28 June 2021, 10:42:40 by nous
Re: /dev/ttySx problem Reply #1 – 23 June 2021, 13:00:21 Quote from: scrnobrn – on 20 June 2021, 17:40:14These all are needed to conect to some legacy homemade hardware. The computer hardware though (MB and adapter card) is new to me. My previous late computer was bit dated (and 32 bit) and had all legacy ports on MB. I gave up on it because I failed to strap a new SATA HDD to it (not even with PATA <-> SATA convertor adapter), and couldn't buy a new ATA disk anywhere.I've had pretty good success with some €1 PATA<->SATA cards from Aliexpress, make sure your connections are correct. IIRC, they also need some DC power to function.Quote from: scrnobrn – on 20 June 2021, 17:40:14At the moment, my printer port (from the card) works fine, but neither of the ttySx transmit or receive anything. I checked the voltages on pins, and they seem fine. The ttyS devices are recognized and I see them in dmesg output. I can open and close picocom on /dev/ttyS0, although it is mute and deaf, but using it on /dev/ttyS4 or /dev/ttyS5 also adds an insult to injury - they cause picocom to hang on exit.Suspecting that perhaps there could be multiple drivers contending for controlling all serial devices, I took the 2S+1P card out and checked /dev/ttyS0 alone, but it dosn't work just the same.An USB to serial saved the day, it worked fine as /dev/ttyUSB0, but I need multiple serial ports. These pcie devices are hopefuly physically fine and functional - but I need a way to determine that.So, dear fellow Artixans, I need help with ideas for, first, troubleshooting and then, solving this problem. Sorry if this post lacks some detail, I will provide more on demand. Perhaps the baud rate needs adjustment? There's some good information on the Arch wiki article. Last Edit: 23 June 2021, 17:32:41 by nous
Re: /dev/ttySx problem Reply #2 – 27 June 2021, 23:16:23 Thank You, nousMeanwhile, I did some more kicking. Booted this machine from another bootable Linux instalation, 32-bit Antix from my netbook.With it, I got my card ports to respond, but the one on motherbord itself was nowhere to be found, it was not made a tty device file.Having a hunch after that, that mobo serial port was the troublemaker, I turned the motherboard's serial port off in BIOS setup.Back in Artix, I could open and work with /dev/ttyS4 and /dev/ttyS5 just fine.Then, I turned the mobo serial port on again, but tried out all of the remaining three setting choices (port address+IRQ #). The port pair on the card worked fine on each of them, and in the end, they even worked fine when I returned mobo serial port settings to original default settings. OTOH the motherboard serial port was not enumerated (? - I mean, /dev/ttyS0 was not a proper device and couldn't be opened as tty), except when settings were back to default - with default settings, I could open picocom on /dev/ttyS0 but I could not get it to transfer anything. I used one of the cables which connect card to its SUB-D 9 connectors, which are now tested good, in place of the one whch connects third SUB-D 9 to motherboard's serial port and still could get no echo in loop.So, the conclusion I draw from all this is that this is probably either a faulty hardware, or rather a BIOS (firmware) problem on Asus side. I am not sure how it interfered with operation of card serial ports (or why it stopped), but it seems like it has some internal stored state wrt serial ports, beyond what can be set in BIOS setup. I can try updating BIOS, but for the time being, I have two working serial ports.