멀티포트 직렬 어댑터: 드라이버를 로드한 후에도 작동하지 않습니다.

멀티포트 직렬 어댑터: 드라이버를 로드한 후에도 작동하지 않습니다.

이 직렬 어댑터를 구입했습니다

여기에 이미지 설명을 입력하세요.

데비안은 리눅스에서 인식됩니다

lspci -k

02:00.0 Serial controller: Device 1c00:3253 (rev 10)
    Subsystem: Device 1c00:3253
    Kernel driver in use: serial 

연속 보고 설정은 정상입니다.

setserial -g /dev/ttyS0
/dev/ttyS0, UART: 16850, Port: 0xe8c0, IRQ: 16
setserial -g /dev/ttyS1
/dev/ttyS1, UART: 16850, Port: 0xe8c8, IRQ: 16

그래서 systemd를 사용하여 직렬 로그인을 활성화했습니다.

cp /lib/systemd/system/[email protected] /etc/systemd/system/[email protected]
ln -s /etc/systemd/system/[email protected] /etc/systemd/system/getty.target.wants/
systemctl daemon-reload
systemctl start [email protected]

cp /lib/systemd/system/[email protected] /etc/systemd/system/[email protected]
ln -s /etc/systemd/system/[email protected] /etc/systemd/system/getty.target.wants/
systemctl daemon-reload
systemctl start [email protected]

시도하기 위해 두 개의 포트를 활성화했지만... 그 중 아무 것도 작동하지 않습니다. Minicom -D 외부 PC 또는 내부 PC에서 작동하지 않고 검은 화면 정지만 보고되며 직렬 활동이 없습니다. 소프트웨어/하드웨어 제어 및 소프트웨어/하드웨어 제어가 없는 일반적인 9600 8N1을 설정했지만 아무것도 작동하지 않습니다. 클래식 echo 명령을 보내도 작동하지 않습니다.

echo "proof" > /dev/ttyS0
cat -V < /dev/ttyS0 

왜 작동하지 않나요?

편집: 인터넷 검색에서 보드에 외부(sic!) 드라이버가 필요하다는 것을 알았습니다. 물론 최신 커널로 컴파일된 코드를 업데이트하지 않기 때문에 약간 어렵습니다.

편집-2: 오래된 드라이버를 찾았습니다

https://github.com/wd5gnr/WCH4SDriver.git

물론 컴파일은 안되지만...

root/WCH4SDriver/wch_serial.c: In function ‘ser_wait_modem_status’:
/root/WCH4SDriver/wch_serial.c:1340:9: error: implicit declaration of function ‘signal_pending’; did you mean ‘timer_pending’? [-Werror=implicit-function-declaration]
     if (signal_pending(current))
         ^~~~~~~~~~~~~~
         timer_pending
/root/WCH4SDriver/wch_serial.c: In function ‘ser_open’:
/root/WCH4SDriver/wch_serial.c:2109:8: error: ‘struct tty_struct’ has no member named ‘alt_speed’
     tty->alt_speed = 0;
        ^~
/root/WCH4SDriver/wch_serial.c: In function ‘wch_ser_register_ports’:
/root/WCH4SDriver/wch_serial.c:3116:7: error: implicit declaration of function ‘init_timer’; did you mean ‘init_timers’? [-Werror=implicit-function-declaration]
       init_timer(&sp->timer);
       ^~~~~~~~~~
       init_timers
/root/WCH4SDriver/wch_serial.c:3118:26: error: assignment to ‘void (*)(struct timer_list *)’ from incompatible pointer type ‘void (*)(long unsigned int)’ [-Werror=incompatible-pointer-types]
       sp->timer.function = wch_ser_timeout;

편집-3: 이것으로가이드마침내 드라이버가 작동하게 되었습니다. wch.ko /dev/ttyWCH0 및 /dev/ttyWCH1 드라이버가 두 명의 새로운 개발자를 생성했지만 minicom을 사용하여 여전히 로그인할 수 없습니다...

답변1

해결책을 찾았습니다: 역케이블 설치! 누군가 직렬 포트 케이블 중 하나를 거꾸로 연결했습니다. 이제 케이블을 올바른 순서로 교체한 후 외부 드라이버 없이도 모든 것이 잘 작동합니다.

관련 정보