Skip navigation.
Home
The QNX Community Portal

View topic - USB memory stick support

USB memory stick support

Read-only archive of qnx.qnx4 (General QNX4 Discussion Group) at inn.qnx.com

USB memory stick support

Postby Jeffrey Adler » Sun Sep 10, 2006 7:05 pm

I am testing out the USB support for QNX-4.

I want to be able to create a shell script that will allow someone to backup
data to the USB memory stick.

Sequence would be as follows:

1. insert a memory stick
2. run a shell script
3. remove the memory stick.

The shell script will need to do all of the mounting, etc, create a ZIP file
on the memory stick, and nicely shut down everything.

What I am confused about is what parts to run when, how to determine which
HD gets mounted, which tasks to slay when I'm done and want to remove the
memory stick, etc., and which can keep running.

If someone has done this already, please let me know the steps (and the
pitfalls) to take and (perhaps more importantly, )which ones not to take.

Thanks for the help.

Jeff Adler
Jeffrey Adler
 

Re: USB memory stick support

Postby Darel Cullen » Tue Sep 26, 2006 1:03 pm

Hi Jeffrey,
First check you have USB enabled in the BIOS (this can be trickier than it
sound as there often are not many free IRQs left for handling all the USB
interrupts)

We wrote a detection program to see if USB is connected to an IRQ in which
case

a.. At startup
a.. Start io-usb
b.. Start Fatfsys
b.. When user opens wants to copy to USB, prompt user to insert the USB
memory in any available USB slot
a.. Start Fsys.umass
b.. Run "mount -t dos /dev/hd1 /dos/c"
c.. When backup finished (the following two command will terminate
Fsys.umass)
a.. Run "umount /dos/c"
b.. Run "rm /dev/hd1"
d.. Prompt user to remove the USB memory
You have to have the latest 4.25 Proc for USB to work. The above seems to
work quite safely.
Fatfsys is safer than Dosfsys it appears also.

/Darel

"Jeffrey Adler" <jeffadler_at_bigfoot_dot_com@127.0.0.1> wrote in message
news:ee1n7e$1e6$1@inn.qnx.com...
I am testing out the USB support for QNX-4.

I want to be able to create a shell script that will allow someone to
backup data to the USB memory stick.

Sequence would be as follows:

1. insert a memory stick
2. run a shell script
3. remove the memory stick.

The shell script will need to do all of the mounting, etc, create a ZIP
file on the memory stick, and nicely shut down everything.

What I am confused about is what parts to run when, how to determine which
HD gets mounted, which tasks to slay when I'm done and want to remove the
memory stick, etc., and which can keep running.

If someone has done this already, please let me know the steps (and the
pitfalls) to take and (perhaps more importantly, )which ones not to take.

Thanks for the help.

Jeff Adler

Darel Cullen
 


Return to qnx.qnx4

Who is online

Users browsing this forum: No registered users and 1 guest

cron