From owner-freebsd-usb@FreeBSD.ORG Fri Jan 11 07:12:56 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F34F316A417 for ; Fri, 11 Jan 2008 07:12:55 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id CC37A13C447 for ; Fri, 11 Jan 2008 07:12:55 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id m0B7Cqrw029450 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 10 Jan 2008 23:12:52 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id m0B7CqVV029449; Thu, 10 Jan 2008 23:12:52 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA03630; Thu, 10 Jan 08 23:00:32 PST Date: Thu, 10 Jan 2008 22:57:08 -0800 From: perryh@pluto.rain.com To: hselasky@c2i.net Message-Id: <47871344.bvH7YPY9QJF3xIgB%perryh@pluto.rain.com> References: <477a00ea.73gFojnRSqtUufCO%perryh@pluto.rain.com> <200801091945.18256.hselasky@c2i.net> <4785dec5.qxgU3WUBgrj+jYS7%perryh@pluto.rain.com> <200801101638.19620.hselasky@c2i.net> In-Reply-To: <200801101638.19620.hselasky@c2i.net> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: ZyXEL Omni 56K Plus USB/serial modem X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2008 07:12:56 -0000 > > > To me it looks like they are using some kind of propritary > > > protocol. You could try and see if any of the endpoints, > > > which appear like /dev/ugen0.x files respond with "OK" when > > > you send "AT\r\n" to the endpoint ... > > > > How would I go about doing that? > > I think the best will be to write a small C-program: > > Here is the basic: > > ... Either the device doesn't like this sort of thing, or I did something wrong: # ls -l /dev/ugen* crw-r--r-- 1 root operator 1, 15 Nov 24 21:17 /dev/ugen0 crw-r--r-- 1 root operator 1, 16 Nov 24 21:17 /dev/ugen0.1 crw-r--r-- 1 root operator 1, 17 Nov 24 21:17 /dev/ugen0.2 crw-r--r-- 1 root operator 1, 18 Nov 24 21:17 /dev/ugen0.3 crw-r--r-- 1 root operator 1, 19 Nov 24 21:17 /dev/ugen0.4 Not sure where that Nov 24 date comes from -- I just plugged the modem in a couple of days ago. They do go away when I turn it off, and then come back (still dated 11/24) when I turn it back on. # ./usbEpProbe /dev/ugen0.1 usbEpProbe: Cannot open '/dev/ugen0.1': Device not configured # ./usbEpProbe /dev/ugen0.2 usbEpProbe: Cannot open '/dev/ugen0.2': Device not configured # ./usbEpProbe /dev/ugen0.3 usbEpProbe: Cannot open '/dev/ugen0.3': Device not configured # ./usbEpProbe /dev/ugen0.4 usbEpProbe: Cannot open '/dev/ugen0.4': Device not configured # ./usbEpProbe /dev/ugen0 usbEpProbe: Cannot set short XFER : Invalid argument # cat usbEpProbe.c #include #include #include #include #define STIMULUS "AT\r\n" main(int argc, char *argv[]) { int f, error, count; char buf[4]; if (argc != 2) { err(1, "Usage: %s /dev/ugen0.[1-4]", argv[0]); } f = open(argv[1], O_RDWR); if (f < 0) { err(1, "Cannot open '%s'", argv[1]); } /* allow short transfers */ error = 1; error = ioctl(f, USB_SET_SHORT_XFER, &error); if (error < 0) { err(1, "Cannot set short XFER\n"); } error = 1000; error = ioctl(f, USB_SET_TIMEOUT, &error); if (error < 0) { err(1, "Cannot set timeout"); } error = write(f, STIMULUS, sizeof(STIMULUS)-1); for ( count = 0 ; ; ++count ) { error = read(f, buf, 1); if (error > 0) printf("%c", buf[0]); else break; } printf("\ngot %d bytes\n", count); }