I plan to use qnx for a new product which uses a pc104 board. One main feature has to be storing data on demand on a USB Memory Stick. The user plugs in the memory stick presses a key and data is transferred.
I have searched the forum for hints how to implement this in C/C++ but didn’t find anything. I only found how to implement the USB stack on the command line but using the command line is not suitable.
My (maybe nOOb) question ist:
Does anybody please give me hints how to code this or does anybody have a sample in C/C++ how to realize that?
I’m not sure what you mean by ‘using the command line is not suitable’. You can spawn a binary or shell script from your program to mount (and later unmount) the USB stick properly, and write to it. That’s all. Or not?
QNX doesn’t support so many USB sticks, be careful. We use SanDisk, they work fine, and some others too.
Automounting is buggy in current release of io-blk.so but we obtained an experimental patch some weeks ago that correctly mounts and unmounts the file system everytime the stick is plugged in / out. If you have actually purchased QNX, you can ask Tech support for that patch. I don’t know when it will be available commercially. Using the automount feature of io-blk.so is the cleanest solution, I believe.
You should search the forum to find a supported USB stick there are some posts stating “I use this XX stick”. But make sure to get exactly the one that is recommended, from my own experience I can tell you that my Kingston Data Traveller Elite 512MB does not work, but I think other Data Travellers (non Elite) do work, but these are just rumors.
You are probably better off installing QNX on a laptop, take it to the shop, and test the stick before you purchase it. (or you use a laptop with QNX in VMware just in case it won’t run on your machine )