🎳openwrt 编译加载龙尚 U8300 4G 网卡 - 简书
2023-7-7
| 2023-7-17
0  |  0 分钟
type
status
date
Jul 7, 2023 01:14 PM
slug
summary
tags
category
icon
password
1、修改 config:
make menuconfig 选择:
Base system —> udev
Kernel modules —> USB Support —> kmod-usb-acm kmod-usb-net kmod-usb-net-qmi-wwan kmod-usb-ohci kmod-usb-serial kmod-usb-serial-option
LuCI —> Protocols —> luci-proto-3g luci-proto-qmi
Network —> uqmi
Utilities —> usb-modeswitch usbutils
notion image
image.png
make kernel_menuconfig
进入 device drivers->usb support->support for host-side usb 选择 USB Modem (CDC ACM) support
notion image
image.png
进入 USB Serial Converter support 选择:
notion image
image.png
2、修改 option.c: build_dir/target-x86_64_musl/linux-x86_64/linux-4.9.146/drivers/usb/serial/option.c ,加入 8300 的 pid 和 vid
notion image
image.png
static const struct usb_device_id option_ids[] = {
加入
notion image
image.png
drivers/network/usb/qmiw_wan.c 文件添加其 USB ID,只有这样当 modem 插入时内核根据其 id 就可以加载 qmi_wwan 驱动了。
notion image
image.png
3、编译后发现 / dev 下多了 ttyUSB1234 四个节点和 cdc-wan0,ifconfig -a 多出一个 wwan0。
notion image
image.png
修改路由配置文件 vi /etc/config/network
添加如下内容
打开接口界面,wan 点击连接,发现拨号成功,可以上网了。
notion image
image.png > 本文由简悦 SimpRead 转码
技术折腾
  • openwrt
  • 总结linux mount 挂载 samba 命令 demoopenwrt 4g 修改 imei 参考
    目录