Discussion:
NetBSD and USB 3G/4G dongles
(too old to reply)
Darren Reed
2011-08-24 08:09:16 UTC
Permalink
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.

Is there a useful guide on what's required to get the u3g driver
functioning with ppp/pppd?

Darren

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Iain Hibbert
2011-08-24 08:31:29 UTC
Permalink
Post by Darren Reed
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.
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.

probably the manpage could be improved to suggest that other adapters may
be supported and that adding the vendor/product ID may be necessary

starting pppd on the tty is pretty simple, I have the following three
files

=== /etc/ppp/options

noauth

=== /etc/ppp/peers/hsdpa

/dev/ttyHS0.08
115200
connect "chat -V -f /etc/ppp/chat.hsdpa"
local
crtscts
defaultroute
updetach
debug
noccp
linkname HSDPA
usepeerdns
novj

=== /etc/ppp/chat.hsdpa

#!/usr/sbin/chat -V -f
#
# HSDPA modem chat script
#

ABORT 'ERROR'

TIMEOUT 1
'' AT
OK-AT-OK-AT-OK AT

TIMEOUT 5
OK AT&F
OK ATI
OK AT+CGDCONT=1,"IP","consumerbroadband"

TIMEOUT 30

ABORT 'NO CARRIER'
ABORT 'BUSY'

OK ATDT*99***1#
CONNECT ''

===

though I use uhso(4) with Orange network, so you will need some minor
modifications to tty (for u3g) and APN (for O2)

% pppd call hsdpa

just connects it..

iain

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Darren Reed
2011-08-25 04:25:41 UTC
Permalink
Post by Bernd Ernesti
[..]
Post by Darren Reed
Post by Iain Hibbert
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.
u3ginit0 at uhub3 port 1: Switching to 3G mode
u3ginit0: detached
u3ginit0: at uhub3 port 1 (addr 3) disconnected
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
If you do a cvs update in src/sys/dev/usb you should get all the changes
which you need so it attaches. I bought the same device 10 days ago
and made the changes then but had no real chance to test it other then
setting the pin and so some basic tests.
I've got a feeling that there's a need for some tweaking.

Quite a few times the modem would "CONNECT" but then pppd would say
that the modem had told it to hangup and terminated the call. It felt
like there was a race condition or two in timers.

I'm not sure if I'll persist with it for a whole lot longer - when I
did get it connected, the only O2 IP# that I could reach was the DNS
server and the DNS server was returning its own IP# for _every_ query
sent to it :-/

I don't know if further authentication is/was required, but this device
is just a hand-me-down to try out and has limited support...

Darren

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Bernd Ernesti
2011-08-25 05:01:24 UTC
Permalink
On Thu, Aug 25, 2011 at 05:25:41AM +0100, Darren Reed wrote:
[..]
Post by Darren Reed
I've got a feeling that there's a need for some tweaking.
Quite a few times the modem would "CONNECT" but then pppd would say
that the modem had told it to hangup and terminated the call. It felt
like there was a race condition or two in timers.
I'm not sure if I'll persist with it for a whole lot longer - when I
did get it connected, the only O2 IP# that I could reach was the DNS
server and the DNS server was returning its own IP# for _every_ query
sent to it :-/
I don't know if further authentication is/was required, but this device
is just a hand-me-down to try out and has limited support...
Mine required es registration and you also need to have some
money left on that account.

Btw, did you add a pin number or was that already done?

Bernd


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Darren Reed
2011-08-25 20:40:46 UTC
Permalink
Post by Bernd Ernesti
[..]
Post by Darren Reed
I've got a feeling that there's a need for some tweaking.
Quite a few times the modem would "CONNECT" but then pppd would say
that the modem had told it to hangup and terminated the call. It felt
like there was a race condition or two in timers.
I'm not sure if I'll persist with it for a whole lot longer - when I
did get it connected, the only O2 IP# that I could reach was the DNS
server and the DNS server was returning its own IP# for _every_ query
sent to it :-/
I don't know if further authentication is/was required, but this device
is just a hand-me-down to try out and has limited support...
Mine required es registration and you also need to have some
money left on that account.
Btw, did you add a pin number or was that already done?
I added and stored the PIN...

And finally I got it connected with the right CGDCONT string but...

Hmmm, maybe I had the wrong one, will need to retest...

But anyway, that doesn't matter.

NetBSD 5.99.23-8-2010 panic's as soon as postgres starts.

So I think I'm going back to 5.1 or 5.0

Darren


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Darren Reed
2011-08-25 21:20:20 UTC
Permalink
Post by Darren Reed
Post by Bernd Ernesti
[..]
Post by Darren Reed
I've got a feeling that there's a need for some tweaking.
Quite a few times the modem would "CONNECT" but then pppd would say
that the modem had told it to hangup and terminated the call. It felt
like there was a race condition or two in timers.
I'm not sure if I'll persist with it for a whole lot longer - when I
did get it connected, the only O2 IP# that I could reach was the DNS
server and the DNS server was returning its own IP# for _every_ query
sent to it :-/
I don't know if further authentication is/was required, but this device
is just a hand-me-down to try out and has limited support...
Mine required es registration and you also need to have some
money left on that account.
Btw, did you add a pin number or was that already done?
I added and stored the PIN...
And finally I got it connected with the right CGDCONT string but...
What I wanted to add is that for whatever reason, the 3G modem was
slower than an
analogue modem when connected via NetBSD.

When connected with Windows, normal speed...

Darren


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Darren Reed
2011-08-24 13:20:48 UTC
Permalink
Post by Iain Hibbert
Post by Darren Reed
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.
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

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Joerg Sonnenberger
2011-08-24 14:20:34 UTC
Permalink
Post by Darren Reed
Now I just need to configure ppp and pppd!
My chat script can be found at http://www.netbsd.org/~joerg/vodafone,
your needs are likely quite similar.

Joerg

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Bernd Ernesti
2011-08-24 19:48:52 UTC
Permalink
[..]
Post by Darren Reed
Post by Iain Hibbert
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.
u3ginit0 at uhub3 port 1: Switching to 3G mode
u3ginit0: detached
u3ginit0: at uhub3 port 1 (addr 3) disconnected
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
If you do a cvs update in src/sys/dev/usb you should get all the changes
which you need so it attaches. I bought the same device 10 days ago
and made the changes then but had no real chance to test it other then
setting the pin and so some basic tests.

Bernd


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...