Search Members Help

» Welcome Guest
[ Log In :: Register ]

 

[ Track This Topic :: Email This Topic :: Print this topic ]

reply to topic new topic new poll
Topic: USB Emulation and, Yeah< Next Oldest | Next Newest >
 Post Number: 1
MattimeoZ80 Search for posts by this member.
Purveyor of Untimely Wisdom
Avatar



Group: Members
Posts: 397
Joined: Nov. 2000
PostIcon Posted on: Feb. 16 2001,19:08  Skip to the next post in this topic. Ignore posts   QUOTE

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

------------------
Ah screw it.
-------------
ICEGAMING.COM

Offline
Top of Page Profile Contact Info WEB 
 Post Number: 2
damien_s_lucifer Search for posts by this member.
Emperor of Detnet
Avatar



Group: Members
Posts: 33
Joined: Jan. 1970
PostIcon Posted on: Feb. 16 2001,23:09 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

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.

Offline
Top of Page Profile Contact Info WEB 
 Post Number: 3
MattimeoZ80 Search for posts by this member.
Purveyor of Untimely Wisdom
Avatar



Group: Members
Posts: 397
Joined: Nov. 2000
PostIcon Posted on: Feb. 16 2001,23:56 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

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?

------------------
Ah screw it.
-------------
ICEGAMING.COM

Offline
Top of Page Profile Contact Info WEB 
 Post Number: 4
damien_s_lucifer Search for posts by this member.
Emperor of Detnet
Avatar



Group: Members
Posts: 33
Joined: Jan. 1970
PostIcon Posted on: Feb. 17 2001,01:08 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

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:

# open the ports for read/write
sysopen(PALM,"USBCOM1:",O_RDWR);
sysopen(PORT,"COM2:",O_RDWR);

# fork once
if ($pid = fork())
{
# we're the child, read input from the Palm and send to the COM port
while (sysread(PALM,$input,1)) # Read a character from the PALM
{
syswrite(PORT,$input,1); # and write it to the COM port
}
exit(0); # Child is done
} # end of child.

# We're the parent.
while (sysread(PORT,$input,1)) # Read a char from the COM port
{
syswrite(PALM,$input,1); # and write it to the Palm
}
# end of prog


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

Offline
Top of Page Profile Contact Info WEB 
 Post Number: 5
MattimeoZ80 Search for posts by this member.
Purveyor of Untimely Wisdom
Avatar



Group: Members
Posts: 397
Joined: Nov. 2000
PostIcon Posted on: Feb. 17 2001,01:21 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

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 )

------------------
Ah screw it.
-------------
ICEGAMING.COM

Offline
Top of Page Profile Contact Info WEB 
 Post Number: 6
MattimeoZ80 Search for posts by this member.
Purveyor of Untimely Wisdom
Avatar



Group: Members
Posts: 397
Joined: Nov. 2000
PostIcon Posted on: Feb. 17 2001,02:19 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

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)

------------------
Ah screw it.
-------------
ICEGAMING.COM

Offline
Top of Page Profile Contact Info WEB 
 Post Number: 7
MattimeoZ80 Search for posts by this member.
Purveyor of Untimely Wisdom
Avatar



Group: Members
Posts: 397
Joined: Nov. 2000
PostIcon Posted on: Feb. 17 2001,05:18 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

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?

------------------
Ah screw it.
-------------
ICEGAMING.COM

Offline
Top of Page Profile Contact Info WEB 
 Post Number: 8
askheaves Search for posts by this member.
Ack!!!
Avatar



Group: Members
Posts: 1955
Joined: Sep. 2000
PostIcon Posted on: Feb. 17 2001,05:52 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

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.

Offline
Top of Page Profile Contact Info 
 Post Number: 9
MattimeoZ80 Search for posts by this member.
Purveyor of Untimely Wisdom
Avatar



Group: Members
Posts: 397
Joined: Nov. 2000
PostIcon Posted on: Feb. 18 2001,16:50 Skip to the previous post in this topic. Skip to the next post in this topic. Ignore posts   QUOTE

does anyone have any ideas?

------------------
Ah screw it.
-------------
ICEGAMING.COM

Offline
Top of Page Profile Contact Info WEB 
 Post Number: 10
damien_s_lucifer Search for posts by this member.
Emperor of Detnet
Avatar



Group: Members
Posts: 33
Joined: Jan. 1970
PostIcon Posted on: Feb. 18 2001,18:04 Skip to the previous post in this topic.  Ignore posts   QUOTE

quote:
Originally posted by MattimeoZ80:
it opens it alright as i can't open it in anything else, but it just stops as sysread.

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...

Offline
Top of Page Profile Contact Info WEB 
9 replies since Feb. 17 2001,05:18 < Next Oldest | Next Newest >

[ Track This Topic :: Email This Topic :: Print this topic ]


 
reply to topic new topic new poll

» Quick Reply USB Emulation and, Yeah
iB Code Buttons
You are posting as:

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code