Date: Thu, 10 Jan 2008 16:38:19 +0100 From: Hans Petter Selasky <hselasky@c2i.net> To: perryh@pluto.rain.com Cc: freebsd-usb@freebsd.org Subject: Re: ZyXEL Omni 56K Plus USB/serial modem Message-ID: <200801101638.19620.hselasky@c2i.net> In-Reply-To: <4785dec5.qxgU3WUBgrj%2BjYS7%perryh@pluto.rain.com> References: <477a00ea.73gFojnRSqtUufCO%perryh@pluto.rain.com> <200801091945.18256.hselasky@c2i.net> <4785dec5.qxgU3WUBgrj%2BjYS7%perryh@pluto.rain.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 10 January 2008, perryh@pluto.rain.com wrote: > > 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? tip(1), or something else? > (In case it is not obvious, I am not all that familiar with > the USB support in FreeBSD.) Hi, I think the best will be to write a small C-program: Here is the basic: if (argc < 2) { err(1, "Usage: ./a.out /dev/ugen0.1"); } 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,"AT\r\n", sizeof("AT\r\n")-1); while (1) { error = read(f,buf,1); printf("%c", buf[0]); } You have to modify the above before it compiles. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801101638.19620.hselasky>