OS/2, eCS & ArcaOS - Technical > Setup & Installation

Internet USB Key Huawei E353 and SafeFire PPP

<< < (2/3) > >>

ivan:
Andi, this thing is a smartphone without the screen and other odd bits.  It connects to a 3G network using a SIM card and makes use of your monthly data allowance to connect you to the web.  It was a long time ago when this first came up for discussion and I never bothered to keep the notes I made at the time believing that the info was safe on the forum. 

ivan:
Hi Barbara, because something was niggling at the back of my mind I downloaded the usb-modeswitch package from hobbes.

The following is the readme from that package:


usb_modeswitch.exe for OS/2
===========================

This version of usb_modeswitch has been compiled using gcc 3.3.5.  I
have compiled it using
   usb_modeswitch 1.0.2 from http://www.draisberghof.de/usb_modeswitch
   libusb-0.1.10a-os2.zip from hobbes.nmsu.edu
   usbcalls-20090823.zip from http://ecomstation.ru/projects/developer/downloads/usbcalls-20090823.zip

NOTE: usb.h is from libusb-0.1.10a-os2.zip and *not* from usbcalls-20090823.zip

For convenience I have copied the pre-compiled libraries and headers
into this distribution.

INSTALLATION
============
Copy boot/usbresmg.sys to e:/ecs/boot

!!!!!!Don't forget to make a backup of the original !!!!!!!
                            
Make sure that the usbresmg.sys is in config.sys as
   DEVICE=E:\ECS\BOOT\USBRESMG.SYS                               
REM out any older line in config.sys

Copy dll/usbcalls.dll to a dll directory which is in your LIBPATH.
(Make sure that there isn't an older copy)

Copy usb_modeswitch.conf to /etc directory.  I had to make an etc
directory because usb_modeswitch.exe doesn't seem to use the ETC
variable set in config.sys

Edit usb_modeswitch.conf for your device.  I have an Cricket A600
and so I uncommented

########################################################
# Cricket A600
#
# Switches to ACM device.  Might need a ResetUSB after switching - or not
#
# Contributor: Jeffrey Hoogland

DefaultVendor=  0x1f28
DefaultProduct= 0x0021

TargetVendor=   0x1f28
TargetProduct=  0x0020

# only for reference
MessageEndpoint=0x08

MessageContent="555342431234567824000000800108df200000000000000000000000000000"

# Afterwards (optional): "usb_modeswitch -v 0x1f28 -p 0x0020 -R"

########################################################

Running
=======

Running usb_modeswitch with my Cricket A600 USB modem gives me

********************************
Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
 Found default devices (1)
Accessing device 001 on bus 000 ...
Using endpoints 0x08 (out) and 0x87 (in)
Inquiring device details; driver will be detached ...
 Cant't do driver detection and detaching on this platform.
 Could not send INQUIRY message (error -22)

Device description data (identification)
-------------------------
Manufacturer: Cal-comp E&CC Limited
     Product: USB Micro SD Storage
  Serial No.: 215973138300
-------------------------
 Cant't do driver detection and detaching on this platform.
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x08 ...
 OK, message successfully sent
Device is gone, skipping further steps ...
-> Run lsusb to note any changes. Bye.
*********************************

Compiling
=========

Make sure you have gcc 3.3.5 installed.
Then the following command with make usb_modeswitch.exe

make -f Makefile.os2

--------------------------------------------------

Cheng-Yang Tan
cytan299@yahoo.com
25 Aug 2009

=========================================================================

Now the question is, what do you have in your usb_modeswitch.conf file and in particular what setup message content are you using?

Barbara:
My usb_modeswitch.conf is:

# /etc/usb_modeswitch.conf
#
# Last modified: 2009-06-09
#
# Configuration for usb_modeswitch, a mode switching tool for controlling
# flip flop (multiple device) USB gear
#
# Main purpose is to trigger the switching of several known UMTS modems
# from storage device mode ("ZeroCD TM" for use with MS Windows) to modem
# (serial) device mode
#
# Detailed instructions and a friendly forum on the homepage:
# http://www.draisberghof.de/usb_modeswitch
#
# News update: you want to read the paragraph about troubleshooting there
# if you run into problems !!!
# Just set or remove the comment signs (# and ;) in order to activate
# your device. (Actual entries are further down, after the reference.)
#
# For custom settings:
# Numbers can be decimal or hexadecimal, MessageStrings MUST be
# hexadecimal without prepended "0x". Digits 9-16 in the known
# MessageStrings are arbitrary; I set them to "12345678"
# What it all means (short command line flags appended):
#
#
# * DefaultVendor            -v <hex number>
# * DefaultProduct           -p <hex number>
#
# This is the ID the USB device shows after having been plugged in.
# The program needs this; if not found -> no action.
#
#
# * TargetVendor             -V <hex number>
# * TargetProduct            -P <hex number>
#
# These are the IDs of the USB device after successful mode switching.
# They are optional, but I recommend to provide them for better analysis.
# You definitely need them if you enable CheckSuccess (see below)
#
#
# * TargetClass              -C <hex number>
#
# Some weird devices don't change IDs. They only switch the device class.
# If the device has the target class -> no action (and vice versa)
#
#
# * MessageEndpoint          -m <hex number>
#
# A kind of address inside the interface to which the "message"
# (the sequence that does the actual switching) is directed.
# Starting from version 0.9.7 the MessageEndpoint is autodetected
# if not given
#
#
# * MessageContent           -M <hex string>
#
# A hex string containing the "message" sequence; it will be
# sent as a USB bulk transfer.
#
#
# * ResponseEndpoint         -r <hex number>
# * NeedResponse <0/1>       -n
#
# Some devices were reported to require receiving the response of the
# bulk transfer to do the switching properly. Usually not needed.
# Starting from version 1.0.0 the ResponseEndpoint is autodetected
# if not given
#
#
# * DetachStorageOnly <0/1>  -d
#
# Some devices just need to be detached from the usb-storage
# driver to initiate the mode switching. Using this feature
# instead of removing the whole usbstorage module keeps other
# storage devices working.
#
#
# * HuaweiMode <0/1>         -H
#
# Some Huawei devices can be switched by a special control
# message.
#
#
# * SierraMode <0/1>         -S
#
# Some Sierra devices can be switched by a special control
# message.
#
#
# * SonyMode <0/1>           -O
#
# Some Sony-Ericsson devices can be switched by a special control
# message. This is experimental and might not have a stable result
#
#
# * ResetUSB <0/1>           -R
#
# Some devices need a rougher treatment. If the switching seems
# to do something (run udevmonitor), but your system does not reflect
# it, try this somewhat brutal method to do a reset after switching.
# Mind that if your device switched OK before, this will probably set
# it back to storage mode ...
#
#
# * Interface                -i <hex number>
# * Configuration            -u <hex number>
# * AltSetting               -a <hex number>
#
# More USB parameter to help with tricky devices and for doing lots
# of cruel experiments ...
#
## Note:
## AltSetting/Configuration changes and ResetUSB are executed after all
## other steps and can be combined or used on their own (e.g. a reset
## might have the same effect as a manual replug)
#
#
# * InquireDevice <0|1>      -I (disables inquiry)
#
# The standard since 1.0.0 is to do a SCSI inquiry on the default device
# before other actions. This might be a future way to identify a device
# without ambiguities. If it causes trouble with your device, just disable.
#
#
# * CheckSuccess             -s <number>
#
# Check for successful switch after <number> seconds (to let device
# settle). First, an interface access test: most devices vanish after
# switching and can't be accessed anymore. Second, a recount of target
# devices: one more than at the first count -> device switched fine. A
# settling time of 2 - 3 seconds is usually enough; your setup may vary
#
#
# -> All other entries are just ignored <-

# Additional command line flags:
#
# Verbose output             -W
# No output at all           -q
# Other config file          -c <file>

# For filling in all this information for an unknown device,
# see instructions and links on the homepage:
# http://www.draisberghof.de/usb_modeswitch
#
# If you find working codes and configurations, please contribute
# them!

########################################################
# Huawei E376u-2
#
DefaultVendor=  0x12d1
DefaultProduct= 0x1446

#TargetVendor=   0x19d2
TargetVendor=   0x12d1
#TargetProduct=  0x1506
TargetProductList="1001,1406,140b,140c,1412,141b,1433,14ac,1506"

# only for reference
MessageEndpoint=0x01

#MessageContent="55534243123456782000000080000c85010101180101010101000000000000"
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
#DetachStorageOnly=1

########################################################
# Huawei E398
#
DefaultVendor=  0x12d1
DefaultProduct= 0x14fe

TargetVendor=   0x12d1
TargetProduct=  0x1506
#TargetProductList="1506"

# only for reference
MessageEndpoint=0x01

MessageContent="55534243123456780000000000000011062000000100000000000000000000"
#DetachStorageOnly=1

########################################################

It is stored in C:\etc and also in C:\MPTN\ETC, I think It sould be right.
Regards

Andi B.:
As in your first post you gave the output of mode com2 which shows a very hight baud rate (baud = 345600), I think the mode switching was successful, wasn't it?

Barbara:
Yes, it was, and switch works also with other COM, this is the question, i think:

Looking for default devices ...
 Found default devices (1)
Accessing device 001 on bus 000 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Cant't do driver detection and detaching on this platform.
Could not send INQUIRY message (error -22)

What about error-22?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version