Option HSDPA USB dongle and mode switching

Bengt Ahlgren bengta at sics.se
Wed Nov 14 06:58:03 PST 2007


Peter Schuller <peter.schuller at infidyne.com> writes:

>> % gcc -L/usr/local/lib -lusb -lusbpp -I/usr/local/include -o ttt
>> icon_switch.c prometheus:/tmp(1)
>>
>> /var/tmp//ccCnzzjn.o(.text+0x26e): In function `main':
>> : undefined reference to `usb_get_driver_np'
>>
>> /var/tmp//ccCnzzjn.o(.text+0x2a7): In function `main':
>> : undefined reference to `usb_detach_kernel_driver_np'
>>
>> Would anyone know of a way to make such USB dongles work, other than
>> properly looking into this stuff and making the necessary code changes?
>
> Simply eliminating the driver attach/detach attemps makes the tool compile and 
> run, though it complains that it cannot find the device (even though the 
> product/vendor matches the config file). I guess it's not visible to the API 
> when the driver is attached or some such.

I got an Option Globesurfer iCON 7.2 last week.  I tried the similar
usb_modeswitch program:

http://www.draisberghof.de/usb_modeswitch/

I found out that the driver detach is not needed on FreeBSD, so I just
ifdef:ed out that part of the code (including both *_np calls - see
attached patch).

It however seems that the ugen driver has to be attached to the device
for libusb to find it.  No driver or the umass driver results in the
device not being found.  I am working on another variant which uses
the method for finding the device Rui Paulo wrote in his reply to your
mail to make the program independent of loaded drivers.

Then you need to add the vendor/product id:s to ubsa.c and usbdevs
(second patch - apply in /usr/src/sys/dev/usb & make all install in
/usr/src/sys/modules/{usb,ubsa}, or rebuild kernel if you have it
built-in).

Regards,

Bengt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb_modesw.patch
Type: text/x-patch
Size: 563 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-mobile/attachments/20071114/3bfc7077/usb_modesw.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usb-icon.patch
Type: text/x-patch
Size: 999 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-mobile/attachments/20071114/3bfc7077/usb-icon.bin


More information about the freebsd-mobile mailing list