yashsingh1/xdaforums huggingface dataset:
[Nexus One General] rumborak:
I'm a new member, the forum doesn't let me post links yet :cool:

www_amazon_com/Cables-Unlimited-Micro-Cable-Meter/dp/B000UNKGHY/ref=sr_1_1?ie=UTF8&s=wireless&qid=1275926558&sr=8-1

Ooh, I see. The hub chip is not powered by the N1 itself?

Or would this also get activated with the power API call?
[Nexus One General] sonic74:
This won't fit, look at the photos.
[Nexus One General] rumborak:
Hmm, now that I realize that the dual power cable is strictly needed, I guess it makes sense that you'd need a female USB plug on that end. I was hoping I could go straight from the OTG micro-A to either a hub, or directly to the device.
[Nexus One General] bipolarben:
Android on external monitor?

Would it be possible to run the android interface on an attached usb external monitor?
[Nexus One General] sonic74:
There are gender changers.

This one is more difficult: You need a Micro B plug.
[Nexus One General] sonic74:
At least it would be possible to mirror the phone screen by copying /dev/graphics/fb0 to /dev/graphics/fb1 periodically.
[Nexus One General] pikipirs:
That's what I would love, being able to connect my phone to a TV or a pocket projector. How fast do you think mirroring would work? Order of 5, 15 or 50 fps? I've been meaning to test the fps speed of just copying from fb0, but it's a busy time, exams at college and all.
[Nexus One General] sonic74:
5.

Looks funny, framebuffer pixelformats don't match :rolleyes:
[Nexus One General] bipolarben:
That's a strategy but I'd rather see it use the full resolution of the external monitor. To be honest, I want to use this to dock the phone into a custom tablet. :)
[Nexus One General] Gr8gorilla:
The possibilities for this are endless. If it can work and have device mode working too.

You could have a sort of custom tablet that you plugged the phone into turning it into a sexyNexyPad. That would be awesome and would really be an interesting device.

If for say 150$ you could turn your Nexus into a pad, then you could have the best of both worlds.
[Nexus One General] sonic74:
I made a Java Class so you can use the framebuffer from the Android framework. It's on the website.
[Nexus One General] toellby:
Is there a chance to get this working on other Android Devices like HTC Desire?

It will be great...
[Nexus One General] homelessbrian:
any chance of being able to use the droid incredible tv out cable with this? I would love to be able to output movies right from my phone to any tv.

http://shop.htcpedia.com/index.php?dispatch=products.view&product_id=875&compability_product=757
[Nexus One General] hugonz:
No. It's not USB, but is instead raw analog video on the same connector. The N1 does not have the necessary internal wiring for this to work.
[Nexus One General] rumborak:
Sven, do you foresee any problems if one were to custom-build a connector

Female A plug -> Male Micro B

with an external 5V power supply (e.g. battery) spliced into the appropriate leads?

Correct me if I'm wrong, but the hub is really just there for a) powering the N1 host chip and b) providing a convenient means of attaching more than one device, correct?
[Nexus One General] sonic74:
No.

Btw., I got a nice battery today.

a) The host chip is powered by the N1, which is powered by the hub :)

b) Exactly.
[Nexus One General] Kermee:
I ordered one of these from HK earlier in the week:

http://www.dealextreme.com/details.dx/sku.34205

There's two miniUSB ports on the dock. One for USB and one for USB-power only. Included is a 1500mA 5V AC adapter.

Found a USB OTG miniUSB-A to USB Type-B that'll plug directly into a USB hub.

I think I'm set.

Cheers,

Kermee
[Nexus One General] rumborak:
Yikes, that comment leaves me scratching my head again!

Are you saying the USB power supply charges the battery, which in turn powers the host chip? Or is the battery totally outside of this?

Mann, eigentlich sollte ich ein bisschen mehr Plan haben als E-Techniker!
[Nexus One General] sonic74:
In my setup it serves three purposes:

Power the hub chip through the dual power cable

Power the USB devices

Charge the N1

I thought the power from the AC adaptor power plug is enough for the hub since last autumn, and that I don't need the dual power cable to power the hub chip. I would have succeeded with host mode much earlier otherwise :rolleyes:
[Nexus One General] sonic74:
Mind though that the miniUSB-A won't plug into the dock. It has miniUSB-B sockets.
[Nexus One General] rumborak:
Splendid, I got mine running. Typing on the Nexus 1 with an actual keyboard is fun! :)

BTW, I wasn't able to mount an external SD card. I take it because it's formatted in FAT?
[Nexus One General] sonic74:
My USB stick is formatted in FAT, too. But it takes some seconds for usb-storage.ko to enumerate the partitions.
[Nexus One General] rumborak:
Hmm, I have to look more into it.

BTW, I didn't go the hub route, but instead created a cable that goes from micro-B to male USB A, with a power supply spliced in in parallel. Currently that power supply is from a USB hub, but the final version will probably run off a battery.
[Nexus One General] sonic74:
perhaps

dmesg

knows more...
[Nexus One General] rumborak:
BTW, any chance to regain ADB over USB, or is this gone for good with this mod? I see you mention ADB over WiFi, but can you convince Eclipse to go that route instead of the regular USB?
[Nexus One General] sonic74:
Eclipse connects to the local adb server, which in turn connects over WLAN to the adbd on the N1.
[Nexus One General] Kermee:
Oops! Good catch. Thanks for the heads up.

I've got the other OTG cable coming that you suggested so that'll work =)

Cheers,

Kermee
[Nexus One General] sonic74:
I corrected the mount command on the website.
[Nexus One General] royalcs:
anybody tried to use an usb soundcard? would it be possible?
[Nexus One General] rumborak:
Actually, turns out that after the installation of the zImage, Wifi no longer works, at least on my phone (just says "Error" in the menu option). Could it be that the module isn't loaded by default?

EDIT: Hmm, trying to manually load the bcm4329.ko gives me an "Exec format error"
[Nexus One General] sonic74:
By default, Android loads /system/lib/modules/bcm4329.ko . You have to backup it and copy the version from the archive to this location.

I have read that this should work. I updated all the files today, perhaps try again with them.
[Nexus One General] rumborak:
Haha, nice update on the page :D

BTW, anything new in the files you updated today?
[Nexus One General] rumborak:
Hmm, so I got a soundcard recognized by the USB driver (w00t!), and it nicely created a /dev/snd/ for me. Only problem now, how on Earth do I access this from within the Android framework? Seems one would have to write a middle-layer Linux app that would directly interact with the ALSA layer and then pass data out.

An easier one would be to use OSS emulation (that way one could just access /dev/dsp), any chance you have those modules lying around? :D (I believe they're called snd-pcm-oss and snd-mixer-oss)
[Nexus One General] sonic74:
I wondered about that, too. Android seems to somehow support ALSA, but I don't know the internals yet. There's even an ALSA driver for the QSD8x50 in the codeaurora tree, but as always it's hard to integrate into the N1 tree.

Here you go, I updated the files again.

Keep us informed how it's working!
[Nexus One General] sonic74:
I used it to receive TV, see the video.
[Nexus One General] Kermee:
Impressive! I was going to try to do the same thing with an ATSC tuner here in the States. I'm aiming to see if at least the multicast 480i channels work. Not holding my breath for 720p/1080i support without access to some of the APIs that Qualcomm has.

Cheers,

Kermee
[Nexus One General] cartoonmonkey:
If any of you have pictures or plans of your nice battery powered small connectors / docks you've made, I'd like to see them!
[Nexus One General] rumborak:
Hmm, the USB audio cards are giving me a lot of trouble. I have tried a good number of them by now, but none of them works properly in full duplex mode. The fact that different cards show different amounts of capability (even though under Windows they all work perfectly fine) seems to indicate to me that it's the Linux USB audio module that's causing the trouble. Or the OSS emulation, one of the two.
[Nexus One General] KeiAiAm:
Sorry if I'm just bumping into here, but I'm kinda new to Android and I just got a small question to make my mind clear again as I'm a little confused right now :S

The kernel is basically the core of the whole Android OS right?

So if I'd download the (precompiled?) files you provided, they would basically overwrite my 2.1 kernel? Would there be any problems with the "rest"? What is basically next to the kernel?

Hope you can help me out

Greetings
[Nexus One General] sonic74:
An Android device has two "cores": the kernel and the Android framework.

I recommend you use

fastboot boot zImage

to test it. After the next reset, your original 2.1 kernel is active again.

Maybe, since my binaries are for Android 2.2
[Nexus One General] KeiAiAm:
Ok thanks for your quick response, I think I get it now.

Just one last question: The file your providing for download is the Kernel right?
[Nexus One General] rumborak:
Well, there's also the modules, if you want to count that into the kernel.
[Nexus One General] roastlechon:
Could this work?

http://www.amazon.com/dp/B003HHK58U...e=asn&creative=380341&creativeASIN=B003HHK58U

I have an external usb hub already, but it has mini-usb instead of micro-usb upstream port.

So same concept:

HUB

HUB is the hub for visual text explanation :/
[Nexus One General] sonic74:
I think so.

I haven't seen a hub with a micro-usb upstream port yet.

I posted a photo on the bottom of the website to make the wiring more clear.
[Nexus One General] roastlechon:
Doesnt the hub you use use a micro-usb upstream port?
[Nexus One General] sonic74:
No, two of them use a B socket and one of them an A plug. The only component with a micro-usb plug is the OTG cable.
[Nexus One General] Chopes:
Hrm, did you end up having success with that product?
[Nexus One General] roastlechon:
Not yet, they are shipping now though, so hopefully Ill get it up before the end of the week. Ill post the results here.
[Nexus One General] tocixxx:
Hi !

I found this and today i will try to implement my first kernel patch ever ;)...

I will try to integrate your mods in the actual cyanogen kernel and i´ll try to get this working on a G1.

I just have one question about the setup.

As far as i understand the N1 does not supply the necessary voltage over USB.

That´s why you use an active USB hub right ?

Would it be possible, if you use a USB-hardware which does not rely on bus power, to use it without the hub ? or does the controller chip in the N1 need the power supply ?
[Nexus One General] sonic74:
Right.

Not without providing power to the device's Vbus pin.

A hub chip is definitely powered by the uplink port Vbus pin. And it seems every other device, too: I just tried to plug in my self-powered printer, it's not recognised.
[Nexus One General] tocixxx:
OK, I see

Seems like to voltage on the VBUS-Pin is like a "remote" control for the attached devices, even if selfpowered...

Hmm,... quite a disadvantage in the usability...

anyway.. I`ll try to apply the patch anyways and sort out the errors.

Did you see, Andrew de Quincey, has made a lot of improvements to his implementation ?

I took a look at the new patch and this incooperates a lot more work...
[Nexus One General] sonic74:
Do you mean the function/gadget framework? I don't have a need for this. I documented substitutions over TCP/IP on the website.
[Nexus One General] pikipirs:
Not all USB hubs need power on the host cable...

I have Trust HU-5870V 7-port USB hub and it has power in the host cable when it's connected to the power adapter. I know this because my notebook (when the hub is connected to it) is half-alive even if the notebook itself doesn't have any power. Stuff like wifi/bluetooth light and dvd-rom are turned on (dvd tray is ejectable), and if I unplug the USB hub, they turn off.

I just received the OTG cable today and I tried it with this hub. It doesn't need any additional cables, apart from power block and the OTG cable. No dual-power USB cable needed. The nexus is charging when connected over OTG.
[Nexus One General] sonic74:
Perfect for the Nexus One, but isn't this extremely dangerous with PCs? Both the hub and the PC providing power to Vbus, isn't that a short circuit?

Nevertheless, I ordered one.
[Nexus One General] ManticoreX:
Great job with this. I am planning on trying to set this up soon, but I have a quick question. On your webpage you have

Could you explain this step a little more. Do I need to use a PC to enable this every time or can this step be done directly on the phone. My plan is to be able to have a usb keyboard I could use with the phone anywhere for taking notes, writing documents etc.
[Nexus One General] sonic74:
There I describe how to substitute the USB client mode. This is only neccessary if you want to use adb or access files on the phone from the PC.

The steps for keyboard support can be started by a small script that you start with ConnectBot on the phone.
[Nexus One General] ManticoreX:
Oh I think I understand now. With your patch the nexus one will be in host mode, so accessing the files by connecting the usb from PC to phone will not work traditionally so these are workarounds.

Great, I look forward to getting my cables and giving it a try!
[Nexus One General] pikipirs:
The polarity in the host cable is reversed (as it should be) so it doesn't produce a short circuit. The only problem would be if the two devices had different grounds (like from two sockets that come from two different power sources, for example power plant and solar).

I would imagine this would be dangerous for the notebook though, seeing as how the hub makes it being powered in some sort of frankensteinish mode where half of the motherboard is (under)powered and half of it is without power.

In any case, no danger to our Nexus.
[Nexus One General] sonic74:
Short circuit was the wrong term, but wouldn't it be a problem if the two voltages weren't exactly the same, which they won't be? There will be a potential gradient which will lead to current flowing, won't it?
[Nexus One General] pikipirs:
I guess it's not a problem. My notebook didn't blow up yet :)
[Nexus One General] ManticoreX:
Not sure if anyone has asked, but what keyboard is that in your video. It seems to be about the size I am looking for.

***.adesso.com/en/home/keyboards/142-akb-110b.html looks similar.
[Nexus One General] sonic74:
I successfully used the plugable UD-160-A. Very Linux-friendly company, the CEO is engaged in the DisplayLink open source driver development.

You only need 1 USB downstream port to power the USB OTG cable.
[Nexus One General] sonic74:
At least not on this website ;)

It's a Keysonic ACK-3400 U.
[Nexus One General] ManticoreX:
Thanks for your help. I ended up ordering the keyboard I linked, and the cables to set this up. When everything gets here I will post my setup (which will hopfully work)
[Nexus One General] sonic74:
I can't believe it: I just tested my TiVECO TM-UH710 and it does the same! I'm baffled :confused:

But certainly perfect for the Nexus One :)
[Nexus One General] roastlechon:
Hey guys!

I got mine working! I'm typing on my phone using a wireless keyboard! Lololololol.

The keys that don't work are the numpad keys, caps lock, and a few keys are used for sleep button, navigating, etc.

@sonic74 What is the issue with WiFi not working when this mode is activated?
[Nexus One General] roastlechon:
Yep! Works really well!
[Nexus One General] sonic74:
Backup and replace /system/lib/modules/bcm4329.ko .
[Nexus One General] pikipirs:
Say one would create random images (two scenarios: a simple animation like a ball bouncing around the screen, or a complex animation like random noise) and would feed them to the displaylink usb adapter.

What would the max FPS be? How about under the lowest possible resolution (I guess that would be VGA) for the external display?

I'm asking because I'd like to buy an adapter, but since I live in Europe, those are ridiculously pricy (almost twice the price as in the U.S.) and I have to be convinced that it will be a wise investment.
[Nexus One General] sonic74:
Depends on the technique:

de.killig.Framebuffer.java: Easy to use, but much touching and copying bits around. Enough to display content with low refresh rate.

/dev/graphics/fb1: Faster through memory mapping. X11 usable.

libtubecable: Even faster with huffman coding. Watching TV on 800*480 possible.

Original Windows driver and DL-1x5: Fastest with the new DL 2+ compression. Supposedly HD video capable.
[Nexus One General] sonic74:
I paid $130 for the first released DL-195-based adapter. Now the HIS Multi-View II is available for 60 €.
[Nexus One General] Dan2552:
I got this working with a friend's USB keyboard. However, my Apple keyboard (small thing, no numpad) doesn't seem to work. Any ideas, are there more modules I need to load other than usbcore.ko ehci-hcd.ko usbhid.ko ?

edit--

perhaps it's because the keyboard acts as a USB hub as well (it has 2 female USB ports)?
[Nexus One General] sonic74:
See below.
[Nexus One General] sonic74:
I updated the files. Try

insmod drivers/hid/hid-apple.ko
[Nexus One General] Dan2552:
Fantastic. Works great.

(Ha! Even the volume buttons work)
[Nexus One General] nurre:
I saw you had linux running in 1920x1200 and had some stability issues. Have the been solved?

I got a bunch of iphones at work, I'd love to skip carrying my laptop one day, boot up linux on my phone and work from that. I'm not too worried about maxing the resolution, but I'd need enough resources to run firefox/chrome + fuse and a text editor editing files on a remote server. Would be WAY cool ;)

Same thing bringing a small box for tvout to client meetings and running demo's off it. Would be incredibly neat !
[Nexus One General] sonic74:
I updated the drivers and just started LXTerminal, PCManFM, Iceweasel and gedit. Works quite well. 184 MB RAM free.
[Nexus One General] TommyPickles:
Powered USB device

Can someone confirm whether the following USB Powered Board device would hypothetically be possible to power devices to attach to the Nexus One (ala. configuration shown in demo)?

13 Port Powered USB Hub Manager

See: http://www.catchoftheday.com.au/smallfish_info.php?products_id=4724

It features:

Power Voltage: +5V ~+/- 5%

Current: 45mA (USB cable power) Max 3A (AC/DC power)

Interface: USB 2.0 and backward compatible with USB 1.1

13 USB ports with individual power switches

I ask on behalf of other Melbourne, Australia residents as at $29.95 its a steal.

Cheers

Leon
[Nexus One General] sonic74:
Every powered hub should work. The only question is whether it provides power to the upstream port. If not, you need additionally a dual power cable.
[Nexus One General] brosenbaum05:
Moto Droid VGA output

So would I be able to:

1. Root my Moto Droid and install Android 2.2 Froyo

2. Attach Droid to VGA monitor (through a USB->VGA DisplayLink converter)

3. insmod the modules @sonic74 has listed under Framebuffer on his website

4. Run the Framebuffer Android project that is listed

and that would display an image from my Andriod phone onto the monitor?
[Nexus One General] sonic74:
No, the modules are for the Nexus One. For the Droid, no special kernel is needed, I believe. If you insert a certain dongle at a certain time, it automatically goes into host mode. You then only need modules fitting to the running kernel, perhaps a kernel, too, if the modules require APIs that are absent in the stock kernel.
[Nexus One General] rumborak:
So, I've compiled my own kernel with your patch and installed it (woot!), but also futzed around with getting the internal USB power supply going. I changed the following line in ehci-msm7201.c :

ehci_port_power(ehci, 0);

to

ehci_port_power(ehci, 1);

I get a nice

but when I actually plug in devices (e.g. a USB keyboard), nothing is happening. Any ideas, or am I supremely naive here on how to activate the VBUS power?
[Nexus One General] sonic74:
This output is also there without your change.

You used the standard EHCI API. I think there's more neccessary on the N1.

In the kernel tree at codeaurora.org look for the RPC stuff called msm_hsusb_vbus*. Andrew de Quincey looked at it a bit.

A word of warning, though: You're going to control the power regulator. You could fry your N1.
[Nexus One General] rumborak:
Oh, I know :)

I'm not doing this on my own N1. I'm working with a couple of N1s through work, and I got the official get-go from my boss. If one dies in the process, so be it.

I'll try to get into contact with Andrew, see what he has. Of course, if you got some code lying around you think would do the trick but scared to try, shoot it over to me and I'll give it a go.
[Nexus One General] sonic74:
No code, but some further information: the power management chip is a PM7500.

Some interesting code bits may be found by

git clone git://codeaurora.org/quic/kernel/bryanh/linux-2.6.31.y.git
rgrep "msm_hsusb_vbus" *
[Nexus One General] cbfalex:
is it possible to use this on a windows-mobile phone with usb-host-function like the

tg01? i am desperately looking for a usb2vga-adapter which works with wm6.5...
[Nexus One General] sonic74:
You'd have to port libtubecable.
[Nexus One General] cbfalex:
what is "libtubecable", never heard about! unfortunately your link doesn't work...
[Nexus One General] sonic74:
An open source library for DisplayLink devices.

libtubecable at GitHub
[Nexus One General] rumborak:
Hmm, no luck with any of the changes I made to the kernel. My most promising attempt was to change

arch/arm/mach-msm/board-mahimahi.c

and copy the code that activates the "power rail" for the video chip, changing the power rail index to that of the USB components (which I found elsewhere). No change in behavior though. Hell, for all I know the power rails might not even be attached physically; after all it doesn't make much sense for a cell phone to try to drive USB devices.
[Nexus One General] roastlechon:
The mod breaks with CM6.. :\

Anyone facing that same issue?

When I boot, lots of errors pop up.
[Nexus One General] ManticoreX:
I'm trying to set it up now with CM6, I'll let you know how it goes. Did you boot the precompiled image, or did you compile it yourself?
[Nexus One General] ManticoreX:
Well I ended up messing up my CM6 install and had to reflash. I compiled the kernel from source using the CM6 kernel from github (hopfully I did it correctly), but when I fastboot boot zImage it hanged on the X with the unlocked padlock below it. Maybe I was impatient, but pulled the battery. I then had problems trying to get back into CM6 so I just reflashed. will try again tomorrow.
[Nexus One General] pikipirs:
sonic74, I've sent you a mail to an email you posted a couple of pages back (Paypal email?). I have an issue with my project and I require your assistance if it's possible.

Edit: thanks, works like a charm!
[Nexus One General] jasonp1980:
I think currently this is a little too technical for me.

But anyone willing to try get a USB ethernet adaptor working.
[Nexus One General] sonic74:
Mine worked.
[Nexus One General] ManticoreX:
Using Modaco's custom rom I was able to boot the kernel in ram and load the drivers, but anything I connected wasn't detected. My setup is a little different, I have a usb charger connected to the power line on the Y connector, and that then goes to a mail-B to female-A converter. I connected a usb thumb drive and its light turned on, so I assume it is getting power. I plan on trying again soon, but anyone have an idea why it might not have worked my previous attempt? (after I get it working on a mostly stock rom, I am going to try and get it to work on CM6)