Nook Simple Touch USB Mode Almost Working - Nook Touch General

Hello, I am trying to hack my Nook Simple Touch 1.2.1 to work with a keyboard or mouse. In order to do this, I followed the instructions here: https://forum.xda-developers.com/wiki/BN_Nook_Simple_Touch/USB_host_mode. The instructions basically worked, except I had to make one small modification. On step 3 (https://forum.xda-developers.com/wiki/BN_Nook_Simple_Touch/Replacing_boot_files), I had to do the command:
cd /data/local/tmp
in between lines 2 and 3 of the terminal method. (As suggested on my previous forum post here: https://forum.xda-developers.com/nook-touch/general/boot-partition-trying-to-install-usb-t3753107)
This appears to have worked in the sense that I have a USB mode utility app now, but I'm encountering problems when actually trying to connect the keyboard/mouse. I bought 2 different USB to microusb adapters, one of which also accepts external power through another female microusb port. Here they are: https://www.amazon.com/gp/product/B00M7X6XNG/ref=oh_aui_search_detailpage?ie=UTF8&psc=1
https://www.amazon.com/UGREEN-Adapt...ords=usb female to micro usb male otg adapter
I open the USB mode utility app, hit the off button on the current limit section. It tells me that Superuser permissions are now enabled. I then hit Host several times, and then I plug in the keyboard or mouse.
With the non-externally powered cable, nothing happens. With the externally powered cable, power switches from battery to usb, and input switches from Key:3 to Key:4. In the latter case, if I then click on view usb, it correctly lists the device information of the keyboard or mouse that is plugged in. For example, for the mouse, it displays:
1d6b:0002:01 MUSB HDRC host driver
1038:1361:00 Steel Series
However, in any app I then try, the keyboard and mouse don't do anything. For example, I can't get the keyboard to input text into text boxes. Basically, except for the view usb output, it's as if the device isn't plugged in.
So I have 2 questions:
1. How do I get the nook to actually recognize the input from these devices?
2. Is it possible to do this without external power? If so, why isn't it working with the non-externally powered cable?
Thanks

Either of those adapter should be fine.
When the tree is showing a keyboard do you see #0 - 03:01:01 HID (boot) and #1 - 03:00:00 HID?
There should (probably) be two interfaces and two check marks.
When you go back to the main screen of UsbMode can you twiddle the keyboard keys and see scan & key codes?
Do you have a /system/usr/keylayout/qwerty.kl?
What does dmesg say?
Code:
# dmesg
Start with a USB OTG adapter and a powered hub until you get the problems ironed out.
You can get a mouse to work, but the behavior is a bit strange.

When I hit usb, if the device is plugged in, its info shows up after the second (indented) 1 in a box. For the mouse, it doesn't have anything under it. But for the keyboard, it has: #0 3:01:01 HID boot (checkmark). No #1 3:00:00 though.
With the keyboard, I went back to the main USB mode screen, and mashed the keys/pressed every key on the keyboard. Nothing on the nook changed, including the scan and key codes. They remained blank. I did notice that the num lock key lighted up the keyboard num lock indicator though, so I guess it's at least getting adequate power. Although this is only after restarting a plugging in and out a bunch of times because the cable/connection is a bit janky.
I do have /system/usr/keylayout/qwerty.kl, other files in that folder include: AVRCP.kl, TWL5030_Keypad.kl,gpio-keys.kl, and omap_tw14030keypad.kl
dmesg (from this location, if that matters) outputs more than a hundred lines, so I would prefer not to copy them word by word. What are you looking for specifically? Notable lines include:
[random #.random #] zforce-ts 2-0050 invalid_frame: 255
[random #.random #]usb 1-1: new full speed USB device using musb_hdrc and address 5
[random #.random #]usb 1-1: device v1038 p1361 is not supported
[random #.random #]usb 1-1: rejected 1 configuration due insufficient bus power
[random #.random #]usb 1-1: new low speed USB device usir
[random #.random #] regulator regulator, 5: enabling charge: USB HID v1.10 keyboard...
[random #.random #] usb 1-1: device not accpeting addresss 15: error -110
[random #.random #] usb 1-1: device descriptor read/64, error -110
[random #.random #] hub 1-0: 1,0 unable to enumerate device on port 1
Looks like it fails for various different reasons, seemingly dependent on the power source, restarting, and how carefully I plug it in.
Thanks again for all your help!

-110 is timeout on the USB, it seems to be flailing.
Did you try using a powered hub?
A "SteelSeries ApS Ideazon Sensei" keyboard?
How about trying a crappy $3 keyboard?
I'd like to know what the configuration descriptor is quoting for bus power, I've not seen that "rejected 1 configuration due insufficient bus power" before.
If you use Windows (or Linux), try UsbView.exe on it from the good folks at FTDI: http://www.ftdichip.com/Support/Utilities.htm
Here's a typical device:
Code:
Configuration Descriptor:
wTotalLength: 0x0029
bNumInterfaces: 0x01
bConfigurationValue: 0x01
iConfiguration: 0x04
0x0409: "Default"
bmAttributes: 0x80 (Bus Powered )
MaxPower: 0x32 (100 Ma)

I tried the standard dell keyboard with a powered hub. It didn't even appear to recognize it unless I used the adapter cable again with external power (which makes much less sense now, because the hub is definitely powered--the num lock key was lighting up before attaching the hub to the adapter). When I did plug it in with the powered adapter (so I had dell keyboard-->powered usb hub-->usb to microusb with a separate microusb power input from the wall-->nook), it was recognized, but performed essentially the same (showed up under viewusb, but didn't register any inputs). I'm attaching a picture of what the viewusb came up with.
Additionally, I tried a really crappy old apple keyboard, which again was recognized, but didn't register input. Looking at dmesg, this error came up (I think) every time:
usb 1-1: new low speed usb device using musb_hdrc and address 7
usb 1-1: device v413c p2005 is not supported
So possibly I just have to use yet another keyboard? I don't have a steelseries keyboard--the steel series thing was the mouse I was plugging in.
I am additionally attaching the outputs from usbview on the dell keyboard and the crappy apple keyboard.

Oops , looks like the usbview.exe output files didn't get attached. Here they are!

Mmm, something goofy is going on
Code:
<7>[ 387.083526] usb 1-1: default language 0x0409
<3>[ 387.093414] usb 1-1: device v04d9 p1503 is not supported
<6>[ 387.098968] usb 1-1: New USB device found, idVendor=04d9, idProduct=1503
Even though I copied qwerty.kl over:
Code:
-rw-r--r-- root root 3123 2012-04-15 10:20 qwerty.kl
-rw-r--r-- root root 3123 2018-04-04 20:23 Vendor_04d9_Product_1503.kl
Maybe the NST didn't use that system, G2 & G3 did.
In any case, my NST still works fine without a specifically matching kl.
Android supposedly looks in eight places for a match: https://source.android.com/devices/input/key-layout-files
If it fails it should fall back to qwerty.kl

One notable thing is that when following the initial install instructions, I accidentally installed usbmode.apk before changing the boot files like you're suppposed to. The nook started giving me an "install failed" lock screen when it idled for long enough. I then realized the problem, switched the boot files, then reinstalled usbmode. Do you think that could be causing the problem? I could try factory resetting and starting over, although I'm not sure if it would help.

There shouldn't be any problem when you installed UsbMode.apk, it's only an app.
The NST's Eclair doesn't use /system/usr/idc like the later Android.
I renamed /system/usr/keychars and system/usr/keylayout to garbage.
When a keyboard is attached and twiddled it all acts as a home key.
Does the cap locks cause the cap lock light on the keyboard to go on and off?

When connected correctly (which is getting harder and harder over time), the caps lock and num lock lights are both toggled by the corresponding keys. But the keyboard still doesn't seem to register at all on the nook--no key codes, no home button functionality, etc.

Does the soft keyboard work correctly?
It's a little bit more difficult to debug when you have the choice of either ADB or keyboard.
If you had a hardware console, a rooted terminal app or ADB over WiFi it might be easier.
This will dump out info as long as the keyboard was inserted and working once:
Code:
# cat /proc/bus/input/devices
...
I: Bus=0003 Vendor=04d9 Product=1503 Version=0110
N: Name="USB Keyboard"
P: Phys=usb-musb_hdrc-1/input0
S: Sysfs=/devices/platform/musb_hdrc/usb1/1-1/1-1:1.0/input/input23
U: Uniq=
H: Handlers=kbd event3
B: EV=120013
B: KEY=10000 7 ff800000 7ff febeffdf f3cfffff ffffffff fffffffe
B: MSC=10
B: LED=7
...
There could be two interfaces.

Yes, the on screen touch keyboard on the nook works fine. I actually do have an ADB Konnect app, and I think it works. I start it on the nook, type in adb connect 192.whatever on my computer, and it says it's connected. Just not sure what to type then; if I enter commands just like into the terminal app on the nook it looks for files and folders on my computer, not on the nook. Getting this to work seems like a good idea though; it would certainly be a lot easier than retyping all the really tiny hard to read output from the nook terminal app.
In the terminal app, cat /proc/bus/... produces the following output:
I: Bus=0019 Vendor=0001 Product=0001 Version=0003
N: Name="TWL 4030 Keyboard"
P: Phys=twl4030_keyboard/input0
S: Sysfs=/devices/platform/i2c_omap.1/i2c-adapter/i2c-1/1-004a/tw14030_keypad/input/input0
U: Uniq=
H: Handlers=kbd event0
B: EV=3
B: KEY=similar long #s
then same paragraph except replace twl keyboard with gpio-keys, and the various numbers change slightly
then same paragraph except replace gpio-keys with zForce Touchscreen
Notably, there is no line after the "B KEY=number" line in the first two paragraphs, but for the third one (the touchscreen),
there is the line: ABS=600000 3. Not sure if that's important.

You're not seeing the USB keyboard at all.
The TWL4030 is the 4 side buttons on the Nook (which are scanned directly by hardware).
The gpio-keys is the power and home button (which are handled by software).
The B:KEY is a bitmap of allowed scancodes.
My button box has 4 scancodes, 1-4 and B:KEY = 1e = 11110
If you got that while the keyboard was connected (and you can get the LEDs to toggle) then there's the problem.
After adb connect 192.XX.XX.XX you should type "adb shell".

The adb part worked great! I can now debug from the computer, so I should be able to copy the full output of long logs for you from now on.
I didn't realize that you wanted me to connect the keyboard while running that command (I thought you meant if it had been connected before it would be ok). I will try it again with the keyboard connected.

Ok, here's the output of the cat line from wireless adb, after successfully connecting the keyboard with the powered adapter. I checked that num and caps lock keys were lighting up the indicators immediately before inputting the line.
Code:
I: Bus=0019 Vendor=0001 Product=0001 Version=0003
N: Name="TWL4030 Keypad"
P: Phys=twl4030_keypad/input0
S: Sysfs=/devices/platform/i2c_omap.1/i2c-adapter/i2c-1/1-004a/twl4030_keypad/in
put/input0
U: Uniq=
H: Handlers=kbd event0
B: EV=3
B: KEY=10800000 0 0 0 0 0 0 0 40000800 0 0 0 1
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="gpio-keys"
P: Phys=gpio-keys/input0
S: Sysfs=/devices/platform/gpio-keys/input/input1
U: Uniq=
H: Handlers=kbd event1 as3676
B: EV=3
B: KEY=100040 0 0 0
I: Bus=0018 Vendor=0000 Product=0000 Version=0000
N: Name="zForce Touchscreen"
P: Phys=
S: Sysfs=/devices/virtual/input/input2
U: Uniq=
H: Handlers=event2
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=600000 3
I: Bus=0003 Vendor=413c Product=2005 Version=0110
N: Name="DELL DELL USB Keyboard"
P: Phys=usb-musb_hdrc-1/input0
S: Sysfs=/devices/platform/musb_hdrc/usb1/1-1/1-1:1.0/input/input3
U: Uniq=
H: Handlers=kbd event3 as3676
B: EV=120013
B: KEY=10000 7 ff9f207a c14057ff febeffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

also, attatched is the (almost) complete output from dmesg. the command prompt stopped letting me scroll up (might have gotten overloaded by the amount of text), so it's cut off at the top, I don't know how much.

Your dmesg is a train wreck!
You should not be having crashes.
Put the Dell keyboard aside. It's quoting 100 mA which may be the problem.
Use the Apple or another keyboard or even a mouse.
Use a powered hub until you get things working.
Your next experiment: If you find your keyboard in /proc/bus/input/devices, look for the event#.
Then:
Code:
cat /dev/input/event# [color=red]<- whichever number it is, event2 or something[/color]
Then twiddle keys, you should get a burst of garbage with each key.
Does your OTG adapter work on other things, your phone?

OK, I attatched a newer keyboard (logitech K120), through a powered hub. I tried the cat line with the event number, and pressing keys produced garbage output, just like you said! However, the keyboard still doesn't seem to provide any input to the nook. Also I retested the non-externally-powered otg adapter (because it seems like it should have enough power now that I'm using the usb hub), but it still doesn't do anything.
I'm not sure what you mean about using the otg cable with other things. Like I wouldn't expect my phone to know what to do when I plug a keyboard into it through the adapter. I tried this (with the externally powered one), and the phone did start to charge. But it didn't do anything else.

mysteriousmonkey29 said:
The nook started giving me an "install failed" lock screen when it idled for long enough.
Click to expand...
Click to collapse
Did you figure out the "install failed" when it sleeps issue? i have two NST that I cloned i thought way back, i can't remember even how I rooted them it's been so long. But one of them does this, and it's super annoying. It's about to sleep but instead it reboots then tries to install something and fails. Requires reboot.

No, never fixed this. I bet I could fix it by wiping the nook, re-rooting, and re-installing usbmode, etc. (in the correct order this time), but that's a pain, so I would prefer not to unless necessary.
Although maybe we are headed in that direction.

Related

Trying to diagnose my USB modem on android, tips?

So i have a CA-FI 7008000 android powered car stereo, it is a freescale based android 2.2 device with a USB host port dedicated for usb modems. Currently I am attempting to use the Sierra wireless 313u (att momentum 4g ) with it. When plugged in, it powers on and status lights begin blinking indicating it does see a network, but does not connect (light should go solid). Currently it isplugged into the correct port and is in Modem only mode. I have verified the device works on windows and a mac.
I've done a fair amount of hacking in android, but I'm beyond lost with this.
under dmesg in terminal im getting **** like this:
<6>usb 1-1: new high speed USB device using fsl-ehci and address 5
<4>usb 1-1: config 1 has an invalid interface number: 7 but max is 3
<4>usb 1-1: config 1 has no interface number 2
any ideas?
It sounds like either the USB descriptors in the device are a bit flakey or else your Linux is.
You can use usbview.exe under Windows (although it's ancient).
http://www.ftdichip.com/Support/Utilities.htm
Copy out the right hand pane for your modem.

rEFInd on the Toshiba Encore WT8-A32

I have managed to boot to rEFInd on my Toshiba Encore in preparation for booting Ubuntu from a microSD card natively. I have not written up a guide yet from my notes because I don't think there will be much demand for this here on XDA. If enough people want to do this, I will turn this post into a guide. This boots directly from the UEFI partition with no USB stick needed. You DO need a USB stick to do the actual install.
Toshiba Encore booting to rEFInd: http://postimg.org/image/4lx3mnxzr/
Toshiba Encore booting to Grub2: http://postimg.org/image/p3rgtpqkp/
__________________________________________________________________________
Installing Ubuntu 14.10 to a microSD card on the Toshiba Encore:
Note: There are many problems right now with Ubuntu on the Encore. Touchscreen driver is broken as of kernel version 3.16. It's some kind of regression bug in the atmel-maxtouch driver(here is a program to debug our touchscreen: https://github.com/atmel-maxtouch/obp-utils).
You will need to prepare with:
A USB stick to do the install
Ubuntu 14.10 64 bit ISO(Daily build) http://cdimage.ubuntu.com/daily-live/current/
A microUSB OTG cable(if you use the StarTech cable mentioned below then you don't need this)
A high speed microSD card(Partitioned: 200MB FAT32 EFI partition, a large EXT4 partition, and a swap partition). I used this(was $21 on sale) http://www.amazon.com/gp/product/B00IVPU894/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1
A Linux box to compile the latest versions of a few programs used to boot into Grub2 and Ubuntu. I will post the compiled versions but you should compile them yourself for security reasons.
Read this to get an idea what's needed to get rEFInd installed: http://www.rodsbooks.com/refind/installing.html#windows (there are extra steps not listed there)
The install will go from the usb stick booted from rEFIind to the microSD card. The Samsung PRO I am using only does ~20MBps so I'm guessing that is a hardware limit. I did the install without a swap partition and Ubuntu was unusable after opening up 4 or more programs so I added a swap partition to the end of my microSD card.
Getting rEFInd booting:
Turn off Secure Boot in the Encore bios. It should be possible to boot Ubuntu from a USB stick without turning off Secure Boot but I doubt it will ever be possible to do from a microSD card because the Toshiba Encore has no option to boot from a microSD card in the bios boot options.
Get rEFInd here: http://www.rodsbooks.com/refind/getting.html
Run these commands in an elevated permissions Windows command shell:
powercfg /h off
manage-bde -status c: (checks bitlocker status)
powershell
PS C:\> Disable-BitLocker -MountPoint "C:"
manage-bde -status c: (after above command finishes, makes sure your disk is really decrypted.)
Then follow this: http://www.rodsbooks.com/refind/installing.html#windows
All the commands are explained on rodsbooks website except disabling Bitlocker. This is optional but if something goes wrong along the way, you might find Windows 8 encrypted and unbootable.
Note: The command: "bcdedit /set {bootmgr} path \EFI\refind\refind_x64.efi" to get rEFInd set as the default EFI boot program did not take the first time I did it. You might have to run that commend a few times rebooting each time until your tablet boots into rEFInd. Once it does, you will see a graphic to boot Windows 8. I suggest changing rEFInd to text mode so that you can use the VOL UP, VOL DOWN, and Windows button(as enter) to scroll through the boot options. Use "textonly" option in the rEFInd config file to set this: http://www.rodsbooks.com/refind/configfile.html#adjusting
Installing Ubuntu(bleeding edge) 14.10:
Touchscreen does not work yet so I will update this section when I get it working.
_________________________________________________________________________
If you want to have power to your tablet and USB OTG access at the same time, here is what you need(both Amazon prime eligible):
http://www.amazon.com/gp/product/B0047AALS0/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1
http://www.amazon.com/gp/product/B00KQES55M/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1 (Any usb gender bender like this will do...there are cheaper ones)
Attach the USB gender changer to the black end of the StarTech cable and the attach a USB hub to the other end of the gender changer. Plug the red end into a 2.1 amp USB power source and the microUSB end into the Encore. Now the tablet will say "plugged in, not charging". You can now attach any USB device to the hub and Windows or Linux with see them. The tablet will have power but the battery will not charge.
bads3ctor said:
I have managed to boot to rEFInd on my Toshiba Encore in preparation for booting Ubuntu from a microSD card natively. I have not written up a guide yet from my notes because I don't think there will be much demand for this here on XDA. If enough people want to do this, I will turn this post into a guide. This boots directly from the UEFI partition with no USB stick needed.
Toshiba Encore booting to rEFInd: http://postimg.org/image/4lx3mnxzr/
Toshiba Encore booting to Grub2: http://postimg.org/image/p3rgtpqkp/
Click to expand...
Click to collapse
Hi
I wanna boot ubuntu on my encore Can You write the instructions how to, step by step?
Nice, not sure how many others own this tablet, the Venue 8 Pro seems more popular. But I bought an Encore for the microHDMI so I would love to see a guide.
Thank You, I would love to see a guide also, I own a Toshiba encore 32gb
Touch working? Wifi?
Thanks for posting the guide though!
Touchscreen driver works but needs calibration
SebMKd said:
Touch working? Wifi?
Thanks for posting the guide though!
Click to expand...
Click to collapse
Touchscreen bug:
Code:
i2c_hid i2c-ATML1000:00: failed to retrieve report from device.
Supposed to be fixed in kernel version 3.16 but so far in Ubuntu 14.10(kernel 3.16.0-23) TS is still broken. Internal WIFI works with a few tweaks. I am using a USB Atheros WIFI device for now.
I am running Windoze 8 and every few weeks I update Ubuntu 14.10 to see if the touchscreen works. I used to hack away at bleeding kernels to fix bugs like this but I am just going to wait for the Linux kernel devs to fix the touchscreen driver.
Edit: Booted into Ubuntu 14.10 after updating to the newest kernel and:
dmesg | grep i2c-ATML
[ 8.053603] input: ATML1000:00 03EB:8C12 as /devices/platform/80860F41:05/i2c-5/i2c-ATML1000:00/0018:03EB:8C12.0005/input/input6
Touchscreen works but is badly calibrated and the Unity side bar refuses to appear when the mouse is pushed to the left side of the screen. Not a very good trade-off! On the bright side, the former useless USB keyboard windows key now brings up the Unity sidebar.
Code:
[email protected]:~$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ MOSART Semi. 2.4G Wireless Mouse id=9 [slave pointer (2)]
⎜ ↳ ATML1000:00 03EB:8C12 id=10 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Video Bus id=6 [slave keyboard (3)]
↳ Logitech USB Keyboard id=7 [slave keyboard (3)]
↳ Logitech USB Keyboard id=8 [slave keyboard (3)]
↳ gpio-keys id=11 [slave keyboard (3)]
↳ gpio-keys id=12 [slave keyboard (3)]
[email protected]:~$ xinput list-props 10
Device 'ATML1000:00 03EB:8C12':
Device Enabled (130): 1
Coordinate Transformation Matrix (132): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (253): 0
Device Accel Constant Deceleration (254): 1.000000
Device Accel Adaptive Deceleration (255): 1.000000
Device Accel Velocity Scaling (256): 10.000000
Device Product ID (248): 1003, 35858
Device Node (249): "/dev/input/event5"
Evdev Axis Inversion (257): 0, 0
Evdev Axis Calibration (258): 1271, 1282, 3196, 3115
Evdev Axes Swap (259): 1
Axis Labels (260): "Abs MT Position X" (280), "Abs MT Position Y" (281), "None" (0), "None" (0)
Button Labels (267): "Button Unknown" (262), "Button Unknown" (262), "Button Unknown" (262), "Button Wheel Up" (136), "Button Wheel Down" (137)
Evdev Scrolling Distance (261): 0, 0, 0
Evdev Middle Button Emulation (268): 0
Evdev Middle Button Timeout (269): 50
Evdev Third Button Emulation (270): 0
Evdev Third Button Emulation Timeout (271): 1000
Evdev Third Button Emulation Button (272): 3
Evdev Third Button Emulation Threshold (273): 20
Evdev Wheel Emulation (274): 0
Evdev Wheel Emulation Axes (275): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (276): 10
Evdev Wheel Emulation Timeout (277): 200
Evdev Wheel Emulation Button (278): 4
Evdev Drag Lock Buttons (279): 0
Edit2: Here is the problem....the coordinates for calibration are off because the tablet is attached to an external monitor:
Code:
[email protected]:~$ xrandr
Screen 0: minimum 8 x 8, current 3200 x 1080, maximum 32767 x 32767
HDMI1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 983mm x 576mm
1920x1080 60.0*+ 50.0 59.9 30.0 25.0 24.0 30.0 24.0
1920x1080i 60.1 50.0 60.0
1600x900 60.0
1280x1024 60.0
1360x768 60.0
1280x720 60.0 50.0 59.9
1440x576i 50.1
1024x768 60.0
1440x480i 60.1 60.1
800x600 60.3
720x576 50.0
720x480 60.0 59.9
640x480 60.0 59.9
DP1 disconnected (normal left inverted right x axis y axis)
DSI1 connected 1280x800+1920+0 right (normal left inverted right x axis y axis) 0mm x 0mm
800x1280 60.0*+
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
very interesting. It's what I need :good:
Any more news on this?
I managed to install Refind. Also, I managed to install ubuntu on sdcard. But in Refind not appears Ubuntu. How I can edit Refind to search the OS on sdcard?
Thanks!!
PainToad said:
Any more news on this?
Click to expand...
Click to collapse
Sorry for not getting back earlier on this but I wanted to exhaust all options before giving up on running Ubuntu on this tablet. The deal killer turns out to be the MicroSD card bandwidth. From what I can tell from the tests I have done while running Ubuntu from the MicroSD card, the BIOS is set to run the SD bus in DDR25 mode with no option to set it to DDR50 mode. DDR25 mode maxes out at about 18 MB/Sec and this is causing Ubuntu to lockup when disk I/O gets saturated.
With no option in the BIOS to set the SD bus to DDR50 mode, it is effectively a hardware limitation preventing Ubuntu from running properly.
bads3ctor said:
If you want to have power to your tablet and USB OTG access at the same time, here is what you need(both Amazon prime eligible):
http://www.amazon.com/gp/product/B0047AALS0/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1
http://www.amazon.com/gp/product/B00KQES55M/ref=oh_aui_detailpage_o03_s00?ie=UTF8&psc=1 (Any usb gender bender like this will do...there are cheaper ones)
Attach the USB gender changer to the black end of the StarTech cable and the attach a USB hub to the other end of the gender changer. Plug the red end into a 2.1 amp USB power source and the microUSB end into the Encore. Now the tablet will say "plugged in, not charging". You can now attach any USB device to the hub and Windows or Linux with see them. The tablet will have power but the battery will not charge.
Click to expand...
Click to collapse
I have a question. This method won't be charging my tablet, so my battery won't be destroyed?
BTW another question. Why card reader in this tablet is that slow? I have sandisk extreme micro sd (64MB/s write - ~ 60MB/s in my PC card reader) but reader in toshiba can only read/write ~26MB/s. I thought that this card will be great for my tablet, but now I fell like I wasted my money. I could better buy standard class 10 micro sd card...
rascal0pl said:
I have a question. This method won't be charging my tablet, so my battery won't be destroyed?
Click to expand...
Click to collapse
The tablet will receive a charge but the battery will not be charged. If your battery is at 100% then it will stay at 100%.
rascal0pl said:
BTW another question. Why card reader in this tablet is that slow? I have sandisk extreme micro sd (64MB/s write - ~ 60MB/s in my PC card reader) but reader in toshiba can only read/write ~26MB/s. I thought that this card will be great for my tablet, but now I fell like I wasted my money. I could better buy standard class 10 micro sd card...
Click to expand...
Click to collapse
It is an internal firmware limitation. There is supposed to be a BIOS setting to set the SD slot to a higher bandwidth level but this tablet does not have that option in the BIOS.
Card Reader of Bay Trail tablets is broken
The Card Reader of Bay Trail tablets is slow because is broken, no linux boot and is a read-only device with stock linuxes. You can patch the kernel and install some boot stuff in new partitions of Windows disk, but you can't boot from microSD. I also installed Android x86 and run fast, Android 4 and 6 stable versions, but I couldn't activate sound nor battery status. At least for my research, until today, if you have the 32 GB disk is very difficult you can play with dual boot, Windows is slow and wastes the hard disk, tablet mode of windows has no attractive (while Android is near perfection) and desktop mode is not friendly for touch-screen use, but for now it is stable and all the other tablet's devices works (touchscreen, GPS, Bluetooth, cameras, sensors, miracast), the battery management in this Atom environment has issues with linux and under Windows this x86 system doesn't seem so far away from ARM efficiency. I installed many GPL portable Windows applications in a minimal disk space, so for now linux and Android are worse for this tablet that seemed created for a Microsoft's skinhead.
UEFI boot
I forgot I have a 10 inches version of this tablet, 32 GB, Windows 10 32 bits upgrade (first upgrade) and BIOS 2.0
UEFI multi-boot is not so difficult with: rEFInd, easyUEFI Windows application (because Windows changes boot order), linux's Unetbootin for USB boot, bootia32.efi archive for some linux's installations (Ubuntu-gnome 16.04.1 64 bits requires at least 7-10 GB and swap, may be 32 bits is a bit better because it's less RAM hunger), ... before tests, you have to disable Windows's Bitlocker encryption (AES-128 Windows disk software encryption for this model of the Atom processor, I think without hardware assistance, that it's seamless for the user because UEFI includes shared key, if disk key is deleted Microsoft online user account stores a large password), secure boot, fast boot, windows session identification (Microsoft online authentication sometimes locks session start, probably cause some autocheck of a efi boot manipulation... may be was "default_selection" option of rEFInd for booting last selected OS), backup efi boot partition (copy the files after mount partition)... then I gparted the Windows disk form USB (with no data loss).
And if someone can the microSD boot, Raspberry Pi community recommends Samsung EVO+ 32 GB, for about 10 $/€ (be warned about scam versions), with the best by far random IO, far less from 20 MB/s, but may be important for linux, although I don't know if max random IO of the card reader had been reduced too (most probably yes... and a lot).
Another chance is wubi EFI, a Ubuntu Windows installer that now supports UEFI 32 bits (the non approved by free-software community secure boot only with UEFI 64 bits), this install linux in a big file (resizable) of a NTFS Windows disk (again microSD doesn't boot, it requires a rEFInd's Card Reader firmware and is not available) and linux runs in loop mode inside this file. I installed Ubuntu-gnome 64 bits and 32 bits (in this case the installer requires a command-line option). UEFI32 too requires EasyUEFI and secure boot and bitlocker disabled, I utilized a USB wifi stick (TL-WN722N) until internal wifi was configured... I found lots of issues, including slow internal-wifi, soundcard, battery status, processor stepping and hangs, and other users's solutions for different tablets have not always worked... then no usability research here. Anyway, wubi is not the best way to install linux, although it works and it's easy, and Windows complain less.
A last possibility for linux could be VirtualBox 32 bits, this supports microSD use and Atom processor includes hardware assistance supporting even linux 64 bits. Virtualize linux on this tablet is very slow and touchscreen is a pain.
After some time I returned the tablet to its original state with no data loss*, USB boot still there or the install in a fast (if well chosen) microUSB 3.0 stick or microSD-adapter... but no charger without the use of a less portable, and manipulation disconnections, cable adapter. I utilized a cheap "octopussy" cable from China (3 USB 2.0+ microUSB for charge... 3-4 $/€ or less), but this tablet is incompatible for simultaneous operation (USB OTG+charge), it don't charge while USB use and only I can do slow charge with a tricky: connect with charge mode, change to OTG mode and connect USB devices (warning: some Amazon's users report issues or damages in other tablets).
*bitlocker key changed with a new online password stored for recovery, and Toshiba recovery (Bios option) was broken, may be caused by gparted or some UEFI boot application or some of the installed OS, who knows... normal fixes solutions don't work, although windows own recovery partition worked. Toshiba utilizes a particular EFI directory and Windows doesn't repair it, I copied Toshiba BCD backed up file or, in case it doesn't work, BCD file from Windows recovery boot directory (may be a normal fixboot is required first).
Bug issues under Windows 10 update
After some time of use this tablet suffers issues, cause of its Bay Trail buggy platform, under Windows 8.1 and 10 (worse): Wifi disconnections and poor speed, laggy applications and touchscreen sometimes is unresponsive, miracast disconnections and choppy sound, although the whole system doesn´t hang. I did try linux last updates from http://linuxiumcomau.blogspot.com.es/ and now most work better (July 2017), probably in a short time I will uninstall Windows 10.

Nook Glowlight Plus USB OTG Keyboard

I managed to get into developer mode on my new NGP, there's no more "build number" as I've seen in several blog posts with the latest update you click on the Nook icon on the About page it takes you to Developer mode. I've been able to install a few apps, but here's what I'd like to do.
I'd like to plug in a USB keyboard and use it to SSH into another machine through my WiFi hotspot to do some HTML/JS/CSS text editing while I'm outdoors (at the pool, the park, etc) as my other laptops/tablets aren't visible at all outdoors with glare. This would be a nice portable solution if I could get it to work, even editing locally on the device through some editor and sending via SFTP would be just fine.
However, I can get my USB OTG cable and USB keyboard to work on my Samsung J3 phone just fine, but not on my NGP it does nothing when plugged in, keyboard caps lock doesn't activate. Is there a way to get it to work, and does it require rooting the NGP? I haven't rooted the device yet.
JohnnyFriendly said:
However, I can get my USB OTG cable and USB keyboard to work on my Samsung J3 phone just fine, but not on my NGP it does nothing when plugged in, keyboard caps lock doesn't activate. Is there a way to get it to work, and does it require rooting the NGP? I haven't rooted the device yet.
Click to expand...
Click to collapse
As a workaround I put a VNC client on it so I can access my other devices and do the typing from there, that way I can use my RPI3 as the system with a keyboard on battery power and do some Python (Django)/NodeJS/ReactJS from the NGP using it as a monitor outdoors, but if I issue the following commands via adb to rotate into landscape mode I lose input on the NGP and have to reboot:
adb shell settings put system accelerometer_rotation 0
adb shell settings put system user_rotation 1
Any ideas?
I believe I looked at this once.
At least one of the problems is that the ID pin on the micro USB connector is not connected through to the processor.
B&N has never shown any interest in putting Bluetooth in a Nook.
We'll have to see if the latest "Nook Glowlight 3" will have either OTG or BT.

[GUIDE] Samsung Galaxy S7 UART

It is happened that I needed to obtain UART access on Galaxy S7. I tried Google search, apparently. I have found several threads on XDA dedicated to this question; however, they all are a bit outdated (2012-2013 years), containing information about an old loader.
Moreover, they are describing information in a very limited way, mostly telling the reader only about how to use UART with loader and do not going deeper into details.
Finally, despired to find any valuable piece of information, I performed my own research and here I will structure all the information I gathered and discovered.
To begin with, there is an USB multiplexing unit between USB-connector and USB-controller, aimed to measure the value of resistance between ID and GND, and setup a USB controller mode in dependance of that. That is not a new thing: the same way works, for instance, USB OTG.
But there exist other work modes which are hidden from the normal user. These work modes are utilized by a special device which is used by Samsung engineers. One can order a device like this on Ebay, but I do not se any reason for. Source codes of the mobile phone kernel are available for download and include a multiplexing unit driver.
The S7's MUIC name is MAX77854, which comes with lack of documentation, but we have a driver, which, obviously, has source codes which are available here: drivers/muic/max77854-muic.c. Going through the sources, I found an actual table of the resistance values and work modes for this device:
OTG =*GND
MHL = 1K
VZW_ACC = 28.7K
VZW_INCOMPATIBLE = 34K
RDU_TA = 40.2K
HMT = 49.9K
AUDIODOCK = 64.9K
USB_LANHUB = 80.07K
CHARGING_CABLE = 102K
GAMEPAD = 121K
TYPE1_CHG = 200K
JIG_USB_OFF = 255K
JIG_USB_ON = 301K
DESKDOCK = 365K
TYPE2_CHG = 442K
JIG_UART_OFF = 523K
JIG_UART_ON = 619K
TA = OPEN
USB = OPEN
CDP = OPEN
UNDEFINED_CHARGING =*UNDEFINED
ATTACHED_DEV_NUM = NUM
I have no idea what the listed most modes mean, but I see one very interesting mode JIG_UART_ON, which has been researched a bit and which allowes us to connect a device through USB-UART adapter and get a SBOOT boot log. I was inspired by an article about SBOOT where a guy researched the possibility of hijacking the boot loader and discovered a way how to change boot parameters including kernel boot parameters.
First of all, we need to build a JIG(UART) adapter. For that purpose we need to have any USB-UART adapter (I used FT232) and resistance unit for 619kOm (I have purchased one for 620kOm in the shop next to my house). Then we need to get them together as on the scheme:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The newly created adapter we need to plug in to the computer and wait for a new device name (on my system it set as /dev/ttyUSB0), then connect to this device through a terminal application (I used minicom).
Code:
sudo minicom -D /dev/ttyUSB0
I am not sure what settings will you have for your terminal application, that's why I highly recommend you to set up your port settings and disable the hardware flow control setting. After all things done, you have to plug a mobile phone to this adapter and turn it on using the key combo: Vol-(Volume Down) + Power.
As symbols on the screen start displaying, you need to quickly press Enter key as minimum as 3 times until we see the command line. Congratulations! We are in the SBOOT console! Run the following command:
Code:
setenv CMDLINE console=ttySAC4,115200 loglevel=4
saveenv
After its execution complete, press and hold Vol-(Volume Down) (if the above mentioned key has not been pressed, SBOOT will not print anything in the console) and enter the command into the SBOOT console:
Code:
reset
The device will reboot and we will see a SBOOT boot log and a part of kernel boot log. Why only a part? Because as of my research, a small bug is located in the kernel sources, I give you a patch for it below:
Code:
diff --git a/drivers/muic/universal/muic_apis.c b/drivers/muic/universal/muic_apis.c
index 342bc51..5af193c 100755
--- a/drivers/muic/universal/muic_apis.c
+++ b/drivers/muic/universal/muic_apis.c
@@ -796,7 +796,7 @@ int detach_jig_uart_boot_off(muic_data_t *pmuic)
*/
int attach_jig_uart_boot_on(muic_data_t *pmuic, muic_attached_dev_t new_dev)
{
- int com_index = COM_OPEN;
+ int com_index = COM_UART_AP;
int ret = 0;
pr_info("%s:%s JIG UART BOOT-ON(0x%x)\n",
After it has been applied, we will be able to see all the kernel boot log; however, we will break the GSM component of the mobile device. This UART port is used be system to communicate with a GSM modem. At this stage we can use it for kernel debugging, but it wasn't our goal.
Now let's get mobile device console access through UART, using the information received above.
To achieve this, we have to install TWRP on our device and using it, get root access. Then we have to install busibox, which includes getty application and that is the only its difference from the original. Afterwards, we boot our device, install a terminal emulator and switch the device to the airplane mode.
Now start the emulator and enter the following commands:
Code:
su
echo 1 > /sys/devices/virtual/sec/switch/uart_en
echo AP > /sys/devices/virtual/sec/switch/uart_sel #на этом этапе должен появиться лог ядра
su root -c "getty -n -L -l /system/bin/sh 115200 ttySAC4 vt102"
Useful links:
xda old forum thread
SBOOT hacking
and you connected the 3.3v line -why- exactly? the samsung won't power your max232 (if it does, like with usb otg, it will supply 5v, not 3.3 or usb converter and 3.3v won't power the samsung. just txd rxd and gnd is enough. also the 301ohm one always turns on the phone and boots to factory 'odin' mode for mass deployment of new firmware. (normal usb tho). when using them with the rs232 resistor value they'll output some crap at 115k2 during the bootloader.
cb3rob said:
and you connected the 3.3v line -why- exactly? the samsung won't power your max232 (if it does, like with usb otg, it will supply 5v, not 3.3 or usb converter and 3.3v won't power the samsung. just txd rxd and gnd is enough. also the 301ohm one always turns on the phone and boots to factory 'odin' mode for mass deployment of new firmware. (normal usb tho). when using them with the rs232 resistor value they'll output some crap at 115k2 during the bootloader.
Click to expand...
Click to collapse
I connected 3.3v because it normal to connect this line and it works. Probably without this line it will work. Everything that I write was tested by me. If you see crap during bootloader check minicom config.
lSDriim said:
I connected 3.3v because it normal to connect this line and it works, ft232 won't power Samsung because it's not working like that. Everything that I write was tested by me. If you see crap during bootloader check minicom config.
Click to expand...
Click to collapse
connecting a 3.3v line to a 5v line (regardless of which way the power goes) doesn't seem very practical for long time use. at least for 'factory odin' mode the phone can be powered from the 5v usb side during the firmware deployment (as usually the batteries aren't all too full when we pull them out of the box anyway
nah not crap as in frame errors and random bytes crap. crap as in some status messages but nothing useful. could not find any way to stop it and drop into a machine language monitor, get any type of prompt, inject code to be booted, or anything else that would be useful from there. it literally just seems to be some debug messages of the bootloader(s)
1650 pages of leaked "samsung confidential" datasheet but finding how to actually -use- the things for anything 'not android' (as in registers, memory map instruction set)? nah. it's more work to figure out how samsung screwed things up and get rid of all their 'monopoly' code which they try to pass off as 'security' than to just design a new phone and order it into production
anyway, the age of the post of the resistor values doesn't matter. the values are the same for every samsung device i've tried (we only use s7's but i got boxes full of other models, including very old ones. the resistor cables work exactly the same way all of those - although the 'magic bytes' for samsungs 'modified' simg format are different for each model, as are obviously the partition sizes. and really old ones seem to use a different and incompatible version of the odin protocol alltogether). haven't tried it with those usb-c connectors on those j5/a5 or whatever those things are called, as i don't have usb-c male pcb connectors in stock, but most likely there too. it's also not very picky on the actual resistor value. 300 ohm instead of 301 is fine. as long as it's 'close enough' it'll go to the desired mode. (as their specified values are weird, you can't buy 301 ohm resistors (pretty much all of them do uart mode and turn on+odin factory mode)
cb3rob said:
connecting a 3.3v line to a 5v line (regardless of which way the power goes) doesn't seem very practical for long time use. at least for 'factory odin' mode the phone can be powered from the 5v usb side during the firmware deployment (as usually the batteries aren't all too full when we pull them out of the box anyway
nah not crap as in frame errors and random bytes crap. crap as in some status messages but nothing useful. could not find any way to stop it and drop into a machine language monitor, get any type of prompt, inject code to be booted, or anything else that would be useful from there. it literally just seems to be some debug messages of the bootloader(s)
1650 pages of leaked "samsung confidential" datasheet but finding how to actually -use- the things for anything 'not android' (as in registers, memory map instruction set)? nah. it's more work to figure out how samsung screwed things up and get rid of all their 'monopoly' code which they try to pass off as 'security' than to just design a new phone and order it into production
anyway, the age of the post of the resistor values doesn't matter. the values are the same for every samsung device i've tried (we only use s7's but i got boxes full of other models, including very old ones. the resistor cables work exactly the same way all of those - although the 'magic bytes' for samsungs 'modified' simg format are different for each model, as are obviously the partition sizes. and really old ones seem to use a different and incompatible version of the odin protocol alltogether). haven't tried it with those usb-c connectors on those j5/a5 or whatever those things are called, as i don't have usb-c male pcb connectors in stock, but most likely there too. it's also not very picky on the actual resistor value. 300 ohm instead of 301 is fine. as long as it's 'close enough' it'll go to the desired mode. (as their specified values are weird, you can't buy 301 ohm resistors (pretty much all of them do uart mode and turn on+odin factory mode)
Click to expand...
Click to collapse
I write from my phone, because I am on vacation now and can't write long messages(too lazy now). But in this guide I write how to get bootloader prompt and change kernel start command and you can change kernel and boot anything you want... I already do this to boot up normal linux. In links there are link to guy that tried to hack sboot, may be he can help you.

USB Host Mode on Glow2 & Glow3

We've had USB host mode working on the NST using a bit of poking with my UsbMode.apk
I just figured out how to get it working on the Glow2 (and it will probably work on the Glow3, though I haven't tried it yet) and it works fine on the Glow3 also.
USB host mode means that you can connect USB accessories like keyboards, audio, flash drives.
The simple stuff (like keyboards or an HID device) works easily, some of the other stuff might need work.
I quickly checked a flash drive and the drivers loaded, so at most it's a question of getting it mounted.
The current downside is that we can't get power out of the Glows.
That means that you need to use a back-powering hub.
You still need an OTG adapter (or at least a reversing cable) to connect the Glow to the input port of the hub.
To see this for yourself is simple if you have busybox installed.
This turns host mode on:
Code:
# busybox devmem 0x20e03d0 32 0x130b1
This turns host mode off:
Code:
# busybox devmem 0x20e03d0 32 0x1b0b1
You can use my UsbMode.apk (in the signature) to see the USB tree, although I haven't added the above poking to the app yet.
I made a daemon that allows playing with this pin padctrl without you having to lower the protection on /dev/mem
I added the option to a private build of UsbMode and it works fine switching into usb host mode.
Unfortunately, even though the bit twiddling back to peripheral mode works just fine, the USB gadget stuff is screwed up.
So, in short, if you wanted to use this (not yet released), you could dock and push a button to go to host mode, but you'd need to reboot to get it working on peripheral and ADB.

Categories

Resources