当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 1 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 如何安装USB - modeswitch - 1.1.0.tar.bz2
帖子发表于 : 2010-01-31 15:36 

注册: 2010-01-17 17:39
帖子: 17
送出感谢: 0 次
接收感谢: 0 次
blue@blue-laptop:~/usb-modeswitch-1.1.0$ ls
40-usb_modeswitch.rules README usb_modeswitch.d
ChangeLog usb_modeswitch.1 usb_modeswitch.h
COPYING usb_modeswitch.c usb_modeswitch.sh
Makefile usb_mode switch.conf
blue@blue-laptop:~/usb-modeswitch-1.1.0$
======================================================
这是README的内容
README for USB-ModeSwitch

For up-to-date and more detailed information (plus a friendly forum) visit
http://www.draisberghof.de/usb_modeswitch


NEW AUTOMATED DEVICE HANDLING - NO USER CONFIG NEEDED (once it works ;-))


What it is
==========

USB-ModeSwitch is (surprise!) a small mode switching tool for controlling
"flip flop" (multiple device) USB gear.

Several new USB devices (especially high-speed WAN stuff, based on cell phone
chipsets containing that feature) have their MS Windows drivers onboard; when
plugged in for the first time they act like a flash storage and start
installing the driver from there.
After that (and on every consecutive plugging) this driver switches the mode
internally, the storage device vanishes (in most cases), and a new device (like
an USB modem) shows up. Some call that feature "ZeroCD".

In the beginning, nothing of this was documented in any form and there was
hardly any Linux support available.
On the good side, most of the known devices work out of the box with the
available Linux modules like "usb-storage" or serial USB drivers. That leaves
the problem of the mode switching from storage to whatever the thing is
supposed to do.

Fortunately there are things like human intelligence, USB sniffing programs and
"libusb". It is possible to eavesdrop the communication of the MS Windows
driver, to isolate the command or action that does the switching, and to replay
the same thing with Linux.

USB-ModeSwitch eases the pain considerably by taking just the important para-
meters from a configuration file and doing all the initialization and communi-
cation stuff, with heavy help from "libusb".
Starting from version 0.9.7 it has an optional success check which spares the
manual call of "lsusb" to note any changes after execution.

We have already collected a wide range of information on how to switch all
sorts of devices. If you run into a new one that is unknown yet, don't despair:
we can find out what you need!


How to install
==============


If you have an earlier version installed, de-installation is recommended ("make
uninstall"). The wrapper script location changed in 1.1.0, old ones might be
orphaned in /usr/sbin.

Important: you need "tcl" for the wrapper script to work; if you enter "tclsh"
and you get a "%" prompt, you are set (to exit type "exit"). The "tcl" package
is part of all distributions I know.

To install, unpack and in the new directory use this line at the shell (as root):

> make install

This installs a config file folder "/etc/usb-modeswitch.d", a script, an
"udev" rules file and the binary.
You are set already; if your device is known, you should be able to just plug
it and use it. If it doesn't work we'll find out why.


For manual use just run "make". Work with the command line interface or
with the original config file. To do the latter put "usb-modeswitch.conf"
into "/etc" and edit it according to your hardware.
It's heavily commented and should tell you what to do.

Run "usb-modeswitch -h" to list the command line parameters. If any of them
except -W and -q are used, the default config file in /etc is NOT read.
See also the provided man page.

To run the program use it from the source folder or put it somewhere into your
path (preferably "/sbin" or "/usr/sbin").

Manual use is intended for testing and analyzing.

Once your device switches fine you can add a rule entry to the rules file
to let udev run usb-modeswitch as soon as the default IDs are found (when
the device is plugged).



##########
Important: libusb programs - like this tool - need to be run as root!
##########


Known working hardware
======================

For details and specific setup see the homepage and the config file. The
automatic installation is still in (advanced) beta stage and might require
your participation.


Contribute
==========

USB-ModeSwitch comes quite handy for experimenting with your own hardware if
not supported yet. You could try this approach:

Note the device's Vendor and Product ID from /proc/bus/usb/devices (or from the
output of lsusb); the assigned driver is usually "usb-storage". Then try spying
on the USB communication to the device with the same ID inside M$ Windoze. I
recommend this tool:
"SniffUSB" (http://benoit.papillault.free.fr/usbsnoop/index.php.en).
Please post any improvements, new device information and/or bug reports to the
forum (see above) or send it to the author (see below)!


Whodunit
========

Copyright 2007, 2008, 2009, 2010 Josua Dietze (mail to "usb_admin"
at the domain "draisberghof.de" or write a personal message through the forum
to "Josh"; NO SUPPORT QUESTIONS, use the forum!)

Command line parsing, decent usage/config output and handling, advanced options
and bugfixes:
Joakim Wennergren (jokedst) (gmail.com)

TargetClass parameter implementation to support new Option devices/firmware:
Paul Hardwick (http://www.pharscape.org)

Created with initial help from:
"usbsnoop2libusb.pl" by Timo Lindfors
(http://iki.fi/lindi/usb/usbsnoop2libusb.pl)

Config file parsing stuff borrowed from:
Guillaume Dargaud (http://www.gdargaud.net/Hack/SourceCode.html)

Hexstr2bin function borrowed from:
Jouni Malinen (http://hostap.epitest.fi/wpa_supplicant, from "common.c")

Code, fixes and ideas from:
Aki Makkonen
Denis Sutter
Lucas Benedicic
Roman Laube
Luigi Iotti
Vincent Teoh
Tommy Cheng
Daniel Cooper
Andrew Bird
Yaroslav Levandovskiy
Sakis Dimopoulos

More contributors are listed in the config file.


Legal
=====

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details:

http://www.gnu.org/licenses/gpl.txt

Or find it as the file COPYING in this folder.




Last revised: 2010-01-24, Josua Dietze


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 1 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译