Author Topic: Usbapplet  (Read 43456 times)

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Usbapplet
« on: November 03, 2006, 12:16:45 am »
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).
« Last Edit: November 03, 2006, 01:03:39 am by Meanie »
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

Jon_J

  • Hero Member
  • *****
  • Posts: 1853
    • View Profile
    • http://
Usbapplet
« Reply #1 on: November 03, 2006, 12:47:28 am »
Cool!
Thank you Meanie.
It's the little USB icon to the left of the paw-print on my statusbar in pic.
It gives you a little notification of CD-ROM mounted when I plugged in my CD-ROM, I like that.
I needed to re-start Qtopia after installation because some of the icons on my statusbar disappeared.
After downloading from forum, rename to qtopia-usbapplet_1.0.0_arm.ipk
..............This forum changes the name to qtopia_usbapplet_1.0.0_arm.ipk
I just tried my 100MB & 750MB Zip drives and they mounted with no problems.
Zip drives DO appear in the Qtopia Files tab.
Still makes me wonder why CD-ROM doesn't, but I use FileLaunch with one pane open in /mnt
I gave up trying different methods to make CD-ROM appear in the Qtopia Files Tab.
« Last Edit: November 03, 2006, 01:24:13 am by Jon_J »
C3100 Multiboot-->Angstrom 2007.12-r18 | Cacko 1.23 | ArchLinuxARM
C3200 pdaxii13v2-5.5-alpha4 Akita on NAND

Ambicom WL1100C-CF Wifi - Ambicom CF modem - Ambicom CF GPS - Belkin-F5D5050 USB LAN
Socket CF Bluetooth rev K - Iogear 4 port USB micro hub - pocket CF card reader
Targus mini USB optical mouse - 2 Targus SD card readers

Cresho

  • Hero Member
  • *****
  • Posts: 1609
    • View Profile
    • http://home.earthlink.net/~cresho/
Usbapplet
« Reply #2 on: November 03, 2006, 01:18:48 am »
iLL TRY IT OUT...as soon as i get a host usb
Zaurus C-3200 (internal 8gb seagate drive) with buuf icon theme, cacko 1.23 full,  and also Meanie's pdaxqtrom-Debian/Open Office
Zaurus SL-5500 Sharp Rom 3.13 with steel theme
pretec pocket pc wi fi
ambicom bt2000-cf bluetooth-made in taiwan
simpletech 1gb cf
pny 1gb sd
patriot 2gb
ocz or patriot 4gb sd(failed after 2 weeks)only on z
creative csw-5300 speakers in stereo
DigiLife DDV-1000 for video, Audio, Picture recording playable on the zaurus
Mustek DV4500-video recorder, pictures, voice record on sd for z

zaurusthemes.biz | ZaurusVideo | Zaurus Software

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Usbapplet
« Reply #3 on: November 03, 2006, 05:39:26 am »
Quote
Cool!
Thank you Meanie.
It's the little USB icon to the left of the paw-print on my statusbar in pic.
It gives you a little notification of CD-ROM mounted when I plugged in my CD-ROM, I like that.
I needed to re-start Qtopia after installation because some of the icons on my statusbar disappeared.
After downloading from forum, rename to qtopia-usbapplet_1.0.0_arm.ipk
..............This forum changes the name to qtopia_usbapplet_1.0.0_arm.ipk
I just tried my 100MB & 750MB Zip drives and they mounted with no problems.
Zip drives DO appear in the Qtopia Files tab.
Still makes me wonder why CD-ROM doesn't, but I use FileLaunch with one pane open in /mnt
I gave up trying different methods to make CD-ROM appear in the Qtopia Files Tab.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145471\"][{POST_SNAPBACK}][/a][/div]

The newer version that I am still working on will have the USB icon in the tray if the USB host cable is plugged in even if no other devices are attached to it. This way you can check if you have the right cable
Also, in addition to unmounting USB devices, I will also add an option to re-mount then, ie after you unmounted a CD-ROM, you can mount it again after changing the disk without pulling the plug and stuffing it back in. I also plan to have it detect some usb ethernet  lan cards and do something with them. Not sure what to do with USB mouse and keyboard, maybe just pop up and say that they were plugged in. Maybe add some hooks for usb bluetooth dongles as well.. we will see...
« Last Edit: November 03, 2006, 05:40:30 am by Meanie »
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Usbapplet
« Reply #4 on: November 03, 2006, 07:54:04 am »
Quote
It's the little USB icon to the left of the paw-print on my statusbar in pic.
I gave up trying different methods to make CD-ROM appear in the Qtopia Files Tab.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145471\"][{POST_SNAPBACK}][/a][/div]




Jon_J,
what are all these tray icons you have ?
j'm just curious
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

dougeeebear

  • Hero Member
  • *****
  • Posts: 537
    • View Profile
    • http://
Usbapplet
« Reply #5 on: November 03, 2006, 08:04:34 am »
Great work, Meanie.
I wanted something like this because my card monitor doesn't notify on usb mount/unmount.
I don't have a hub, but it works perfect on my usb host with a usb flash drive attached.
I also don't have automounter installed (guess I don't need it).

Thanks a lot for this.

Regards,
Doug
« Last Edit: November 03, 2006, 12:47:06 pm by dougeeebear »
Zaurus SL-C1000 and SL-5500
NetWalker PC-T1 (tablet)

dougeeebear

  • Hero Member
  • *****
  • Posts: 537
    • View Profile
    • http://
Usbapplet
« Reply #6 on: November 03, 2006, 09:29:44 am »
I changed the size of the usb-host.png icon from 48x48 to 32x32.
This makes the icon fit better in the tray.
The icon is located in /home/QtPalmtop/pics144/sysinfo

After downloading it, make sure you rename it to "usb-host.png".

You need to reboot after installing the new icon to see the difference.
« Last Edit: November 03, 2006, 10:44:34 am by dougeeebear »
Zaurus SL-C1000 and SL-5500
NetWalker PC-T1 (tablet)

Jon_J

  • Hero Member
  • *****
  • Posts: 1853
    • View Profile
    • http://
Usbapplet
« Reply #7 on: November 03, 2006, 02:05:50 pm »
Quote
Jon_J,
what are all these tray icons you have ?
j'm just curious
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145499\"][{POST_SNAPBACK}][/a][/div]
I have Cresho's "noia" theme installed.
From left to right are:
clipboard-applet
netactive-applet
network-applet (connect/disconnect)
screenshot-applet (I'm using "screenshotapplet_1.1.0_arm.ipk" because it has the correct sized icon)
volume-applet
CF/SD card applet (cardmonapplet)
pawprint brings up applet list. (I cannot remember it's correct name)
battery monitor
memory monitor
clock
subapplet

Dougeeebear,
Thank you
I used "Restart Qtopia" instead of a full reboot and the new icon registered itself.

EDIT: opps, it's actually oslinux theme, see Cresho's correction below.
Jon
« Last Edit: November 03, 2006, 04:34:06 pm by Jon_J »
C3100 Multiboot-->Angstrom 2007.12-r18 | Cacko 1.23 | ArchLinuxARM
C3200 pdaxii13v2-5.5-alpha4 Akita on NAND

Ambicom WL1100C-CF Wifi - Ambicom CF modem - Ambicom CF GPS - Belkin-F5D5050 USB LAN
Socket CF Bluetooth rev K - Iogear 4 port USB micro hub - pocket CF card reader
Targus mini USB optical mouse - 2 Targus SD card readers

Cresho

  • Hero Member
  • *****
  • Posts: 1609
    • View Profile
    • http://home.earthlink.net/~cresho/
Usbapplet
« Reply #8 on: November 03, 2006, 03:18:12 pm »
actually, its oslinux but he hasnt modified the icons to make it look "together".

noia looks like this.

[img]http://www.zaurusthemes.org/oddpics/scrn004.jpg\" border=\"0\" class=\"linked-image\" /]
Zaurus C-3200 (internal 8gb seagate drive) with buuf icon theme, cacko 1.23 full,  and also Meanie's pdaxqtrom-Debian/Open Office
Zaurus SL-5500 Sharp Rom 3.13 with steel theme
pretec pocket pc wi fi
ambicom bt2000-cf bluetooth-made in taiwan
simpletech 1gb cf
pny 1gb sd
patriot 2gb
ocz or patriot 4gb sd(failed after 2 weeks)only on z
creative csw-5300 speakers in stereo
DigiLife DDV-1000 for video, Audio, Picture recording playable on the zaurus
Mustek DV4500-video recorder, pictures, voice record on sd for z

zaurusthemes.biz | ZaurusVideo | Zaurus Software

Jon_J

  • Hero Member
  • *****
  • Posts: 1853
    • View Profile
    • http://
Usbapplet
« Reply #9 on: November 03, 2006, 04:32:12 pm »
Cresho, you're right. It's oslinux. I just installed it and didn't add the icons from the xtra folder except a few.
C3100 Multiboot-->Angstrom 2007.12-r18 | Cacko 1.23 | ArchLinuxARM
C3200 pdaxii13v2-5.5-alpha4 Akita on NAND

Ambicom WL1100C-CF Wifi - Ambicom CF modem - Ambicom CF GPS - Belkin-F5D5050 USB LAN
Socket CF Bluetooth rev K - Iogear 4 port USB micro hub - pocket CF card reader
Targus mini USB optical mouse - 2 Targus SD card readers

dougeeebear

  • Hero Member
  • *****
  • Posts: 537
    • View Profile
    • http://
Usbapplet
« Reply #10 on: November 04, 2006, 08:32:12 am »
Quote
The newer version that I am still working on will have the USB icon in the tray if the USB host cable is plugged in even if no other devices are attached to it. This way you can check if you have the right cable
Also, in addition to unmounting USB devices, I will also add an option to re-mount then, ie after you unmounted a CD-ROM, you can mount it again after changing the disk without pulling the plug and stuffing it back in. I also plan to have it detect some usb ethernet  lan cards and do something with them. Not sure what to do with USB mouse and keyboard, maybe just pop up and say that they were plugged in. Maybe add some hooks for usb bluetooth dongles as well.. we will see...[div align=\"right\"][a href=\"index.php?act=findpost&pid=145485\"][{POST_SNAPBACK}][/a][/div]
I think your idea for a pop up notification on insertion/removal of a usb mouse and keyboard would be a nice feature.
« Last Edit: November 04, 2006, 07:53:34 pm by dougeeebear »
Zaurus SL-C1000 and SL-5500
NetWalker PC-T1 (tablet)

MrStaypuft

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Usbapplet
« Reply #11 on: November 04, 2006, 11:30:50 pm »
This is GREAT.

I was just going to jump on the forum and ask about occasionally getting corruption in my FAT32 harddrive (I think it was becuase I was unplugging without unmounting... probably a pretty silly thing to do now I think about it!)

Now I've got an easy way to do it without even opening terminal.

Thanks Meanie.

Puffer

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Usbapplet
« Reply #12 on: November 05, 2006, 10:45:56 pm »
I really hate filesystem corruptions. My source file for the applet just got corrupted just when I was about to have it finished. Darn, and no backups  Have to start again
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

dougeeebear

  • Hero Member
  • *****
  • Posts: 537
    • View Profile
    • http://
Usbapplet
« Reply #13 on: November 06, 2006, 08:25:58 am »
Quote
I really hate filesystem corruptions. My source file for the applet just got corrupted just when I was about to have it finished. Darn, and no backups  Have to start again
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145629\"][{POST_SNAPBACK}][/a][/div]
Man, that's a real bummer.

I'm just curious about something here.
Since I don't have a hub, I only have one drive attached to my usb host at a time.
Therefore I don't really need to have automounter installed.
I use the directory /mnt/usbstorage and the usbapplet recognizes it and notifies me on insertion with no problem.
However when I try to unmount the drive I get a "failed to unmount" error message.
In your updated version, would it be possible to add that directory to the list of recognized directories in order to be able to unmount it?

Thanks for this handy program.

Regards,
Doug
Zaurus SL-C1000 and SL-5500
NetWalker PC-T1 (tablet)

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Usbapplet
« Reply #14 on: November 07, 2006, 10:21:02 am »
Quote
Quote
I really hate filesystem corruptions. My source file for the applet just got corrupted just when I was about to have it finished. Darn, and no backups  Have to start again
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145629\"][{POST_SNAPBACK}][/a][/div]
Man, that's a real bummer.

I'm just curious about something here.
Since I don't have a hub, I only have one drive attached to my usb host at a time.
Therefore I don't really need to have automounter installed.
I use the directory /mnt/usbstorage and the usbapplet recognizes it and notifies me on insertion with no problem.
However when I try to unmount the drive I get a "failed to unmount" error message.
In your updated version, would it be possible to add that directory to the list of recognized directories in order to be able to unmount it?

Thanks for this handy program.

Regards,
Doug
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145648\"][{POST_SNAPBACK}][/a][/div]

I managed to rewrite the applet while everyone was watching the horse race.
Here's the rewritten version. It has some more features, but needs much more testing also...
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K