Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex

Notices

Reply
 
Thread Tools Search this Thread
Old 05-22-2009, 12:45 PM   #1
scotsman
Enthusiast
scotsman doesn't litterscotsman doesn't litter
 
Posts: 32
Karma: 106
Join Date: Mar 2009
Device: irex DR1000S
USB host mode hacking

Hi there,

as we are still stuck without bluetooth and thus external keyboards, I want to inspire some joint effort to get the USB port into host mode. I think it is feasible. Below is what I could find out and tried so far:

1. Hardware: as wallcraft has already investigated, hardware-wise, we have two USB OTG ports which could be switched into host mode:
Quote:
Originally Posted by wallcraft View Post
Its a safe bet that as delivered the USB port won't work with a keyboard. The Freescale i.MX31L FactSheet mentions USB On-The-Go and 2x USB Hosts. So (a) it might be possible to reconfigure the USB for OTG (which would allow some keyboards to work), and (b) there is an unused "iPod-like connector" located at the bottom of the DR1000 (see Post #75). I'm not sure what "iPod-like" means, but if this is a USB port then it can probably be made to work with memory sticks and keyboards.
2. switching on the Nokia N8x0: works both via software and hardware (special plug): the software version addresses files that we don't have on the DR1000, so the OS are too far apart to simply use that solution. I faintly tried the hardware version by bridging pin 4 and 5 on the connector with a needle, and it had no effect. But this could be due to not having properly soldered it. Reference. http://www.harbaum.org/till/n800_usb/index.shtml

3. host mode on other freescale machines: http://www.mail-archive.com/uclinux-.../msg02473.html
For the host, we need the ehci-hcd kernel module.

4. what we have got: I wrote some scripts to play around with modprobe. Here the results: available modules (modprobe -l)
/lib/modules/2.6.24-irex/kernel/drivers/net/mii.ko
/lib/modules/2.6.24-irex/kernel/drivers/net/usb/usbnet.ko
/lib/modules/2.6.24-irex/kernel/drivers/usb/core/usbcore.ko
/lib/modules/2.6.24-irex/kernel/drivers/usb/host/ehci-hcd.ko
/lib/modules/2.6.24-irex/kernel/drivers/usb/gadget/g_file_storage.ko
/lib/modules/2.6.24-irex/kernel/drivers/usb/gadget/arcotg_udc.ko
/lib/modules/2.6.24-irex/kernel/drivers/usb/gadget/gadgetfs.ko
/lib/modules/2.6.24-irex/kernel/drivers/w1/slaves/w1_smem.ko
/lib/modules/2.6.24-irex/kernel/drivers/w1/wire.ko
/lib/modules/2.6.24-irex/kernel/drivers/w1/masters/mxc_w1.ko

active modules (lsmod): none. I suspect that there is some script running once you confirm connection to the PC which then loads the modules, and unloads them again when you disconnect.
When I load most of these modules, except ehci-hcd, and then try to connect to the PC, it does not work. I guess that the script runs modprobe --first-time, and then gets an error if the script is already loaded.


5. inserting modules: I can insert e.g. usbnet, and then get as active this one and usbcore. No problems, but no effect.
Inserting ehci-hcd has an effect, but not switching to host, but crashing the machine.
This happens both when I load the other modules first, and when I don't.

6. after a reset the list of active modules is empty again, and the PC connection works fine.

7. future investigation: it may be helpful to check some of the shell scripts in /etc for connecting to the computer. Maybe one can learn from there how to proceed. I have attached the complete output of ls -aR /

8. could someone port a terminal? Working with desktop links, redirected output and leafpad is horribly slow for trying out things.

This is as far as I have got until now. I think checking out the shell scripts used in the system can help us further. It would be just too lovely to get the thing working.

I hope you join and enjoy this endeavor!
Attached Files
File Type: txt DIRS-l_part1.txt (627.5 KB, 200 views)
File Type: txt DIRS-l_part2.txt (745.5 KB, 214 views)
scotsman is offline   Reply With Quote
Old 05-22-2009, 05:49 PM   #2
GEMITO138
Member
GEMITO138 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Feb 2009
Device: dr1000s
very interesting!!!!
GEMITO138 is offline   Reply With Quote
Old 05-23-2009, 12:38 AM   #3
PhishStyx
The me that I am
PhishStyx can extract oil from cheesePhishStyx can extract oil from cheesePhishStyx can extract oil from cheesePhishStyx can extract oil from cheesePhishStyx can extract oil from cheesePhishStyx can extract oil from cheesePhishStyx can extract oil from cheesePhishStyx can extract oil from cheese
 
PhishStyx's Avatar
 
Posts: 413
Karma: 1078
Join Date: Jan 2009
Location: In my house! Duh!
Device: Kindle 1 & DR 1000s
Quote:
Originally Posted by scotsman View Post
Hi there,

as we are still stuck without bluetooth and thus external keyboards,
Those BASTARDS@!!@
PhishStyx is offline   Reply With Quote
Old 05-23-2009, 02:06 PM   #4
omro
Addict
omro is on a distinguished road
 
Posts: 322
Karma: 64
Join Date: Nov 2008
Location: Hamilton, On
Device: Broke both my ebook readers, and bought an iPad. Couldn't be happier.
This is all very interesting, but why bother? My netbook cost much less than the DR, is actually not much bigger than the DR when it's closed and with the extended life battery lasts 5 hours. Don't get me wrong, I still use my DR, but why try and make a DR into a laptop?
omro is offline   Reply With Quote
Old 05-23-2009, 08:52 PM   #5
Grimulkan
Lord
Grimulkan has a complete set of Star Wars action figures.Grimulkan has a complete set of Star Wars action figures.Grimulkan has a complete set of Star Wars action figures.Grimulkan has a complete set of Star Wars action figures.
 
Grimulkan's Avatar
 
Posts: 177
Karma: 328
Join Date: Feb 2009
Device: Q1 (on way out), PRS505, DR1000S (dead :<), TC1100 (10'' perfection!)
Quote:
Originally Posted by omro View Post
This is all very interesting, but why bother? My netbook cost much less than the DR, is actually not much bigger than the DR when it's closed and with the extended life battery lasts 5 hours. Don't get me wrong, I still use my DR, but why try and make a DR into a laptop?
Opening up the USB port would open up unlimited possibilities, not just the mouse and keyboard. Having the internets on the DR is itself useful if you want to read something for a long while on an eink screen (such as going on a Wikipedia hunting spree). Hooking up a small USB keyboard (or a presentation tool which usually has 1-3 buttons) might let you flip pages etc. without using the stylus or nasty capacitive buttons. Musicians who use the DR for notes (for which it is simply great) currently have to stop playing to turn the page (or have someone do it for them), but a wired/wireless keyboard can double as a footswitch to change pages. You can stream out the Wacom data into your computer as you draw on the DR, which could be really great for artists because you have all the advantages of a Wacom drawing tablet and you can see what the drawing looks like on the DR screen as you draw (like the heavy, horrendously expensive and power hungry Wacom tablets, but better in all those respects). Just ideas.

Most of these uses revolve around:
1. The DR being small and lightweight without the clunkiness of having a flip out keyboard.
2. The Wacom pen.
3. The eink screen.

If there was a 10'' netbook out there with a twisty screen (to counter #1) and a Wacom pen, then alternative applications for the DR loses some ground. I don't know of one.
Grimulkan is offline   Reply With Quote
Old 09-06-2009, 10:09 PM   #6
Kent Walters
Connoisseur
Kent Walters has learned how to buy an e-book online
 
Kent Walters's Avatar
 
Posts: 79
Karma: 92
Join Date: Sep 2009
Location: Northern California, USA
Device: iRex DR1000S, Astak EZreader (Hanlin V3)
RE: scotsman’s post ‘USB host mode hacking’, here.

Dear scotsman,

Some months back, I opened a ticket with iRex’s tech support in an effort to get the specs and a pinout of the DR1000s’ ‘Function Extension Slot,’ with a belief that it contained a USB Host port. After several pleasant but unresponsive back and forths, I was told A.) that the mini USB port is ‘hardware limited’ to Peripheral only, and B.) that there is indeed a USB Host port in the ‘Function Extension Slot’, but that the specs were ‘for sale,’ and intended for ‘corperate’ developers. (I was somewhat taken aback, as iRex’s touting of the DR’s ‘Open Architecture’ was a factor in my buying decision--it seems to me that the ‘Function Extension Slot’ is a part of the ‘architecture’ that I paid for; am I wrong?) Anyway, I’m determined to hack in (and I have other reasons; see my Mobileread Introduction), and I have an o’scope; I can use usbview and a thumbdrive to find the USB data lines, if the USB port is active (‘on’).

I recently bought a DR1000s with a broken screen, just for hacking. I’m waiting for delivery from China.

I’m hoping that you, or someone, can come up with software to turn the DR’s USB ports ‘on,’ so the USB Data lines can be found; we could then determine which of the Host ports it is, and proceed accordingly.

Let’s figger this puppy out--interested?
Kent Walters
Kent Walters is offline   Reply With Quote
Old 09-06-2009, 10:23 PM   #7
Floeee
Groupie
Floeee began at the beginning.
 
Posts: 179
Karma: 10
Join Date: Aug 2009
Location: Vienna
Device: iRex DR1000s *returned* / Sony PRS-505 *returned* / Asus eee PC t91
woow, this is getting more than interesting ^^

is it possible to use a keyboard on the iliad??
im just awaiting my DR to arrive, but what kind of usb port are you talking about? the mini usb or does the DR also have something like an usb hub on the iliad
Floeee is offline   Reply With Quote
Old 09-07-2009, 12:02 AM   #8
Kent Walters
Connoisseur
Kent Walters has learned how to buy an e-book online
 
Kent Walters's Avatar
 
Posts: 79
Karma: 92
Join Date: Sep 2009
Location: Northern California, USA
Device: iRex DR1000S, Astak EZreader (Hanlin V3)
Floeee;

I don't know about the iliad...

The DR's mini USB port cannot be used as host; there is a USB Host port in the ‘Function Extension Slot,' but iRex is keeping tight lipped, we have to figure out to access it; when that happens... Wifi, bluetooth, USB drives, keyboards, cup warmers and bells and whistles of your own choosing will all be available--Just don't count on it happening soon...

Did that help?
Kent Walters
Kent Walters is offline   Reply With Quote
Old 09-07-2009, 01:37 AM   #9
allovertheglobe
Grumpy Old Man
allovertheglobe is no ebook tyro.allovertheglobe is no ebook tyro.allovertheglobe is no ebook tyro.allovertheglobe is no ebook tyro.allovertheglobe is no ebook tyro.allovertheglobe is no ebook tyro.allovertheglobe is no ebook tyro.allovertheglobe is no ebook tyro.allovertheglobe is no ebook tyro.allovertheglobe is no ebook tyro.
 
allovertheglobe's Avatar
 
Posts: 260
Karma: 1364
Join Date: Jul 2006
Location: L.A., Euro ex-pat
Device: Kobo, Nook Classic,Color,ST/Glow, iRex DR1000, Sony 505, REB1100&1200
How about the physical aspect? Even if we were willing to do a bit of soldering, what generic connector would fit that expansion slot?
allovertheglobe is offline   Reply With Quote
Old 09-07-2009, 11:35 AM   #10
scotsman
Enthusiast
scotsman doesn't litterscotsman doesn't litter
 
Posts: 32
Karma: 106
Join Date: Mar 2009
Device: irex DR1000S
Hi folks,

this sounds promising, thank you for your eagerness. I am currently away from my main pc and dr1000, but intended to spend the next week of my holiday with this issue. Here are some thoughts:
1. hardware: the dr1000 manual warns that the iliad connector fits but will damage the dr1000. I guess the damage is because of different pin uses, not the form factor. Thus the iliad plug could be used to connect to the extension slot.

2. activation of usb port: the ehci module shipped with the device does not support the port selector function that is docu;;mented by freescale (reference to follow). I saw this when I modprobed correspondingly and then read the error in dmesg. Thus I guess that irex ships an outdatd driver.Idea: compile freescale's new driver and replace old one. then we could selectively activate ports, and then test the connector pins. it may be that the crashes are caused by unselectively activating host on the ports, the freescale manual speaks of that.


3. call dmesg and read the output. it talks of deregistering the usb port, and that this should not happen. i guess that the mini usb is host disabled only by software, but i may be wrong. someone with an open device could check how the pins are connectd to the processor, and compare the specs of freescale.

So far from me, sorry for the style, it is typed from a nokia N810 (where usb host works fine). I am excited about your interest, and look forward to further work on this matter.
scotsman is offline   Reply With Quote
Old 09-07-2009, 10:27 PM   #11
Kent Walters
Connoisseur
Kent Walters has learned how to buy an e-book online
 
Kent Walters's Avatar
 
Posts: 79
Karma: 92
Join Date: Sep 2009
Location: Northern California, USA
Device: iRex DR1000S, Astak EZreader (Hanlin V3)
Ohh Kaaay, responding to scotsman;

1. The male connector for the Function Extension Slot has been identified; Cypres Industries A21-567-2001, a 20 pin solder type connector. The part number and a source are posted in the Mobileread forum somewhere—I’ll look it up later, and give kudos here. The iPod connector is the same except that the two slots in the top of the metal shell are a diferent distance from center, (I will use a Dremel w/a diamond saw to hack one, but I don’t recommend this, as it will still fit an iPod). I think the iliad’s travel hub is a cheap enough source, but be sure to remove all the wires from the plug (including and especially any jumpers under the shell) before inserting it into the DR.

Everyone, Please Note: In one of the forums, someone said that he tried to force an iPod connector into his DR--this is a BAD IDEA; the iPod (and possibly the iliad and DR) use jumpers inside of the connectors to signal the device as to the type of connection being made: on the iPod, for example, whether it is connecting to USB or FireWire. (The use of connectors with many more pins than a user can use also suggests that the same port on the device is also used for service testing, and it is not unlikely that a battery hot (+) is there.) Fitting a plug configured for another device might easily ruin something. (Stepping off the pulpit, and back on topic)

2, 3. iRex said that the DR’s mini USB port is ‘hardware limited’ to peripheral only. Freescale’s tech spec says, “Freescale’s i.MX31 and i.MX31L integrate one High-Speed USB On-The-Go port for connection to a PC or PC peripherals without PC involvement, plus one high-speed USB host and one full-speed USB host for interfacing with peripherals such as Wi-Fi®, Bluetooth® and cellular baseband.” (Italics added) If Freescale’s On-The-Go Port is the DR’s mini USB (most likely), then iRex’s claim is accurate, and that port cannot be Host enabled. It is no help that nobody seems to use the same language to describe their hardware, or the same language that the USB spec uses.

I had thought to use usbview, on the iRex (it would have to be compiled for the Freescale chip), but I don’t know if it would even run on the DR? Might we be better off going to OpenInkpot to do all of this?

Magic is afoot,
(I heard that somewhere, butI don’t think they meant my feet.)

Have fun,
Kent Walters

Last edited by Kent Walters; 09-07-2009 at 10:33 PM. Reason: typos
Kent Walters is offline   Reply With Quote
Old 09-08-2009, 07:18 AM   #12
scotsman
Enthusiast
scotsman doesn't litterscotsman doesn't litter
 
Posts: 32
Karma: 106
Join Date: Mar 2009
Device: irex DR1000S
Dear Kent,

thanks a lot for all the information. One correction: USB on-the-go (OTG) means that the port can operate as a device (as usual) *and* as limited power (some 100+ instead of 500 mA) usb host. Thus irex claim that the mini usb is liimited to device mode seems imprecise at best, except if they messd with the cables inside, e.g. to power the battery directly without connecting via the cpu (no idea if the cpu also charges the battery, or needs to be circumvented to do a usb charge).

The otg host mode can be software switched, as on the Nokia N8x0 series. The power is enough for thumb drives and most keyboards, everything else needs to run over a powered external usb hub. For most purposes of the DR1000, the otg would be enough, and it can do without soldering and new plugs.
In either case, the challenge is the software, as modprobing the shipped usb host driver crashes the machine. It only makes sense to solder plugs if the respective kernel can at least be loaded without trouble.

Does anyone of you have a running developer kit to do the compilation?

scotsman
scotsman is offline   Reply With Quote
Old 09-09-2009, 12:21 AM   #13
Kent Walters
Connoisseur
Kent Walters has learned how to buy an e-book online
 
Kent Walters's Avatar
 
Posts: 79
Karma: 92
Join Date: Sep 2009
Location: Northern California, USA
Device: iRex DR1000S, Astak EZreader (Hanlin V3)
Dear scotsman,

Aha! This is what I was talking about when I complained about companies not using the same terminology in the same way regarding usb. iRex does not call the mini USB port on the DR an OTG port--The USB port on the DR is not an OTG port (because the device is portable, and contains a USB port, does not make it an OTG device), according to usb.org:

USB embedded hosts and multiple recepticals.pdf found at http://www.usb.org/developers/docs/EH_MR_rev1.pdf

“3.4 On-The-Go Device
An On-The-Go device contains a single Mini-AB recepticle that will function either as a host or a peripheral. An OTG device defaults to acting as host when a Mini-A plug is inserted, and defaults to acting as peripheral when a Mini-B plug is inserted. The Host Negotiatition Protocol (HNP) allows these roles to be changed.” (Italics added)

The DR does not contain a mini AB recepticle; it is a mini B, and while a hacker could easily configure it to function as a mini AB (assuming that it is wired to the Freescale OTG port), I consider that to be a bad idea, for several reasons (unless you want to know, I’ll spare you the details)--one is the HNP. The spec also says that an OTG device may not contain multiple USB ports, and iRex has included two, even if they won’t tell us where the other one is.

Before I first contacted iRex regarding the DR’s USB, I connected a flash drive; I tried using adapters, wires, and even a powered hub, in every way I could imagine. You are correct in that the DR does not power the port, but applying power to the port will, I think, run us headlong into the Lithium Ion Polymer battery’s power management/charging circutry, and confuse the logic of the DR. (I doubt that Freescale includes charging circutry on their chip; too many variables. Power management and charging for Li-Ion-Poly batteries is very different than other battery types, and has very stringent requirements (see: http://www.batteryspace.com for more info), and Freescale’s chips are used in all manner of devices, with all kinds of power supplies.)

For these and other reasons, I think finding the USB port in the Function Extension Slot is the way to go, someone can make adapter cables for those who are unable to, or unsure of their abilities, I will post a how-to as soon as we figure it out. It will only require the female end of a standard A type USB extension cable and the 20 pin plug mentioned earlier in the thread.

Man! I thought you were the software guy! I haven’t played with Linux since the Berkely Distro (15+ years ago, SCO before that), and I haven’t really done any programming for the last 10 years; I sure ain’t the guy! I did consider installing the iRex developer package on my Mac, but, frankly, with my rusted-out skills, the idea of running a virtual machine inside of a virtual machine is a little daunting--I’m hoping someone will compile a Freescale VM for BSD (found underneath Apple’s OSX), so I could run native. Sorry. (I always look for Mac binaries--failing that, I do without.) I’m prety good with hardware.

Still waiting for my package from China--that will answer a lot of questions.

Take it easy,
Kent Walters
Kent Walters is offline   Reply With Quote
Old 09-09-2009, 07:07 PM   #14
Kent Walters
Connoisseur
Kent Walters has learned how to buy an e-book online
 
Kent Walters's Avatar
 
Posts: 79
Karma: 92
Join Date: Sep 2009
Location: Northern California, USA
Device: iRex DR1000S, Astak EZreader (Hanlin V3)
Connector Update

The link about the 20 pin connector for the Function Extension Slot, that I mentioned earlier, is actually on the iRex Forum, here:

http://forum.irexnet.com/viewtopic.php?p=2501

Kudos to all concerned.

To allovertheglobe, and anyone else interested; as I said above, it will only require soldering the proper wires of the female end of a USB extension cable to the proper pins on the 20 pin plug (and perhaps a pin to pin jumper or two) to make the USB Host adapter cable--once we have determined which pins on the DR to use.

I have other reasons to go inside of my DR, hacking wise; see my Mobileread Intro. If anyone is interested in any of that, let me know, and we'll start another thread.

Kent Walters
Kent Walters is offline   Reply With Quote
Old 10-27-2009, 01:27 PM   #15
scotsman
Enthusiast
scotsman doesn't litterscotsman doesn't litter
 
Posts: 32
Karma: 106
Join Date: Mar 2009
Device: irex DR1000S
USB Host Mode Modules: How to Compile?

Hi there,

sorry, it took me forever to get back on that issue.

The software side of enabling USB host seems to boil down to kernel modules. Now the DR100 ships with ehci-hcd.ko, which is a host mode driver. However, insmod ehci-hcd crashes the device.

The device emulator comes without the driver, so I could not test it there now (also, what would it do without the physical interface?).
However, the complete irex source code (linux-er...) contains a whole lot of different usb drivers (/trunk/drivers/usb/host/), and the documentation (/trunk/Documentation/usb/) explains that among these are dedicated freescale drivers for activating only one of the ports in host mode (which, if Kent is right, is what we need if the mini usb is really physically blocked from operating as host (e.g. if the power pins are not connected to the cpu, but to some battery circuit instead)), as well as instructions which modules to use if ehci-hcd does not work.

The thing to do now, then, would be to get these modules compiled for arm architecture. However, I have no real idea of how to go about it (write my own makefile, or compile the whole kernel and say "yes" to the relevant options? - if have not managed to get the kernel compile for arm isntead of x86).
Once we have the modules compiled, I could easily make a set of desktop shortcuts and shell scripts to test them on the actual device.

So we would either have to wait for me to find out that probably trivial detail, or some more able programmer who knows how to do the compiling. Any volunteers?

Correction: the relevant file is /trunk/drivers/usb/host/KConfig, where you can see all the options that presuambly are there for Kernel compilation. It includes options for enabling host mode for *both* usb ports even.

So I assume that the way to go is to compile the kernel and thereby play around with the different options. The question, however, is whether modifying the options just affects the modules (which we can then just insert), or changes something else so that we would have to reflash the kernel (which I would like to avoid).

Last edited by scotsman; 10-27-2009 at 01:46 PM. Reason: correction
scotsman is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
302 USB host mode, or: WOW! Serif PocketBook 5 06-10-2010 05:35 AM
Question about using it in USB mode ficbot Amazon Kindle 3 01-13-2010 06:44 PM
USB Host Mode? brecklundin PocketBook 2 11-19-2009 02:49 AM
Host USB? fargo iRex 6 05-05-2008 05:36 PM
iLiad USB hacking arivero iRex Developer's Corner 0 07-19-2006 11:30 AM


All times are GMT -4. The time now is 03:49 AM.


MobileRead.com is a privately owned, operated and funded community.