PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Using the USB port to communicate with other devices

We are looking into developing an application where the PocketPC needs to communicate with another device over the USB cable. The problem I'm facing is that all the documentation talks about ActiveSync, which is not going to be applicable since the other device won't be using Windows. (It will probably be running uCLinux on an embedded chip.)

Books such as 'USB Complete' and 'USB Design By Example' seem to focus on developing new peripherals for the PC, whereas I need to be looking at how to connect something to a PocketPC, which is nearly always a slave device (I think). But they both imply that I may need to write a new driver to do this. I've been looking into USB-On-The-Go so that I don't need a proper host as such, but can't find out whether this requires hardware support or merely a new driver. Usb.org isn't much help either, since it focuses on the hardware side more than the software, which is my area.

Basically, I don't know much about this area, and really want some pointers on what is possible and what is not, and where to look for more information. Any comments appreciated.
I'm afraid that all I can help with is to confirm that the iPAQs (at least) cannot act as a USB host because its hardware doesn't support it - it can only be used as a slave.

I believe that the USB system comes straight off the SA1110 in the ARM-based PocketPCs at least (don't quote me on that though) - I presume you've looked at the processor documentation chez Intel and it didn't help?
Sorry to be OT but, "Location: Nottingham, UK?" Isn't that one of the places in the Robin Hood tale?
Indeed. Sherwood Forest, Sheriff of Nottingham, and all that.
Yes, Nottingham is a real place, with real programmers. Just don't visit expecting to find a cool castle or loads of Robin Hood stuff. ;)

Anyway... the SA1110 (and equivalent Intel processors) mention USB slave support but no host support; that comes as part of the SA1111 addition, I think. And my tentative research on USB-on-the-go indicates that it requires hardware support. So I suppose this would have to be done with the PocketPC as a slave device, and the other side would have to be a host.

In this case, does anybody know of an API for USB comms? (Cross-platform would be nice, but probably unrealistic to ask for.) The stuff at http://www.qnx.com/developer/docs/momen ... rview.html looks nice, but obviously that's not for either of my platforms.
So I suppose this would have to be done with the PocketPC as a slave device, and the other side would have to be a host.


You'd have to do that anyway, I think. You should also be aware that there's (or at least "there was") an unfixable bug in the SA1110's firmware that means that it must be the only slave on the host it's connected to, or it won't work.

I don't know about the USB API. :( Perhaps looking at some of the Linux code, especially with regards to installing Linux over USB onto the iPAQs would help if you have to roll your own? On the bootldr@handhelds.org mailing list, somebody just got the ymodem protocol working over USB.

OT:

Roooobin, the Hooded Man (theme tune by Clannad):
<img src="http://www.geocities.com/puckrobin/stat2.jpg">

Oh dear, I'm showing my age, but I guess remembering Michael Praed and Jason Connery as Robin Hood is better than remembering Erol Flynn as him ;) (And anybody is better than friggin' big-head Costner).
refractor wrote:
You'd have to do that anyway, I think. You should also be aware that there's (or at least "there was") an unfixable bug in the SA1110's firmware that means that it must be the only slave on the host it's connected to, or it won't work.

That's ok; my test Pocket PC is an Intel one anyway (although the instructions set is the same, I think - and therefore maybe any bugs are too).

On the bootldr@handhelds.org mailing list, somebody just got the ymodem protocol working over USB.

I'm very surprised at how badly supported direct use of USB is. Most of the projects I see involve getting USB to pretend to be a serial port! I suppose there are a lot of old serial programmers out there who want to work with what they know. The USB docs are certainly very dense and difficult to understand. I don't think they ever really wanted application-level programmers to work with it.


OT:
Oh dear, I'm showing my age, but I guess remembering Michael Praed and Jason Connery as Robin Hood is better than remembering Erol Flynn as him ;) (And anybody is better than friggin' big-head Costner).

Seen <a href="http://hometown.aol.com/jimmac747/Cat/RobinHood.html">Matthew Poretta</a> as Robin Hood? That version was funny, if only for the total Americanisation of it. Oh, and Maid Marian was cute too...
The bootldr over USB project is still pretty unusable I remember, and the host machine requires Linux to get a terminal running over USB (I recall something about lack of drivers for Win). The details I know are a bit hazy though.