OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> Usbapplet, my first attempt
Meanie
post Nov 2 2006, 09:16 PM
Post #1





Group: Members
Posts: 2,808
Joined: 21-March 05
From: Sydney, Australia
Member No.: 6,686



I just wrote a little usb applet which allows you to unmount usb devices such as usb sticks, usb hdds, usb zip, usb cdrom, etc... once they have been mounted by automounter.
I am working on updating it to also do usb networking and other usb devices related things.

This is primarily for Sharp ROM. Cacko already has an unmount for USB disks. However, this one handles 4 concurrent disks (provided my automounter package is installed).
Attached File(s)
Attached File  qtopia_usbapplet_1.0.0_arm.ipk ( 11.42K ) Number of downloads: 155
 
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
xamindar
post Oct 4 2008, 01:05 AM
Post #2





Group: Members
Posts: 803
Joined: 30-March 04
From: California
Member No.: 2,368



Wow, can't believe I never saw this before. Works great! Only bother is that it doesn't mount more than one usb drive at a time. Anyone know if this is possible?
Go to the top of the page
 
+Quote Post
speculatrix
post Oct 4 2008, 01:29 AM
Post #3





Group: Admin
Posts: 3,281
Joined: 29-July 04
From: Cambridge, England
Member No.: 4,149



QUOTE(xamindar @ Oct 4 2008, 10:05 AM) *
Wow, can't believe I never saw this before. Works great! Only bother is that it doesn't mount more than one usb drive at a time. Anyone know if this is possible?


you should be able to have lots of USB drives mounted; just be warned of the power limits on the USB host, and/or use a powered hub.
Go to the top of the page
 
+Quote Post
xamindar
post Oct 4 2008, 01:59 AM
Post #4





Group: Members
Posts: 803
Joined: 30-March 04
From: California
Member No.: 2,368



QUOTE(speculatrix @ Oct 4 2008, 02:29 AM) *
QUOTE(xamindar @ Oct 4 2008, 10:05 AM) *
Wow, can't believe I never saw this before. Works great! Only bother is that it doesn't mount more than one usb drive at a time. Anyone know if this is possible?


you should be able to have lots of USB drives mounted; just be warned of the power limits on the USB host, and/or use a powered hub.

I'm using a powered usb hub. When I plug more than one usb drive into it only the first is mounted and shows in the files tab. I can mount a second one manually so I know they work. Just wondering why this applet and/or the automount package doesn't do more than one.
Go to the top of the page
 
+Quote Post
xamindar
post May 16 2010, 12:48 AM
Post #5





Group: Members
Posts: 803
Joined: 30-March 04
From: California
Member No.: 2,368



QUOTE(xamindar @ Oct 4 2008, 02:59 AM) *
I'm using a powered usb hub. When I plug more than one usb drive into it only the first is mounted and shows in the files tab. I can mount a second one manually so I know they work. Just wondering why this applet and/or the automount package doesn't do more than one.

No one ever responded to this so I decided (2 years later wink.gif) to look into it myself. The /etc/hotplug/usb/usb-storage script is what is called when a drive is inserted and it will by default mount up to 4 drives (sda-sdd). If you connect one flash drive it will run through, check for a remove script and if it does not exist will then go ahead and mount the drive by looking for each of the four in turn. Then, once it is done mounting it will create a remove link under /var/run/usb/. If you then connect a second drive afterwards the script will run again and first check for any remove scripts which in this case will exist and therefore it will not try to mount anything else.
On the other hand, if I plug four flash drives into a usb hub and then afterwards plug that hub into the Zaurus the script will run and because there is no remove link yet it will run through and mount all four drives in the first go. Drives can be unmounted individually from the usb tray applet but ALL have to be physically disconnected from the zaurus before it will remove that remove link and allow mounting new drives again.
I'm not sure why whoever made this automounter (meanie?) decided to make it this way but it isn't very robust at all. Of course, I'm not very skilled with hotplug as the zaurus is the only linux I have that still uses it. Oh well, good enough as long as you understand how this usb-storage script is working. Maybe a simple change to the script to check if the drive is already mounted before trying to mount it instead of looking for that remove script would fix it. I'll try it but it may be that way for a reason.

I mainly put this here so in the future when I again try to figure this out I will remember where I left off.
Go to the top of the page
 
+Quote Post

Posts in this topic
Meanie   Usbapplet   Nov 2 2006, 09:16 PM
Jon_J   Cool! Thank you Meanie. It's the little U...   Nov 2 2006, 09:47 PM
Meanie   QUOTE(Jon_J @ Nov 3 2006, 03:47 PM)Cool! ...   Nov 3 2006, 02:39 AM
dougeeebear   QUOTE(Meanie @ Nov 3 2006, 04:39 AM)The newer...   Nov 4 2006, 05:32 AM
jpmatrix   QUOTE(Jon_J @ Nov 3 2006, 07:47 AM)It's t...   Nov 3 2006, 04:54 AM
Cresho   iLL TRY IT OUT...as soon as i get a host usb   Nov 2 2006, 10:18 PM
dougeeebear   Great work, Meanie. I wanted something like this b...   Nov 3 2006, 05:04 AM
dougeeebear   I changed the size of the usb-host.png icon from 4...   Nov 3 2006, 06:29 AM
Jon_J   QUOTE(jpmatrix @ Nov 3 2006, 06:54 AM)Jon_J, ...   Nov 3 2006, 11:05 AM
Cresho   actually, its oslinux but he hasnt modified the ic...   Nov 3 2006, 12:18 PM
Jon_J   Cresho, you're right. It's oslinux. I just...   Nov 3 2006, 01:32 PM
MrStaypuft   This is GREAT. I was just going to jump on the fo...   Nov 4 2006, 08:30 PM
Meanie   I really hate filesystem corruptions. My source fi...   Nov 5 2006, 07:45 PM
dougeeebear   QUOTE(Meanie @ Nov 5 2006, 09:45 PM)I really ...   Nov 6 2006, 05:25 AM
Meanie   QUOTE(dougeeebear @ Nov 6 2006, 11:25 PM)QUOT...   Nov 7 2006, 07:21 AM
dougeeebear   QUOTE(Meanie @ Nov 7 2006, 09:21 AM)I managed...   Nov 7 2006, 08:16 AM
John Galt   QUOTE(dougeeebear @ Nov 7 2006, 12:16 PM)QUOT...   Nov 7 2006, 10:04 AM
dougeeebear   QUOTE(John Galt @ Nov 7 2006, 12:04 PM)I do n...   Nov 7 2006, 12:55 PM
Meanie   QUOTE(dougeeebear @ Nov 8 2006, 06:55 AM)QUOT...   Nov 7 2006, 01:09 PM
John Galt   QUOTE(dougeeebear @ Nov 7 2006, 04:55 PM)QUOT...   Nov 7 2006, 01:47 PM
dougeeebear   QUOTE(John Galt @ Nov 7 2006, 03:47 PM)QUOTE(...   Nov 7 2006, 01:54 PM
Meanie   I build a new version (1.0.2) to be uploaded later...   Nov 7 2006, 10:09 PM
Meanie   here's the updated package   Nov 8 2006, 04:19 AM
dougeeebear   Nice job. I see the two menu items "Mount US...   Nov 8 2006, 06:05 AM
dougeeebear   Here's a little icon I whipped up for usb stor...   Nov 8 2006, 01:29 PM
Meanie   QUOTE(dougeeebear @ Nov 9 2006, 07:29 AM)Here...   Nov 8 2006, 05:26 PM
Meanie   QUOTE(Meanie @ Nov 9 2006, 11:26 AM)btw, the ...   Nov 8 2006, 06:15 PM
dougeeebear   QUOTE(Meanie @ Nov 8 2006, 08:15 PM)I will ju...   Nov 9 2006, 04:28 AM
Meanie   QUOTE(dougeeebear @ Nov 9 2006, 10:28 PM)QUOT...   Nov 9 2006, 04:55 AM
dougeeebear   This is nice. One question: (since I only have a ...   Nov 9 2006, 05:33 AM
Meanie   QUOTE(dougeeebear @ Nov 9 2006, 11:33 PM)This...   Nov 9 2006, 05:59 AM
dougeeebear   I think I was wrong about what icon the usbstorage...   Nov 9 2006, 10:30 AM
Meanie   QUOTE(dougeeebear @ Nov 10 2006, 04:30 AM)I t...   Nov 9 2006, 01:29 PM
dougeeebear   QUOTE(Meanie @ Nov 9 2006, 03:29 PM)QUOTE(dou...   Nov 9 2006, 02:33 PM
Meanie   QUOTE(dougeeebear @ Nov 10 2006, 08:33 AM)QUO...   Nov 9 2006, 04:49 PM
dougeeebear   That's got it. This applet is a real jewel. Th...   Nov 9 2006, 05:43 PM
tml   I installed 1.0.3 on sharp rom (c3100, tetsu kerne...   Nov 11 2006, 03:27 AM
Meanie   QUOTE(tml @ Nov 11 2006, 09:27 PM)I installed...   Jan 31 2007, 04:51 PM
dougeeebear   This is interesting... When I insert/remove an SD ...   Dec 11 2006, 05:59 AM
Jon_J   Got a copy of CardExport and now I can use my Palm...   Jan 12 2007, 01:17 PM
Snappy   This is really neat meanie! This is really mak...   Jan 31 2007, 09:03 PM
xamindar   Wow, can't believe I never saw this before. Wo...   Oct 4 2008, 01:05 AM
speculatrix   QUOTE(xamindar @ Oct 4 2008, 10:05 AM) Wo...   Oct 4 2008, 01:29 AM
xamindar   QUOTE(speculatrix @ Oct 4 2008, 02:29 AM)...   Oct 4 2008, 01:59 AM
xamindar   QUOTE(xamindar @ Oct 4 2008, 02:59 AM) I...   May 16 2010, 12:48 AM
Meanie   QUOTE(xamindar @ May 16 2010, 06:48 PM) Q...   Aug 13 2010, 08:05 AM
Snappy   Hi folks, how has everyone been?   Aug 15 2010, 07:33 AM
Meanie   QUOTE(Snappy @ Aug 16 2010, 01:33 AM) Hi ...   Sep 6 2010, 04:55 AM
xamindar   QUOTE(Meanie @ Sep 6 2010, 05:55 AM) QUOT...   Sep 6 2010, 10:16 AM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 16th September 2014 - 07:35 AM