With some modems the ttyUSBx device are not automatically created
after the modeswitch (for example with my k3765).
This patch adds a new id for the target device after the mode switch.
Signed-off-by: Roberto Riggio<roberto.rig...@create-net.org>
--
Index: utils/usb-modeswitch/files/modeswitch.hotplug
===================================================================
--- utils/usb-modeswitch/files/modeswitch.hotplug (revision 23538)
+++ utils/usb-modeswitch/files/modeswitch.hotplug (working copy)
@@ -121,6 +121,10 @@
[ -n "$configs" ] && {
log "$DEVICENAME: Selecting ${configs%% *} for mode switching"
$modeswitch -c "${configs%% *}"
+ log "$DEVICENAME: Adding $tVid $tPid device id"
+ tVid=$(cat ${configs%% *} | grep TargetVendor |
sed 's/.*=\(.*\)/\1/')
+ tPid=$(cat ${configs%% *} | grep TargetProduct
| sed 's/.*=\(.*\)/\1/')
+ echo "$tVid $tPid" >
/sys/bus/usb-serial/drivers/option1/new_id
}
}
fi
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel