博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux 添加串口数量,如何在Linux中添加4个以上的串口设备?
阅读量:4678 次
发布时间:2019-06-09

本文共 1272 字,大约阅读时间需要 4 分钟。

当我运行命令“dmesg | grep tty”时,它只显示从0到3的4个ttyS设备.我使用了#MAKADEV和makenode命令,他们在/ dev文件夹中创建了ttyS …文件.所以现在,我不能使用它们,因为它们的属性如MMIO地址没有设置.我听说过“setserial”命令,但我看不出它设置了串口设备MMIO地址.那么我有办法吗?

这很关键,因为我的电脑有8个串口,我想全部使用它们.在我的Linux中,我只能使用其中的4个..

解决方法:

如果您的系统使用驱动程序8250来处理串行端口,请检查内核配置文件中的CONFIG_SERIAL_8250_NR_UARTS参数.这定义了内核将处理的最大串行端口数.

从Kconfig到那个司机:

config SERIAL_8250_NR_UARTS

int "Maximum number of 8250/16550 serial ports"

depends on SERIAL_8250

default "4"

help

Set this to the number of serial ports you want the driver

to support. This includes any ports discovered via ACPI or

PCI enumeration and any ports that may be added at run-time

via hot-plug, or any ISA multi-port serial cards.

config SERIAL_8250_RUNTIME_UARTS

int "Number of 8250/16550 serial ports to register at runtime"

depends on SERIAL_8250

range 0 SERIAL_8250_NR_UARTS

default "4"

help

Set this to the maximum number of serial ports you want

the kernel to register at boot time. This can be overridden

with the module parameter "nr_uarts", or boot-time parameter

8250.nr_uarts

有可能,您的系统上CONFIG_SERIAL_8250_NR_UARTS的值仍为4.如果是这样,您可以在内核配置中设置更大的值并重建内核以使所有端口可用.

请注意,8250.nr_uarts内核运行时参数只能设置0到CONFIG_SERIAL_8250_NR_UARTS之间的端口数,因此仅在引导时设置它是不够的.

标签:linux,linux-device-driver,serial-port

来源: https://codeday.me/bug/20190728/1561056.html

转载地址:http://hofkp.baihongyu.com/

你可能感兴趣的文章
Windows下载安装良心教程
查看>>
Android上下文菜单ContextMenu
查看>>
【bzoj4543】Hotel加强版(thr)
查看>>
React-Native学习手册----搭建基于ios平台的开发环境
查看>>
[stm32] 中断
查看>>
L1-043 阅览室
查看>>
RTP Payload Format for Transport of MPEG-4 Elementary Streams over http
查看>>
两个时间相差多少 .net中的timespan应用
查看>>
递归 换零钱问题——由打靶子问题引申
查看>>
Python-函数基础
查看>>
Extensible Messaging and Presence Protocol (XMPP) 简介
查看>>
Farm Irrigation
查看>>
windows平板的开发和选型
查看>>
无平方因子的数(数论初步) By ACReaper
查看>>
C语言截取字符串
查看>>
如何查自己的账单
查看>>
JAVA8学习笔记(二)----三个预定义接口
查看>>
JDBC连接各种数据库的字符串
查看>>
构建之法阅读笔记06
查看>>
CentOS minimal新装配置笔记
查看>>