[Share Experiences] [deb] bash 编写的 wifi 无线网卡芯片型号检测工具 wifi-card-report
Tofloor
poster avatar
字甲达宾
deepin
2023-11-05 07:57
Author

[deb] bash 编写的 wifi 无线网卡芯片型号检测工具 wifi-card-report

2023.11.04

起因:时常有看到网友反馈,无线网卡无法使用。但发贴时,很多人无法明确说明网卡的芯片型号,以及内核版本,无法方便地沟通和解决问题。

所以才觉得,如果有一个工具或命令,能帮助用户,方便地自动收录这些信息,保存到一个报告文件,方便技术人员来进行有效的指导。


wifi-card-report_0.1-1~kba1_all.deb

https://url48.ctfile.com/f/30646948-970352134-7e4cc1?p=6859

(访问密码: 6859)


使用方法:下载、安装 DEB 包。

然后,普通用户,在终端运行命令:

wifi-card-report

稍后(过程约10秒),会生成一份 markdown 格式的文本报告,并自动打开。

报告收集的信息:

  • 操作系统版本/代号;
  • 内核版本号,
  • lspci 的输出,
  • lsusb 的输出,
  • 以及 usb.ids 文件(可用于手动查找 lsusb 命令中显示的 厂商 ID 和产品 ID 对应的芯片型号)的位置

技术说明:

主要是运行以下几组命令:

  • lsb_release -a
  • uname -a
  • lspci
  • lsusb
  • locate /usb.ids
  • dpkg -S usb.ids
Reply Favorite View the author
All Replies
字甲达宾
deepin
2023-11-05 07:58
#1

输出示例:

无线网卡-信息检测报告 wifi-card-report 0.1

检测时间:2023年 11月 04日 星期六 23:43:45 CST

(报告文件名:/home/user2/wifi-card-report/wifi-card-report_2023-11-04x23.md )

1. 检测 Linux 操作系统的 [版本] 和 [代号] ...

命令: lsb_release -a


 1	Distributor ID:	Debian



 2	Description:	Debian GNU/Linux 11 (bullseye)



 3	Release:	11



 4	Codename:	bullseye

2. 检测 Linux 操作系统的 [内核版本] ...

命令: uname -a


Linux debian 5.10.0-26-amd64 #1 SMP Debian 5.10.197-1 (2023-09-29) x86_64 GNU/Linux


3. 检测 内置 PCI 芯片模块信息 [ lspci 命令] ...

命令: lspci


 1	00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers (rev 08)



 2	00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07)



 3	00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)



 4	00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)



 5	00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)



 6	00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21)



 7	00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)



 8	00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)



 9	00:1d.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #9 (rev f1)



10	00:1d.2 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #11 (rev f1)



11	00:1d.3 PCI bridge: Intel Corporation Device 9d1b (rev f1)



12	00:1f.0 ISA bridge: Intel Corporation Sunrise Point-LP LPC Controller (rev 21)



13	00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)



14	00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)



15	00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)



16	02:00.0 SD Host controller: O2 Micro, Inc. SD/MMC Card Reader Controller (rev 01)



17	04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)



18	05:00.0 Network controller: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter (rev 31)

4. 检测 USB 芯片模块信息 [ lsusb 命令] ...

命令: lsusb


 1	Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub



 2	Bus 001 Device 005: ID 04f2:b594 Chicony Electronics Co., Ltd Integrated Camera



 3	Bus 001 Device 004: ID 0cf3:e500 Qualcomm Atheros Communications 



 4	Bus 001 Device 003: ID 093a:2533 Pixart Imaging, Inc. Gaming Mouse



 5	Bus 001 Device 002: ID 1a2c:0b2a China Resource Semico Co., Ltd USB Keyboard



 6	Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

5. 检测 [ usb.ids ] 数据文件...

命令1: locate /usb.ids

命令2: dpkg -S usb.ids

命令3: sudo apt-get install usb.ids hardinfo hwdata

参考网址: https://devicehunt.com/view/type/usb/vendor/0BDA/device/8179


 1	/usr/share/doc/usb.ids



 2	/usr/share/doc/usb.ids/changelog.Debian.gz



 3	/usr/share/doc/usb.ids/copyright



 4	/usr/share/hardinfo/usb.ids



 5	/usr/share/hwdata/usb.ids



 6	/usr/share/misc/usb.ids



 7	/var/cache/apt/archives/usb.ids\_2023.05.17-1\_all.deb



 8	/var/lib/dpkg/info/usb.ids.list



 9	/var/lib/dpkg/info/usb.ids.md5sums

Reply View the author
璀璨星空
deepin
2023-11-05 08:07
#2

上传星火joy

Reply View the author
阿尼樱奈奈
Moderator
2023-11-05 15:27
#3

like

Reply View the author
神末shenmo
deepin
Spark-App
2023-11-05 20:43
#4

xdg-user-dir DESKTOP

可获得用户desktop


最后加个read

这样图形启动不会突然崩溃

Reply View the author