There has been many problems in getting Internet Connection Sharing working properly in Linux. I had been using WModem/Wvdial which I have posted about here. The only problem is that this limited you to only certain ROMs as most chefs remove the Wmodem application as ICS is much easier to use. You can also use a BT dialup connection which is well documented for Linux/WM6 but this is not ideal for the faster HSDPA/HSUPA speeds.
So the problem exists with the current usb-rndis-lite implementation where the device is recognized but the rndis0 interface never gets a dhcp address from the phone. In my many google searches I have come across a real solution that works. I do not take ANY credit for this as I simply stumbled across this on my many google searches. All credit to José Oliveira for posting this solution. For the full version please see
Original Post
The Fix:
Code:
Step 1 - Install Pre-requisites
open a terminal (use same terminal in next steps)
Code:
$ sudo apt-get install subversion
Step 2 - Get the Source
Code:
$ svn co http://synce.svn.sourceforge.net/svnroot/synce/trunk/usb-rndis-lite
cd usb-rndis-lite/
Step 3 - Modify the source (Diamond only)
Code:
$ gedit rndis_host.c
on line 524, find this bit
Code:
if (tmp <>hard_mtu) {
dev_err(&intf->dev,
"dev can't take %u byte packets (max %u)\n",
dev->hard_mtu, tmp);
goto fail;
}
change it to this
Code:
if (tmp <>hard_mtu) {
dev_err(&intf->dev,
"dev can't take %u byte packets (max %u)\n",
dev->hard_mtu, tmp);
retval = -EINVAL;
/* goto fail;*/
}
save the file
Step 4 - Compile and make and install
Code:
$ make
$ sudo ./clean.sh
$ sudo make install
Step 5 - Start the Internet Connection Sharing
On OLD Tytn II's open Comm Manager on your phone and click on the Internet Sharing Now make sure USB is selected and choose connect
On Diamonds it's a seperate program called Internet Connection Sharing
Step 6 - Plug in the Phone (USB)
You may need so select that device in NetworkManager or "sudo dhclient rndis0".
Verified on a HTC AT&T Fuze (Touch Pro). Mods I apologize for the double post as I posted this solution in the Diamond forum as well.
-e
Have you tested Bluetooth using wmodem? It doesnt appear to work on my touch pro. I am using the Sprint stock rom, but I have added the wmodem application and done all the registery hacks. USB works perfectly, but I can't get Bluetooth to connect at all.
weird i had no issues with ICS and my kubuntu laptop.
Are you using wmodem (DUN) or Internet Sharing application (PAN)? I have no issues connecting BT using Internet Sharing (PAN), but (PAN) doesn't work well with my work VPN.
I made a little change into the fix and now it's working for me :
Code:
if (tmp < dev->hard_mtu) {
dev_err(&intf->dev,
"dev can't take %u byte packets (max %u)\n",
dev->hard_mtu, tmp);
retval = -EINVAL;
/* goto fail;*/
}
internet sharing not working for me.
I am totally stumped. I have compiled and installed the usb-rndis-lite modules, but my phone (HTC 8525) still won't provide internet to my debian linux box.
when I plug the phone into the usb port. I see that eth1 is created by the rndis_host module. This is with the connection sharing off. When I press connect on the phone, the computer acts like the usb was disconnected and reconnected. In the process the eth1 interface was deregistered.
I have tried to plug the usb cable in while the phone was already in the connected mode (internet sharing shows "check usb connection"). This way, I get no indication of rndis_host doing anything. No interface is created at all.
Here is dmesg output:
Code:
usb 3-1: new full speed USB device using uhci_hcd and address 68
usb 3-1: configuration #1 chosen from 1 choice
rndis_host 3-1:1.0: RNDIS_MSG_QUERY(0x00010202) failed, -47
eth1: register 'rndis_host' at usb-0000:00:10.2-1, RNDIS device, 80:00:60:0f:e8:00
usb 3-1: New USB device found, idVendor=0bb4, idProduct=0b04
usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-1: Product: Generic RNDIS
usb 3-1: Manufacturer: HTC
usb 3-1: SerialNumber: 01145735-9943-0170-0800-0050bf3f5173
eth1: no IPv6 routers present
usb 3-1: USB disconnect, address 68
eth1: unregister 'rndis_host' usb-0000:00:10.2-1, RNDIS device
usb 3-1: new full speed USB device using uhci_hcd and address 69
usb 3-1: configuration #1 chosen from 1 choice
usb 3-1: New USB device found, idVendor=0bb4, idProduct=0303
usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 3-1: Product: Generic RNDIS
usb 3-1: Manufacturer: HTC
usb 3-1: SerialNumber: 01145735-9943-0170-0800-0050bf3f5173
usb 1-2: new full speed USB device using uhci_hcd and address 68
usb 1-2: device descriptor read/64, error -110
hub 1-0:1.0: unable to enumerate USB device on port 2
usb 3-1: USB disconnect, address 69
Any Ideas?
Thanks,
David
I'm seeing multiple kickstarters for "turn your cell phone into a computer" type appliances. Typically a keyboard thing that includes an OTG adapter, an HDMI output, etc... Most /claim/ that you can charge your cell phone while working. They are all overfunded (and shaky, I'm not recommending them)
I've tried many times to use phones / tablets as OTG devices to interface to hardware of different types. Everything from diagnostic tools to robot arms (no really, I'd post links but I'm a newbie here and linking is always suspect; I don't want to be accused of spamming).
One major issue always comes up: You can NOT charge while running OTG on /most/ phones. I've done a lot of research on this, and found a few older phones / tablets that seem to support it. I can't find a /single/ USB C based device that is known to do it. Perhaps it's just not an advertising point? MFGRs don't see most users doing that, so they don't support it?
So what am I asking?
1. Is anyone with a modern phone, especially USB C based, actually using OTG and charging at the same time? Please note: I'm NOT talking about charging the OTG device /from/ the phone, I'm talking about charging the phone while using OTG devices. If you are doing this, please: What phone, what OTG adapter?
2. Is this something people have an interest in doing? Why yes, why no? For me, I don't have any interest in using my cell as a computer, but being able to plug it into equipment and monitor / control operation while not running the battery flat would be great!
3. Is anyone aware of the actual specs, technical issues, reasons for the current state of affairs? I've started a web page to track this issue (again, not linking, not spamming) and would love to hear from anyone with direct knowledge of the technical issues involved. Why doesn't it always work? What specification needs to be met? What future is there for this sort of feature?
Here are the devices I understand DO support it:
RaspBerry Pi
Amazon FireStick
Amazon Kindle Fire 10???
Dell Venue 8 pro
HTC One M9
Lenovo Miix 2 tablet?
Lenovo Yoga Book
Moto G 4?
NuVision Tab 8 (Windows 10) after restart only?
Nvidia Shield K1 table??
OnePlus One
Samsung Galaxy S3
Samsung Galaxy S4
Samsung Galaxy S5
Samsung Galaxy Note 3
Samsung Galaxy Tab A7?
Samsung Galaxy Tab A8.0
Samsung Galaxy Tab S2??
Samsung Galaxy Tab S 10.5?
Samsung Galaxy View
Snes Classic
And here are some that support OTG, but will not charge at the same time:
Amazon Kindle Fire 7
Asus T100TAM
LG Nexus 5
LG Nexus 7
Samsung Galaxy Note 4
Samsung Galaxy S7
Samsung Galaxy S8+
Samsung Galaxy S9
Samsung Galaxy TabPro 10.1
Please do add on your info?
How's the research going? I've been looking for tabs that support USB-OTG and charging when connected to a powered USB hub as I'm planning a car install. Sort of interested in whether the newer tabs like the Samsung Tab S5E support this or not. That would be sweet installed into the dash!
Prostheta said:
How's the research going? I've been looking for tabs that support USB-OTG and charging when connected to a powered USB hub as I'm planning a car install. Sort of interested in whether the newer tabs like the Samsung Tab S5E support this or not. That would be sweet installed into the dash!
Click to expand...
Click to collapse
..
Sent from my SM-S767VL using Tapatalk
I decided to buy a Galaxy Tab A 10.1 2019 (SM-T515) and will report back with findings once I test with a USB C OTG Y cable adapter. It's possible that I may need to fabricate some discrete switch into the tablet's USB to alternate between OTG and charging. Not an ideal state of affairs.
Additionally, I've pondered whether devices with pogo pin dock connectors such as the Samsung Galaxy Tab S5E can charge that way whilst using the USB port for OTG devices. Whilst not strictly meeting the requirement of the list (one USB port charging whilst using OTG) it does present a compelling alternative.
It seems that with USB C, the "standard" includes OTG host charging but called pass through charging, dual role data or something along those lines. I connected my Tab A 10,1 to a Kingston Nucleum non-powered hub via the connected USB C lead, then plugged in a charger to another USB C port. Charging! Pretty much the same works whichever combination of connections is used. It seems the devices negotiate who is the power delivery and at what level. There are some settings in android to set also.
Prostheta said:
It seems that with USB C, the "standard" includes OTG host charging but called pass through charging, dual role data or something along those lines. I connected my Tab A 10,1 to a Kingston Nucleum non-powered hub via the connected USB C lead, then plugged in a charger to another USB C port. Charging! Pretty much the same works whichever combination of connections is used. It seems the devices negotiate who is the power delivery and at what level. There are some settings in android to set also.
Click to expand...
Click to collapse
Yes, but does it charge while also having other external devices such as a USB hard drive connected to the hub(which also requires being powered) at the same time? The USB hard drive receives power from the hub like it should and the device charges simultaneously?
Sent from my SM-S767VL using Tapatalk
I've tested with a USB mouse dongle, and when it arrives, my Meizu DAC pro. So far it seems positive. It does however default to the 5v charging level, but that's fine.
Prostheta said:
I've tested with a USB mouse dongle, and when it arrives, my Meizu DAC pro. So far it seems positive. It does however default to the 5v charging level, but that's fine.
Click to expand...
Click to collapse
Hey did you ever get this working? Does USB-C charge and connect devices simultaneously?
thx
Yes, everything works fine....sometimes. The Kingston Nucleum USB C hub has a 5v supply plugged into a 12v car charger port that has USB PD and QC3.0 options. The tablet is problematic in that once the power to the charger (and hence the hub) is removed after turning the car off, the tablet decides that it'll take over the role of supplying power to the hub which discharges the tablet battery whilst the car is off. Also, the hub doesn't always arrange the attached devices correctly, leaving the USB SSD unmounted and the tablet sat alone charging. I'm unsure what is happening, however I'll blame USB C for being a dumpster fire.
Prostheta said:
Yes, everything works fine....sometimes. The Kingston Nucleum USB C hub has a 5v supply plugged into a 12v car charger port that has USB PD and QC3.0 options. The tablet is problematic in that once the power to the charger (and hence the hub) is removed after turning the car off, the tablet decides that it'll take over the role of supplying power to the hub which discharges the tablet battery whilst the car is off. Also, the hub doesn't always arrange the attached devices correctly, leaving the USB SSD unmounted and the tablet sat alone charging. I'm unsure what is happening, however I'll blame USB C for being a dumpster fire.
Click to expand...
Click to collapse
Thanks, I've been looking for a tablet for car infotainment and gauges/data logging, finally decided on a Lenovo tab 4 8 plus Verizon model, precisely because it had a USB-C 3.0 port, and it is rootable. Then I started reading about the complicated mess that the USB-C standard is. Anyway I'll make a post in the General Discussion>Connected Car forums in a month or so when I get everything connected... work and kids always stand in the way of progress
Is that the place to discuss these things? I've had a lot of difficulty trying to find the best place for this, as most are either too specific or not quite on-topic.
I'm updating all of my comments in various threads on this. I've found that with my specific setup with the Kingston Nucleum hub, there are issues. I'm unsure as to the cause, but hey. Firstly, the tablet needs to be powered up before I turn on the car or at least supply power to the hub. It seems that if this is done the other way around, that is, to power on the car accessories (and hence the hub) then it seems to end up staying as the "device in charge" of the USB network. The tablet charges (slowly) but doesn't mount the USB SSD drive or the USB DAC. If the tablet is powering the hub (in charge, so to speak) then applying power to the hub via the car accessory supply has it working as expected. This does mean that the tablet ends up with a power drain when the car/USB power supply is powered down which isn't ideal. I've gotten into the habit of turning the tablet off when I park for long periods of time, however I need to boot it up to "take charge" of the USB hub network before I can start the car. It's a bit of a bummer.
Prostheta said:
It seems that with USB C, the "standard" includes OTG host charging but called pass through charging, dual role data or something along those lines.
Click to expand...
Click to collapse
Yes, my notebook has an USB-C port and can be charged via USB-C PD pass trough by a USB-C dock (USB hub with LAN). Why the Android Smartphones/Tablets don't do the same?
JamesMNewton said:
3. Is anyone aware of the actual specs, technical issues, reasons for the current state of affairs? I've started a web page to track this issue (again, not linking, not spamming) and would love to hear from anyone with direct knowledge of the technical issues involved. Why doesn't it always work? What specification needs to be met? What future is there for this sort of feature?
Click to expand...
Click to collapse
I found this diagram of a "accessory charger adapter" (USB 2.0 spec, not 3.0+?): https://superuser.com/questions/1124237/windows-tablet-otg-simultaneously-charge/1124354#1124354
JamesMNewton said:
Supports OTG, but will not charge at the same time:
LG Nexus 7
Click to expand...
Click to collapse
Charging+OTG was possible on Nexus 7 2012+2013 using a custom kernel!
Yeah, the Nexus 7 was one of the rarities amongst pre-USB3.0 spec ports that could be manipulated into simultaneous data and charging.
My ongoing concern is with ennumeration; I can get my Tab A10,1 charging through the hub easily. However, to access devices attached to the hub, the tablet needs to be active first and then power applied to the hub. Applying power to the hub first, then starting the tablet leads to charging only. The problem as I see it is the negotiation over host rights on a USB network, and whether re-negotiation or forcing priority is possible. It could be a hardware issue built into the USB-PD negotiation specs, a hardware issue with the tablet or simply a software issue in the tablet. I'm not really wanting to wade into the USB specs since they're notoriously vague and contradictary these days....
Prostheta said:
It does however default to the 5v charging level, but that's fine.
Click to expand...
Click to collapse
I would want to know why? It was the same with the Pixel C, but Notebooks will charge at faster speed via PD pass through.
skally said:
I tried powering the PixelC and it works but not at the same speed as the same charger connected directly. I estimate about 1-1.2A
Click to expand...
Click to collapse
PD charging of a Pixel 1 via pass trough (interesting read on PD negotiations):
"The USB Power Delivery behavior seen when the Plugable USB-C 3-Port Hub is passing through power from Google Pixel's own USB Power Delivery charger is a lot different from what you get when you plug the charger directly into the Google Pixel." https://gtrusted.com/review/how-the...google-pixel-phone-using-usb-power-delivery-2
JamesMNewton said:
You can NOT charge while running OTG on /most/ phones. I've done a lot of research on this, and found a few older phones / tablets that seem to support it. I can't find a /single/ USB C based device that is known to do it. Perhaps it's just not an advertising point? MFGRs don't see most users doing that, so they don't support it?
Click to expand...
Click to collapse
I was able to use the ethernet, PD pass through and USB host feature at the same time with:
1. Samsung Galaxy Tab A 10.5 2018 (Stock ROM)
2. Google Pixel 2 (LineageOS 17.1)
The USB-C standard really has made things easier! I was not able to use the HDMI output because these devices do not support DP alt mode! :-(
"USB C Charger RAVPower 65W Fast Wall Charger, PD3.0 & GaN Tech 2-Port Power Adapter" https://www.amazon.com/Charger-RAVPower-Adapter-Compact-Foldable/dp/B08MWG612F
"Dockteck 4-in-1 USB C Hub with [email protected] HDMI HDR, 100W PD, USB 3.0 and Gigabit Ethernet, Multiport USB Type C Adapter"
Amazon.com: dockteck 4-in-1 USB C Hub with [email protected] HDMI HDR, 100W PD, USB 3.0 and Gigabit Ethernet, Multiport USB Type C Adapter for MacBook/Pro/Air, iMac, XPS, iPad Pro 2020 2018 and More: Computers & Accessories
Amazon.com: dockteck 4-in-1 USB C Hub with [email protected] HDMI HDR, 100W PD, USB 3.0 and Gigabit Ethernet, Multiport USB Type C Adapter for MacBook/Pro/Air, iMac, XPS, iPad Pro 2020 2018 and More: Computers & Accessories
www.amazon.com
USB Device Info
---
Device Path: /dev/bus/usb/001/003
Device Class: Unknown (0x11)
Vendor ID: 2109
Vendor Name (reported): VIA Labs, Inc.
Vendor Name (from DB): not found
Product ID: 8817
Product Name (reported): PD3.0 USB-C Device
Product Name (from DB): not found
Additional Info
Interface #0
Class: Unknown (0x11)
Endpoints: none
---
Device Path: /dev/bus/usb/002/003
Device Class: Use class information in the Interface Descriptors (0x0)
Vendor ID: 0bda
Vendor Name (reported): Realtek
Vendor Name (from DB): Realtek Semiconductor Corp.
Product ID: 8153
Product Name (reported): USB 10/100/1000 LAN
Product Name (from DB): not found
Additional Info
Interface #0
Class: Vendor Specific (0xff)
Endpoint: #0
Address : 0x81 (10000001)
Number : 1
Direction : Inbound (0x80)
Type : Bulk (0x2)
Poll Interval : 0
Max Packet Size: 1024
Attributes : 00000010
Endpoint: #1
Address : 0x02 (00000010)
Number : 2
Direction : Outbound (0x0)
Type : Bulk (0x2)
Poll Interval : 0
Max Packet Size: 1024
Attributes : 00000010
Endpoint: #2
Address : 0x83 (10000011)
Number : 3
Direction : Inbound (0x80)
Type : Interrupt (0x3)
Poll Interval : 8
Max Packet Size: 2
Attributes : 00000011
Interface #1
Class: Communication Device (0x2)
Endpoint: #0
Address : 0x83 (10000011)
Number : 3
Direction : Inbound (0x80)
Type : Interrupt (0x3)
Poll Interval : 8
Max Packet Size: 16
Attributes : 00000011
Interface #2
Class: Communication Device Class (CDC) (0xa)
Endpoints: none
Interface #3
Class: Communication Device Class (CDC) (0xa)
Endpoint: #0
Address : 0x81 (10000001)
Number : 1
Direction : Inbound (0x80)
Type : Bulk (0x2)
Poll Interval : 0
Max Packet Size: 1024
Attributes : 00000010
Endpoint: #1
Address : 0x02 (00000010)
Number : 2
Direction : Outbound (0x0)
Type : Bulk (0x2)
Poll Interval : 0
Max Packet Size: 1024
Attributes : 00000010
---
Device Info
Device Path: /dev/bus/usb/002/004
Device Class: Use class information in the Interface Descriptors (0x0)
Vendor ID: 05e3
Vendor Name (reported): Generic
Vendor Name (from DB): Genesys Logic, Inc.
Product ID: 0749
Product Name (reported): USB3.0 Card Reader
Product Name (from DB): not found
Additional Info
Interface #0
Class: Mass Storage Device (0x8)
Endpoint: #0
Address : 0x81 (10000001)
Number : 1
Direction : Inbound (0x80)
Type : Bulk (0x2)
Poll Interval : 0
Max Packet Size: 1024
Attributes : 00000010
Endpoint: #1
Address : 0x02 (00000010)
Number : 2
Direction : Outbound (0x0)
Type : Bulk (0x2)
Poll Interval : 0
Max Packet Size: 1024
Attributes : 00000010
---
SGH-i200 said:
"Charging+OTG was possible on Nexus 7 2012+2013 using a custom kernel! "
Click to expand...
Click to collapse
Actually You don't need to modify anything with certain tablets to do otg and charging at the same time:
I bought a Lenovo tab 8 hd and only by using a so called "charging y cable" (please Google it) I was able to listen music through my USB dac and charge the tab simultaneously.
Maybe getting into developer mode helped? I don't know, but it's so easy to try...
Daniel
I have a custom designed & built USB hub board, where multiple such boards have been working with multiple android devices for multiple years. One thing I can always do with a new USB device is plug my board into the Android device, then plug a USB thumb drive into one of my boards hub inputs, and then from the Android device use Google Files to view the contents of the "disk" (the USB thumb drive). Note that most times I must first go to Settings, turn on Developer Options, and change the Default USB Configuration to allow File Transfer.
Now I'm trying it out with the very inexpensive B130DL. I've changed Default USB Configuration to allow File Transfer. I plug a USB thumb drive into my hub board in advance, and I plug my usb hub board into the B130DL in advance. Then I power up the usb hub board. SUCCESS... a moment later the BL130DL shows that USB trident icon at the top. From Google Files I'm able to view the contents of this disk. UH OH... a moment later I get a message that the usb device has been ejected. (I believe this message comes from Google Files. If I'm not currently running Google Files, I don't see this eject message. I just see the USB trident icon go away.)
Note that the B130DL is [disliking] my USB hub, specifically. If I plug in both B130DL and USB thumb drive, then it takes about 6.5 seconds from powering on the hub board to when the B130DL shows the USB trident icon. Then it takes another roughly 9 seconds for the USB trident icon to go away again. If I do the same test, plugging in the USB thumb drive 3 seconds after powering on the hub board, then the same things happen based on timing from powering on the hub board. Also, once ejected, removing and replacing the USB thumb drive doesn't repeat the test. I must remove and replace hub board power to repeat the test. In essence, it seems like the B130DL is ejecting the hub and thus everything on it. Meanwhile, a separate USB OTG cable works indefinitely when plugged into the B130DL. Note as well that this very same usb hub board works great and continuously when plugged into a different phone (Samsung A01, Android 11). I've been swapping between phones (B130DL and A01) repeatedly to make sure I haven't broken my hub board in any way. Also, In the past, this usb board has worked with Android 9 and 10. The B130DL is Android 10.
So what about the B130DL is it that causes it to first work with my usb hub board and then eject it? Any good ideas? Again, note that the problem is NOT intrinsically with my custom usb hub board, because that works great with many other Android devices. It's this specific B130DL that has the problem. True, it might be customized by BLU to refuse a number of USB OTG devices. Or it might be customized by BLUE to do something else. This is my question.
Thanks!