[Oberon] Re. (4) How is ETHO with USB?

Jörg Straube joerg.straube at iaeth.ch
Tue Aug 24 08:37:20 MEST 2010


> NB. the copied and repeated statement that "the first time the
> device is IDed, it shows it self as a CDROM, and then subsequently 
> as a wireless-modem" is ambigious.

You're right. The "normal" ZeroCD device's behavior is, it always
boots up in CDROM mode and stays there until it receives an "eject"
command.
But there are some modems (AVM Fritz!Wlan USB Stick N) that
have indeed a timer and switch to modem mode after a long timeout.
With those boxes an "eject" doesn't harm, as you just shorten the
time you would have to wait until the device switches automatically.

So, the whole switch logic is "normally" in the PC's OS. If the PC knows
that its a ZeroCD device, it ejects it. How does the OS know?

If you have a WindowsPC, have no driver installed and plug that device
in for the FIRST time, Windows matches to the GENERIC class "mass storage"
mounts it and starts "autorun". Autorun installs the driver and that driver
ejects the ZeroCD device and it switches to modem.
If you plug in for the SECOND time, Windows does no longer match to
generic "mass storage" but to the SPECIFIC USB ID (side effect of the
previous driver installation), loads that specific driver and ejects the
device accordingly.

If you don't have a WindowsPC, you have to insert the specific
USB ID by yourself, so the OS doesn't match generically to class "mass
storage" but matches to USB ID and ejects the device.
In Linux, you can do it by simply adding a rule to "/etc/udev/rules.d" saying
SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1010", RUN+="/usr/bin/eject %k"

FYI: 12d1 = Huawei, 1010 = ETS2252+ in CD-ROM mode.

Jörg



More information about the Oberon mailing list