USB error: no configuration chosen from 1 choice

前段时间使用wifi模块时, 由于设备连接HUB, 在加载驱动过程中提示信息如下:

usbcore: registered new interface driver rtl8188eu
usb x-y.z: New USB device found, idVendor=0bda, idProduct=8179
usb x-y.z: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb x-y.z: Product: 802.11n NIC
usb x-y.z: Manufacturer: Realtek
usb x-y.z: SerialNumber: 00E04C0001
usb x-y.z: rejected 1 configuration due to insufficient available bus power
usb x-y.z: no configuration chosen from 1 choice


提示相应的功耗不足, 导致无法找到wifi模块对应的设备.


没办法, 先找解决办法:

方法一(治标不治本, 可暂时先解决眼前问题)

使用shell命令强制提高电流到500mA

echo -n 1 > /sys/bus/usb/devices/x-y.z/bConfigurationValue

x y z对应usb设备的编号


方法二

跟根源上解决, 找到当前系统对应的内核源码

既然设备练到HUB上, 那电流应该是由hub分配的, 在kernel/driver/usb/core中找到hub.c

在hub_configure中可以发现

else if ((hubstatus & (1 << USB_DEVICE_SELF_POWERED)) == 0) { 
        dev_dbg(hub_dev, "hub controller current requirement: %dmA\n",
            hub->descriptor->bHubContrCurrent);
        hub->limited_power = 1; 
        if (hdev->maxchild > 0) { 
            int remaining = hdev->bus_mA -
                    hub->descriptor->bHubContrCurrent;


            if (remaining < hdev->maxchild * 100) 
                dev_warn(hub_dev,
                    "insufficient power available "
                    "to use all downstream ports\n");
            hub->mA_per_port = 100;       /* 7.2.1.1 */
        }    
    } 

设备被设置为100mA, 只需将其设置为500mA即可

hub->mA_per_port = 500;

再重新编译内核, 完毕

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值