ZyXEL Omni 56K Plus USB/serial modem
Hans Petter Selasky
hselasky at c2i.net
Thu Jan 10 07:37:34 PST 2008
On Thursday 10 January 2008, perryh at 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
More information about the freebsd-usb
mailing list