tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD and USB 3G/4G dongles



On 24/08/2011 9:31 AM, Iain Hibbert wrote:
> On Wed, 24 Aug 2011, Darren Reed wrote:
> 
>> On 10/08/2011 10:32 PM, Joerg Sonnenberger wrote:
>>> On Wed, Aug 10, 2011 at 11:23:48PM +0100, Darren Reed wrote:
>>>> How well does NetBSD work (or not work) with the various
>>>> USB dongles from European carriers such as O2, T-mobile, etc?
>>>
>>> Most are handled by u3g with minor adjustments.
>>
>> Here, O2 has given me one that probes in 5.0 as follows:
>>
>> umass1 at uhub1 port 2 configuration 1 interface 0
>> umass1: HUAWEI Technology HUAWEI Mobile, rev 2.00/0.00, addr 3
>> umass1: using SCSI over Bulk-Only
>> scsibus1 at umass1: 2 targets, 1 lun per target
>> umass2 at uhub1 port 2 configuration 1 interface 1
>> umass2: HUAWEI Technology HUAWEI Mobile, rev 2.00/0.00, addr 3
>> umass2: using SCSI over Bulk-Only
>> cd1 at scsibus1 target 0 lun 0: <HUAWEI, Mass Storage, 2.31> cdrom removable
>> scsibus2 at umass2: 2 targets, 1 lun per target
>> sd4 at scsibus2 target 0 lun 0: <HUAWEI, SD Storage, 2.31> disk removable
>> sd4: drive offline
>> sd4(umass2:0:0:0):  Check Condition on CDB: 0x00 00 00 00 00 00
>>     SENSE KEY:  Not Ready
>>      ASC/ASCQ:  Medium Not Present
>>
>> sd4: unable to open device, error = 19
>>
>> ... I will be installing -current from yesterday later today.
>>
>> The u3g man page seems rather light on details on how to
>> configure this device and get it running.
> 
> sounds like you need to add the product/vendor IDs to the u3g_dev table in
> u3g.c -- if it works then you can proceed to pppd on the tty it attaches.

At first NetBSD/23.8.2011 would only probe it with this message:

u3ginit0 at uhub3 port 1: Switching to 3G mode
u3ginit0: detached
u3ginit0: at uhub3 port 1 (addr 3) disconnected

After adding a line to u3g.c:


static const struct usb_devno u3g_devs[] = {
        { USB_VENDOR_DELL, USB_PRODUCT_DELL_W5500 },
        /* OEM: Huawei */
        { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E1820 },
        { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 },
        { USB_VENDOR_HUAWEI, 0x1406 },
        { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_K3765 },
        { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_MOBILE },

... the phone is an E1750, product code 0x1406. I tried to add
the new product to usbdevs but even after running make as suggested
to rebuild the .h/.c files, the symbol gave me an error, so I stuck
with the number instead. It should be USB_PRODUCT_HUAWEI_1750 and
not 0x1406. Anyway, after that, I booted up and got:

u3ginit0 at uhub3 port 1: Switching to 3G mode
u3ginit0: detached
u3ginit0: at uhub3 port 1 (addr 3) disconnected
u3g0 at uhub3 port 1 configuration 1 interface 0
ucom0 at u3g0 portno 0: 3G Modem
u3g1 at uhub3 port 1 configuration 1 interface 1
ucom1 at u3g1 portno 1: 3G Modem
u3g2 at uhub3 port 1 configuration 1 interface 2
ucom2 at u3g2 portno 2: 3G Modem
umass2 at uhub3 port 1 configuration 1 interface 3
umass2: HUAWEI Technology HUAWEI Mobile, rev 2.00/0.00, addr 3
umass2: using SCSI over Bulk-Only
scsibus2 at umass2: 2 targets, 1 lun per target
sd5 at scsibus2 target 0 lun 0: <HUAWEI, SD Storage, 2.31> disk removable
sd5: drive offline
sd5: unable to open device, error = 19

Which was slightly more encouraging.
A "tip uplcom" allowed me to get a bit of information out:

ati
Manufacturer: huawei
Model: E1750
Revision: 11.126.08.02.18
IMEI: ...
+GCAP: +CGSM,+DS,+ES

OK

... so the comms to the device worked without panic'ing.

Now I just need to configure ppp and pppd!

Cheers,
Darren


Home | Main Index | Thread Index | Old Index