[KERNEL] USB tethering support for android-wired-tether (12/20/10) - Epic 4G Android Development

2/22/11 Update: Froyo kernels include tethering support, so this patch is no longer necessary. A Froyo-compatible Wired Tether client is available here.
12/20/10 Update: Added patch to wired-tether client to clamp MSS. Fixes stalled connections when the network breaks fragmentation support.
10/18/10 Update: The MixUp-20101024-847 kernel now includes USB tethering (RNDIS) support. If you have this kernel installed, you should be able to USB tether by installing the modified android-wired-tether client attached here.
Troubleshooting Update: If the client force closes on you and you're using a ROM with android-wifi-tether preinstalled, then there is a library conflict. Remove android-wifi-tether from /system, and most importantly, delete (or rename) /system/lib/libnativetask.so, then android-wired-tether should work. If you want both wifi & wired tether, reinstall android-wifi-tether from the market. This will make each application use its own library so there's no more conflicts. See this post for more details.
Attached is a patch to the DI18 kernel sources to enable USB tethering support with android-wired-tether. Kernel developers, please feel free to include this patch in your kernel builds. It requires no configuration changes.
This patch requires use of a modified wired-tether agent (at least, until the change is commited upstream). A modified build of wired-tether is also attached, along with the source patches against upstream v1.4 (SVN r34).
Also attached is a build of the stock DI18 kernel with the kerel patch applied. It's compiled with CodeSourcery Lite 2009q3-68 with stock config options, stock initramfs (so no root, no clockworkmod support). It's intended for folks who want to try this right away, and know how to restore their old kernel if need be.
Directions:
To install the test kernel, look for a copy of redbend_ua in any of the kernel update.zip packages, install with:
Code:
adb push redbend_ua /data/local/tmp
adb push zImage /sdcard
adb shell
su
chmod 755 /data/local/tmp/redbend_ua
/data/local/tmp/redbend_ua restore /sdcard/zImage /dev/block/bml7
Then install the attached wired-tether-1.4-epic-2.apk. Tethering may be used with "USB debugging" enabled or disabled. However, neither mass-storage support nor ADB will be availble while actively tethering. To use:
(Windows only) Install the Samsung USB drivers. No other drivers are needed for Windows 7, and I think Windows XP SP3.
Make sure the USB cable is unplugged before starting the tether client.
Start "Wired Tether" and "Press to start tethering."
Grant the Superuser Request (if your su requires it).
Make sure tethering has started, you should see green/red "Down/Up" numbers at the bottom of the screen.
Attach the USB cable.
Select "Charging" mode if the "Select USB mode" menu comes up (it won't if USB debugging is enabled).
Tether!
When finished:
Detach the USB cable.
"Press to stop tethering."
Grant the Superuser Request (if your su requires it).
Exit the "Wired Tether" program.
Reattach the USB cable if you want to use mass-storage or ADB.
Technical details (for those interested, otherwise ignore):
The Epic kernel already provides RNDIS USB support in the USB gadget driver, however the host-side RNDIS interface is never presented. The kernel patch adds a sysfs variable that, when enabled, configures the host-side USB to exlusively present the RNDIS interfaces, and when disabled, reconfigures the host-side USB back to the previous state, either mass-storage (actually typically "KIES" mode) or ADB. You may toggle this variable manually, for example, if you wanted to use the RNDIS interface for other purposes. Just be sure to toggle when the USB cable is unplugged:
Code:
su
echo -n 1 > /sys/devices/virtual/sec/switch/rndis_enable # Enable RNDIS.
echo -n 0 > /sys/devices/virtual/sec/switch/rndis_enable # Disable RNDIS, reenable UMS or ADB.
The wired-tether patch simply toggles the sysfs varible upon starting and stopping tethering. Since the host-side USB interface will only reconfigure upon cable reinsertion (I think?), this is why the cable must be attached/detached only while tethering is enabled.
Note that the host-side RNDIS interface is exclusively presented--it may not be used simultaneously with mass-storage or ADB. This is a limitation of the Samsung Windows driver and will not be fixed. The previous version of the kernel patch (10/8) did present RNDIS alongside ADB, which is a mode of operation generally supported by Linux. However, the Samsung drivers need to be modified to support this mode (necessitating a reinstall) and as it turns out, driver bugs presents the along-side configuration from actually working. Because of this, and reports from Ubuntu users of losing ADB with the previous version, this patch only uses "blessed" host-side USB configurations.
Nitty grity details:
I'm not precisely sure what "Tethered Mode" is, that shows up in the menu when you plug in a USB cable with debugging disabled. From the USB gadget driver code, it appears to disconnect one (or both) of the 3G/4G modems and presents it over the USB interface directly, not allowing it to be shared with the phone. This may use the RNDIS interface (hence why it's "supported" in the first place), or may expose a serial UART. I've never tried it, and I'm uncertain (from the driver code) that it actually works.
Amusingly enough, it should be possible to enable the RNDIS interface even with the stock kernel. However, the gadget driver code is very buggy, and the existing sysfs interfaces do not operate as advertised. Even if you "game the bugs" to work around them, you'll lose ADB support until the phone is restarted. Since I would have to modify the kernel to fix these bugs, I decided to just present a new interface that mirrors the behavior of ADB mode, to keep the patch simple to maintain.
If you want to follow along though, the two relevant parts of the USB gadget driver are "adb_ums_acm_mtp_rndis.c" and "fsa9480_i2c.c" (in "drivers/usb/gadget"). "adb_ums_acm_mtp_rndis.c" contains host-side USB interface configurations for UMS mode (default), ACM/UMS/ADB (USB debugging), ACM/MTP (disabled), MTP (disabled), RNDIS (basically unused), and ACM only (disabled). The two functions that appear to switch between configurations are enable_adb() and enable_askon().
At first I thought enable_adb() was used by "USB debugging" mode, and enable_askon() by the "Charging/Mass Storage/Tethered Mode" menu, but this isn't the case. Turns out enable_adb() is the only of the two actually used, and enable_askon() is buggy dead code that, for example, doesn't set the current USB configuration status so it's not possible to switch back to the previous configuration.
"fsa9480_i2c.c" contains, among other things, a variety of show/store functions exported as (world-writeable!) sysfs variables in /sys/devices/virtual/sec/switch. I can't tell if these were intended for internal debugging only, or if they were intended to be used by userspace (e.g., the "Select USB mode" menu). The two interesting interfaces here are UsbMenuSel and AskOnMenuSel, which should take a USB device configuration nickname (e.g., "UMS", "KIES", "VTP") and set the host-side USB configuration accordingly. However, the "if/else if/else" lists in both functions are broken, and the "else" clause is often executed when it shouldn't. Interestingly enough, the default host-side USB mode appears to be "KIES", although I'm unsure if that's intentional or due to this bug. But this doesn't matter since the ACM/MTP configuration is disabled and UMS is used in its place.
In other words, the USB gadget driver code is a misleading rats nest of buggy/dead code. It's a wonder it actually works in the first place. I really hope the rest of the device-specific code isn't that bad, but I'm afraid to look.
Mirror links (does not require forum login):
kernel_rndis_enable.diff
kernel_rndis_enable.zip
wired-tether-1.4-epic-2.apk
wired-tether_use_stable_api.diff
wired-tether_clamp_mss.diff
wired-tether_rndis_enable.diff

Great! I was working on a patch for this earlier but didn't have the time! Thanks, t'will be in my next kernel

Sweet. Was waiting for dev to bring this so i can install wired tether

saWeet, can't wait for your updated kernel Genius!

Any ideas?
C:\Users\*****>adb shell
$ su
su
# /data/local/tmp/redbend_ua restore /sdcard/zImage /dev/block/bml7
/data/local/tmp/redbend_ua restore /sdcard/zImage /dev/block/bml7
/data/local/tmp/redbend_ua: permission denied
EDIT: Had to chmod redbend_ua to 777 first!

remount
did you remount the drive into read/write mode?
adb shell remount rw

Has any more testing been done with this? Has it been incorporated in Genius' kernel?
Sent from my SPH-D700

Forcystos said:
Has any more testing been done with this? Has it been incorporated in Genius' kernel?
Sent from my SPH-D700
Click to expand...
Click to collapse
Well, it is incorporated but I haven't released yet. I'm still adding some stuff. See my GitHub if you're curious.

Has the download speed been tested using this method? I currently get 1MB using wireless tether and would like to know if my laptop would be able to surf the net faster through this kernel and a USB cord.

The Google Code FAQ says "The client needs to support RNDIS. Windows Vista/7 comes with RDNIS-support out of the box." However when I plug in my Epic it says it needs drivers for RNDIS, and Windows Update does not find any. Anyone know where to get these drivers?
Edit: I'm on Windows 7 64-bit and Herver's Baked Snack 1.3 kernel.

ragnarokx said:
The Google Code FAQ says "The client needs to support RNDIS. Windows Vista/7 comes with RDNIS-support out of the box." However when I plug in my Epic it says it needs drivers for RNDIS, and Windows Update does not find any. Anyone know where to get these drivers?
Edit: I'm on Windows 7 64-bit and Herver's Baked Snack 1.3 kernel.
Click to expand...
Click to collapse
It's a lie.
http://www.microsoft.com/downloads/...FamilyID=46f72df1-e46a-4a5f-a791-09f07aaa1914
You need WMDC on Vista/7.

Firon said:
It's a lie.
http://www.microsoft.com/downloads/...FamilyID=46f72df1-e46a-4a5f-a791-09f07aaa1914
You need WMDC on Vista/7.
Click to expand...
Click to collapse
I plugged in my Epic via USB (with debugging mode on), ran the file from that link (drvupdate-amd64.exe), and I get an error message pop-up saying "Device driver software was not successfully installed" and under details it says
RNDIS Communications Control X No Driver found
Unidentified Device X Device unplugged
I tried this a few times, unplugging and replugging my Epic in. I also tried running the exe without the phone plugging in.

ragnarokx said:
I plugged in my Epic via USB (with debugging mode on), ran the file from that link (drvupdate-amd64.exe), and I get an error message pop-up saying "Device driver software was not successfully installed" and under details it says
RNDIS Communications Control X No Driver found
Unidentified Device X Device unplugged
I tried this a few times, unplugging and replugging my Epic in. I also tried running the exe without the phone plugging in.
Click to expand...
Click to collapse
Reboot, install the driver, reboot again and try plugging it in? Maybe you need the ADB drivers installed too.

I've updated the OP with a new kernel/patch as well as a modified version of android-wired-tether to support the new patch. I've tested it in Windows 7 with the Samsung USB drivers installed (you don't need WMDC as it turns out) and it works.
If you tried the previous kernel, you may want to uninstall/reinstall the Samsung drivers to wipe out any stale device configuration.
Sorry about that folks, I just assumed the old (simpler) patch would work on Windows, but it's very much not the case. Apparently RNDIS support on USB composite devices is flaky, and the Linux USB documentation was recently updated reflecting this.

mkasick is it possible to get a video tutorial of how to get this to work (noob)

docdg said:
mkasick is it possible to get a video tutorial of how to get this to work (noob)
Click to expand...
Click to collapse
Sorry I don't have a video camera.
Anyways, the latest MixUp kernel has USB tethering support. So if you install that, all you need to do is install wired-tether-1.4-epic-1.apk from the OP and follow the directions for starting tetherig half-way down the post; which, in short is just starting the tethering client, tapping the screen to start tethering, the connect your USB cable.
If you're running Windows, you also need the Samsung USB drivers installed (see OP). But if you're tethering with the same computer you rooted the phone with, that should already be done.

Finally got wired tether to work. When I compare the bandwidth speeds with those of easy-tether the speed seems slower. What is the best FREE tethering solution?

docdg said:
When I compare the bandwidth speeds with those of easy-tether the speed seems slower.
Click to expand...
Click to collapse
I suppose this is possible, particularly if your OS's RNDIS driver isn't very good.
I did some benchmarking. I can send data over RNDIS to my phone at 18.7 MiB/s (157 Mb/s) and receive at 14.5 MiB/s (122 Mb/s). That's a little slow relative to the USB 2.0 maximum (480 Mb/s).
However, it's quite a bit faster than the rate I can transfer over 802.11 directly: 2.2 MiB/s (18 Mb/s) sending, 2.0 MiB/s (16 Mb/s) receiving. Tethering USB <-> 802.11 is bounded to about those speeds as well.
I haven't benchmarked 3G, but my past experience suggests is no faster than 802.11. In which case the RNDIS speed should be plenty sufficient unless there's a driver problem.

Related

[REQUEST] Samsung Kies?

Not sure if this is the right forum or has been asked before but can we
port this option to our USB menu from the Vibrant?
tommi_han said:
Not sure if this is the right forum or has been asked before but can we
port this option to our USB menu from the Vibrant?
Click to expand...
Click to collapse
lol HUH links to what you want are more than helpful....
tommi_han said:
Not sure if this is the right forum or has been asked before but can we port this option to our USB menu from the Vibrant?
Click to expand...
Click to collapse
I'm not exactly sure what Kies is, but as I gather it lets you sync media to the phone and also use the phone as-a-modem to tether.
Anyways, in the kernel USB gadget driver, "KIES" mode is defined as exposing the CDC ACM UART (presumably for tethering), and the Android Media Transfer Protocol (presumably for media syncing). Unfortunately there's two problems with the current Epic USB driver.
First, all MTP modes (KIES, MTPONLY) are functionally disabled by having their USB configurations redefined to mass-storage only mode.
Second, there's a bug in the USB gadget driver that prevents the userland mode switching hooks in /sys from actually working. Amusingly enough, when "USB Debugging" is disabled, the Epic is always in KIES mode, but since this is redefined to provide mass-storage support only, it doens't matter.
Both of these can be fixed in the kernel USB driver and by rebuilding the kernel. However, because the MTP modes are explicitly disabled, and the code pathways used by the USB selection menu on the international version/vibrant aren't used at all on the Epic, makes me worried that this would introduce other bugs. For example, it might simply be the case that userland support (if necessary?) simply isn't present on the Epic.
In any event, it's pretty clear that the sad shape of the USB gadget driver is due to the simultaneous development of the Galaxy S devices with bug fixes not making it across all kernel trees and the presence of different hardware (e.g., WiMAX radio on the Epic) necessitating kludges to make it work.
Unless someone else feels ambitious enough to work on it, probably the simplest thing to do is to wait for the Froyo kernel to come out and see if the driver code for the Galaxy S devices has been unified a bit more. In which case, hopefully "KIES" mode will work as-advertised on the stock kernel, or if not, it would work with a trivial kernel config change.
I was under the impression that Kies was disabled intentionally, as it is also a firmware updater that can easily load unofficial operating systems to the Epic. Can't remember where I read it though.
mattallica76 said:
I was under the impression that Kies was disabled intentionally, as it is also a firmware updater that can easily load unofficial operating systems to the Epic. Can't remember where I read it though.
Click to expand...
Click to collapse
It's definitely the case that it's intentionally disabled, didn't know that's the reason why though.
Odin is still available though. I guess the difference is that Kies is a tool intended to be used by end users.
It's part of twiz 3, which we don't have thanks to the keyboard
Sent from my SPH-D700 using XDA App

How to connect two android devices over USB

First, why:
I own two Coby Kyros tablets that I am using as a part-time car headrest entertainment system. Heck, they are so cheap, buying a dedicated car video just does not make sense.
Tablets work great for that purpose, great resolution (for a car), have games and music. There is only one piece that is missing, simultaneous video playback on both tablets.
Getting this working presents two challenges:
* A fast, stable, always ON connection between the tablets.
* A master/slave video playback software, either streaming or syncing
Glad to report, I've solved the first issue, that I'll describe here. Be warned this is not for the faint of hart and right now is fully manual. If you find it helpful I might work on automating the link.
Tested on Froyo. At least one device has to be rooted and support the USB Host mode.
Now, how:
The idea is simple - use the android debugging bridge to forward TCP ports between two systems over USB. If you do have USB tethering enabled on at least one device (I did not) you could use RNDIS to route all traffic, not just specific ports, over USB.
1. Pick a tablet to be the slave. It must be rooted. Get the adb client compiled for android from here, upload it to the slave /system/xbin ("adb push ...") and make executable (adb shell chmod 755...). Get ConnectBot from the market to access its console.
2. Put the slave into the USB Host mode, disable USB debugging on it. Put the master into the USB device mode and enable USB debugging.
3. Connect the master and the slave using a miniUSB-USBfemale and USBmale-miniUSB combination, a USB hub (make sure it is a high-speed one) or a miniUSBmale-miniUSBmale cord.
4. Now the tough part, typing shell commands on the tablet. You can make it a bit easier by using a USB hub and connecting a keyboard and a mouse together with the other tablet to the slave.
On the slave start ConnectBot for the localhost and type the following
Code:
less /proc/bus/usb/devices
Look for your master's devices BUS# and DEV#. Record both. Note, these numbers change when you re-plug USB.
Now, on the slave:
Code:
su
mkdir -p /dev/bus/usb/001/
ln -sf /proc/bus/usb/[BUS#]/[Dev#] /dev/bus/usb/001/001
5. Test. On the slave run 'adb devices'. It should show your master in the list.
6. Forward slave ports to the master as needed. Run 'adb forward tcp:123 tcp:234'. Now you can use localhost:123 on the slave to reach out to the master port 234 over USB.
If your kernel is RNDIS enabled you could route all network connections over the usb0 interface, essentially creating a one-to-one network. Stock Kyros unfortunately does not support RNDIS so I've not tested it.
The ADB USB speed is not bad, averaging 2.5MB/sec after protocol overhead.
I did some research on the second issue, went several routes (mplayer, VLC and UPNP) and, sadly, found nothing that currently works. If you know of any working video source/sink pair or a sync peer for android, let me know.
sicvolo said:
Tested on Froyo. At least one device has to be rooted and support the USB Host mode.
Click to expand...
Click to collapse
Is there a guide on getting USB Host Mode to work on this device or if there isn't could you write one?
I have two Galaxy S3. I went through steps 1-3, all fine. But in step 4, there is no '/proc/bus/usb/devices'; there are only '/proc/bus/input' and '/proc/bus/input/devices'.
Is there any other method to get dev# and bus#? Thanks.

USB Tethering test/feedback thread (2011/09/10)

I've decided to create a seperate thread for feedback for USB Tethering (using RNDIS, enabled under Settings >> Wireless & Networks >> Tethering, since CM7.1 RC15), so it's all in one place.
As you know, Milestone kernel (with the exception of first beta builds) had RNDIS disabled and so I've created a module that adds RNDIS support and patch usb gadget driver accordingly. Git repository is set here: https://github.com/a853/a853_modules_froyo/tree/master/usb
Current release is in CM7.1 RC15 (module mot_usb.ko).
Please attach "/data/dontpanic/apanic_console" in case of reboot or the output of dmesg and logcat when having an issue with USB Tethering.
excellent. i waiting that in milaq's cyanogen to feedback.
EDIT: works good at moment, but it's slow compared to PdaNet. No issues
EDIT2: connection drops in hard usage conditions.
EDIT3: Without Debug Mode works more fast and at moment, the connection doesn't drop.
EDIT4: With Ubuntu 11.4 x64 works flawless
-
EDIT2 Conditions:Torrent Leech, P2P, Debug Mode and Charge Only Mode, Windows 7 x64.
EDIT3 Conditions:Torrent Leech, P2P, Charge Only Mode, Windows 7 x64
EDIT4 Conditions:Browser navigation, Ubuntu 11.4 x64
I don't have speed issues with it. However I'm also getting connection drop on hard usage (regardless to ADB status) (usage = downloading) on Windows 7 x64. On another machine with Windows Vista x64, it worked flawlessy.
I was really happy when I saw this feature in Milestone 1, I want to get rid of running PdaNet and easytether and save RAM and internal memory on my device. Is possible leave it stable?
I need it until buy a wifi receiver. I share the wifi connection with my PC, which is 2mbps. Do not laugh at me, I'm in Brazil: (
Native usb tethering is still under development (it has been released just 2 days ago).
Please also post result from logcat when the connection drops.
I'm posting this workaround also here, so it can be more easily found.
jorgemariom said:
I have unstable connection with the native USB tethering, when I try to load a heavy page or download a file the connection drops...
Click to expand...
Click to collapse
There seems to be a Windows 7 RNDIS driver issue.
Possible workaround is to create a bridge between RNDIS and ethernet or wifi device on your PC.
See http://rainmeter.net/forum/viewtopic.php?f=14&t=6699#p43460
I tried to use the USB tethering in my old xp-64-bit machine but had no luck.
I'm not able to install the RNDIS driver for it. Therefore, I can't test it....
As far as I know you need at least Windows Vista to use native usb tethering.
Works just fine with Windows XP, just googling for Android USB Thethering Driver Windows XP get you to the right place:
http://www.google.com/support/mobile/bin/answer.py?hl=en&answer=182134

[WORKING][USBOTG][STOCK] - Atrix 2 USB OTG Host Mode and USB Accessory acquisition

04/11/2014 - 01:41AM - Central Time
USB OTG does work on the Motorola Atrix 2.
I post this because there are no defining topics listing all the requirements and caveats of making this work currently as of the date. Just alot of help topics to sift through. I got a little obsessive in my search to make this work so this is pretty much a knowledge dump.
Started from original help threads here on the forums (various many... lots), figured things out from there through conversations with Chainfire. Ultimitely fixed with lots of research and use of his USB Host Diagnostics App.
Requirements:
Motorola Atrix 2 Stock 4.0.4 - Rooted [stock kernel as well]
(what drove me insane on this was that in USB HOST Diagnostics App it showed kernel support, and API support up to Device detected)
USB OTG Y cable, usb 2.0 (I was concerned about this in the beginning however mine appears to be usb 2.0, got it off amazon.)
(Through research it concerned me that a usb 3.0 would not work. Have not tested this)
USB Drive, usb 2.0
- Tested with a Sandisk Cruzer Micro 1gb
(I assume others will work although there have been some help topics mentioning problems with certain usb drives)
[NOTE]
Must be formatted fat32 - I have noticed a few threads I researched mentioning exfat is not supported for certain devices
(have not confirmed as of post date if exfat is supported for Atrix 2 Stock)
[NEEDED] For USB Host AutoMount
Usb 2.0 Hub (I have an old one i cut apart originally. Dont remember the make, and I lost the housing for it, but hey it works)
---------------
USB Host Diagnostics App by Chainfire
(v1.3 as of post date)
Get it at Play Store [link]
Click to expand...
Click to collapse
Instructions (i.e. my exact process)
I came from testing a multitude of custom roms. None of them worked. I have a help thread on it here. Unconfirmed if any of them work at all I had no success. If you are wondering the post thread is here.
- Flash to stock ICS 4.0.4 (if you are not already)
- Root the Atrix 2
Not sure if the relevant (but this is the exact process I took)
-Install BMM
-Installed Busybox (1.22.1)
-Installed USB Host Diagnostics App
(get your host cable and usb drive ready)
-Ran the app
(Follow the instructions it will ask you at the end if you wish to attempt to fix the issue)
- Say yes to try to fix it.
- Follow instructions (go for a reboot)
- Open up usb diagnostics app.
- Run again to confirm
Congrats!
Click to expand...
Click to collapse
This will not make it automount.
- You do not need a separate program to do this.
Grab your USB hub, plug the USB Drive into the hub and plug it in. To my surprise it automounted.
Chainfire had mentioned checking out a certain file when I was trying to find custom roms that would work. The file was there but they did not work. I gather that file was added by his program and made it work on stock ICS 4.0.4.
There are alot of other threads for other devices. Samsung requires shorting the last 2 pins on the USB connection. This is not needed for Motorola, but keep this in mind if you are randomly searching for USB OTG answers.
---------------
Thanks: Chainfire
Couldn't have figured this out without his help. I highly recommend his apps, he definitely has a deep knowledge of the android system.
Hopefully that should clear things up a bit for anyone searching for the Atrix 2 USB OTG help. I'm moving on to hopefully port from ICS USB OTG host features to a custom rom like Cyanogen. Ill update a link if I come up with anything.
Hello, maybe someone can guide me for final results and find solution. My plans was watch Tv on lapdock 500pro, after i find dvb-t reciever for android. the model was ]CSL - mini DVB-T Stick (from amazon)
requriments of device informs that phone needs android 4.0 or high, dual core cpu (neon support) and usb otg
i have atrix2 mb865 with stock 4.0.4 +root and text inside /proc/cpuinfo returns - "Features: swp half thumb fatmult vfp edsp neon vfpv3"
last one what i need must be usb otg support, so after i get device i connect it direct to microusb and run installed Air Dtv app, it returns "Device not found" then i find this topic and install Busybox and USB Host Diagnostics and run app. I rush to make it quickly so when start diagnostics app asks me connect usb device but i have no any usb device and otg cable also. so i just plug charge cable in lapdock`s usb and connect it to phone, app little think then ask me to Fix usb otg support and after ask to reboot system. After reboot i try again connect directly that device but app again returns "Device not found" - then i check topic again and start to build otg cable.
After cable was complete i check it by connecting to external power (wall adaptor) then i have results.I run USB Host Diagnostics, start test connect device by otg cable, and app returns me (see pic)
Also, when i connect device by otg cable now system popup "By which programm you want use device" and give choice to Air Dtv or Idtv Mobile, 2 apps. But Air Dtv returns me "Device initialisation failed, unplug device and connect after few seconds" another app cant find device also. (see pic)
Also i install Usb Device info app, and able to see connected device info, system shows me that stick is connected to phone. (see pic)
Also i able to mount usb stick to phone by otg cable with external power, and can view files in it. Means i suggest that otg cable and otg in system works
My final point was view Tv on lapdock but at this step i cant run it on phone, Air Dtv also returns me "device not found" when i try to connect it to lapdock by microusb female - usb male extension (included in package of Tv stick)
Also that device works on pc, i install windows software and check it. Mean stick works and shows tv channels. can be for sure that device works
Hope for your help and support!
That solves my problem sort of, I'm going to try to install NUMA and see what results I get. Ill update my post once I'm done

ADB will not connect to one device, others are fine...

Hello, I have been struggling with this one for a few days...
I have a Linux ADB installation and I can use it to connect to my devices, except for one - a Galaxy S3 running Resurrection Remix 5.8.3.
When I do `adb devices` the repsonse is an empty list. The phone does show the `USB debugging connected` alert. It also shows `USB charging for this device`.
I've read that latter one should be changed to `Transfer Phots (PTP)` but doing so makes no difference, and unplugging and reconnecting the USB resets this option to the charging setting.
I've tried everything that I can think of.... disabling and reenabling USB debggging and developer mode.
I don't think it's the ADB because it works fine with any other device that I try.
What else can I try?
ogpog said:
What else can I try?
Click to expand...
Click to collapse
Do you have the specific drivers installed for your phone? If you do not, install them and then try
If you do, uninstall and install again.
I am not sure what "specific drivers" I need. I am running `adb` from `android-tools 8.0.0_r17-1` on Arch Linux. I am pretty sure that the client side is fine because it does work sometimes, as I explain below.
I did a firmware update as an attempt to fix this. I now have "RR-N-v5.8.5-20171217-i9300-Final". I have since been able to get it to work but it is hit-and-miss.
First I note that the usb connection resets to charge-only whenever it is disconncted/reconnected. This requires that the appropriate mode needs to be selected each time the USB is plugged into the device.
I connect the phone via USB to the computer and try `adb`. It doesn't work (`adb shell` reports `error: no devices/emulators found`).
I open the "Developer Options" of the settings screen. I "Revoke USB debugging authorisations" so that I get the authorisation pop-up when the adb connection works as a visual cue that the connection is working. An alternative way to get feedback is to use `adb wait-for-device` on the computer - this blocks until the connection is made and, when it exits `adb shell` works immediately afterwards.
I then go to the "Networking" selection, choose "Select USB Configration" and then change the setting from "Charging" to "PTP (Photo Transfer Protocol)". Perhaps adb will work, but unlikely. If it doesn't work I keep selecting between the various usb options and, eventually, adb starts working. It only ever seems to work on the PTP mode.
I find doing this a few times may get adb working or it may cause the device to fall over and reboot. In fact, the latter scenario is the most likely!
(edit, I think the reboot may be a result of selecting the 'audio source' option and not relevant. Selecting between charging and ptp a good few times (30-ish - I lose count) eventually gets adb working).
My work-around to this problem is to connect ADB over the network which works reliably but requires opening a terminal on the device to configure and start the service.

Categories

Resources