Journal the_mad_poster's Journal: [??wahfuh?] ATTENTION: COMPUTER ENGINEERS 10
I have a question.
I have a Palm. It has a 256MB SD Card in it. I want it to be able to act like removable storage under Windows, and, although it works quite well, I don't want to buy commercial software to do it.
No, I don't want a thumb drive. I have enough crap on my keychain, including four keys for various things at work. I don't need anything else on it.
Even if that means I have to write my own bloody app for my Palm.
I understand the concepts involved in writing applications for Palms, and I'm guessing that figuring out how to interact with the USB device on the Palm will come with understanding PalmOS better. The problem I have in beginning my little project here is that I cannot, for the bloody life of me, figure out how to write a driver for a non-Windows platform that can interact with Windows. I understand that Windows XP has usbstor.sys which will theoretically allow me to use some sort of API to transfer files around.
But how the hell do I use it? Assuming I can figure out how to get through the enumeration process and I get Windows to understand that I just plugged in a mass storage device to the USB port and it loads usbstor.sys, what then? How does the communication work between my app on the Palm and Windows? I would assume I'm going to need to both send and receive commands that open/close, delete/create, and rename files since I'll need to do translations to make sure everything stays kosher. But how?
I'm totally lost. So far I figured out:
1) How USB enumeration works
2) How to write apps for PalmOS
3) How to do this on Linux with the USB kernel drivers.
But hell if I can do it with Windows. Lots of documentation telling me how to write a windows app that will interface with a USB device, can't find squat about how to write an app for a USB device that will understand Windows calls coming into the thing.
Of course, I'm probably just not understanding something about how Windows or USB communication in general works. Whatever the case, I'd very much appreciate if someone could point me in the right direction. And, of course, anything (useful) I manage to get developed will be GPL'ed.
Re: (Score:2)
Re:HIDious! (Score:1)
Right?
Re: (Score:2)
Re:HIDious! (Score:1)
Re: (Score:2)
Re:HIDious! (Score:1)
Step 1:
Open Port
Step 2:
Establish connection through enumeration
Step 3:
Run a psuedo-driver for MSC until the user requests the connection be closed
In theory, I now know what I'm doing, though this is shaping up to be a rather hefty process between all the demands of Palm programming and USB standards.
This may... (Score:1)
http://www.ibiblio.org/peanut/Kernel-2.6.12.2/usb/ gadget_serial.txt [ibiblio.org]
This link and the actual kernel source for that driver might give you some idea of how to use your Palm as a USB device. Or I could have totally isread you, which I
Re:This may... (Score:1)
What's throwing me off is that I'm thinking I'm goi
Re:This may... (Score:2)
Squiggleslash is right. If it helps you to think about it as a client / server paradigm, the Palm in this case is going to be ther server. As long as the server properly implements the USB protocol, you won't have to mess with any Win32 at all. All of your coding will be done on the Palm, then any OS (Win, Linux, OS X) that supports USB will be able to us