USB Tether doesn't work in Linux - Auto USB0 not recognized - Epic 4G Q&A, Help & Troubleshooting

I have a rooted Epic 4G running Random Thunderhawk with the EH17 Modem and Nubernel, which is based on 2.6.35.7.
My problem is that my phone DOES NOT tether through USB on any Linux machine. The wired tether works fine on Windows 7, and WiFi tether works universally on any computer. After running netcfg on my phone I see the USB0 connection active, but when I plug in my phone on a Linux machine, nothing happens. For the sake of clarity, I'll just focus on my laptop running a fresh install of Xubuntu 11.10. When I run ifconfig on my laptop, USB0 isn't there. Only Eth0, lo, and WLAN.
Could someone help me out? Am I missing something?
BTW - I'm using the pre-installed wired tether app which is Wired Tether v1.4

Anyone have suggestions? I would really like to tether using 4G, but having the 4G and WiFi radios on simultaneously consumes too much power and makes my phone crash after an hour of use. I'd appreciate any help getting my USB/Wired tether working again for my Linux machines.

It's a known bug in the USB gadget stack for all SGS GB ROMs. The problem is that the RNDIS interface is reporting interface descriptors numbers (4 & 5 if I recall) that don't actually match the actual interfaces used (0 & 1). Even though it's redundant information, Linux pays attention to these values and chokes when they don't match. Windows appears to ignore them entirely.
I've thought about fixing it, but it requires changing the gadget API a bit and, well, I haven't got around to it. I personally use a much simpler kernel patch that exposes the RNDIS interface when "USB Debugging" is enabled, forcing it to use the correct interfaces. I haven't included this patch in a compiled kernel though since I'm not certain if the presence of an additional interfaces breaks adb on Windows.
Sorry that's not a perfect answer. I may try to revisit the issue and fix the original bug when I have a bit more time.

mkasick said:
It's a known bug in the USB gadget stack for all SGS GB ROMs. The problem is that the RNDIS interface is reporting interface descriptors numbers (4 & 5 if I recall) that don't actually match the actual interfaces used (0 & 1). Even though it's redundant information, Linux pays attention to these values and chokes when they don't match. Windows appears to ignore them entirely.
I've thought about fixing it, but it requires changing the gadget API a bit and, well, I haven't got around to it. I personally use a much simpler kernel patch that exposes the RNDIS interface when "USB Debugging" is enabled, forcing it to use the correct interfaces. I haven't included this patch in a compiled kernel though since I'm not certain if the presence of an additional interfaces breaks adb on Windows.
Sorry that's not a perfect answer. I may try to revisit the issue and fix the original bug when I have a bit more time.
Click to expand...
Click to collapse
Thanks for the help. I was unaware of the bug. I'll downgrade to a Froyo-based ROM until the GB bugs are worked out on the Epic.

An alternative to tethering...
http://code.google.com/p/proxoid/
Just run the host application and install the android app... works pretty well.

When I run ifconfig -a on my phone from adb shell, while it is plugged into a windows machine with usb debugging active, I cannot see usb0. Why would usb0 be missing?

Related

SDIO WiFi which support Host AP,Can we build an Access Point

I know this may seem rhetorical, as most people use their PDA as WiFi clients. However, i've noticed a plethora of cheap SDIO WiFi cards, many of them OEM's. In fact, I have an Ambicom branded SD WiFi card which is actually the same OEM card as produced by Spectec in Taiwan. Unfortunately i haven't seen a pocketpc driver by them that supports the softap function. The specs for the cards show that they can do "Host AP Mode", which is what it takes.
What this means, is that with these cards it should be possible to turn the Harrier/(Blueangel with SD Wifi Card) into an actual Access Point.
My knowledge of how the Windows Mobile kernel operates and its packet routing infrastructure is pretty much nil. I have seen that you can add ICS (Internet Connection Sharing) as a catalog option when compiling a rom for Windows CE. An older product called Segue SoftAP by PCTEL actually did something similar while running under Windows XP, and utilized the built in ICS on it. I'm just curious if anyone knows of a way to build a ROM that something like this could be done through. I've never even seen a DHCP server for pocketpc, so there would need to be a few new things written for sure.
I would just like to know if this is absolutely impossible to do because of the operating system, i know that the hardware can do and handle this, easily.
Also, to know if there is an interest in having something like this by the users in the community.
Would be nice with a video capture device - streaming video from the handset directly to connections.
IH.
Actually, personally i was planning on using it with the Sony PSP to have internet access for it...
There would be many benefits to having the device set up as an access point. Almost limitless.
I guess i'll answer my own question. Apparently there is no routing built in to the OS (PocketPC).
However, companies like airscanner have managed to write drivers which interface to NDIS 6.0 for a firewall. Someone writing a packet router would be really cool.

Figuring out debugging on a Kaiser on Win 7 (32 AND 64 bit)

Hi all!
I need your help to get this thing working, without necessarily
1: Install Ubuntu on one of my boxes
2: Debug through VirtualBox
I have been mucking about with getting ADB to recognise my Kaiser but it's been a long run uphill without any results. I'd like to ask you guys/gals if you have a fully working adb debugging environment with your Kaiser in Windows 7, 32 bit AND 64 bit. I'd like to know for three reasons
1: I have two boxes with either version of Windows 7
2: I have a Kaiser I'd like to be able to debug so I can help out as best I can
3: It would be a great addition to the wiki I'm authoring
So, if you have and/or know a debugging environment set up, please provide details on what to get, where to get it and how to install it.
I have been searching this forum up and down and used Google but this is seriously kicking my butt right now . Thank you all in advance!
Another option would be to make a dual-boot machine, although i'm not certain how this would work with Win7, only done it on XP, however I'm sure it's relatively simple.
In fact if it wasn't for the fact that I need my desktop as a file and print server it'd be dual-boot already.
I'm resurrecting an older laptop at the moment purely as a linux box to use as a dev environment, which is fun as anyone who has an acx100 wifi chipset will tell you (having to go back to Ubuntu 6.10, which is the last fully acx100 aware version I can find).
Dual booting involves either, repartitioning your hard drive, or installing another drive for Linux, I find having about 10GB is enough with maybe 1GB or so for swap, this is usually plenty for a decent dev environment with a lightweight GUI like Xfce or even Enlightenment, if you want bells and whistles, (Gnome or KDE), maybe as high as 20GB.
Some feedback
I've been trying to do this on two Windows boxes for a couple of hours and I have to say, it's pretty amazing that I can't seem to get this working in any other way that either installing Ubuntu or Windows XP.
I've been trying the drivers that came with the Android 2.x SDK because these should be working. Is there anything preventing these drivers from working on our Kaisers and should I in that case get other ones (please provide a link)?
I'll try using a Live CD of Ubuntu and boot up my 64-bit box and see if I can get that to behave. Will report back as soon as its done.
It may be something weird, because I connected my kais130 to my old armada 500 laptop yesterday, which is running an old 6.10 version of Ubuntu, and it connected in USB with not a care in the world, powered down, swapped drives to my XP drive, and rebooted, it too detected the kais, yet on my 1.6Ghz dual core netbook, not a flicker, even running the latest 9.10 ubunto on live cd, not a thing.
I'm starting to wonder if sometimes the lack of connectivity is down to hardware on the PC side?
My old laptop however hates even ubuntu 6.10, so I may have to go to another lighter distro, probably slackware based, in order to get decent speed without the damn memory hog of a gui ( gnome or kde ) and the ability to compile my acx100 module without all the ubuntu hand-holding sudo stuff getting in the way.
I just finished a guide on the wiki I'm authoring to get debugging up and running on Ubuntu 9.(Karmic Koala) and it worked on two of the machines I got around here. One of those machines is the one with 64-bit Windows 7 which I couldn't get to work before.
I threw in a Live CD of Karmic Koala and made a couple of changes to the udev rules and it worked from the first get-go. Same with the other computer, which is a laptop which just so happens had Ubuntu installed in it already. I followed the guide I wrote and it worked without a hitch.
My limited knowledge about drivers and hardware leads me to think there's something going on with either the driver having a problem realising there is an Android based device connected to it, or it is something else entirely.
I wish I had a it more knowledge about these things, if nothing else to be able to get some kind of log/dump/debugging info out of Windows that I could share with the rest of the people around here, which might make us nail down the culprit and get rid of these problems for good. Or until the next version of Windows gets released.
Anyways, it is now up and running on my Ubuntu-laptop, so now I can at least get some more info about what's going on in Android when it locks up, freezes or just FC's.
Ditch VirtualBox. USB support on it is pretty crappy.
I build all of my roms on Ubuntu sitting on VMware Player. Very seamless experience.

Reversing Kin Syncing Procedure [Theory]

Mmm at last, the thing was discovered, and just experimentation is needed, so we can test the syncing (Cheack Thread Page 3).
Old post text:
Code:
Mmm as I am far from a selfish guy, and have been asked about this, i think that i will share in an independent thread for anyone to see.
Note that this comes from my own ideas, not tested as i cannot use MTP protocol anymore.
[SIZE="5"]Responsability Disclaimer[/SIZE]
This may be agains DCMA or laws about reversing in your country. It's not probably being that way as is a development to interoperate with an unsupported OS (linux) and its one of the exceptions, but i'm not responsable for any liability you can have or imagine.
[SIZE="5"]What is this for?[/SIZE]
This is the procedure to follow before thinking in hacking the phone itself, trying to get to write and read files from the device.
It could faild and serve to no purpose or be gold, depending on the success of the tests.
In the best case, this will lead to the reading and writing of files at will to the device storage.
[SIZE="5"]USB protocol Pre-Knowledge (fast)[/SIZE]
I know you dont wanna know about it, and i am far from an expert but i must just express that USB devices support two operations:
[B]Bulk Transfers[/B] -> Big chunks of data, used mostly for the common data transfers up to 512Bytes per transmission (at a max/time).
[B]Interrupt Transfers[/B] -> Short chunks of data, used for changing settings on the device or short burst of information.
For your personal knowledge, MTP protocol instructions are bunch of hex codes and [U]they use bulk transfers for all of the MTP instructions[/U].
[SIZE="5"]Required items - Gathering[/SIZE]
- Working Kin
- Windows OS as host OS
- USB sniffer / monitor (I like Usblyzer, has trial for 30 days)
- CPU with virtualization capabilities (google how to check)
- Vmware
- Mac OSX image dvd (Snow leopard)
- Software & registration from MacSpace for Kin Media Sync
[SIZE="5"]Procedure[/SIZE]
- Unplug the kin & close all zune software opened.
- Install OSX in an vmware machine
- Install and setup Kin Media sync for mac
- Kill the process that launches zune when you plug the device ("ZuneLauncher.exe")
- Plug the kin now. Use a port where no other device is, so try to put it not together with other usb device like mouse/keyboard which could send packets and confuse the capture.
- Install and setup usb sniffer for windows.
--- Set it to sniff/capture at the USB port where the kin is (it's a tree view structure, so easy to see where to put the check). [U]Dont do it at the left of the KIN device!!![/U] do it on the bus/port as you will disconnect the kin later. Press start capture.
--- Open the zune software and visually check that the sniffer is capturing data (eeeeeeeeeeeeaaaaaaasssssyyyyyyy as it appears there). If it doesnt, you'r doing it wrong, probably cause the port/bus issue.
--- Close zune
--- Reset the capturing (stop, dont save, start).
- Open the virtual machine if it isnt.
- In the virtual machine you should have Kin Media Sync installed, which autolaunches if you have plugged the phone (virtually).
- In the virtual machine window bottom right (vmware border) you will see an item with usb icon. Hover over it and see if the tooltip says KIN. If there are more, look for the right one. Right-Click on it and pick "Connect (Disconnect from host".
- Hopefully, the usb sniffer on Windows would turn mad and begin capturing data, while Kin Media Sync is opening on the OSX virtual machine.
- I cant remember if it does put the label "Connected" at the Kin (you should remember that window from the Zune syncing :P). If it does, close Kin Media Sync and stop the capture on the windows usb sniffer. Else, do a sync before closing (doesnt matter what).
- Save the captured log as a file (in my case, Usblyzer file).
[SIZE="5"]Yeah, but why this is better than other software?[/SIZE]
Other users (and myself) have tried software that uses the MTP software which has some success on getting info from the device but fail when it comes to do reading or writing to the device.
I guess it's probably because the rest of the protocol, the private part that microsoft uses (MTPz) has some control values through the usb that turn on/off device properties, among ones is the one to write/read files.
My first idea was to understand this through the Zune software, but as i said many times, it uses DRM (Janus) to protect the songs (sigh!) and the mtp specification varies if using DRM protection, so i can never find out a way to solve it, without hacking the Zune software cryptography itself (not my intention at all) or became an old man finding how to bypass it. In any case, the Zune software does a RSA challenge-response handshake to the kin before calling to MTP-OpenSession, i can assure that, so its out of reach.
On the other hand Kin Media Studio for the OSX has no official DRM and it can just do easy syncing, so it's pretty much obvious for a dev guy (i am, haha) that its an easiest way to replicate. So i tried to go that way and i was correct, so it just does normal operations through usb and control interrupts.
The problem is that the native sniffers from OSX only capture 16 bytes of data through the usb bus, so messages over that cipher were not reachable for me at the moment. I contacted apple USB master guys about getting a bigger limit, and the resumed answer was something (just much more politely) like: "you'r screwed & stuck with 16 bytes".
So the only approach is to emulate Kin Media Sync in an OSX virtual machine under a windows os machine for the best sniffer software. Another bad point for the fruit logo machines.... (and i'm an owner... imagine a hater!). Here is why I stopped, as my normal working device (laptop) is kinda old and has no VMX/virtualization support, so i couldnt setup the virtual machine for OSX, stopping all the needed setup.
[SIZE="5"]From sniffed data to magic[/SIZE]
At this point, comes the complicate part. Understanding & testing the packets sent to the device to make things work. This is the part where i was going to operate with a new device or my current one if it wasnt bricked/stuck.
The problem appears with this structure (what is on the logged sniffed session):
- Plug the device
- Device <-> OS Handshake (Interrupt/Bulk transfers possible)
- Kin media sync queries (Interrupt transfers)
- Kin media write/read enable (Interrupt transfers)
- Kin media MTP Open session (Bulk transfer)
- Kin media MTP GetStorageInfo (Bulk transfer)
..... more MTP xxxxx (bulk transfer)
- Kin media MTP Close session (bulk transfer)
- Kin media write/read disable (Interrupt transfers)
- Kin media bye bye sync queries (Interrupt transfers)
(if unplugged, the ones below)
- Device <-> OS Goodbye (Interrupt/Bulk transfers possible)
- UnPlug the device
As some of you may realize, normal MTP software used didnt make the "read/write enable" cause the kin is not a standard device. So they fail. Once some person identifies which of this interrupt values make the kin "Connected" window shown and also enables it to be writable, profit comes.
So to test this and later make it published, you need a program to communicate with the device itself and do what some of you called "send hex codes to the kin" (which technically is "bulk and interrupt transfering values to the kin")
There seems to be none, so i code one from scratch and could polish it a bit and giveaway as a Netbeans C++ proyect.
I had some success and it works ok as i reused it(almost all the code) to operate my G15 on linux, iluminating keys and using the LCD pixels.
[SIZE="5"]This can brick my device?[/SIZE]
The short answer to this is NO. The long answer is no again, but cannot be sure of what happens enabling the the device settings while testing. It may become frozen and need to be restarted for example.
During the few test i made, mine refused to operate within my usb program and it was autosolved by libmtp-tools, which did a protocol reboot and it just work as is without doing nothing.
Anyway, i was aware that it was better than getting stuck with the phone "as is".
mmm All being said above, i just leave space for you guys to think what you wanna do with the info and questions that may appear.
Thanks but Hardware Virtualization came up as a no on my laptop.
I hope someone else tries.
I know I know I have to change my username as there are many similar and it gets confusing.
Thanks for taking the time for all the above text
I had a quick read-over what you put, but haven't looked at everything in detail. My wife had a baby yesterday morning, so I'm finding myself rather busy as of late.
Anyway, I'm more than happy to run some tests. Here's what I have access to right now (at home), with much more available when I get back to work in two weeks:
XPS m1530 laptop running x86 Windows 7 (dual-boot to Ubuntu 10.10 running as the Joli OS front). No Hardware Virtualization available for this system, though it can run VMWare for 32-bit Windows OS's.
Macbook Pro (Intel 64-bit archetecture) running 10.6.7 Snow Leopard. Can set up virtual machines if needed, using VMWare, but I'm not sure if that's necessary or not.
Powerbook G4 (PPC) running 10.5.x (latest 10.5 build). Can't run virtual machines, but can be used if another source is helpful to trace.
My personal KIN TWOm running the M OS build. Can technically be reverted back to the TWO (non-M) OS, but I'd rather not lose everything as it's my working phone.
My wife's TWOm, not activated. I can probably play with this more, as she isn't ready to use it yet, but I'd be in trouble if I bricked it.
At work, I have access to a number of different computers and OS's, as needed. I don't think this would be necessary, but they are still there.
John, can I ask where you're at? I've gotten the notion that you're not in the US, as you've said you don't have access to a CDMA network. Is there any way we can get your phone to a US Verizon store for assistance?
klamation said:
Macbook Pro (Intel 64-bit archetecture) running 10.6.7 Snow Leopard. Can set up virtual machines if needed, using VMWare, but I'm not sure if that's necessary or not.
Click to expand...
Click to collapse
This has hardware capabilities (VMX feature), but you should have to install XP (or 7) through bootcamp and then install the OSX there, as the host must be windows. Anyway, you'r "lucky" as 64 bit machines can get up to 32 bytes from the usb bus, so 2x my limitation (not enough but more).
klamation said:
John, can I ask where you're at? I've gotten the notion that you're not in the US, as you've said you don't have access to a CDMA network. Is there any way we can get your phone to a US Verizon store for assistance?
Click to expand...
Click to collapse
I'm from Europe, so most phone network is common GSM with some 3G implementations. I didn bought the phone from verizon, so have no relation to them and hence, no way to give them the phone expecting a working return (why should they in any case?).
johnkussack said:
This has hardware capabilities (VMX feature), but you should have to install XP (or 7) through bootcamp and then install the OSX there, as the host must be windows. Anyway, you'r "lucky" as 64 bit machines can get up to 32 bytes from the usb bus, so 2x my limitation (not enough but more).
Click to expand...
Click to collapse
After I read the details of what you want to do, I thought the same thing. I have 64-bit Windows 7 set up on a bootcamp partition (I actually use VMware Fusion to run it, most of the time, but can natively boot into it, if I need). I have never been successful at setting up an OSX VM though, as it's not officially supported. If you have any reference on how to do it, I'm all ears. I'll do more research into it after posting this.
johnkussack said:
I'm from Europe, so most phone network is common GSM with some 3G implementations. I didn bought the phone from verizon, so have no relation to them and hence, no way to give them the phone expecting a working return (why should they in any case?).
Click to expand...
Click to collapse
Considering the phone is less than a year old, it should still be under warranty. I know I've taken phones into their stores before and had them reimage them. I should try that with the KIN to see if they can do it (if the stores actually have the ability to reimage a KIN phone, indicating they have a ROM of it)
I could assist, I have a tri-boot of vista, 7, and OS X.
I doubt that there is a 128 bit processor emulator, let alone the OS...so wouldn't a solution be to use the same technique ,but "freeze" the process to collect data being transferred?
When I mean freezing, I mean slowing the USB data transfer speeds (using hardware underclocking, on the computer and/or phone)
@klamation
http://www.redmondpie.com/how-to-install-os-x-snow-leopard-in-vmware-windows-7-9140301/
Also, it could be a hackintosh image, i guess. At least if it is able to install the kin media sync software...
awesome71717 said:
...
Click to expand...
Click to collapse
i didnt understand anything beyond the 1st line.
there is no need to slow anything as it was a OSX kernel limitation thing, period.
John,
Why do we need 64bit vmx capability to capture messages when the Zune Software is successfully messaging with 32 bit on windows machines? Obviously I am missing something important.
Dave
kintwouser said:
....Dave
Click to expand...
Click to collapse
You'r missing a more detailed reading of the first post.
Quoteing myself:
My first idea was to understand this through the Zune software, but as i said many times, it uses DRM (Janus) to protect the songs (sigh!) and the mtp specification varies if using DRM protection, so i can never find out a way to solve it, without hacking the Zune software cryptography itself (not my intention at all) or became an old man finding how to bypass it. In any case, the Zune software does a RSA challenge-response handshake to the kin before calling to MTP-OpenSession, i can assure that, so its out of reach.
Click to expand...
Click to collapse
John, I was talking about halting the processor of the phone to allow the cache of data to be recorded and cleared. Once cleared, the processor will resume and the cycle can be repeated until the data is fully collected.
Anyway, has anyone found a jtag port on the board?
awesome71717 said:
John, I was talking about halting the processor of the phone to allow the cache of data to be recorded and cleared. Once cleared, the processor will resume and the cycle can be repeated until the data is fully collected.
Anyway, has anyone found a jtag port on the board?
Click to expand...
Click to collapse
I guess that it would be feasible in a parallel universe. And not mentioning that it's a host os "problem" (st#### OSx), not the phone fault.
Also please posting random ideas without thinking about what you say. A jtag? really?
And in the random case where you can plug one JTag cable/homemade adapter.... how the hell will you use it? with what program? with what known hardware specific schematics?
We cannot handle a USB writing... forget about other access...
Trying to start up Mac OSX 10.6 on a dell 630 laptop but keep getting a cpu has been disabled by the guest operating system error. Maybe I can get a newer copy of MAC that will work.
@ kintwouser
If you are having problems, look for kexts oriented around vmware or your own hardware if you're using hardware acceleration.
@John
Ah. Well then I'll just hop into my Delorean that I modified to travel to alternate dimensions, rather than just through time.
Ok ok I'll try to resist irking you any further.
I just reread the Kin Media Sync to asure it, and you can install it over a 10.5.6 Osx which is the labeled "Leopard" (as is), so i guess easier to get.
Maybe a little hackintosh image would do the same thing, as we dont really need compatibility... as long as the Media Sync works i wouldnt care about having audio on the virtual machine, or networking.. whatever.
On my own plain of existance, i tried to follow the url i posted and went till 95% of the installation, but Virtual machine didnt keep installing, so i had to turn the pc (was about 3 hours). I guess i will try with another different image or my official leopard dvd's.
It's kinda weird in my case, using a macbook with windows to vitualize a OSX... haha.
I've been trying to install SL for about 30 hrs now with no success. I've tried three different versions. VMware 7 is OK here but ACPI errors keeps disabling the CPU during osx install. I have edited the vmx file to no avail. Some suggested that I need kext files but I can't install them if osx isn't installed. I'll keep trying as it is a quest now.
don't know if i am breaking the agreements of this forum since i didn't read it (ala the latest south park episode) but here:
http://tehparadox.com/forum/f51/snow-leopard-10-6-6-vmware-hackintosh-newbies-1973493/
No editing needed. You just need to get VMware Workstation from the official site and use that custom vmware osx image. I have tested it and it works. Now if only I had the phone I could really do some testing.
zero2duo said:
don't know if i am breaking the agreements of this forum since i didn't read it (ala the latest south park episode) but here:
http://tehparadox.com/forum/f51/snow-leopard-10-6-6-vmware-hackintosh-newbies-1973493/
No editing needed. You just need to get VMware Workstation from the official site and use that custom vmware osx image. I have tested it and it works. Now if only I had the phone I could really do some testing.
Click to expand...
Click to collapse
Great find, i'm downloading it atm. Well, i think they could have chosen a (mega)better site but's ok. Queued downloads.
I will try the "installation" in my bootcamped windows XP plus vmware and then kin media sync.... Now I need a phone too, heehehehehe.
John,
I got a 10.6.7 VM running on my Win7 bootcamp partition. I followed the steps you mentioned and was able to capture some USB sniff/trace logs of browsing the device and copying a file. (inexperience during the initial sync missed the bulk of the sync).
You can find the file at www.kyleandelin.com/KIN - let me know if this helps or if you need something more?
Phew, i saw a little pack of problems hahaha (unexpected!)
While i stopped doing this, there was a new version released (2.0) and its format is not readable with 1.6 (version i have).
Installing 2.0 didnt solved the issue, as it says that was captured with a 64 bitOS version and it's not compatible with 32 bits version..... The 2.0 is the first one that included the support for 64 bits.
Man, this is all against us haha.
So... possible solutions:
- Install v1.6. May not work on 64bit os
- Install v2.0 as 32 bit verison. May not work on 64 bits or may be autoinstalled and set to 64bits.
So... what to do from here:
Please, confirm my theory before going further.
- Perform a capture from unplug state (needs to be from start). Must include the plugin till kin shows the connected status.
- Stop the capture session.
- Check the captured data in usblyzer.
- Look for the first "Request" column with "Bulk or Interrupt transfer" value.
--- If there is no suck column in all the capture session, the whole process is futile (no MTP protocol would have been transfered) and we should rethink our options.
--- If there is, please check that its column "Raw data" contains at least "10 00 00 00 01 00 02 10 ... " or a very close value.
If i'm right, and the column matches, it means that usblyzer has successfully captured the mtpz OpenSession request. Also, if it was that way, the "magic" instructions would be the before it.
If there are more than 1 and it's not the first one, please check for it .
I am finally gonna get a new (working) device, so i think that things are going to be a bit fun in some time.....
This time, just MTP, no Qualcomm random options testing.. (hahahahaha)

[WIP] USB Host support (working)

Hello!
I have been asked into looking for usb host support for nook touch. The hardware appears to be pretty similar to Nook Color, so there were no troubles in that area.
The kernel used by B&N for the Nook Touch is somewhat older than .32 kernel used for Nook Color, so the patch itself required some massage. Surprisingly B&N kernel already has usb host support compiled in, so you don't even need to change anything in kernel config, just apply the patch.
Just like in Nook Color, the id pin in the usb receptacle is not connected anywhere, so a special app is needed to switch the host mode on and off. The Nook Color usbhost switcher should work: https://github.com/verygreen/Nook-Color-usbhost-switcher though I cannot compile it for eclair, so I guess that needs some more massage and help here would be appreciated.
Meanwhile you can simply switch the mode from adb, type
Code:
echo host > /sys/devices/platform/musb_hdrc/mode
to enable usb host mode and type
Code:
echo peripheral > /sys/devices/platform/musb_hdrc/mode
to disable it.
The LED at the bottom that usually indicates charging status will light up in usb host mode even if the power is not connected.
The upside is you don't need a special OTG cable and can just use gender changer on your existing nook cable if you so desire.
Now, problems
I have not tracked why yet, but self powered mode only works when you try to enable it first with external power plugged in first.
The user-friendly tool for usbhost mode switching needs to be compiled for eclair
The self-powered mode is very faint. Keeps up with my keyboard, but not even with a simple usb hub.
Battery drain is significant, though not sure what part of it is attributed to the usbhost mode and what to adb over wifi
Eclair init is buggy so input devices are unusable without a patch, see commit 6405c6953fa02d41d9f6377f4cdb947604f481c4 in google tree to sytem/core/init. I am attaching recompiled init binary that works.
Attachments: binary.zip contains:
uImage - prebuilt 1.1 kernel with the patch
uRamdisk - root ramdisk with fixed init, adb over wifi
init - just recompiled init binary for those who might need it
usbhost_patch.zip - just the patch itself in it's current form.
THANKS TO:
andrewed, who asked me to do this and also provided me with a device. He is on a quest to touchtype on e-paper with a USB physical keyboard, all described here: Project: E-Paper Tablet (typable!)
Thats just awesome, thanks!
Now the only thing missing is a good ebook composer and publisher, and it becomes symetrical.
That is awesome! How about audio and serial ports?
Thanks!
bisbal said:
That is awesome! How about audio and serial ports?
Thanks!
Click to expand...
Click to collapse
Audio will most probably require external power source. Also to make audio work there would need to be some changes to the libaudio, likely similar in nature to stuff I did for Nook Color, only for this older release of Android.
Serial ports will likely work as is as I don't think they draw too much power. The kernel support for usbserial would need to be added of course.
Possibility for Bluetooth dongle? And thus audio?
Sent from my GT-I8150 using xda premium
Thiso said:
Possibility for Bluetooth dongle? And thus audio?
Click to expand...
Click to collapse
Should be possible, but would require external power for the bt dongle I would think.
Verygreen,
As of now, what is the use? Can I put an external keyboard as it is? Does it need a driver (or something of the sort) for that? Can I put a usb stick? Audio and BT, as I can see, need an extra effort...
Anyway, thank you for your effort. I thought I'd never see something like that for the STR.
apeine said:
Verygreen,
As of now, what is the use? Can I put an external keyboard as it is? Does it need a driver (or something of the sort) for that? Can I put a usb stick? Audio and BT, as I can see, need an extra effort...
Anyway, thank you for your effort. I thought I'd never see something like that for the STR.
Click to expand...
Click to collapse
You can use keyboard and mouse as is with just the files posted, no extra drivers need. Everything else would need more work at the android side.
for some phones it is possible to buy usb to audio jack converter, e.g.
http://www.amazon.com/Headphones-Ea...6?s=electronics&ie=UTF8&qid=1327504575&sr=1-6
I don't know how much effort and changes is needed on kernel side to make it work though.
---------- Post added at 04:26 PM ---------- Previous post was at 04:21 PM ----------
Do I need to copy all three binaries? Also, could you prepare uRamdisk with adb over usb (not wifi) enabled? Thank you in advance.
cceerrtt said:
for some phones it is possible to buy usb to audio jack converter, e.g.
http://www.amazon.com/Headphones-Ea...6?s=electronics&ie=UTF8&qid=1327504575&sr=1-6
I don't know how much effort and changes is needed on kernel side to make it work though.
Click to expand...
Click to collapse
Those are not applicable, since they aren't actually connected to the USB port. On some phones, the USB "plug" is modified to connect with extra pins -- which carry audio signal.
cceerrtt said:
Do I need to copy all three binaries? Also, could you prepare uRamdisk with adb over usb (not wifi) enabled? Thank you in advance.
Click to expand...
Click to collapse
You need the kernel uImage and uRamdisk files, init is already included.
As far as adb over usb is concerned, it's a bit pointless since there is only one usb receptacle, so you can either connect with adb over usb or connect some usb device, but not both at the same time.
That's why wifi makes more sense.
verygreen said:
Should be possible, but would require external power for the bt dongle I would think.
Click to expand...
Click to collapse
BT USB dongle consumes almost same as USB mouse
http://www.tomsguide.com/us/squeezing-more-life-out-of-your-notebook,review-583-26.html
Since USB mouse is working, BT USB might be feasible as well...
verygreen said:
You need the kernel uImage and uRamdisk files, init is already included.
As far as adb over usb is concerned, it's a bit pointless since there is only one usb receptacle, so you can either connect with adb over usb or connect some usb device, but not both at the same time.
That's why wifi makes more sense.
Click to expand...
Click to collapse
My point is that you don't need wireless access point with adb over usb. It is also more secure than adb over wifi with lower power consumption. Whenewer I need adb over wifi, I can enable it using one adb command. Moreover, using both adb and keyboard attached to nook would not be very frequent scenario (at least in my case).
Thiso said:
BT USB dongle consumes almost same as USB mouse
http://www.tomsguide.com/us/squeezing-more-life-out-of-your-notebook,review-583-26.html
Since USB mouse is working, BT USB might be feasible as well...
Click to expand...
Click to collapse
I've tried a few BT dongles and they can be detected without external power, but I have yet to figure out if BT communications can be driven without external power as well.
USB Host Mode Swicth for Nook Simple Touch
Attached is a Nook Simple Touch version of verygreens USB Host Mode switching app.
Requires properly installed "su" in /system/bin
Let me know if there are problems.
Let's hope so. But I have good hopes as BT intention is to be low power communication. In the post I was referring to earlier, the power communication of BT in use was similar to USB mouse in use...
Sent from my GT-I8150 using xda premium
Would this cable work for host? I've had cables refuse to work with other devices for no apparent reason before, and I don't really want to order something that won't work.
http://www.amazon.com/female-Micro-male-Cable-Adapter/dp/B005GI2VMG/ref=pd_vtp_e_77
TorimuNooter
I'll try to get this included in my TorimuNooter root! Maybe version 0.5 I'm working on 0.4 right now and I can't include your USB host support because it's not yet complete, but I will try to implement it as soon as I can.
Good work!
@Googie2149: Any standard USB cable will work as well as any other.
The ID pin on the micro USB connector on the Nook is not going anywhere so a special OTG cable is not required.
I loaded in the new uImage and uRamdisk and things act more consistently, but I still can't get a keyboard to work.
Neither of the two utilities out there seem to work correctly for me. I do have su installed. I have had more success with simple commands
Code:
echo host > /sys/devices/platform/musb_hdrc/mode
echo peripheral > /sys/devices/platform/musb_hdrc/mode
cat /sys/devices/platform/musb_hdrc/mode
One thing is clear; the Nook adheres to the USB standard for supplying power, that is, it supplies it for 100 millisecs and if the peripheral signals back correctly it continues to supply it. Issuing a host command cause the red LED to flash for about a 1/10 of a second. Supplying power on the red wire is not necessary for host communication.
My setup has a powered hub and a cable with the red lead not carried through. I can issue a host command but it never seems to communicate. The status reads back "a_wait_vrise".
Does anybody have any insight into the FSM to say what is going on?

CM7 with Bluetooth possible without a kernel rebuild?

I've spent a lot of time the last week or so on trying to figure out if it's possible to enable bluetooth on whistlestop's CM7 without having to rebuild the kernel. I've made some progress - if it's possible - or I've just wasted a lot of my time and learned a little about Linux and Android if it's impossible.
Where I am now:
Thanks to whistlestop's guide, I have a working build of CM7 for Kindle. I've got a Kindle running CM7 but have been unsuccessful in loading btwilink.ko via insmod so far. Dmesg shows several unknown symbols which I think may be related to not having st_drv.ko loaded first. insmod fails in init_module with "No such file or directory". I do not currently have a st_drv.ko built for 2.6.35.7+ but I haven't really tried to find it yet.
uim-sysfs seems key but I'm not sure where it comes in - if I load it and it loads the drivers or vice-versa.
What I have found:
Device driver info for a WiLink solution in Android: http://omappedia.org/wiki/Device_Driver_Interface_of_WiLink_Solution
btwilink built for 2.6.35.7+ ARM: http://www.angstrom-distribution.or...le-btwilink_2.6.35.7-r113c_omap4430_panda.ipk
Source for uim-sysfs: https://github.com/CyanogenMod/android_device_bn_encore/tree/gingerbread/uim-sysfs
Firmware: https://gforge.ti.com/gf/download/f....1-P2-Pandroid-1.0-Linux-x86-Installmentioned
Interesting thread that may or may not apply here discussing loading btwilink.ko: http://e2e.ti.com/support/low_power_rf/f/307/t/115891.aspx
Questions:
How different are kernel versions 2.6.35.7 and 2.6.35.7+? The "+" tacked on doesn't comply with the kernel version numbering scheme I read up on. Is this just an android thing, a CM7 thing or a TI/OMAP thing?
I am assuming that a driver built on the same architecture and for the same kernel version should work even if the kernel and driver didn't happen to be built together. Is this a safe assumption?
Is the kernel in whistlestop's CM7 derived from a CM7 for a device which has bluetooth? (ie. was it built with bluetooth enabled?) I don't know how to tell conclusively...
Even if it's not possible to load the drivers via insmod, might it be possible to tweak a working CM7 build tree with the drivers, firmware and some editing to get the drivers to load at boot? I've been assuming that if it's possible to use these drivers in a build tree, it should be possible to just load them post-boot since either way I didn't build them.
Is building the linux kernel for Android difficult? I've been avoiding even starting down that road, thinking that this would work with the drivers loaded via insmod - am I spending a lot of time avoiding something relatively easy?
Is this a lost cause without building the kernel? If so, why? I'm leaning towards the answer to this question being yes based on the first link here. It sounds like there may be some config options set and structures or entry points defined at kernel build time that, if not done, will make it impossible for the kernel to load and/or communicate with the drivers.
Good luck on the bluetooth.
im pretty sure the kindle fire has no bluetooth
symbiiote said:
im pretty sure the kindle fire has no bluetooth
Click to expand...
Click to collapse
It does have bluetooth. It just was not activated on the stock rom.
If there will be no way to activate the bluetooth, im going to smash my kindle so hard, its gonna wish it's not even made.
Hardware question
I appreciate the effort you are putting forth, I would really enjoy using my BT headphones w/pandora on my Kindle. Are you sure that the bluetooth on the chip is even enabled? It wouldn't surprise me if they disabled the connection on the die when they made the chips (licensing fees/fair competition/etc.) As a community we may need a hardware expert to pull a device apart and check connectivity across the paths before anything on the software end is even explorable.
Not trying to be a downer, just a thought. Please prove me wrong with your efforts
biglama said:
I appreciate the effort you are putting forth, I would really enjoy using my BT headphones w/pandora on my Kindle. Are you sure that the bluetooth on the chip is even enabled? It wouldn't surprise me if they disabled the connection on the die when they made the chips (licensing fees/fair competition/etc.) As a community we may need a hardware expert to pull a device apart and check connectivity across the paths before anything on the software end is even explorable.
Not trying to be a downer, just a thought. Please prove me wrong with your efforts
Click to expand...
Click to collapse
that has been done. There is discussion in the CM7 ROM thread about bluetooth with links to teardown. Whistlestop CM7 developer thread.
http://forum.xda-developers.com/showthread.php?t=1390773
Discussion on bluetooth in CM7 thread.
http://forum.xda-developers.com/showthread.php?p=20283669&highlight=bluetooth+teardown#post20283669
Here is the teardown:
http://www.ifixit.com/Teardown/Amazon-Kindle-Fire-Teardown/7099/1
Using Tapatalk on a Kindle Fire w CM7 ROM
wow guess you learn something every day. Well in that case i wanna use Bluetooth o.o
Sent from my LG-VM670 using XDA App
Let me set things straight.
-There is bluetooth hardware in the Fire. The WiFi module has bluetooth, WiFi, and FM radio on the same chip.
-The module needs additional connections to the CPU above and beyond what's needed for WiFi to make BT or FM work.
-The module does not need another antenna for bluetooth. There is a second chip in the module that multiplexes the one antenna for WiFi and BT.
-You will not be able to just build the drivers and make them work without knowing where the connections are located. If they exist at all.
-There are two sets of connections needed to the CPU. The first is a high speed serial channel. Because of the choices made by Amazon for other UARTs on the Fire, this must be ttyO2. The second is an enable signal to turn power to the BT subsystem on and off. This could go to one of dozens of signals, and would need to be probed for.
-The module is a BGA package, and many of the connections are done through blind vias. In English, that means that the connections between the chips cna only be seen if you desolder them. This would mostly destroy the Fire, but would allow existence and location of those connections to be confirmed.

Categories

Resources