On Sat, Apr 30, 2011 at 18:08, Erik Mugele <[email protected]> wrote:
> The following patch against -current enables the Samsung Galaxy S
> Android device (Samsung Captivate with AT&T) to be be used for USB
> tethering.
>
> With or without this patch, the device can still act as a modem and
> can be used with PPP. With this patch, the device can be used as an IP
> router over USB the same way that the Mobile AP mode works.
>
> A new USB device shows up when "USB tethering" is enabled on the
> Galaxy S.
>
> [big snip]
>
Erik, great work and great patch... I, too, have a Samsung Galaxy S.
Your patch did not apply correctly, so here is my version of it.I've also
attached a diff of "usbdevs.h" .
Index: if_urndis.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_urndis.c,v
retrieving revision 1.29
diff -N -u if_urndis.c
--- if_urndis.c 25 Jan 2011 20:03:35 -0000 1.29
+++ if_urndis.c 3 May 2011 00:14:49 -0000
@@ -135,7 +135,8 @@
* Supported devices that we can't match by class IDs.
*/
static const struct usb_devno urndis_devs[] = {
- { USB_VENDOR_HTC, USB_PRODUCT_HTC_ANDROID }
+ { USB_VENDOR_HTC, USB_PRODUCT_HTC_ANDROID },
+ { USB_VENDOR_SAMSUNG2, USB_PRODUCT_SAMSUNG2_ANDROID }
};
usbd_status
Index: usbdevs
===================================================================
RCS file: /cvs/src/sys/dev/usb/usbdevs,v
retrieving revision 1.544
diff -N -u usbdevs
--- usbdevs 24 Apr 2011 02:55:50 -0000 1.544
+++ usbdevs 3 May 2011 00:15:01 -0000
@@ -3269,6 +3269,7 @@
/* Samsung products */
product SAMSUNG2 RT2870_1 0x2018 RT2870
product SAMSUNG2 I330 0x8001 I330
+product SAMSUNG2 ANDROID 0x6881 Android Phone USB Tethering
product SAMSUNG SWL2100W 0xa000 SWL-2100U
/* ScanLogic products */
Index: usbdevs.h
===================================================================
RCS file: /cvs/src/sys/dev/usb/usbdevs.h,v
retrieving revision 1.554
diff -N -u usbdevs.h
--- usbdevs.h 24 Apr 2011 02:56:01 -0000 1.554
+++ usbdevs.h 3 May 2011 00:15:11 -0000
@@ -3276,6 +3276,7 @@
/* Samsung products */
#define USB_PRODUCT_SAMSUNG2_RT2870_1 0x2018 /* RT2870 */
#define USB_PRODUCT_SAMSUNG2_I330 0x8001 /* I330 */
+#define USB_PRODUCT_SAMSUNG2_ANDROID 0x6881 /* Android
USB Tether */
#define USB_PRODUCT_SAMSUNG_SWL2100W 0xa000 /* SWL-2100U
*/
/* ScanLogic products */