7

voip的lsusb检测华为猫棒usb地址来回跳动

 7 months ago
source link: https://bajie.dev/posts/20240216-lsusb_huawei/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Voip的lsusb检测华为猫棒usb地址来回跳动

2024-02-16 1 分钟阅读

这不是要出国就提前搭建了一个voip的电话系统么,结果在使用的过程中,华为的猫棒居然出现地址来回跳动的问题。

正常情况下,lsusb的结果

lsusb

Bus 001 Device 017: ID 12d1:1436 Huawei Technologies Co., Ltd. Broadband stick

过一阵子,或者持续几天后,地址就变了

lsusb

Bus 001 Device 017: ID 12d1:1446 Huawei Technologies Co., Ltd. HSPA modem

看上面,vender id从1436变成了1446,名字也从stick变成了modem

由于这个usb设备是直通到kvm的freepbx虚机里面去的,这直接导致voip系统不能用了,可恶啊。

必须把它给固定下来,首先先从1446变回1436

yum -y install epel-release
yum -y install use_modeswitch

usb_modeswitch -v 12d1 -p 1446 -c "/usr/share/usb_modeswitch/12d1:1446"

变回来了不成,还得把它彻底固定下来

vi /lib/udev/rules.d/40-usb_modeswitch.rules

#装了usb_modeswitch后居然已经自带了
# Generic entry for most Huawei devices, excluding Android phones
ATTRS{idVendor}=="12d1", ATTRS{manufacturer}!="Android", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '%b/%k'"

shit,不管它,再次强行固定

vi /lib/udev/rules.d/40-usb_modeswitch.rules、

# Huawei, newer modems
ATTR{idVendor}=="12d1", ATTR{idProduct}=="1446", RUN+="usb_modeswitch '%b/%k'"

这样就搞定了,得亏提前发现了这问题,否则跑到国外再发现,就晚了!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK