FORUMS
Remove All Ads from XDA

[WIP] USB Host support (working)

1,305 posts
Thanks Meter: 2,652
 
By verygreen, Senior Member on 22nd January 2012, 02:18 AM
Post Reply Email Thread
11th February 2013, 04:09 PM |#331  
Renate NST's Avatar
Inactive Recognized Developer / Recognized Contributor
Boston
Thanks Meter: 1,182
 
More
Quote:
Originally Posted by tebra

Correct?

Both the uImage that I am using and the 1.2.1 uImage identify as "2.6.29-omap1"

The uImage I am using has a ton of drivers in it, the size is 2,727,540
I'm not sure that the stock 1.2.1 uImage has any drivers in it: 1,848,944

Yes, you need to replace init, which goes inside uRamdisk.
You can use bootutil.exe to do that.
12th February 2013, 10:44 AM |#332  
Senior Member
Thanks Meter: 91
 
More
Hi Renate,
one more question:
it is easier for me to install uRamdisk_wireless_adb_init_1.1_1.1.2.zip and uImage_mt_usbhost_nopowercheck_115.zip over my current uImage and uRamdisk but is it working with firmware 1.2.1?
If yes, which tools to install them? CWM or Noogie?
12th February 2013, 07:45 PM |#333  
Senior Member
Thanks Meter: 91
 
More
ok it works by replacing uimage and uramdisk with noogie
thanks
13th February 2013, 02:52 AM |#334  
Renate NST's Avatar
Inactive Recognized Developer / Recognized Contributor
Boston
Thanks Meter: 1,182
 
More
You can also just use ADB and mount the boot partition.

Code:
adb connect whatever
adb shell
mount -o rw,remount rootfs /
mkdir /boot
mount -t vfat /dev/block/mmcblk0p1 /boot
^C
adb push uRamdisk /boot/
adb reboot
15th February 2013, 02:45 PM |#335  
Senior Member
Thanks Meter: 91
 
More
Is it possible to change the keyboard layout?
My keyboard works but is detected as a QUERTY keyboard but I have a AZERTY Belgian keyboard
15th February 2013, 03:28 PM |#336  
Renate NST's Avatar
Inactive Recognized Developer / Recognized Contributor
Boston
Thanks Meter: 1,182
 
More
Quote:
Originally Posted by tebra

Is it possible to change the keyboard layout?

Of course.

There are two levels of processing turning a key press into a character.
The first is mapping of the scan code into a key code.
The second is mapping the key code and meta keys (shift, alt, etc) into a character.

The first mapping is done using files like /system/usr/keylayout/qwerty.kl
The second mapping is done using files like /system/usr/keychars/qwerty.kcm.bin
The first file is conveniently in plain text, the second is a simple binary file.

If you are simply swapping keys around you only need to change the .kl file
If you want to make it so that shift 4 is Euro instead of dollar you need to change the kcm.bin file.

You can just edit the .kl file. Before:
Code:
  key  21  Y
After:
Code:
  key  21  Z
This would make the key layout more "German-like" by making the center key in the top alpha row be considered the 'Z' key.

The .kcm.bin are compiled files from source.
I haven't looked into where the compiler comes from, I just modify the stock kcm.bin by hand.

The file is broken down into 16 byte chunks with a 16 byte header.
Here is the chunk for C (on my modified version):
Code:
000100 1F 00 00 00 43 00 32 00 63 00 43 00 E7 00 C7 00
This means:
  • This chunk is about KEYCODE_C (0x1f) (uses Android key codes)
  • The visual for this key is 'C' (0x0043)
  • On a numeric keypad this would dial a 2 (0x0032) as in ABC on a phone
  • The unshifted UTF-16 value is 'c' (0x0063)
  • The shifted UTF-16 value is 'C' (0x0043)
  • The alt modified UTF-16 value 'ç' (0x00e7)
  • The alt-shift modified UTF-16 value is 'Ç' (0x00c7)

You can also use alt combos for combining diacritics:
  • 0x0300 grave accent
  • 0x0301 acute accent
  • 0x0302 circumflex accent
  • 0x0303 tilde accent
  • 0x0308 umlaut accent

To replace these files on your Nook, you will need to remount your system as R/W:
Code:
mount -o rw,remount /dev/block/mmcblk0p5 /system
You can get fancier if you want to have some USB keyboards US and some Belgian.

I await my shipment of Belgian chocolates.
The Following 4 Users Say Thank You to Renate NST For This Useful Post: [ View ] Gift Renate NST Ad-Free
19th February 2013, 02:57 PM |#337  
Senior Member
Thanks Meter: 91
 
More
I just replace my qwerty.kl and qwerty.kcm.bin with files on this post http://forum.xda-developers.com/show...47&postcount=8
Now I have French usb keyboard layout
Very nice
9th March 2013, 09:29 PM |#338  
Member
Thanks Meter: 0
 
More
"The uImage I am using has a ton of drivers in it, the size is 2,727,540." It is the "big kernel."

For others hunting for it, as I was, Mali100 prepared it and it can found at:

http://nst-recovery.googlecode.com/f...audio_test.zip

I'm using it, but am having trouble getting audio to work. The AudioControl app causes the screen to go black. I know it ran when first rooted.
(Now, after a long delay, I am getting the error message: "Activity Audio Control (in application Audio Control) is not responding.") Drivers for audio are loading.

Keyboard is working fine with above uImage.
10th March 2013, 05:18 PM |#339  
Renate NST's Avatar
Inactive Recognized Developer / Recognized Contributor
Boston
Thanks Meter: 1,182
 
More
For audio, you need a bunch of stuff, all to be found in this thread (somewhere).
I'll do a recap when I get some spare time.

You need /system/etc/asound.conf (somewhere here).
You need to delete /system/lib/hw/alsa.zoom2.so
You need to modify /system/lib/hw/alsa.default.so
Make sure the contents match!
Code:
[00002268] 02 // format
[0000226c] 01 // channels
[00002270] 40 1F => 44 AC
The Following User Says Thank You to Renate NST For This Useful Post: [ View ] Gift Renate NST Ad-Free
11th March 2013, 09:04 PM |#340  
Junior Member
Thanks Meter: 2
 
More
Thank you, Renate.
Renate,

I wanted to thank you for the work you're doing on here. I'm trying to mod a Nook ST to be a safer media-control solution on my motorcycle, and your work has been a HUGE help. I've been following this particular thread with a great deal of interest because of the audio-output issue. I have gathered all the hardware, rooted the Nook, loaded the software, and now all I need to do is dig deep into the board to figure out how to activate output to the USB dongle via OTG. I know you've written about it, I just need to find it!

Thanks again. Your hard work has made my life better.
The Following User Says Thank You to y_chromosome For This Useful Post: [ View ] Gift y_chromosome Ad-Free
11th March 2013, 09:38 PM |#341  
Member
Thanks Meter: 0
 
More
Renate wrote:

"You need /system/etc/asound.conf (somewhere here)."

Already had it.

"You need to delete /system/lib/hw/alsa.zoom2.so" Did.

Also:
"You need to modify /system/lib/hw/alsa.default.so
Make sure the contents match!
[code]
[00002268] 02 // format
[0000226c] 01 // channels
[00002270] 40 1F => 44 AC "

The 02 and the 01 are already present at the first two addresses. I changed 40 1F to 44 AC.

Audio now working! Beeps from Audio Control app. Volume not loud but may be earphones. Volume buttons on usb sound device seem not to have any effect. However, I'm almost there!
Many thanks!
Post Reply Subscribe to Thread

Tags
usb host, usbhost

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes