ACK. (Worked for me as my product_id contains only hex-digits from 0 to 9.) Thanks for reporting.
On 11/09/2011 02:42 AM, Kentaro Matsuyama wrote: > Hi list! > > Few days ago, I send below patch for usb_modeswitch to this list. But it > seems just ignored. Please check this out. > Before I apply this patch, usb_modeswitch doesn't retry even product id is > not changed on startup. > If it's not correct patch, please tell me. > > ---------- Forwarded message ---------- > From: Kentaro Matsuyama > <kentaro.matsuy...@gmail.com<mailto:kentaro.matsuy...@gmail.com>> > Date: 2011/11/7 > Subject: [PATCH] usb-modeswitch: Fix a condition to compare default product > id and switched product id on startup. > To: openwrt-devel@lists.openwrt.org<mailto:openwrt-devel@lists.openwrt.org> > Cc: Kentaro Matsuyama > <kentaro.matsuy...@gmail.com<mailto:kentaro.matsuy...@gmail.com>> > > > These default product id and switched product id are hex string variables, so > this comparison operator should be '='. > > Signed-off-by: Kentaro Matsuyama > <kentaro.matsuy...@gmail.com<mailto:kentaro.matsuy...@gmail.com>> > --- > utils/usb-modeswitch/Makefile | 2 +- > utils/usb-modeswitch/files/ > modeswitch.hotplug | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/utils/usb-modeswitch/Makefile b/utils/usb-modeswitch/Makefile > index 62444f1..c033c72 100644 > --- a/utils/usb-modeswitch/Makefile > +++ b/utils/usb-modeswitch/Makefile > @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk<http://rules.mk/> > > PKG_NAME:=usb-modeswitch > PKG_VERSION:=1.2.0 > -PKG_RELEASE:=1 > +PKG_RELEASE:=2 > > PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 > PKG_SOURCE_URL:=http://www.draisberghof.de/usb_modeswitch > diff --git a/utils/usb-modeswitch/files/modeswitch.hotplug > b/utils/usb-modeswitch/files/modeswitch.hotplug > index 7f9ce94..8042451 100644 > --- a/utils/usb-modeswitch/files/modeswitch.hotplug > +++ b/utils/usb-modeswitch/files/modeswitch.hotplug > @@ -127,7 +127,7 @@ if [ "$ACTION" = add ]; then > [ -f "$usb_dir/idVendor" ] || usb_dir="${usb_dir%/*}" > while [ $switching_done -lt 1 -a $switching_tries -le > 6 ]; do > $modeswitch -I -D -n -s 30 -c "${configs%% *}" > - if [ $(sanitize "$usb_dir/idProduct") -eq > $uPid ]; then > + if [ $(sanitize "$usb_dir/idProduct") = $uPid > ]; then > log "switching seemingly failed" > else > switching_done=1 > -- > 1.7.4.1 > > > Regards, > matsu > > 2011/11/9 Alexander Gordeev > <lasa...@lvk.cs.msu.su<mailto:lasa...@lvk.cs.msu.su>> > Hi Daniel, > > Sorry for the delay. > > В Wed, 2 Nov 2011 19:42:12 +0100 > Daniel Golle <dgo...@allnet.de<mailto:dgo...@allnet.de>> пишет: > >> Hi Alexander, >> >> >> On 11/02/2011 01:54 PM, Alexander Gordeev wrote: >>> Please remove usb-storage module from your filesystem. You can then >>> restore it from /rom. This will show us if the problem is with >>> usb-storage. >> >> Removed usb-storage from rootfs, and usb-modeswitch is still failing on the >> first try and succeeding later on: >> >> http://pastebin.com/mdAH2s8N >> >> http://pastebin.com/ht2bPF8j >> >> http://pastebin.com/yUirS7pc >> >> >> it seems that usb-modeswitch for some reason doesn't always check if the old >> usb-product-id has disappeared. any idea why it doesn't just retry sending >> the >> message until the old device is gone for good and/or a wanted-product-id >> shows >> up instead? > > Sometimes I think that usb_modeswitch's design is not very good too but > it is already working great for lots of devices. > I think you should trace usb_modeswitch at this point and try to > understand why it doesn't do the job. It also may help to usbsnoop the > switching sequence under Windows and check if there is a difference. > Does it also work on other other computers and routers? > > Probably we should move to usb_modeswitch forum (I think they don't > have a mail list) to get help from its author if we can't fix it > ourselves. > > -- > Alexander > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org<mailto:openwrt-devel@lists.openwrt.org> > https://lists.openwrt.org/mailman/listinfo/openwrt-devel > > _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel