• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root OTG Cables, USB and the Logitech K400r Wireless Keyboard with Track Pad Area

First, let me say a bit about myself and what I already have done.

I have a Nexus 7 (2013). I have succeeded in Rooting it, updating it to the Q version of firmware, have succeeded getting the OTG cable working on it, succeeded on getting a wireless Kingsington Mouse, tiny four-port unpowered USB Hub, flash drive, and folding keyboard working on the OTG.

I have had two different Nexus 7 machines. The first had a problem with the MicroUSB connector, so I sent it back and got this one.

THE PROBLEM:

Although a second keyboard that I have, the Logitech K400r (advertizes as being both an Android keyboard as well as Windows andit worked fine on my first Nexus 7), worked properly on the first Nexus I got... it's not being recongnized by my MicroUSB on the new Nexus 7 (2013).

I've tried mounting many different kinds of Apps to get it working I've turned-on USB debugging. I have a full-version of both "Nexus Media Importer" v6.2.1 and "USB OTG Helper Donate Version" running.

"USB Debugging Monitor" has been installed.

I have used "DroidEdit" and turned on Root mode so I can modify system files, modifying the system/etc/handheld_core_hardware.xml file, adding the line:

<feature name="android.hardware.usb.host" />

This, then, allowed the USB Host library to load (usb.jar?)

Still doen't mount the Keyboard.

Any ideas on how I can see what's happening?

I would guess that an improper pairing was done, and it doesn't properly see the keyboard because some paring number is off or incorrect, or the wrong driver is being loaded... but I never get any error. I can see that it is arbitrating with the OTG and the Keyboard, but it never acts as either a keyboard, or a mouse.

Is there some cache I need to delete, or App I could install that would tell what USB error I am getting (if any).

I tried plugging the dongle into both the OTG itself, and the USB Hub and both did the same thing. The keyboard works fine on, both, a Windows computer and on my Vizio TV. The batteries are fresh.
 
I've moved this to the Nexus 7(2013) root forum in order for more people with the device to see it and potentially help you out. :)
 
There were a number of problems in Android 4.3 with bluetooth keyboards. In my case, I had to delete the keyboard profile for my Zagg Flex so it would fall back on the default keyboard, and that worked properly.

I wonder if there is a similar problem with USB?

Here's one of the Bluetooth bug requests:
https://code.google.com/p/android/issues/detail?id=58202

It details what I had to do, which is deleting a /system/usr/keylayout file. I know it's not specific to your issue, just thinking it might have the same root cause and you might be able to dig through that directory to see if you can do a similar thing.
 
Well, from your suggestion I found a keyboard layout that someone else had done for the K400r, installed it, downloaded a terminal emulator, set "su" superuser permission, did a CHMOD 644 on the file to set permissions, rebooted...

and nothing.

At least I know know the vendor ID of the keyboard and the folder where the keyboard layout is in; both of those should help.

Another thing I learned was to plug in the OTG cable, then the dongle. Still nothing, though.

Oh, and I renamed the keyboard layout they suggested and rebooted... nothing.
 
Well, I've got more info.

I installed an App which allowed me to see dmesg messages better.

Here is what it said:

<6>[ 136.320922] msm_otg msm_otg: USB exited from low power mode
<6>[ 136.584777] usb 1-1:new full-speed USB device number 2 using msm_hsusb_host
<6>[ 136.755615] usb 1-1: New USB device found, idVendor=046d, idProduct=c52b
<6>[ 136.755889] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
<6>[ 136.756256] usb 1-1: Product USB Receiver
<6>[ 136.756469] usb 1-1: Manufacturer: Logitech
<3>[ 136.783142] logitech-djreceiver 0003.046D:C52B.0003: claimed by neither input, hiddev nor hidraw
<3>[ 136.783599] logitech-djreceiver 0003.046D:C52B.0003: logi_dj_prove.hid_hw_start returned error
<3>[ 138.886260] wlan: [621:E:SME] sme_FTUpdateKey: Unhandled state=0

I looked up that error and a guy made it sound simple.

He said, "Solved, obvious solution is obvious. I had to enable /dev/hidraw"

From there he went on to say you had to enable it in the kernel configuration. "The flag is called Code:
CONFIG_HIDRAW
. You can find it in menuconfig under Code:
Device Drivers -> HID Devices -> Generic HID support -> /dev/hidraw raw HID device support

Or, possibly (as I am using a Logitech Unifying Receiver), check for:

-> Device Drivers -> HID Devices (HID_SUPPORT [=y]) -> Special HID drivers -> Logitech devices (HID_LOGITECH [=y])

Other links seemed to indicate that you can't just modify the file that has that line in it, you have to do a make menuconfig... and that means you need "a make tool", "a C compiler" and the "ncurses" library.

Is there some way to turn on, either the CONFIG_HIDRAW=y or the HID_LOGITECH=y in some way that I don't need such things?

...

Also, why is it not on? The other Nexus 7 I had mounted it fine.
 
Well, just tried installing a Stock Rooted JSS15R - De-Odex version 355.20 MB

I have SuperSU v1.65 installed (not pro version).

Did a good job, so I'm now running JSS15R.

I, right afterwards, tried the k400R keyboard with no success. It wasn't some problem with JSS15Q, then (or at least, if there WAS a problem with JSS15Q, it is the same problem now).

My thought is... I did the same thing with the JSS15Q upgrade. Could it be that the Stock Rooted method has the wrong settings in the Kernel Config file?

Can someone check their JSS15R system and see if CONFIG_HIDRAW=y or HID_LOGITECH=y ?

Also, anybody know where the kernel config file for Nexus 7 (2013) resides?

It, of course, wiped out the permissions file I had modified. I redid the USB Host driver modification.

Funny how every other USB thing I plug in works just fine. Annoying (particularly because this Logitech K400r keyboard was working just fine back when it was version JSS15J version and the other Nexus 7 (2013) I had with the slightly broken MicroUSB port). At that time it brought up a mouse pointer and took input from the keyboard just fine.
 
I've been trying to find a way to get the k400r to work on my n7 LTE for many months. The n7 is build KOT49H, kernel 3.4.0-gac9222c, running android 4.4.2.
Here is a quote from a thread in XDA
forum.xda-developers.com/showthread.php?t=2425622&page=2
"After my last post, I contacted Google support. They said that they could not help, and Logitech would have to fix it. I tried to talk technical about kernel config switches, and I begged to talk to someone who understood what I was saying, but I basically was told they did not have resources to troubleshoot every possible accessory.

I contacted Logitech, and they said that Google was right. They claimed responsibility and stated they did not support Nexus 7 (2013). It would not work.

Bottom line: This accessory will only ever work in a custom ROM, if it works then. "

Maybe that explains why trying to get this keyboard to work is like butting one's head against a brick wall.

Anyway, if there is any good news about this issue, please let's hear it.
 
I have searched the Internet for answers and can't find a fix for this. Is there a ROM for nexus 7 (2013) that has these kernel configurations in place?
From the amount of research I have done I know there is a ROM for the nexus 10 which isn't what I'm looking for.

I have tried the k400r on my HTC one mini and it works flawlessly. So I know this works on Android (as per the comments above suggest also).

If all else fails I may look into recompiling the kernel with these Config settings but I don't want to go through that process if it has already been done.

Thanks in advance.
 
I have searched the Internet for answers and can't find a fix for this. Is there a ROM for nexus 7 (2013) that has these kernel configurations in place?
From the amount of research I have done I know there is a ROM for the nexus 10 which isn't what I'm looking for.

I have tried the k400r on my HTC one mini and it works flawlessly. So I know this works on Android (as per the comments above suggest also).

If all else fails I may look into recompiling the kernel with these Config settings but I don't want to go through that process if it has already been done.

Thanks in advance.

Did you manage to solve it after recompiling?

Thanks, Esteban.
 
Back
Top Bottom