huawei e220 hsdpa on freebsd 6.3-BETA2
Hans Petter Selasky
hselasky at c2i.net
Fri Dec 7 09:43:41 PST 2007
On Friday 07 December 2007, no at spam@mgedv.net wrote:
> > Your HSDPA modem presented itself like a mass storage device, probably
> > with
> > some autorun and virus like drivers intended for the Windows operating
> > system :-)
>
> unfortunately, this is the "intended" behaviour. this device has the
> ability to present itself as "mass storage" which will show up as a
> cd-rom device where the windows drivers are stored on.
>
> this is the way it works under windows:
> - plug it in first time
> - (auto)run the setup on the device for the win-driver
> - as soon as the driver is loaded, the cd device disappears and a modem is
> detected
>
> but when loading the ucom/ubsa stuff before umass, the device will
> not be recognised as /dev/cdX and show up as a communication device
> (ucom).
>
> of course there must be a way for getting the serial device working,
> because this is one of the most sold umts/hsdpa modems across eu and
> many people run it under linux as well (there are no drivers from
> the vendor provided except windows and mac).
> i'm pretty sure there is some "message" or anything else which will
> render this device switching to serial mode.
> there is some code, which i found (doesn't compile/run under freebsd)
> which "puts" this device in pure serial mode. maybe someone out there
> is able to tell me, how/if this can be done on freebsd as well?
> (btw, i'm not a c-guru)
>
> do you (or anybody else reading this) have an idea, how to get this
> device working and put it in serial mode "completely" ?
>
Hi,
You can try the following test program and see what happens. You need to run
it like super-user:
#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <dev/usb/usb.h>
int main(int argc, char **argv)
{
struct usb_ctl_request ucr = { /* zero */ };
int f;
if (argc < 3) {
printf("Usage: %s /dev/usb1 <addr>\n", argv[0]);
return 1;
}
f = open(argv[1], O_RDWR);
if (f < 0) {
return 1;
}
ucr.ucr_addr = atoi(argv[2]);
ucr.ucr_request.bmRequestType = 0;
ucr.ucr_request.bRequest = 3; /* SET_FEATURE */
ucr.ucr_request.wValue[0] = 1;
if (ioctl(f, USB_REQUEST, &ucr)) {
printf("Error!\n");
}
close (f);
return 0;
}
Use "usbdevs -v" to get the parameters. Don't forget to load "umodem".
If my program doesn't work, I suggest that you contact the manufacturer of
your modem, and tell them the truth, that the device is a mass-storage device
and that you want the money back! You paid for a modem, but got a
mass-storage device. You can tell them that FreeBSD USB experts have looked
at your device. There is no doubt about it that you've been fooled :-)
--HPS
HINT: HINT: Buy a HDSPA modem that comes with a CD-ROM. Then there is a
greater chance that they did not put the drivers on the device itself.
More information about the freebsd-questions
mailing list