Re: Dell 5540 HSDPA

2011-11-09 Thread Stuart Henderson
On 2011/10/20 10:25, rivo nurges wrote:
 cdce port must be enabled before use by sending following to one
 of the serial ports(should it be somehow documented in the manpage?):
 
 AT+CFUN=1 # enable radio
 AT+CGDCONT=1,IP,internet # configure apn
 AT*ENAP=1,1 # enable cdce port

I've committed your diff - very nice to be able to dhclient cdce0 (and
route add default -ifp cdce0 if it doesn't pick up a route automatically)
rather than mess around making a ppp session to the phone. Now I'm
wondering how far to go with the manpage.

It probably makes sense to at least add something like this in caveats,


Index: cdce.4
===
RCS file: /cvs/src/share/man/man4/cdce.4,v
retrieving revision 1.15
diff -u -p -r1.15 cdce.4
--- cdce.4  9 Nov 2011 21:49:53 -   1.15
+++ cdce.4  9 Nov 2011 21:56:51 -
@@ -144,3 +144,5 @@ Many USB devices notoriously fail to rep
 correctly.
 Undetected products might work flawlessly when their vendor and product IDs
 are added to the driver manually.
+Some mobile data devices must be configured via AT commands on the serial
+interface before they will connect cdce(4) to the mobile network.


It would be handy to list the necessary commands somewhere in the
manual where people can find them easily offline, but I'm not sure
which section would be appropriate for that, maybe at the bottom
of description?

(Actually with my aspireone when I first setup ppp with this card
I had a lot of trouble working out how to get AT+CFUN=1 to report
anything other than ERROR, it took me quite a while to figure out
that I had to flip the 3-way RF-kill slider towards 3G, whereas the
AT commandset list for the device was relatively easy to find ;)



Dell 5540 HSDPA

2011-10-20 Thread rivo nurges
Hi!

The diff below makes cdce(4) to recognize cdce part of my Dell 5540 mini-pcie
card.

cdce port must be enabled before use by sending following to one
of the serial ports(should it be somehow documented in the manpage?):

AT+CFUN=1 # enable radio
AT+CGDCONT=1,IP,internet # configure apn
AT*ENAP=1,1 # enable cdce port

umodem0 at uhub5 port 6 configuration 1 interface 1 ADell Wireless 5540 Dell 
Wireless 5540 rev 2.00/0.00 addr 3
umodem0: data interface 2, has CM over data, has break
umodem0: status change notification available
ucom0 at umodem0
umodem1 at uhub5 port 6 configuration 1 interface 3 ADell Wireless 5540 Dell 
Wireless 5540 rev 2.00/0.00 addr 3
umodem1: data interface 4, has CM over data, has break
umodem1: status change notification available
ucom1 at umodem1
cdce0 at uhub5 port 6 configuration 1 interface 6 ADell Wireless 5540 Dell 
Wireless 5540 rev 2.00/0.00 addr 3
cdce0: address 02:80:37:ec:02:00
umodem2 at uhub5 port 6 configuration 1 interface 9 ADell Wireless 5540 Dell 
Wireless 5540 rev 2.00/0.00 addr 3
umodem2: data interface 10, has CM over data, has break
umodem2: status change notification available
ucom2 at umodem2
ugen0 at uhub5 port 6 configuration 1 ADell Wireless 5540 Dell Wireless 5540 
rev 2.00/0.00 addr 3

Diff:

Index: sys/dev/usb/if_cdce.c
===
RCS file: /OpenBSD/src/sys/dev/usb/if_cdce.c,v
retrieving revision 1.50
diff -u -p -r1.50 if_cdce.c
--- sys/dev/usb/if_cdce.c   3 Jul 2011 15:47:17 -   1.50
+++ sys/dev/usb/if_cdce.c   20 Oct 2011 10:03:40 -
@@ -146,8 +146,9 @@ cdce_match(struct device *parent, void *
if (cdce_lookup(uaa-vendor, uaa-product) != NULL)
return (UMATCH_VENDOR_PRODUCT);
 
-   if (id-bInterfaceClass == UICLASS_CDC  id-bInterfaceSubClass ==
-   UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL)
+   if (id-bInterfaceClass == UICLASS_CDC  (
+   id-bInterfaceSubClass == 
UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL ||
+   id-bInterfaceSubClass == UISUBCLASS_MOBILE_DIRECT_LINE_MODEL))
return (UMATCH_IFACECLASS_GENERIC);
 
return (UMATCH_NONE);
Index: sys/dev/usb/usb.h
===
RCS file: /OpenBSD/src/sys/dev/usb/usb.h,v
retrieving revision 1.37
diff -u -p -r1.37 usb.h
--- sys/dev/usb/usb.h   4 Mar 2011 23:55:32 -   1.37
+++ sys/dev/usb/usb.h   20 Oct 2011 10:03:40 -
@@ -412,6 +412,7 @@ typedef struct {
 #define UISUBCLASS_CAPI_CONTROLMODEL   5
 #define UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL 6
 #define UISUBCLASS_ATM_NETWORKING_CONTROL_MODEL 7
+#define UISUBCLASS_MOBILE_DIRECT_LINE_MODEL10
 #define   UIPROTO_CDC_AT   1
 
 #define UICLASS_HID0x03
Index: share/man/man4/cdce.4
===
RCS file: /OpenBSD/src/share/man/man4/cdce.4,v
retrieving revision 1.14
diff -u -p -r1.14 cdce.4
--- share/man/man4/cdce.4   14 Mar 2008 15:19:52 -  1.14
+++ share/man/man4/cdce.4   20 Oct 2011 10:03:40 -
@@ -46,6 +46,8 @@ including the following:
 .It
 Acer Labs USB 2.0 Data Link
 .It
+Dell Wireless 5540
+.It
 FRITZ!Box Fon ata 1020
 .It
 G.Mate YP3X00


-- 
rivo