maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   N800 USB Host Mode Experiment (https://talk.maemo.org/showthread.php?t=4177)

dormant 2008-01-16 22:48

Re: N800 USB Host Mode Experiment
 
You hope this helps?

I am over the moon, and if you ever can find your way down to Trinidad, I'll buy you a cold Carib. Hell, I'll buy you a 12-year-old Angostura rum with fresh coconut water.

It was a simple job, without too much bloodshed, to peel back the shielding on the mini-A connector and then cut it off. After only one setback - I'd forgotten to turn my camera to mass-storage mode - I was using my N800 to browse the photos on my Nikon D200.

I've been wanting to do that ever since I bought my N800 a year ago.

My only concern is that the connector is a bit wobbly without the shielding.

Anyone fancy porting gphoto2?

kudos1uk 2008-01-17 00:27

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by dormant (Post 128975)
You hope this helps?

I am over the moon, and if you ever can find your way down to Trinidad, I'll buy you a cold Carib. Hell, I'll buy you a 12-year-old Angostura rum with fresh coconut water.

Take care I might hold you to that.

I gave my one a very slight forward bend (toward the bit I removed) this gave it a real firm fix in the socket.

Glad it helped, I was in two minds to send it back then thought, what the hell, why not give it a go.

mplawner 2008-01-20 19:21

Re: N800 USB Host Mode Experiment
 
Based on JohnX's a2dp script, I've made the following to toggle, enable or disable hostmode.

Copy the script below into /usr/bin/hostmode
Make the script executable with chmod +x /usr/bin/hostmode
Add the following line to /etc/sudoers:
user ALL = NOPASSWD: /usr/bin/hostmode
Add the command: sudo /usr/bin/hostmode toggle to osso-statusbar-cpu's command settings and enjoy!

Code:

#!/bin/sh

if $(grep -q b_idle /sys/devices/platform/musb_hdrc/mode)
  then
    #echo "guest mode enabled"
  hostmode=0
else
    #echo "host mode"
  hostmode=1
fi

case "$1" in
        "enable" | "host" | "hostmode" )
                echo host > /sys/devices/platform/musb_hdrc/mode
                run-standalone.sh dbus-send --print-reply  \
                --type=method_call --dest=org.freedesktop.Notifications  \
                /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog  \
                string:'USB HOST MODE - ENABLED' uint32:0 string:'OK' 2> /dev/null 1> /dev/null
                ;;
        "disable" | "guest" | "otg" | "peripheral" )
                echo otg > /sys/devices/platform/musb_hdrc/mode
                run-standalone.sh dbus-send --print-reply  \
                --type=method_call --dest=org.freedesktop.Notifications  \
                /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog  \
                string:'USB HOST MODE - DISABLED' uint32:0 string:'OK' 2> /dev/null 1> /dev/null
                ;;
        "toggle" )
                if [ $hostmode -eq 1 ] ; then
                        #"Calling $0 to disable"
                        $0 disable
                else
                        #"Calling $0 to enable"
                        $0 enable
                fi
                ;;
        * )
                echo "$0 usage: enable | disable | toggle | --help"
                ;;
esac


jolouis 2008-01-20 20:02

Re: N800 USB Host Mode Experiment
 
After reading all through these posts I decided the easiest thing to do was create a home-brew auto-switching cable; it was actually incredibly easy to do!
1) By a USB Female to Female gender bender (formerly known as Bender the Offender)
2) Attach said gender bender to the the factory USB table that comes with the N800. Since I didn't want to get my cables mixed up in the future I put a bit of heat shrink over the connector and shrank it down so the gender bender wouldn't come off accidentally in the future.
3) Use a pair of pliers to bend up the metal top cap of the mini USB connector on the other end of the cable. There's a kind of "zig-zag" line where the two pieces of metal meet up, and all you have to do is bend them up slightly to either side to expose the copper pins.
4) Take a soldering iron and apply a tiny smear of solder between the exposed pins 4 and 5 near the back; if the solder beads up too much just scrape it down a bit with either the soldering iron or a small file so that it's fairly flat.
5) Bend the metal top cap back down into original position.

That's it! 5 minutes of work an $2 for a gender bender! Very easy!! Automatically switches and detects my USB keyboard, mouse, Flash Drives, Camera, etc! I'm going to do another "modded" cable up for my Dad's N800 at some point so if anyone's looking for pictures of how to do it I'll grab some then.

tz1 2008-01-20 23:50

Re: N800 USB Host Mode Experiment
 
The Second Generation iPod (I have a 40Gb version FAT formatted) works directly attached to the USB port on n810. It works fine on batteries.

The 4th Generation (photo) nor 5th (video) doesn't (at least not without external power).

The power for the 2ndGen comes through the FireWire port though.

gsagers 2008-01-21 14:33

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by jolouis (Post 131076)
3) Use a pair of pliers to bend up the metal top cap of the mini USB connector on the other end of the cable. There's a kind of "zig-zag" line where the two pieces of metal meet up, and all you have to do is bend them up slightly to either side to expose the copper pins.
4) Take a soldering iron and apply a tiny smear of solder between the exposed pins 4 and 5 near the back; if the solder beads up too much just scrape it down a bit with either the soldering iron or a small file so that it's fairly flat.
5) Bend the metal top cap back down into original position.

D'oh - Wish I'd noticed it was split side up before I cut away all the plastic to make one by soldering between 4 & 5! Your way is MUCH easier!

ranasing 2008-01-21 15:38

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by sjgadsby (Post 101342)
I purchased (and am using) this adapter, though you may be able to find a better deal elsewhere.

EDIT: The linked USB adapter is not wired correctly to let OS2008 on an N800 do its USB mode autoswitching magic.

So, just to clarify, this adapter will not work? Can you add a link to adapter you did get to work? Thanks!

raynman 2008-01-22 02:56

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by ranasing (Post 131456)
So, just to clarify, this adapter will not work? Can you add a link to adapter you did get to work? Thanks!

The adapter will "work" but will not auto-switch, even though its description says "OTG" in it. I just read the entire thread and concluded that nobody has found an adapter that will auto-switch out-of-the-box. Please, correct me if I'm wrong.

The adapter he used can also be found here for (slightly) cheaper shipping:
http://www.wiretester.com/gcusbafxm.html

Total of $17.86 (outrageous).

raynman 2008-01-22 03:07

Re: N800 USB Host Mode Experiment
 
For an external 20GB hard disk, I think the Archos Gmini XS 200 mp3 player would be a good fit. It's tiny (it held the "smallest hd-based 20GB mp3 player" title for quite a long time-- not sure if it still is) and doesn't charge through the USB port. It also received high ratings for its transfer rates. I have one, so I'll test it when I get my cable and post my results.

http://www.amazon.com/Archos-Gmini-2.../dp/B0002U0JP4

tz1 2008-01-22 13:06

Re: N800 USB Host Mode Experiment
 
The only thing with the Archos is that USB Flash drives at 16Gb are getting cheaper - I've seen them under $100, and unless you don't like the media player in the nokias you don't need the multimedia function. Unless the $180 price Amazon was quoting was wrong. http://www.meritline.com/usb-hdd-enc...rnal-host.html
combined with a 80+Gb drive should work and be less expensive (I don't have it yet to test because I'm away from home and my 2.5" drives).

Note it comes with a 5 pin mini A to USB F, but I think it is the kind that won't fit into the n800 - the real OTG cable. And this "case" has copy functions to pull (and maybe push?) files to or from another device.


All times are GMT. The time now is 05:49.

vBulletin® Version 3.8.8