Active Topics

 


Reply
Thread Tools
Posts: 154 | Thanked: 73 times | Joined on Jan 2009 @ Toronto
#11
Originally Posted by bunanson View Post
.... to make the 770 OTG work, if you can drop a few line, I will try again.
EDIT: Just noticed, you said "OTG". This is not OTG but true Host Mode with OHCI controller. That is what makes it better than N8x0.

NOW THE ORIGINAL POST, ABOUT HOST MODE:

I was wondering whether it was time to write this up again. The old ITT threads on the subject are hard to find, and in any case they contain a lot of misleading information. There was a wiki about it that has now disappeared. There are different ways of activating USB host mode on the 770. Some methods require the use of another Linux computer. I am going to describe a method that can be done entirely on the 770 and requires very little knowledge of Linux. (It avoids using a Linux text editor.) It works for every OS except OS2005. I assume that readers have some experience with X-Terminal and that they have installed rootsh or becomeroot (depending on their OS).

First, you need to find three pieces of hardware.

1.Y-cable, such as those on http://shop.ebay.com/i.html?_nkw=usb...y+cable+mini+b .
You might already have this item. It sometimes comes in the box with a hard drive or a HDD enclosure. Note that one of the items on the eBay page is not a Y-cable at all, but just a 10 ft cable with USB connectors for A male and mini B. Your cable should have a mini-B connector at one end (to plug into your 770's USB port) and two A-male connectors at the other end. One of the A-male connectors will be at the end of a thinner piece of cable: you will plug this into a USB power supply. The other A-male connector is your data line, connecting with your memory drive, keyboard, hub or whatever.
DO NOT CONNECT THE USB POWER TO YOUR 770 AT THIS TIME.

2.USB Gender Changer (with an A-female connector at each end).
Officially, there is not supposed to be a purpose for these in the USB system. Nevertheless, they are sold on eBay, and you can sometimes find them in electronics stores. If you get one by mail order, you might have to straighten its ends with pliers, because they are not sturdily made and they are too cheap to be worth protecting in a mailing box. (Ideally, the Y-cable should have a female connector in place of the A-male data connector. Unfortunately, no such cables are available, and you have to attach the gender-changer there instead.)

3.USB Power Supply.
These are widely available nowadays as chargers for mp3 players etc. You can get a reliable wall charger for under $5, but then you will also need a USB extension cord to connect the charger to the power connector of your Y-cable. For a lot more money, you can get a compact portable version with lithium batteries. I would warn you not to make the same choice that I did (illustrated in the picture). I bought the most expensive one because it had the biggest capacity, and I hoped to use it for recharging Nokia phones and tablets, since the kit includes plug-in tips with Nokia connectors. Unfortunately, the Nokia connectors have voltage regulators that waste a large proportion of the stored energy, giving it disappointing performance as a charger. For USB purposes, a much smaller and less expensive version is all that you need.


While waiting for your hardware to arrive, you can make some more preparation.

Download this attachment [attach]host-texts.tar.gz[/attach] to your Documents or other folder of your preference. You can download directly to the 770 if you access this page on the MicroB browser. Tear and some other browsers refuse to download attachments from talk.maemo.org. If you are running OS2006, you will have to download first to another computer and then transfer the file. (Sorry, the attachment is down at the bottom of the post. I thought this thing with the square brackets was supposed to link it here. If someone can tell me how to link it here, I would be grateful.)

cd to the folder where you saved the download and expand the downloaded file with
Code:
tar zxvf host-texts.tar.gz
This gives you two Plain Text files: Activate-host-mode.txt and Restore-client-mode.txt. Even if you know all about writing and running scripts, keep the Activate-host-mode.txt file as a Note and do not delete the "sudo gainroot" line. There is a possibility of losing the onscreen keyboard if your system crashes while you are in host mode with a USB keyboard attached. This Note will enable you to recover the onscreen keyboard by copying and pasting (operations that do not need a keyboard).

(If you are comfortable with a Linux text editor, you can also adapt the texts into scripts. For this purpose, you would delete the "sudo gainroot" line, add an "exit" line at the end of each script, and run the scripts as root. This works much better than the copying and pasting method. You should still keep Activate-host-mode.txt handy for emergency use, though.)

Next, open X-Terminal and enter the following code:
Code:
sudo gainroot
cd /home/user/MyDocs
mkdir usb1
mkdir usb2
mkdir usb3
This will allow you to mount up to three USB storage devices. However, unless you have an extremely high-quality USB hub (or preferably a USB switch), you risk crashing your system when you mount more than two at a time.

THE BIG DAY.

When you have all your hardware and want to use host mode, do the following operations in this order (if X-Term is open at this time, close it now):

1.Attach the gender-changer to the cable's A-male connector that has the thicker piece of cable.

2.Connect the USB power supply to the A-male connector that has the thinner piece of cable.

3.Open the Activate-host-mode text file.

4.Click the menu symbol in the top left corner of the Notes page. Click on Edit -> Select all.

5.Again from the menu, click on Edit -> Copy.

6.Open X-Terminal.

7.Click the menu symbol on the X-Term page, then Edit -> Paste.

The cursor will start moving and then will pause for a while after insertion of the usbhid module. It will start again in a few seconds.

8.The cursor will come to a complete stop at the end of a line reading
Code:
echo "HOST MODE ENABLED"
You will have to tap the "return" symbol to continue. (This is a limitation of the copy-and-paste procedure. It fails to copy a final "return" in the text, and you have to make the return by hand.)

9.Plug the cable's mini-B into the 770's USB port.

10.Plug your peripheral device into the gender-changer.

If your device is an external keyboard, you can now use it. Be careful to unplug your keyboard while the 770 is still in host mode. If you fail to do this, you will lose the onscreen keyboard. If that happens, close X-Term, copy the Note as before, re-open X-Term, paste as before, plug in the USB keyboard, wait 10 seconds, unplug the USB keyboard, and your onscreen keyboard will reappear.

If you connect a USB storage device, you still have to mount it at the command line. First, you need to find the drive name that the 770 has given to your device. Almost certainly this will be sda1, but you had better make sure. Assuming that you are still root in X-Term, code:
Code:
dmesg
Look through the last ten lines of the resulting output. There will be a line that looks something like this:
[some numbers] sda: sda1

There could be something other than a letter a, for instance sdc: sdc1 . If your storage device has more than one partition, you might see something like:
[some numbers] sda: sda1 sda2 sda3

Whatever you find in the dmesg output, amend the following command accordingly:
Code:
mount /dev/sda1 /home/user/MyDocs/usb1
Now open File Manager. There will be a folder called usb1. Open it, and you should find the contents of your memory device. It is now part of your file system.

BEFORE UNPLUGGING YOUR MEMORY DEVICE, you must unmount it at the command line, as root in X-Term:
Code:
umount /home/user/MyDocs/usb1
or usb2 or usb3 if that is where you mounted the device..

To use the 770 as a peripheral device again, first unmount all attached USB devices (unplug keyboard, use umount command for memory device, unplug hub/switch), then unplug the cable from the 770.

At this point, you have a choice. Rebooting will return the 770 to peripheral mode. Alternatively, if you are still root in X-Term, you can copy the contents of the Restore-client-mode Note into the X-Term page and the 770 will be back to peripheral mode without rebooting.

Additional Notes:
(1)When you close the text files and a popup asks you whether you want to save changes, it is better to answer "No".
(2)When you open the file, you just see the end of the text. There are several "insmod" or "rmmod" lines higher up.
(3)If you are bothered by the large number of line breaks, you could remove some of them. The various operations of copying, tarring, transferring and untarring seem to have added more line breaks than I started out with.
Attached Images
 
Attached Files
File Type: gz host-texts.tar.gz (485 Bytes, 283 views)

Last edited by scaler; 2010-11-28 at 20:23. Reason: Tried again to display the attachment where it should be.
 

The Following 2 Users Say Thank You to scaler For This Useful Post:
Posts: 179 | Thanked: 47 times | Joined on Oct 2007
#12
It doesn't seem too hard, but if someone can make it into a simple program, then would be even better.
Thanks for the info.
 

The Following User Says Thank You to racky For This Useful Post:
Posts: 654 | Thanked: 664 times | Joined on Feb 2009 @ Germany
#13
Sorry if this is a bit OT, but does using the OS2008HE solve the wireless problem? My 770 is currently on OS2006, but I canīt see any wireless networks. The problem seem to be draft-n access points. As soon as a draft-n network is near, it wonīt see any wireless networks. How is it on OS2008HE? Do you have similar problems?
 
Posts: 4,030 | Thanked: 1,633 times | Joined on Jul 2007 @ nd usa
#14
Originally Posted by conny View Post
...My 770 is currently on OS2006, but I canīt see any wireless networks. The problem seem to be draft-n access points. As soon as a draft-n network is near, it wonīt see any wireless networks. How is it on OS2008HE? Do you have similar problems?
1st, it takes 'more power' and more time lag for a 2008He seeing a network, I have better luck everytime when it is plugged in.

2. For some reason, I always have to do it twice, then it will work. 2007He does NOT seem to have this problem. the 1st time, "no network available", the 2nd time it sees the network. Very strange, hey, but it will connect.

But, bottomline, you just have to do it one or two time, yes, it will see the network. And strange enough, at the same spot, same router, 2007He seems to catch on much easier and faster.

Hope this helps,

bun
 

The Following User Says Thank You to bunanson For This Useful Post:
Posts: 154 | Thanked: 73 times | Joined on Jan 2009 @ Toronto
#15
Originally Posted by racky View Post
......... if someone can make it into a simple program .......
There is a simpler and better way, using the 0xFFFF flasher. With that, you just have to write one line
Code:
0xFFFF -U 1
and then go through the special switching-on procedure that you use when flashing firmware. (The code varies slightly, depending on which version of 0xFFFF you use and where you install it. It could be ./0xFFFF.static -U 1 in a particular installation.)

The drawback is that 0xFFFF has to run on a different Linux computer (which could be another Nokia 770 already in host mode). Installation also requires a certain amount of Linux knowledge. I was trying to write a procedure that could be used on the 770 without any other computer, and I hoped to make it available to anyone who cared to take the trouble, even with minimal knowledge of command-line procedure.

The hardware requirements are the same with 0xFFFF, and also the use of command-line for mounting USB storage. These are characteristics of the 770. Command-line mounting of storage is not a bad thing. Linux distributions that automount storage have to include vast and complicated coding to prevent the computer from trying to automount devices that look a bit like storage but aren't. Such complications have not been worked out for the MUSB controller in N8x0. That is why N8x0 can not handle cameras etc. in a stable manner.

With host mode by 0xFFFF, you do not have to worry about losing your onscreen keyboard after a crash, because host mode persists after reboot.

@Bun, you have other Nokia tablets. You could run the version of 0xFFFF that qwerty12 has packaged for the IT's. A .tar.gz file for it is at the bottom of this post. You untar it somewhere in the Linux file-system, not in FAT/FAT32. (This is on your other IT, not the 770 whose USB mode you want to change.)

After untarring there will be a folder, and the actual 0xFFFF.static program is inside the folder. You will have to
Code:
chmod ugo+x 0xFFFF.static
and I would rename it to something shorter, like 0xFFFF without the .static.

To activate host mode, you switch off your 770 and attach it to the other IT. (The other IT must already be in Host mode or in OTG with the Host cable attached.)
cd to the folder containing 0xFFFF (assuming that you have in fact changed the name),
Code:
./0xFFFF -U 1
and then hold the Home button of the 770 while you turn it on, as you do for flashing firmware.

To switch back to peripheral, you would do the same, except that you use 0 (zero) instead of 1 (one).

Thanks to maacruz for drawing my attention to qwerty12's package.
Attached Files
File Type: gz 0xFFFF.static.tar.gz (50.4 KB, 280 views)

Last edited by scaler; 2010-07-13 at 20:49.
 

The Following 2 Users Say Thank You to scaler For This Useful Post:
Posts: 154 | Thanked: 73 times | Joined on Jan 2009 @ Toronto
#16
UPDATES to post #11:

(1) Anyone who downloaded the Activate-host-mode.txt and Restore-client-mode.txt files before I posted the .tar.gz file: please delete them and take the .tar.gz instead. The untarred files have a strong risk of corruption during the download. They may look OK, but then when you paste the text into X-Term your 770 will crash and reboot instead of entering host mode.

(2) Maemo Talk puts a "?" symbol in the URL of any attachment in a post, and for some reason the Tear browser and the pre-2008 Opera refuse to download from URL's containing that symbol. You can download directly to your 770 if you use MicroB. If you are running OS2006, you will have to download initially to some other computer and then transfer the file to your 770. Sorry, I hoped to make the 770 completely self-sufficient for this procedure, whatever OS was used.

(3) The large chunks of code in the original post have been replaced by text attachments, now tarred as mentioned in (1) above. (Even if the chunks of code had been left in, you still could not have copied them in OS2006. The browser does not let you highlight text on the page, and it did not even display all the code.)

(4) It was not entirely accurate to say that the procedure does not work in OS2005. The problem with OS2005 is that you have to use a flasher to become root. If you are in a position to do that, there is an easier and better way for you to enable host mode.

(5) A few comments were added in italics on 2010-07-15.

Last edited by scaler; 2010-07-15 at 15:02. Reason: Update (5) was added.
 

The Following 2 Users Say Thank You to scaler For This Useful Post:
Posts: 654 | Thanked: 664 times | Joined on Feb 2009 @ Germany
#17
Bun, thank you. I'll give OS2008HE another try
 

The Following User Says Thank You to conny For This Useful Post:
Posts: 179 | Thanked: 47 times | Joined on Oct 2007
#18
Another thing I like 2008HE is it has the SIP account, but 2007HE and 2006OS do not. I will try the 2008HE again.
 

The Following User Says Thank You to racky For This Useful Post:
Posts: 3 | Thanked: 0 times | Joined on Oct 2009
#19
Nice i bring my N770 with os2007he to work every day but mostly use it for videos and internet i been looking for a good calendar app to use as a notebook
 
Reply


 
Forum Jump


All times are GMT. The time now is 20:08.