Tethering issue - EVO 4G Q&A, Help & Troubleshooting

I'm trying to tether my Evo with my HP netbook that's currently running Blackbuntu which is a pen test distro based on Ubuntu 10.10 and using Wicd as my network manager. With the default network manager usb tethering worked "out of the box" but unfortunately I was unable to use WiFi with it which forced me to use Wicd. In order for Wicd to function properly I had to fully remove the original network manager. Now I can't figure out how to configure Wicd to work with tethering. Somewhere I read all I have to do is change the wired interface in Wicd from eth0 to usb0, or something along those lines, so I tried ifconfig to verify and nothing showed up other than eth0, lo, and wlan0 - the 3 that always show up. I can't seem to find the tethering tutorial I read before to double-check it. Any help/ideas would be great.
EDIT: I figured it out on my own. I just had a brain fart for a bit. For anyone wondering how to do it, here's how:
On your Evo open a terminal and do the following.
su
busybox ifconfig
Write down the IP address given.
Connect your phone to your Linux box and start USB Tethering.
On the Linux box open a terminal and type:
sudo ifconfig usb0 up
Open Wicd, click preferences, and change the wired interface to usb0. You may have to set DNS1 to the IP you copied earlier.
Sent from my PC36100 using XDA App

Related

How to get internet on your phone via USB

You may also call this reversed USB tether.
This might come in handy if you're near a computer (Win XP/Win7) and there's no Wifi to connect to etc..
So after some research and trying I've found some information on how to do this.
Requirements:
* Android 2.2 (or an older version with a root tethering app)
* ADB from Android SDK, or a rooted Android 2.2 with terminal in root mode
STEP 1:
Install USB drivers from Android SDK.
STEP 2:
Connect USB cable and activate USB Tethering.
You should see a new network interface. (On XP you might need to install the RNDIS driver manually, see below)
If you're also missing RNDIS driver on Win7, look here.
Win XP manual driver install Android USB Ethernet/RNDIS: (You can skip this if you're on Win 7)
1. Download the following configuration file inside the *.zip attached to this post (tetherxp.inf) to your Windows XP computer.
2. Use the USB cable that came with your phone to connect your phone to your computer.
3. On the Android phone, press Home > Menu > Settings to open the Settings application.
4. Press Wireless & networks > Tethering & portable hotspot.
5. Check USB tethering.
6. When Windows XP’s New Hardware Wizard opens, select No, not at this time and click Next.
7. Select Install from a list or specific location and click Next.
8. Click Browse to browse to the directory where you installed the configuration file you downloaded in Step 1 and click Next. Windows XP uses the configuration file to configure itself to support USB tethering with the Android phone. (This might take a while)
9. When Windows XP finishes installing the software for Android USB Ethernet/RNDIS, click Finish.
STEP 3:
Bridge the 2 network interfaces.
STEP 4:
Setup usb0 interface of your phone. You have to options:
1. From your computer, execute:
./adb shell netcfg usb0 dhcp
2. Or in a root terminal on your phone, type:
su
netcfg usb0 dhcp
You should now be able to connect to Internet on your phone using your computer's Internet connection.
Try to do a ping www.google.com to be sure.
STEP 5:
To shut down the reverse-tethering, first unbridge interfaces on your computer:
sudo ifconfig eth0 down
sudo ifconfig usb0 down
sudo ifconfig br0 down
sudo brctl delbr br0
sudo ifconfig eth0 up
sudo dhclient eth0
Then on your phone, uncheck the USB Tethering option.
Quote...
It is working now. After setting up ICS type in console emulator on your phone:
ifconfig usb1 192.168.2.2 netmask 255.255.255.0 up
route add default gw 192.168.2.1 dev usb0
iptables -F
iptables -F -t nat
setprop net.dns1 8.8.8.8
setprop "net.gprs.http-proxy" ""
Click to expand...
Click to collapse
Hope this helps some one who wants this to the right direction.
And maybe we're able to create an app to do this all automated.
Known issues but does not apply to all users:
1. Internet in browser application does not work.
2. Can't ping domain name.
For a little more info check out the sources, this includes the Linux version too.
Sources: Google android, Mycila
Nice info
Going to post a link on the hero forum where someone was wanting to do this. I wonder if this will work on a froyo hero too...
it would be cool if one of the devs could write a small app to switch this on n off great find tho shoemeistah
Thank you for the guide, It worked fine. There are several things not working though:
- can't download apps from market, they stuck on "downloading"
- my google account don't sync
- other apps don't update themselves. For example my twitter app won't show any new tweets until I open it and manually press "refresh"
I searched for this long time ago, even created a thread about it awhile back, didnt have luck like you did though
I gave up on it eventually, it would be nice to make an app out of it.
mind asking how did you confirm the net to be working on browser? by pinging google.com?
since i saw the last line you put "Internet in browser application does not work."
You can do that in the terminal
[U][B] Internet connection on your Android phone via your PC [/B][/U]
I think I found the best solution. Check it out connectify.me
I wanted to use my PC wired internet & I was astonished that this wasn't available in my HTC Desire & 1st Android device!. I looked over the net, I found many options but most asked for a rooted device! I didn't want to root my brand new Desire.
Connectify is an easy to use software router for Windows 7 computers. After downloading and installing the lightweight application, Connectify utilizes your computers' built in Wi-Fi card to wirelessly share any available Internet connection: a cable modem, a cellular card, or even another Wi-Fi network. Other Wi-Fi enabled devices including laptops, smart phones, music players, and gaming systems can see and join your Connectify hotspot just like any other Wi-Fi access point and are kept safe and secure by password-protected WPA2 Encryption.
I tried it & it's working perfectly for me .. It's a free app.
-----------
Phone: HTC Desire (SIM Free)
Type: Desire
Build: HTC Desire 2.2, 2.10 (kernel: htc 2.6.32.15)
Baseband: 5.09.05.30
Network: UMTS auto (EGY)
By me it didn't work. Using OpenDesire with Froyo 2.2
So I made it work, by edititng the .inf file.
Here the file for USB\VID_0BB4&PID_0C02.
For all which still have a problem(USB TETHERING ON DEVICE MUST BE ACTIVE, ALSO THE IDs DIFFERS BETWEEN CONNECTED WITH ADB OR NOT), go into the device manager -> open the device -> goto tab details -> choose device id
look at it, you see somewhere vid_XXXX and further pid_XXXX
open my file -> goto line 31 -> change vid_YYYY and pid_YYYY with what you see in your device dialog. the same you do on line 35. be careful with 0 or o.
Regards
Ralph
I am also using connectify, easy to install, set it up, connect with Desire, anything works fine.
Thanks GhostOfTheNet.
chrismast said:
I am also using connectify, easy to install, set it up, connect with Desire, anything works fine.
Click to expand...
Click to collapse
I appreciate the recommendations for other solutions.
But as you can see this thread is for a internet solution at places where is no Wifi available.
So please keep it on topic, thanks!
browser & webviews
Any idea why browser won't work?
I'm interested in testing against internal sites (of course no WAP here.. cuz they be scared i guess).. both Browser and embedded webviews.
connectify great program.works fine
its a default feature in hd roms but that doesnt work in all programs
Connectify doesn't work correctly with my Galaxy 5. It keeps connected for a short time then disconnects and then, connects again, connect, disconnect...
Does anyone know how to fix it?
Thanks Man
plz make a video tutroial of this
its difficult to under stand
does it actualy work?? anyone tried this and actualy worked??? just a simple yes or no.
thanks
small proble plz solve it
hi
I have a small problem in it when my device is not in usb tethering mode
i can see it in my adb devices
as soon as is start usbtethering it say no device found
plz help me
thanks a lot !!!
realy nice guide! Thanks!

Connect an HTC desire to an ad-hoc network

Ok, i found this tutorial.
ott.net/knowledge/htc-desire-adhoc/
Installed apk and trying to terminal adb shell command and getting error
abd: not found
what is wrong?
this terminal i runned from phone not from pc..
You have to run adb from pc. A guide for installing it can be found in my signature.
TouchPaled from Oxygen with Transparent XDA App
I started adb shell and when enter:
insmod /system/lib/modules/bcm4329.ko
I have this error:
insmod: init_module '/system/lib/modules/bcm4329.ko' failed (Operation not permitted)
atlantisu21 said:
I started adb shell and when enter:
insmod /system/lib/modules/bcm4329.ko
I have this error:
insmod: init_module '/system/lib/modules/bcm4329.ko' failed (Operation not permitted)
Click to expand...
Click to collapse
I have spent some time yesterday trying the exact same thing, I didn't succeed.
For your question:
Try using the command "su" before starting insmod.
Also remember to assign execute permissions to iwconfig, else it will not work either!
I probably did something wrong (or it just doesn't work on my ROM (I'm on redux2)) because i couldnt get it to work.
Also the app ad-hoc (follow the links on his page i think) fails for me. Wifi will go to error state and only reboot makes it work again.
If you succeed please tell us how you did it because I'm veeery interested!
Doesn't work with su command...
I trying to change bcm4329.ko permission with root explorer but nothing happening.
Maybe this is the problem?
And where is located iwconfig file?
Can I change file permission from adb shell and how?
Finaly WORKS!!!!!!!!!!!!!!
Because, I cant enable ad hoc on my Desire (I try many ways and nothinhg...),
I found another way to share wifi internet from pc to android phone.
This is my way:
Download VirtualRouter
Download fresh wifi drivers for Windows 7 64bit/32bit
Disable IP6 (if you have Windows 7 64bit)
After install VirtualRouter, reset your PC and VirtualRouter will start with your Windows in system tray.
In Network Connections, enable Microsoft Virtual WiFi Miniport Adapter if disabled.
Go to Local Area Connection (your default internet connection), properties -> sharing and check all box. Select home network connection -> Microsoft Virtual WiFi Miniport Adapter or Wireless Network Connection 2.
Run cmd as admin and type this:
netsh wlan set hostednetwork mode=allow ssid=Test key=password
netsh wlan start hostednetwork
VR automaticly write ssid and key and starting virtual network.
Desire CAN SEE this network, and you CAN CONNECT!
If you have problems go here.
atlantisu21 said:
Finaly WORKS!!!!!!!!!!!!!!
Because, I cant enable ad hoc on my Desire (I try many ways and nothinhg...),
I found another way to share wifi internet from pc to android phone.
[
Click to expand...
Click to collapse
I work in the same way (with connectify)>
Too bad you couldn't get ad-hoc to work, i would like to have that solution, it is more elegant.

[Q] Reverse tether ("internet passthrough") on DHD using JellyTime ROM?

Hi.
I didn't want to start this in the JellyTime dev thread and take it off-topic, and figured a separate thread would be more useful to anyone searching for this.
Aim: Access the internet on my DHD using my Linux PC's internet connection.
Set-up: Ubuntu 12.04, Desire HD (European), JellyTime R21.
Process/progress so far:
I found a script here... I modified it a little, so it looks like this:
Code:
#!/bin/bash
adb shell 'echo 6 > /sys/devices/platform/msm_hsusb/usb_function_switch'
sleep 1
adb shell ifconfig usb0 192.168.99.5 netmask 255.255.255.0 up
sleep 1
adb shell setprop net.dns1 8.8.8.8
get_ip ()
{
ifconfig usb0 | grep inet | awk '{print $2}' | sed 's/addr://' | grep .
}
echo "waiting for IP on computer usb0"
while [[ `get_ip` < 192 ]];do sleep 2; done
ip=`get_ip`
echo "IP adress is $ip "
adb shell route add default gw $ip dev usb0
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
If I set my device to "USB tether" mode, running (as su) "ifconfig usb0 up" works fine, but running the above script generates:
Code:
/system/bin/sh: can't create /sys/devices/platform/msm_hsusb/usb_function_switch: No such file or directory
waiting for IP on computer usb0
connect.sh: 14: connect.sh: cannot open 192: No such file
connect.sh: 14: connect.sh: [[: not found
IP adress is 192.168.42.245
No such process
Is the problem that usb_function_switch is not present in Cyanogenmod? If so, I guess randomblame (the JellyTIme dev) would have to add this to his DHD port of CM10. I think it has been added for the HTC Hero.
Incidentally, I also tried using this app. I followed the instructions, and can ping my DHD from the PC, but pressing the start button throws the message "No tetherable USB interface!".
Any tips and advice (even if it's just telling me it's not possible, and that I should give up now) would be appreciated.
Thanks.
EDIT (P.S.): If we can come to the conclusion that this is something to do with the ROM (e.g. usb_function_switch) then I will create an issue for this in the ROM issue tracker... but I didn't want to do that immediately in case it is just me missing something obvious.
Well, even if you create the usb_function_switch file, the ROM still doesn't support Internet pass-through, so putting "6" in it won't do anything. You can put it on the issue tracker, but I have not yet seen a non-Sense ROM have that feature.
bananagranola said:
Well, even if you create the usb_function_switch file, the ROM still doesn't support Internet pass-through, so putting "6" in it won't do anything. You can put it on the issue tracker, but I have not yet seen a non-Sense ROM have that feature.
Click to expand...
Click to collapse
Really? It supports USB tethering... I was pretty sure that was all that was needed... See this.
lawrencew said:
Really? It supports USB tethering... I was pretty sure that was all that was needed... See this.
Click to expand...
Click to collapse
First of all, I'm not sure if that site you're quoting is for the Desire or the Desire HD. Second, USB tethering allows the computer to use the phone's internet (which is supported); internet pass-through is the other way around. Third, I could be wrong about JellyTime supporting internet pass-through; where did you see that?
bananagranola said:
First of all, I'm not sure if that site you're quoting is for the Desire or the Desire HD. Second, USB tethering allows the computer to use the phone's internet (which is supported); internet pass-through is the other way around. Third, I could be wrong about JellyTime supporting internet pass-through; where did you see that?
Click to expand...
Click to collapse
I was under the impression that passthrough uses the same connection as tether, but with slightly different config.
Could definitely use that...the reverse tether would be great in remote area's with spotty connections as well as in buildings like hospitals.
lawrencew said:
I was under the impression that passthrough uses the same connection as tether, but with slightly different config.
Click to expand...
Click to collapse
If that's true, that's really interesting.
Well, we have to find out how it works because i want to use JB but i can't because it doesn't has Reverse Tether. Sense Roms are my only Option and i hate that. If someone gets the solution it would be nice if you make a tutorial for that.
Found a solution. Search the forum for Reverse Tethering 2.30 .

native adb

Does anyone know how to connect your phone, to its own native adb. If your running 4.0 or better like the new 4.0.1 sense on evo 4g lte you have the native adb, in the terminal you can start it by typing adb start-server, but I cannot connect the phone to it.
This is nice to use to connect to other phones and use it as a debug station, but does anyone know how to connect to the phones adb server from the terminal on its own phone. When I start the server it says its listening on 5083 I have tried adb forward tcp:5555 tcp:55, tried adb tcpip 5555, but none of the forwarding ports seems to work. I have started adb on the phone and adb over wifi but still do not see the ip in adb.
Some help on this would be nice, I will keep thinking, but any help would be nice.
Some ideas might be to start a wifi server using the phones wifi tether, or hotspot to connect to itself
ip addr add 192.168.1.10/24 dev eth0
ip addr add 192.168.1.10/24 dev wlan0
maybe we can manually add and connect the devices threw wifi hotspot or tether with this. someone want to take this on and get back to me
There are posts on StackOverflow about this, and those have worked for me. Search "adb over wifi"
Sent from my PG06100

How do you specify a mac address for wlan0 on CM 12.1?

Is there a way to "permanently" set the mac address of wlan0 to something of my choosing? I have been able to do this temporarily through ADB and with busybox, but it does not always work. I want to have a specific mac address on wlan0 for when I use my phone as a hotspot for portable gaming devices. I have google's this, and it seems at least in previous versions of CM, this was stored in a file and could be changed, but I cannot find that file on the build I am running (CM 12.1-20150705-NIGHTLY). Does anyone know how to do this? Currently, I have to enable the hotspot, use ADB cli like:
# busybox ifconfig wlan0 down
# busybox ifconfig hw ether 00:11:22:33:44:55
# busybox ifconfig wlan0 up
# busybox ip link show wlan0
If I check the mac address after this, sometimes it changes, sometimes it does not. And sometimes when "ip link" reports the changed mac, it is not really changed (I check with other devices and they still see the old mac). But it does work... sometimes (rarely.. but I have had it working). I'd really like to make this more permanent.
I have looked in /data/misc/wifi but I don't see any nvram file in there anymore where I think you used to be able to set it.
This thread may help you. http://forum.xda-developers.com/showthread.php?t=2286440 I haven't tried it myself but a friend of mine said it worked for him.

Categories

Resources