yashsingh1/xdaforums huggingface dataset:
[Nook Color Android Development] verygreen:
Currently the charger indication is not working properly (I've got some reports claiming that it does for some people, but it never does for me) all due to the way I force vbus on.

Anyway when you have external vbus forced, the charger pump is open and will relay the power to the battery if there is power applied externally to vbus (there would be no charging indication), if there is no external power then the current will go the other way and the battery will be discharging.

I am thinking of ways to make the proper indication show up.
[Nook Color Android Development] flaviopac:
Great job man!

Is there any chance to port this to other devices running CM7 (like LG OPTIMUS ONE) using your sources?
[Nook Color Android Development] lekofraggle:
For those wondering...

My dslrs do not support usb host, so they won't work in the field. However, if you want a CF reader that is low enough power,

http://reviews.cnet.com/flash-memory-adapters/vivitar-rw-50-card/1707-8898_7-34043238.html

I grabbed it at staples. It is a bit touchy, and you need to use the supplied cable, but it works.

No hub. No external power. Just plug and play... Well, sort of.

Do we need to eject our media if we do the auto mount vold.conf? If so, how do we do it?

Thanks again.

~Leko
[Nook Color Android Development] seth.i.simmons:
You have to use the terminal emulator to unmount it. Should be something like:

busybox umount /sdcard/usb

Just replace the /sdcard/usb part with wherever your mounting your USB accessory.

Hope that helps.
[Nook Color Android Development] lekofraggle:
seth.i.simmons,

Gee, I should have been able to figure that out.

Thanks. I just did not want to corrupt my cards.

Can we use script manager (I forgot what it is called) to automate that?

This whole thing really is amazing. I seriously am no longer even glancing at the ipad.

~Leko
[Nook Color Android Development] seth.i.simmons:
I messed with script manager a little, but actually like doing it manually, and couldn't get the script to work anyways. Plus its such an easy command, its almost as fast to type it in as to open an app and run the script.
[Nook Color Android Development] verygreen:
Assuming they use the same TWL and wired it correctly.

I guess powering from battery and external sources is easier but still probably a bit of extra patching is needed for their respective twls used.

I don't have this particular phone (or any other Android phone yet), so I cannot try.
[Nook Color Android Development] flaviopac:
thanks for your reply.

so theorically we could use internal battery to supply usb devices?
[Nook Color Android Development] verygreen:
Assuming the voltage is high enough to cross the vbus threshold.

On the Nook this only happens when the battery is very full.

On the other hand some chargers (like in n900) have a special "boost" mode that just boosts voltage from the battery to 5v too.
[Nook Color Android Development] yourm0m1:
i cant compile the xpad module for our kernel for the life of me. if anyone has a dev environment setup properly and would be kind to compile the xpad module for us that would be awesome to test out. its located in source of this kernel and others around the forum under /kernel/drivers/input/joystick/xpad.c

ill keep plugging at it but atm im failing
[Nook Color Android Development] newellj79:
Has anybody had luck with a keyboard not using a hub?
[Nook Color Android Development] deadbot1:
I wonder if this may be dangerous, as it seems then that there is no "brains" behind the charging...or am I misreading?????
[Nook Color Android Development] verygreen:
Yup. I even have a video of it when I did my first demonstration.

Also hololight did his original demonstration with a keyboard without any hub.

Just make sure your keyboard does not claim it is very power hungry.
[Nook Color Android Development] verygreen:
The "brains" are always there - the charger controller.

It performs whatever actions necessary to prevent battery overcharging automatically (check the datasheet).
[Nook Color Android Development] seth.i.simmons:
Any eta yet on when this will be merged with dal's OC kernel? Would love to get this functionality at 1.3ghz ;)
[Nook Color Android Development] verygreen:
http://coachz.inetpro.org/~dalingrin/nook/kernels/virus_trojans_and_worms/uImage
[Nook Color Android Development] seth.i.simmons:
Lol, yep, just saw that, flashed it, then posted in the OC kernel thread.

Thanks though VG, and thanks for all the freaking amazing work. You rock.
[Nook Color Android Development] newellj79:
It truley awesome. I was waiting for a clue as to what it was. Running great!
[Nook Color Android Development] Mistar Muffin:
Worked fine for me with the original Nook cable and a gender changer with the usb keyboard plugged into that. Powered and functional.
[Nook Color Android Development] Taosaur:
Microphones still aren't working, are they? Has anyone tried a USB mic?
[Nook Color Android Development] verygreen:
They sort of do in the latest nightly with a fix (http://review.cyanogenmod.com/5985 ) and recompiled alsa hw lib, but now there is a rate mismatch (usb device I have does not want to work at 8kHz), so all you hear is some bubbling.

I am digging in this today and so hopefully a "Working skype" video is forthcoming at the end of the day ;)
[Nook Color Android Development] jinp6301:
sweet! all Im looking for is a way to use my USB dac with the nook color!
[Nook Color Android Development] Taosaur:
Any chance the ALSA changes will impact bluetooth devices, too?
[Nook Color Android Development] mpkrcl:
app to mount usb drives

Any chance to get an app to mount the available drives?

http://xdaforums.com/showthread.php?t=1101729

Tried that app..wont install on my nook...

I haven't had much success with the vold.fstab trick...only worked sometimes for me.
[Nook Color Android Development] verygreen:
Ok, I guess I'll do some sort of a progress update on the usb audio since so many people are interested.

To use the files referenced here you need to install nightly -100 or later! If you use anything earlier than that version there is a bug in generic framework code that would prevent any audio input from working!

You will need this kernel image: http://nook.handhelds.ru/usbaudio/uImage

that you will need to use as the kernel.

The kernel change is only to allow skype not to enter dead loop when it tries to open a microphone and cannot (when you do not have a usb headset connected).

Unfortunately as soon as the internal mic input is opened, the audio out is also muted so I only include this for convenience of testing. (naturally don't take any of this as an indication that there is internal microphone input or anything.

On the other hand this kernel also includes some groundwork to enable FM radio support (assuming it was properly wired, in the past all attempts failed because these bits were missing)).

The other important bit is the alsa.omap3.so: http://nook.handhelds.ru/usbaudio/alsa.omap3.so

Drop it to /system/lib/hw/ (this on sdcard this is partition2, /lib/hw)

once the files are in place, reboot, connect the audio device, enable usbhost (or the other way around).

The skype will now work. The sound is a bit distorted/sped up due to lack of rate conversion I guess.

My usb headset is limited to 44.1kHz rate where as voice in is usually requested at 8k.

the library I supply hardcodes the rate at 44.1kHz anyway.

I suspect that the microphone only devices (like what is commonly found on web cameras) should also work with sound going to internal speaker.

While you are at it, also please try to see if your audio device supports any other rates than mine. If it will turn out there are many 8k-supporting devices, I can try to add support for it I guess:

# cat /proc/asound/card1/stream0
C-Media USB Headphone Set at usb-musb_hdrc-1.4, full speed : USB Audio

Playback:
Status: Stop
Interface 1
Altset 1
Format: S16_LE
Channels: 2
Endpoint: 1 OUT (ADAPTIVE)
Rates: 48000, 44100

Capture:
Status: Stop
Interface 2
Altset 1
Format: S16_LE
Channels: 1
Endpoint: 2 IN (ASYNC)
Rates: 48000, 44100

The important are the "capture" rates. If yours look different, please report here.

Hm... Actually I just tried my usbcam and the rates I see are (and yes, the mic-only input works too, output goes to internal speaker):

Rates: 8000, 16000, 22050, 24000, 32000, 44100, 48000

So I guess I need to add lower rates support after all and it'd work much better as a result.

Also need to figure out how to make ALSA to sample down the rates, I believe there is support for this.

The hardcoded 8k samplerate alsa lib is coming soon, though, after I give it a try locally.

Another useful bit - make sure to press volume-up button while in skype, esp if on internal speaker, as it starts calls at something like 70 or even 60% volume for some reason.
[Nook Color Android Development] racks11479:
Sweetness! A great fathers day present for me to play with. Thank you verygreen!!!

-Racks
[Nook Color Android Development] jinp6301:
I'm getting an "error updating vbus mode - exec" in the app now after updating to 105. Any suggestions?
[Nook Color Android Development] verygreen:
You need to install the usbhost-enabled kernel again.
[Nook Color Android Development] timothydonohue:
like the way this is headed. would love to just hook up my webcam w mic via usb w/ adapter and have gtalk or skype working...
[Nook Color Android Development] verygreen:
I don't think Skype supports video under Android.

Don't know about gtalk.

The audio you can try right now, in fact I only tested with Skype and I am interested about other apps like gvoice and gtalk in particular, so give it a try and report here ;)
[Nook Color Android Development] jinp6301:
*facepalm*

sorry. that was just stupid :P I should have known that.

Another problem I ran into. When im playing music using the standard android music app through the usb (I assume since its not making any sound from the internal speaker), it does not emit any sound and the music seems to be going 5x faster (seek bar moving 5x faster than normal). Any suggestions?

Also thank you for helping out :)
[Nook Color Android Development] bradputt:
anybody having problem connecting a mouse to your nook

mine always hang when I connect my mouse.
[Nook Color Android Development] newellj79:
Nope just plugin and go.
[Nook Color Android Development] legolee:
verygreen, thanks for your awesome work.

Just tested it with Dalingrin latest OC kernel.

I use a micro USB to USB OTG cable.

My Logitech wireless keyboard+mouse set is working perfectly!

It I connect nook to my apple pro keyboard or razer mouse (without hub), it hangs and needs rebooting.

Tried 2 USB drive and 2 card reader, none of them are working. I don't see and sxx in dev/block. those drive and card reader works well with Samsung Galaxy S2 USB host mode.

Am I out of luck or should I use a micro USB to USB adapter instead of the OTG cable?

Or it is problem of Dalingrin OC kernel?

I also tried with the Belkin 7 ports powered USB hub. But when i connect to my NC, my NC screen is acting crazy and registering ghost touch everywhere.

I thought i was going to burn my NC, but nothing happens :)
[Nook Color Android Development] seth.i.simmons:
Try plugging it in through a powered hub. If the mouse (or any other accessory) draws too much power, it makes my Nook hang and I have to reboot. What kind of mouse is it?? Does it have any special lighting or anything?
[Nook Color Android Development] chisleu:
n108 + 6/18 kernel + host app

I was able to mount the memory stick in my old sony camera just fine.

I thought it very wierd that quickpic could see the directories but the term emu couldn't. ls was just not showing anything.

I we get auto mounting working I am going to be pumped!!!
[Nook Color Android Development] verygreen:
Hm, I have not seen any hangs from connecting USB stuff to my nook. The worst that have happened is the device was just refused as drawing too much power.

I guess if it's a total hang, I cannot get any logs from the event?

Or does it reboot all by itself a few seconds later?

Nook must be rejecting them due to too much power drawing declared. You should see what dmesg reports. (type dmesg in terminal emulator or after you disconnect the device and disable host mode, type dmesg in adb shell)

There is no difference from what adapter you use.

I have not tried OC cable and I guess the power requirements of Nook increase in OC mode, so it might be an interesting idea to confirm this by testing with my usbhost-enabled kernel referenced in the first post, but I don't think it'll make a big difference. Still an interesting experiment to conduct.

This is a second report like this I got. I don't have a power supply for my supposedly powered hub, but I wonder if it is related to the way usb socket is mounted on some nooks that leads to erratic touchscreen behavior even when plugged in and charging? Do you have such a problem I wonder?

Does your hub supply power to the upstream port too?

When I need more power for my testing devices I just use Y-cable to draw extra power from my PC (external vbus forced in host mode) and it works.
[Nook Color Android Development] verygreen:
Well, actually I only tested with Skype before this moment.

But I just tested with playing an ogg file (from /system/media/ringtones) in File Manager and it works.

Also I see that adjusting volume beeps into my headphones I use for testing too.

Have you tried increasing volume? Nook seems to be getting very low volume for me often (probably because it's all too easy to press the volume down button without noticing).
[Nook Color Android Development] bradputt:
oh sorry i got it to work by rebooting with the mouse plugged in.

don't know why it always hang on the first connection.
[Nook Color Android Development] jinp6301:
hmm, still no go. no sound coming out of both the internal speaker and the usb audio, the seek bar moves erratically. what can i do to check whats going on between the usb audio and the nook? dmesg?
[Nook Color Android Development] Divine_Madcat:
Yes, a dmesg and logcat are the best places to start.
[Nook Color Android Development] skwalas:
So I finallly got my adapter and was all pumped to mount my flash drive, but no joy. After many hours of verbally abusing my poor nook, I finally did a dmesg and saw not enough power available. It actually said something like "98.7 mV available" or something similar. My battery was at 35% at the time though.

So my question is: is there any feeling for a battery level below which a plain flash drive becomes too much? Or are some flash drives just designed to draw more power than others?

Also, in familiarizing myself with vold.fstab, I can't help but wonder, WHY do we have to have /sdcard and mnt/sdcard (courtesy of vold) along with /emmc and /mnt/emmc (also courtesy of same ol' vold)?

As usual, looking for answers in all the wrong places...
[Nook Color Android Development] skwalas:
Answered the first question: fully charged nook still won't see my daily use flash, but does see my older and slower flash just fine.
[Nook Color Android Development] Divine_Madcat:
The problem is that the newer drive is requiring more than the 100mV that the Nook can supply, so the nook rejects it.. The older drive appears to need less power, and so it works.
[Nook Color Android Development] RikF:
Bluetooth Keyboard

Has anyone tried using a bluetooth keyboard with this kernel? I've just upgraded to Phiremod's latest beta and installed this kernel, and now I can't use my keyboard (apple). I can pair fine (it reads the code from the keyboard to pair and connect) but I can't use the keyboard to type in any app. Anyone else seen this problem?
[Nook Color Android Development] Arbelzapf:
It's been like that since the very first 7.0.3 / .32 beta. I haven't heard of anyone getting his Apple keyboard to work with the new kernel and its new Bluetooth module. Other keyboards seem to work, though.

I'd really wish to be able to use my keyboard again, although this is probably the wrong thread for such requests
[Nook Color Android Development] furius:
I'm trying to connect my NC to my Nexus One and trying to mount the N1 as SD Card... when plugged, nexus one get red led (that means is charging) and show the "debug usb" icon but not the "mount usb" icon... what I need now to mount my nexus as sdcard? I used terminal emulator and I get dmsg log... I checked with root explorer on devices/platform/ but I don't see any drive to mount...

any suggestion?

Thanks! :)
[Nook Color Android Development] RikF:
Thanks for the quick reply. To pull it back on track, I can confirm that this worked flawlessly with my Sony DSLR. Combined with RawDroid this will be incredibly useful on my next trip away.
[Nook Color Android Development] Divine_Madcat:
Rikf - may i ask what model you have? I have been meaning to try it out with my A900 and A700, but work has kept me busy.

On a side note.. nice to see other Sony shooters around here.. :)
[Nook Color Android Development] FRSP:
100 mA, not 100 mV
[Nook Color Android Development] Divine_Madcat:
Doh! Aren't typos a *****? Thanks! :D
[Nook Color Android Development] RikF:
Just my faithful A100 I'm afraid (one day I'll upgrade, one day...), mated almost all the time to a Minolta 50mm 1.7

The nook makes a great screen for previewing RAW images - the app I mentioned is a WIP, but the developer is doing great things! I'm looking forward to taking a break next week and going no-laptop for the first time.
[Nook Color Android Development] Divine_Madcat:
No shame at all in the A100; it was my first Sony camera. I still technically have it, but really, it is on perm loan to a buddy who just had a baby girl.. gotta get those baby shots. :)

Anyway, i cannot thank everyone enough for the work done on this. I love being able to plug flash drives and such into the nook.. it is so handy...
[Nook Color Android Development] newellj79:
?Got my powered hub today. Keyboard which previously didn't work powered right up. I've tried to use to different mp3 players wit the hub to test external store. I get crazy phantom touches as soon as I plug either in. Any thoughts?
[Nook Color Android Development] nee_vak:
Any luck at getting videochat with gtalk 1.3 using microsoft webcam? Need to know it works before i fry my usb port lol.
[Nook Color Android Development] newellj79:
N e body else notice the temp rising on the nook after using USB host for a bit? I can really feel the chassis heating up just to the right of the "n". Also, any advances made in webcam or audio support?
[Nook Color Android Development] verygreen:
I don't think I feel any temperature differences.

The webcam works (you need a special build referenced from the first post).

Audio also works (instructions were published like 2 pages back), I guess I need to rebuild the usb image to include both features at the same time.
[Nook Color Android Development] dalingrin:
I have updated the Nook Color Tweaks app with USB host support but I have no way of testing it.

I would like to get confirmation that it works.

Note: CM after version 7.1 is released this week will have automatic USB storage mounting for external disks. This app has a handy dandy shortcut in the notifications to safely unmount the disk. In order to test this notification you will need to manually mount to /mnt/usbdisk until the changes are merged into CM7.1

The app should be partially compatible with verygreen's modified kernel but will need the 06/18 OC kernel to use all the features.

As a bonus the app has boot features added by FatTire
[Nook Color Android Development] lschroeder:
I guess I could install it to find the answer. Will need to change my mount point from the sdcard USB directory I am using. Does it have support for the y usb cable? Minu usb leg in powered hub upstream; keyboard, fat 32 drive, power only leg in powered hub; data leg with micro adapter into nook. With verygreen's app I must have keyboard and drive working first, then select the second button for power and then plug the power only leg into the hub.
[Nook Color Android Development] dalingrin:
USB mode and VBus source should behave the same as verygreen's app.
[Nook Color Android Development] lschroeder:
Nook Color Tweaks Mount Poing

moderators delete please - double post - wrong title - see next one
[Nook Color Android Development] lschroeder:
Nook Color Tweaks Temporary Mount

Revised to reflect additions from Dal in later post. *** I use "adb shell mount -o rw,remount /"

Note: that changes you make to the rootfs (root file structure) are only temporary and will not last past a reboot. That is why Dal's say just wait for the final commit. ***

Use adb or adb wireless. Directory usbdisk needs to be created in directory mnt (again will not last past reboot).

For windows adb pull vold.fstab down, open vold.fstab with notepad++ to add the following line

dev_mount usb /mnt/usbdisk auto /devices/platform/musb_hdrc

Save it. Then use windows adb to push it. Be sure to change the file,vold.fstab, with notepad++ (Linux format editor for windows) before you push it. Do not use notepad format it wrong.

You will have to download and install notepad++.

STEPS

Session 1

adb pull /etc/vold.fstab

open vold.fstab, add line below, and save in notepad++ ...

dev_mount usb /mnt/usbdisk auto /devices/platform/musb_hdrc

adb remount

adb push vold.fstab /etc/vold.fstab

adb reboot

Session 2

adb shell mount -o rw,remount /

adb shell mkdir /mnt/usbdisk *** temporary will not work after reboot ***
[Nook Color Android Development] dalingrin:
that's fine. After adb remount you can then create the directory with "adb shell mkdir /mnt/usbdisk"
[Nook Color Android Development] lschroeder:
Gives error "can't create directory '/mnt/usbdisk': Read-only file system

Is there something like this that we can use:

"adb shell mount -o remount,rw /dev/block/mmcblk0p5 /system"
[Nook Color Android Development] newellj79:
The apps is working great for me. Thanks Dal.
[Nook Color Android Development] bradputt:
erm, Dal

i don't see the shortcut on the notification to unmount the SD card.

where is it??
[Nook Color Android Development] J-ROCK:
Yea same here.,
[Nook Color Android Development] bled82:
7.1 This week :D looking forward to it and thanks for all the work .
[Nook Color Android Development] dalingrin:
I think it would be best to wait until the change is merged to test the unmount notification. It will require you to mount the USB disk via vold not via the console. Then in order to do that you will need to make the directory /mnt/usbdisk on each boot. AND THEN, you will also need to add /mnt/usbdisk in build.prop in order to unmount via the UI.

See this commit: http://review.cyanogenmod.com/#change,6271
[Nook Color Android Development] lschroeder:
Dal, I still can not get file program or create the directory with "adb shell mkdir /mnt/usbdisk" to work because of a read error. Anybody have a clue on what I should do?
[Nook Color Android Development] verygreen:
you need to remount / as read-write first

(something like "busybox mount / -o remount,rw" in adb)
[Nook Color Android Development] dalingrin:
What he said ^

I use "adb shell mount -o rw,remount /"

Note that changes you make to the rootfs are only temporary and will not last past a reboot. That is why I say just wait for the above mentioned commit.
[Nook Color Android Development] cama900:
will there be a /mnt/usbdisk by default in CM 7.1? i was just about to modify the ramdisk to create it on startup, but maybe ill just wait...

EDIT: Im goanna do it just for the experience, and if its its not included perhaps ill release it as a flashable zip or something