Forum: Geek Forum Topic: USB Emulation and, Yeah started by: MattimeoZ80 Posted by MattimeoZ80 on Feb. 16 2001,19:08
ok, heres the deal. i was given a visor deluxe and of course it came with a usb cradle... now i've been reading up and found a good ppp server that works over serial ports so that i can be connected to the net while it's in its cradle. i'd rather not go spend 贶 on a modem right now. the problem is i have a usb cradle, and i KNOW that it doesn't run at usb speeds; i have a utility on the visor that routes all serial lib data to the usb out, but i need like a little prog on the computer that could run in the background piping usb data from the palm to a com port and vice versa. that way i could start up the ppp program and use it. there's no way i'd want serial over usb for anything that could utilize usb speeds, and i'd rather not write my own ppp program even if i DID have any extra free time ------------------ Posted by damien_s_lucifer on Feb. 16 2001,23:09
you might be better off simulating Ethernet over USB. There has to be something out there that will do this.I assume the Visor has a TCP/IP stack, right?If the Visor appeared as an Ethernet device, you could use Internet Connection Sharing, WinProxy, or similar software to share the Internet connection. Posted by MattimeoZ80 on Feb. 16 2001,23:56
it has a tcp/ip stack but i don't think that it can be networked, at least not with the software that comes on it. it'd require me to write a software (yuck) ethernet emulation on it... usb/serial is built into it. anyone have ANY ideas as to how to map usb to com? maybe take it one step at a time: how to access the usb i/o for the visor and how to emulate a com port? anyone know?------------------ Posted by damien_s_lucifer on Feb. 17 2001,01:08
Now that I think about it, the Windows software that comes with the Visor should map the Visor to a COM: port (though it's probably referred to as USBCOMx: or something.)Here's an easy way to find the name of that port : use the Add Printer wizard, tell it you're connecting a LOCAL printer, and then scroll through the device names under "Use the following port :". It should be fairly easy to open the device as a file (say, "USBCOM1:" or whatever the device name is - maybe use the colon, maybe not, you'd have to try) and then redirect all I/O to a real COM port. Something like this (I hope you know Perl, or can at least make some sense out of it) : code: If you don't know how to use fork(), I highly recommend learning. It makes the impementation *far* less painful. If your C library doesn't support a true fork(), get yourself better one (the GNU compiler for Windows supports it, I think.) Or just grab Perl for Windows from < ActiveState >. You'll probably have to adjust your COM port speed in Windows, it usually defaults to 9600. This message has been edited by damien_s_lucifer on February 17, 2001 at 08:13 PM Posted by MattimeoZ80 on Feb. 17 2001,01:21
thanks a lot, yeah i do know perl... gotta go try this, i'll let you know if it works (that is if my mom gives my palm back )------------------ Posted by MattimeoZ80 on Feb. 17 2001,02:19
ok, right i can't even get perl to read stuff from the com port. it opens it alright as i can't open it in anything else, but it just stops as sysread. i plugged in a device that i can send characters with in hyperterminal just fine and yet it stays on sysread. i've never used sysread before, any ideas? (its on com2, so no usb yet)------------------ Posted by MattimeoZ80 on Feb. 17 2001,05:18
Does anyone know if and how you could emulate a com port through a usb port? What I mean is this; lets say you have a usb device plugged in and you want to route the i/o of that device to a certain com port you have open, say com3. is that possible under windows and are there any programs that do it?------------------ Posted by askheaves on Feb. 17 2001,05:52
You know what? That's a damn good question.I suppose it depends on what your specific application is. If you're doing programming, I wouldn't recommend even attempting this. For one thing, I have to believe that Windows has a hard coded speed limit on COM ports. You wouldn't be able to get any sort of speed advantage that you would out of USB since Fast USB 1 is 12Mb/s, Slow USB 1 is like 1Mb/s, and USB 2 is on the order of 400Mb/s. Also, programmatically, it's just as easy to access the USB functionality as it is to get to a COM port, and I believe the interface is a bit more powerful for you. Under WinNT, the system has logical access to 256 COM ports, and I believe Win9X has like 16 accessible. However, every COM port takes up significant system resources, like a memory range and in IRQ (although that has been minimized recently). COM ports are very antiquated beasts. If you want some real power, stick with the USB due to it's tremendous power. Explain your intent, and maybe we can help better. Posted by MattimeoZ80 on Feb. 18 2001,16:50
does anyone have any ideas?------------------ Posted by damien_s_lucifer on Feb. 18 2001,18:04
quote: Sysread works almost exactly like the <> operator... in fact, you could try using that operator on the file. (If you do this, you'll have to use PRINT to write, though). Are you using the ActiveState distro? Browse thru their documentation. Also, you might be able to get some help at < Perl.com >. Finally, I'd start asking The Right People(tm) about talking to the COM ports in Windows, there is almost certainly something funky about it... |