Author Topic: Usbapplet  (Read 37916 times)

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Usbapplet
« Reply #30 on: November 09, 2006, 08:59:45 am »
Quote
This is nice.

One question:
(since I only have a usb drive and a mouse, I can't check other items)

On the mouse popup detected/unplugged notifications I get the mouse icon ok.

On the usbstorage popup mounted/unmounted notifications I get the usb.png icon, but the usbstorage.png icon displays ok in the menu.

Not sure what's going on there.
I'm using /mnt/usbstorage (I don't have automounter installed).
Maybe that's the problem.

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

prolly a bug  i must have forgotten to change the code to look for usbstorage.png instead of usb.png
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 #31 on: November 09, 2006, 01:30:07 pm »
I think I was wrong about what icon the usbstorage mounted/unmounted popup notifications are using.
I believe they are still using the usb.png icon from sysinfo, as they did before you added the new icons.
« Last Edit: November 09, 2006, 02:06:31 pm by dougeeebear »
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 #32 on: November 09, 2006, 04:29:44 pm »
Quote
I think I was wrong about what icon the usbstorage mounted/unmounted popup notifications are using.
I believe they are still using the usb.png icon from sysinfo, as they did before you added the new icons.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145915\"][{POST_SNAPBACK}][/a][/div]

you prolly need to restart qtopia since it caches images...
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 #33 on: November 09, 2006, 05:33:41 pm »
Quote
Quote
I think I was wrong about what icon the usbstorage mounted/unmounted popup notifications are using.
I believe they are still using the usb.png icon from sysinfo, as they did before you added the new icons.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145915\"][{POST_SNAPBACK}][/a][/div]

you prolly need to restart qtopia since it caches images...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145929\"][{POST_SNAPBACK}][/a][/div]
I reboot each time I make a change (I don't have an option to restart qtopia).
Anyway, I renamed /sysinfo/usb.png and the popup notification icon didn't display at all which tells me that it's still using that icon.

EDIT:
Just to make sure I was right, I just renamed usbstorage.png to usb.png and copied it to /sysinfo and it's displaying as it should on the popup.

Doug
« Last Edit: November 09, 2006, 07:08:26 pm by dougeeebear »
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 #34 on: November 09, 2006, 07:49:26 pm »
Quote
Quote
Quote
I think I was wrong about what icon the usbstorage mounted/unmounted popup notifications are using.
I believe they are still using the usb.png icon from sysinfo, as they did before you added the new icons.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145915\"][{POST_SNAPBACK}][/a][/div]

you prolly need to restart qtopia since it caches images...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=145929\"][{POST_SNAPBACK}][/a][/div]
I reboot each time I make a change (I don't have an option to restart qtopia).
Anyway, I renamed /sysinfo/usb.png and the popup notification icon didn't display at all which tells me that it's still using that icon.

EDIT:
Just to make sure I was right, I just renamed usbstorage.png to usb.png and copied it to /sysinfo and it's displaying as it should on the popup.

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

ok, I checked the code and indeed I forgot to change the icons for the popup messages so the menu was displaying the right icons, but the popup messages for the usbstorage devices were not.

well, back to recompile and repackage

ok, that took only a minute to do
« Last Edit: November 09, 2006, 10:14:45 pm 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

dougeeebear

  • Hero Member
  • *****
  • Posts: 537
    • View Profile
    • http://
Usbapplet
« Reply #35 on: November 09, 2006, 08:43:46 pm »
That's got it.
This applet is a real jewel.
Thanks a lot.

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

tml

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Usbapplet
« Reply #36 on: November 11, 2006, 06:27:39 am »
I installed 1.0.3 on sharp rom (c3100, tetsu kernel) and created a file usbkeyboard, which checks $1 using a case statement whether it's start of stop. The usbkeyboard should switch key maps using keyhelper.

When I plug in the keyboard, two items appear in the menu. Now, when I click "start" the zaurus gets stuck for a moment and then a error message (could not be mounted) appears. The script works fine when run from the command line as user zaurus.

Could somebody please post a sample script? Are there any log messages so I can look what went wrong? I assume the script is run as the standard user zaurus?
SL-C3100

dougeeebear

  • Hero Member
  • *****
  • Posts: 537
    • View Profile
    • http://
Usbapplet
« Reply #37 on: December 11, 2006, 08:59:34 am »
This is interesting...
When I insert/remove an SD card, I usually get a popup notification (I have qtopia-cardmon installed).
But if I have a usb drive connected I don't get the SD notification popup, although it does mount and unmount.
I'm not sure if this happened before I installed the usb applet or not, but I think I'll check it out.
(Regardless, I wouldn't be without the usb applet).

UPDATE:
I uninstalled the usb applet and it still acted the same.
So it's apparently a little conflict caused when a drive is plugged into the usb port.
It must be a sharp rom thing I guess.

Meanie, you're off the hook
« Last Edit: December 11, 2006, 10:46:15 am by dougeeebear »
Zaurus SL-C1000 and SL-5500
NetWalker PC-T1 (tablet)

Jon_J

  • Hero Member
  • *****
  • Posts: 1853
    • View Profile
    • http://
Usbapplet
« Reply #38 on: January 12, 2007, 04:17:57 pm »
Got a copy of CardExport and now I can use my Palm as a card reader.    
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

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Usbapplet
« Reply #39 on: January 31, 2007, 07:51:13 pm »
Quote
I installed 1.0.3 on sharp rom (c3100, tetsu kernel) and created a file usbkeyboard, which checks $1 using a case statement whether it's start of stop. The usbkeyboard should switch key maps using keyhelper.

When I plug in the keyboard, two items appear in the menu. Now, when I click "start" the zaurus gets stuck for a moment and then a error message (could not be mounted) appears. The script works fine when run from the command line as user zaurus.

Could somebody please post a sample script? Are there any log messages so I can look what went wrong? I assume the script is run as the standard user zaurus?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=146057\"][{POST_SNAPBACK}][/a][/div]

The scripts are executed as root user so it will fail to run qcop command since only zaurus user can run those. you need to add sudo or su to your commands to root user can run the commands as zaurus user.
I will update the applet when i have time to also check for the usb client mode so you can enable/disable samba, usbnetworking when the client cable is plugged in....
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

Snappy

  • Hero Member
  • *****
  • Posts: 793
    • View Profile
    • http://
Usbapplet
« Reply #40 on: February 01, 2007, 12:03:05 am »
This is really neat meanie! This is really making Cacko feel very polished!
Snappy!
------------------------
Akita (Daily use)
<span style='font-size:8pt;line-height:100%'>SL-C1000 with Cacko 1.23 full
Accessories: Wifi XI-825 CF  |  16GB (6) SDHC (Transcend) | 1GB 80x CF (RiDATA PRO-2) </span>

Collie (Sandbox)
<span style='font-size:8pt;line-height:100%'>SL-5500 with OZ/GPE 3.5.4.1 alpha3 build 2006-04-27
Accessories: 512MB A-Data SD | 64MB Toshiba SD</span>

xamindar

  • Hero Member
  • *****
  • Posts: 803
    • View Profile
    • http://www.radnimax.com
Usbapplet
« Reply #41 on: October 04, 2008, 05:05:32 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?
SL-C3100 happily Dualbooting Japanese Rom 1.02 and Debian Eabi
Replaced internal CF with 8gb seagate cf hard drive
Ambicom CF GPS
CyberPower battery powered USB hub
D-link DCF-650W (MAN THIS THING IS HUGE!!)

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3704
    • View Profile
Usbapplet
« Reply #42 on: October 04, 2008, 05:29:09 am »
Quote from: xamindar
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.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

xamindar

  • Hero Member
  • *****
  • Posts: 803
    • View Profile
    • http://www.radnimax.com
Usbapplet
« Reply #43 on: October 04, 2008, 05:59:11 am »
Quote from: speculatrix
Quote from: xamindar
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.
SL-C3100 happily Dualbooting Japanese Rom 1.02 and Debian Eabi
Replaced internal CF with 8gb seagate cf hard drive
Ambicom CF GPS
CyberPower battery powered USB hub
D-link DCF-650W (MAN THIS THING IS HUGE!!)

xamindar

  • Hero Member
  • *****
  • Posts: 803
    • View Profile
    • http://www.radnimax.com
Usbapplet
« Reply #44 on: May 16, 2010, 04:48:17 am »
Quote from: xamindar
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 ) 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.
SL-C3100 happily Dualbooting Japanese Rom 1.02 and Debian Eabi
Replaced internal CF with 8gb seagate cf hard drive
Ambicom CF GPS
CyberPower battery powered USB hub
D-link DCF-650W (MAN THIS THING IS HUGE!!)