Page 2 of 2 FirstFirst 12
Results 21 to 37 of 37
Like Tree4Likes
  1. #21  
    Quote Originally Posted by somline View Post
    Shouldn't it be "ls" in lower case?
    Yes, Thank you for spotting that. I have edited my post to correct the error.
  2. #22  
    webOS has udev right? Can't we add an auto mount rule?

    https://wiki.archlinux.org/index.php...ng_USB_devices
  3. #23  
    Quote Originally Posted by GyroJoe View Post
    webOS has udev right? Can't we add an auto mount rule?

    https://wiki.archlinux.org/index.php...ng_USB_devices
    I can't see why not, I'd give it a try if I could be bothered. I'm using a script I've written that does the job well enough. It's far too ugly to try and share though.
  4. #24  
    Izzeho, Please share....
  5. #25  
    Hi folks,
    does the construction work with another charger too? the duracell charger is 45€ in Germany :'(
  6. bable's Avatar
    Posts
    247 Posts
    Global Posts
    440 Global Posts
       #26  
    It should work with nearly any portable power pack that can pump out 5v .5a. You can build a battery pack for under 3$ from radio shack/maplin type stores. Just checked back at this thread, thanks for helping out Wheel_nut!
    "The Gods do not protect fools, fools are merely protected by more capable fools"
  7. #27  
    Quote Originally Posted by izzeho View Post
    I ................ I'm using a script I've written that does the job well enough. It's far too ugly to try and share though.
    Please could you help me with running my script:

    1) Which Directory did you place the Script file in?

    2) Does the TP use sh? or bash?

    3) How do you run the script? can you run it from the GUI?

    I am trying to run my script from the Terminal but get an error message "sh not recognised"

    Any help would be appreciated.
  8. #28  
    Quote Originally Posted by bable View Post
    So this whole setup costs about 40$ on Amazon with everything prime worthy, the most expensive part is the battery pack which is 20$ and can be optional. Simply plug everything in, have a media/internal/usb folder already created, and mount the new device. USB and SD cards should be cake, I'm working to get support for cameras and wifi cards too.

    I've tested every drive I have(flashdrives, sdcard readers, external HDD) and the TP can handle anything but NTFS with full read/write abilities, however, NTFS can be handled through chroot so it's moot.

    This plugs into the touchpad
    Amazon.com: Micro USB Host Cable (OTG Cable) - Xoom, Galaxy S2, Nokia N810 / Nokia N900, Toshiba TG01, Archos G9. New Version with more accommodating "L" shaped connector! - Better than Motorola Camera Connection Kit!: Electronics

    This plugs into that and lets you have two male USB(one power, one device or hub)
    Amazon.com: USB A Male to Male Power and Sync Y Cable for 2.5 inch Drives: Electronics

    This easily outlasted lawrence of arabia playing off a flash drive
    Amazon.com: Duracell - Powerhouse Charger, Universal Cable w/USB & Mini-USB: Office Products

    This let me plug in two flash drives, an sd card reader, and a wifi cards all fully powered from the battery pack.
    Amazon.com: Belkin USB 2.0 4-Port Ultra Mini Hub F5U407: Electronics

    This helps everything connect
    Amazon.com: Bluecell 3 Pack USB Female to Female Type A Coupler Adapter + Bluecell Cable Tie: Electronics

    Here's the full setup without any aesthetic work yet, soon I'll make it about the size of a card deck and cut down the stray wires.
    http://i263.photobucket.com/albums/i...t/DSC04768.jpg

    After it's all set up make a folder at media/internal and name it usb. Then type "mount /dev/sda1 /media/internal/usb" into xterm and as long as there aren't any errors you can navigate to the folder you made earlier in internalz or chroot file manager for copy/pasting/listening/playing/etc!

    I have four friends using this setup without a hitch, one person has claimed the OTG cable didn't work for them but it seems very isolated. Enjoy plugging 64 gigs worth of movies in, or loading you camera pics straight into your TP
    I've read the above and am I right in thinking that with this setup I can use the touchpad as a portable dvd player eg in cars or on the plane as iwas going to buy a portable dvd player and won't ned to if I do the above. Thanks
  9. #29  
    Hi everyone - I was wondering if you could help me.

    Is there any way that I can connect a flash drive to my TP with no external power? I need to access thumb drives when I am out of the office for work purposes, that would be in conference venues etc to access clients' documents that have been brought in usb drives - in those venues or similar ones external power is not always available - any ideas? Your help would be very appreciated - thanks very much!
  10. #30  
    Quote Originally Posted by Irida View Post
    Hi everyone - I was wondering if you could help me.

    Is there any way that I can connect a flash drive to my TP with no external power?
    In a word, No.
    I need to access thumb drives when I am out of the office for work purposes, that would be in conference venues etc to access clients' documents that have been brought in usb drives - in those venues or similar ones external power is not always available - any ideas? Your help would be very appreciated - thanks very much!
    The easiest and most portable solution is the one discussed in this thread:
    http://forums.webosnation.com/hp-tou...e-kbd-etc.html
  11. thg
    thg is offline
    thg's Avatar
    Posts
    238 Posts
    Global Posts
    261 Global Posts
    #31  
    Quote Originally Posted by GyroJoe View Post
    webOS has udev right? Can't we add an auto mount rule?
    https://wiki.archlinux.org/index.php...ng_USB_devices
    normaly this should work.

    Unfortunately it's a little bit hard to get it working, because on webOS there is no "udevinfo" to get detailed infos about the device and no "udevtest" to test your rules.

    I was able to get it running at least for USB-sticks in my solar/battery-powered USB-hub and with my USB-hub/flash-card-reader with a Y-cable, both connected via an OTG-cable to my TP.

    Login as root on your TP (novaterm or wterm and the "su -") and then do:
    # cd /etc/udev/rules.d/
    # vi 11-mnt-auto-mount.rules
    Enter the following, if finished do an <ESC> and ":wq" to save the file and quit the editor:
    # automount all attached devices like sda1, sda2, ...
    KERNEL!="sd[a-z][0-9]", GOTO="mnt_auto_mount_end"

    # Mount under /media/internal/usb/...
    RUN+="/bin/mkdir -p /media/internal/usb/%k"
    RUN+="/bin/mount /dev/%k /media/internal/usb/%k"

    # Exit
    LABEL="mnt_auto_mount_end"
    Finaly do a:
    # udevcontrol reload_rules
    to reload the rules, or reboot your TouchPad.

    For me this works fine if I plug in one or more USB-sticks in my USB-hub and I can access the content via "/media/internal/usb"sdX1". But it does not recognize an SD-card I plug into my reader, manually I can mount the SD-card with "mount /dev/sda1 /media/internal/usb" anyway.

    Two other limitations do exists, you always have to unmount every attached device after the work is done with "umount /dev/sdb1" or what ever your device name is and the directories automaticly created for mounting the devices are not removed after detatching.

    Normaly this should work with the following rules:
    # Mount under /media/internal/usb/sdXX
    ACTION=="add", RUN+="/bin/mkdir -p /media/internal/usb/%k", RUN+="/bin/mount /dev/%k /media/internal/usb/%k"

    # Clean up after removal with eject
    ACTION=="remove", RUN+="/bin/umount -l /mnt/usb/%k", RUN+="/bin/rmdir /media/internal/usb/%k"
    I tested them on a "normal" Linux, but it seems that the udev in webOS does not accept the "add" and "remove" action and there is no "eject" command to initiate the remove action.

    Things to do would be now creating an App that show the attached drives and where you can unmount them.


    PS: Isn't there a "CODE"-tag for including source-code?
    Last edited by thg; 05/15/2012 at 07:25 PM.
  12. thg
    thg is offline
    thg's Avatar
    Posts
    238 Posts
    Global Posts
    261 Global Posts
    #32  
    Quote Originally Posted by thg View Post
    I tested them on a "normal" Linux, but it seems that the udev in webOS does not accept the "add" and "remove" action
    it does accept them, but for me it seems that you can not put several commands, sparated by a comma, in one line. On Linux this works, on webOS not, so one action, one command per line.

    Status right now is, that mounting of one or more USB-sticks is working reliable, access is possible with "Internalz" and enabled "show hidden files" (don't know why, hopefully there is a solution to change this) and after unplugging the stick the directory is unmounted an deleted. This only should be done if there was only read access on the stick, otherwise you might loose (all) data on it.

    Things to do would be now creating an App that show the attached drives and where you can unmount them.
    This is the "hard" part for me, I know "some" Enyo-programming, but I still have no clue how to run Linux-commands/shell-scripts from Enyo, so that I can check and display the status of mounted devices and eject/unmount them if not needed anymore.

    The current "/etc/udev/rules.d/11-mnt-auto-mount.rules" I've tested on two TouchPads with several USB-sticks:

    # automount all attached devices like sda1, sda2, ...
    KERNEL!="sd[a-z][0-9]", GOTO="mnt_auto_mount_end"

    # Global mount options
    ACTION=="add", ENV{mount_options}="relatime,shortname=mixed,umask=0000"

    # Create directory and mount USB-stick
    ACTION=="add", RUN+="/bin/mkdir -p /media/internal/usb/%k"
    ACTION=="add", RUN+="/bin/chmod 777 /media/internal/usb/%k"
    ACTION=="add", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/internal/usb/%k"

    # Clean up after removal with eject
    ACTION=="remove", RUN+="/bin/umount -l /media/internal/usb/%k"
    ACTION=="remove", RUN+="/bin/rmdir /media/internal/usb/%k"

    # Exit
    LABEL="mnt_auto_mount_end"
  13. thg
    thg is offline
    thg's Avatar
    Posts
    238 Posts
    Global Posts
    261 Global Posts
    #33  
    Quote Originally Posted by thg View Post
    Things to do would be now creating an App that show the attached drives and where you can unmount them.
    not yet an App, but a little bit more "easy" way to unmount drives.

    You need "bash" installed from Preware and just place the script to "/media/internal" where you call it with "./eject.sh sdb1" (or what ever drive is mounted) within a terminal.

    And I found one more problem, if the TouchPad goes to "sleep" with attached USB-hub/Card-reader, most times I was not able to get it running again, even connecting the TouchPad via USB cable was not possible anymore!

    So just don't do that, remove the OTG-cable from the TouchPad if your work is done, otherwise to have to reboot your device to get it running again!

    eject,sh:
    #!/opt/bin/bash
    #

    logdir="/var/log/"
    logfile="eject.log"
    mountdir="/media/internal/usb"

    if [ "$1" == "" ]; then
    echo "Usage: eject.sh <device>"
    echo
    echo "e.g. eject.sh sdb1"
    echo
    exit 1
    fi

    device=$1

    if [ "${device:0:2}" != "sd" ] || [ "${#device}" -ne 4 ]; then
    echo "Error: Devicename '$device' wrong, valid names are 'sdb1', 'sdc1'!"
    echo
    exit 1
    fi

    echo "Unmounting and removing '$mountdir/$device' ..."
    echo
    /bin/umount -l $mountdir/$device
    RETVAL1=$?
    /bin/rmdir $mountdir/$device
    RETVAL2=$?

    if [ $RETVAL1 = 0 ]; then
    echo "Device '$mountdir/$device' successfully unmounted,"
    echo "it can be savely removed from the hub/reader now!"
    fi

    exit 0
    I attached both files, remove the ".txt" before copying them to the TouchPad and use them on your own risk!
    Attached Files Attached Files
    Last edited by thg; 05/17/2012 at 06:10 PM.
  14. thg
    thg is offline
    thg's Avatar
    Posts
    238 Posts
    Global Posts
    261 Global Posts
    #34  
    Hi,

    today I was trying to make the auto-mounting rules better, by supporting device-labels as directory and NTFS using the ntfs-3g driver described here: [HOW TO] USB OTG - Read and write on NTFS .

    Unfortunately I was "quite" unsuccessfull doing this just with an enhanced udev-rules file, what normally should work and does work on Linux. Problem was, that simple checks like "ACTION=="add", ENV{ID_FS_TYPE}=="vfat", ..." just are not working. I have no clue why not, because they are working on Linux as expected.

    To get a solution anyway, I stripped down the udev-rules file just to call a batch-script with all needed parameters which does all the preparing, mounting, unmounting and cleaning up now, logs are written to /var/log/messages.

    In the attached zip you find 4 files:

    11-mnt-auto-mount-ntfs.rules - udev-rules-file
    eject.sh - simple script to unmount
    install.sh - simple installation script
    usbmount.sh - script doing "the work"

    Unpack the zip-file into his folder, copy the folder to your TouchPad, connect via "novaterm" or use "wterm" as root, go to the folder and start the installation with "./install.sh". If there is an other or older auto-mount script for USB-sticks, you have to delete it before the installation!

    You need the BASH ('Bourne Again Shell') installed from Preware and if you want to use NTFS-drives, you also need the ntfs-3g driver from the above link (has to be in "/bin/").

    Just plug your USB-stick or USB-harddrive into the hub and wait some seconds, the drive should pop up under "/media/internal/usb/..." with it's name or, if not existent, with the device name.

    To see the files you need "Internalz Pro" and you have to enable "show hidden files" in the settings of Internalz.

    Until there is an App doing this more comfortable, you have to call the "eject.sh" with the device name to unmount the USB stick before removing if there was not only read access. Otherwise you might loose (all) data on the stick.

    I tested the scripts on three TouchPads (16GB, 64GB and Go) with a Solar/Battery-powered USB-hub and a USB-hub with power over a Y-cable, both connected with an OTG-cable to the TouchPad. I tried several USB-sticks (FAT, 4 to 32 GB) and a USB-harddrive with several partitions (FAT, NTFS and other not supported).

    As far as I can say the auto-mount, the recognition of drive-label and partition-type (FAT or NTFS) works reliable, I only tested read-access and checked the cleaning up process after unplugging.


    But anyway, there are no warranties at all, use the scripts as they are and at your own risk!
    Attached Files Attached Files
    Last edited by thg; 05/19/2012 at 07:35 PM.
  15. #35  
    So this should work? ...Or do the card reader and the OTG cable need to be reversed for some reason? I set it up as shown because my Y-connector has a female end where the card reader is shown, so no additional adapters were needed. The TP doesn't "see" enough power to indicate charging with this hooked up (no "lightning bolt" on battery symbol), even if I substitute the HP wall charger for the Duracell unit...is this normal? There IS power coming thru...my phone with a micro usb port shows charging when the setup is plugged into it. The TP "wakes up" from off when I plug this in, so it's "seeing" that there IS power/something there....that's what's needed, right?

    Haven't done the program mods yet. Only had the TP about 2 weeks & wanted to make sure there were no warranty issues before I messed with anything.
    Last edited by Cathammer; 06/12/2012 at 09:01 AM.
  16. #36  
    my touchpad does not show directory sda1 under /dev. There are no directories with sd neither sda1 sda2.. or sdb1 sdb2 etc
    This is reason, I am unable to mount /media/internal/usb
    Please suggest the solution
  17. #37  
    Quote Originally Posted by rksharma View Post
    my touchpad does not show directory sda1 under /dev. There are no directories with sd neither sda1 sda2.. or sdb1 sdb2 etc
    This is reason, I am unable to mount /media/internal/usb
    Please suggest the solution
    I refer you to the answer I gave when you posted the same question here Functional USB Host on Touchpad
Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions