我用的licheepi 的5.2linux内核, lsusb 键盘能看到,大小写切换灯也得跟着切换,就是输入文字,按回车屏幕都没反应! 串口这边输入输出都能正常工作, 是不是要配置控制台,搞不懂,特求教大神!
如图键盘输入屏幕 不变
离线
离线
这个屏幕显示的 tty 可能和你键盘的 tty 不一样,所以也就不显示你键盘的输入。
屏幕能显示来自串口的输入(和 ttyS0 shell prompt)吗,还是只显示内核 printk 信息?
离线
屏幕只能显示内核打印信息! 屏幕也不显示串口信息 ,串口和屏幕是独立的,串口的输入输出都能正常操作输入命令都ok,但屏幕和usb键盘没联系上,键盘输入字符屏幕没反应!
离线
用 cat /proc/cmdline 看看 console= 这个选项是啥。
然后再在你的串口控制台里用 tty 指令查看你的当前 tty 是什么。或者打开 /etc/inittab 看看串口连接的是哪个 tty
离线
cmdline : console=tty0 console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 rw
串口
# tty
/dev/ttyS0
离线
# cat /etc/inittab
# /etc/inittab
#
# Copyright (C) 2001 Erik Andersen <andersen@codepoet.org>
#
# Note: BusyBox init doesn't support runlevels. The runlevels field is
# completely ignored by BusyBox init. If you want runlevels, use
# sysvinit.
#
# Format for each entry: <id>:<runlevels>:<action>:<process>
#
# id == tty to run on, or empty for /dev/console
# runlevels == ignored
# action == one of sysinit, respawn, askfirst, wait, and once
# process == program to run
# Startup the system
::sysinit:/bin/mount -t proc proc /proc
::sysinit:/bin/mount -o remount,rw /
::sysinit:/bin/mkdir -p /dev/pts
::sysinit:/bin/mkdir -p /dev/shm
::sysinit:/bin/mount -a
::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS
# Put a getty on the serial port
/dev/ttyS0::respawn:/sbin/getty -L /dev/ttyS0 115200 vt100 # GENERIC_SERIAL
# Stuff to do for the 3-finger salute
#::ctrlaltdel:/sbin/reboot
# Stuff to do before rebooting
::shutdown:/etc/init.d/rcK
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r
离线
这是usb 键盘 插入后信息
[ 831.933590] usb 1-1: new low-speed USB device number 15 using musb-hdrc
[ 832.297615] input: GASIA USB KB V11 as /devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/usb1/1-1/1-1:1.0/0003:0E8F:0022.0003/input/input3
[ 832.606465] hid-generic 0003:0E8F:0022.0003: input: USB HID v1.10 Keyboard [GASIA USB KB V11] on usb-musb-hdrc.1.auto-1/input0
[ 832.869936] input: GASIA USB KB V11 Consumer Control as /devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/usb1/1-1/1-1:1.1/0003:0E8F:0022.0004/input/input4
[ 833.185734] input: GASIA USB KB V11 System Control as /devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/usb1/1-1/1-1:1.1/0003:0E8F:0022.0004/input/input5
[ 833.430735] hid-generic 0003:0E8F:0022.0004: input: USB HID v1.10 Device [GASIA USB KB V11] on usb-musb-hdrc.1.auto-1/input1
离线
感谢unturned3 的提示。经过几天终于找到原因了
:我的roorfs是复制一键烧录的,里面仅仅打开了串口ttys0
修改如下:nano /etc/inittab
添加:
/dev/tty1:12345:respawn:/sbin/getty 38400 /dev/tty1
离线