seanhold3n / android-wifi-tether

Automatically exported from code.google.com/p/android-wifi-tether
0 stars 0 forks source link

Wireless Tethering for HTC EVO #362

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which device (manufacturer, type)?
HTC Supersonic (HTC EVO)

Which firmware is installed?
Rooted 2.1

What version of wireless tether are you using?
None

Please provide any additional information below.

Thought I would start off this thread now that the EVO is rooted. I have
one already ready to test if needed. This will be fantastic for this phone,
just have to work out how to make it work with 4G.

Original issue reported on code.google.com by Love2Shred on 3 Jun 2010 at 1:39

GoogleCodeExporter commented 9 years ago
As far as I know is that the evo has the same wifi-chip built-in like the 
nexusone. 
So, the wifi-chip itself should be supported by the app (version 2.0.1 and 
higher).

Please install the latest 2.0.2-pre-version of the app (see download-section). 
Install the app and try to start via the gui. Starting via the gui will 
generate a 
configuration file.

Please upload this config-file here - it is stored under 
/data/data/android.tether/conf/tether.conf!

You could also try to start tethering from command-line. This will generate 
some 
additional output which might be helpful:

adb shell
su
cd /data/data/android.tether/bin
./tether start 1

Please post this output here as well.

Original comment by harald....@gmail.com on 3 Jun 2010 at 3:20

GoogleCodeExporter commented 9 years ago
Did not work. "Unable to start tethering. Please try again."

Original comment by Love2Shred on 3 Jun 2010 at 4:18

Attachments:

GoogleCodeExporter commented 9 years ago
If we could get this fixed I would be so happy!  Let me know if you want my log 
file
as well... doesn't work for me either. 

Original comment by prsal...@gmail.com on 3 Jun 2010 at 4:31

GoogleCodeExporter commented 9 years ago
@Love2Shred: "Unable to start tethering. Please try again." indicates that 
there is 
something wrong with your "su environment". 
Does "/system/bin/su" exist?
Is there an app called "Superuser Permission" installed? If yes, is 
"USB-debugging" 
(Settings->Application->Development) enabled? (Most version of "Superuser 
Permission" 
needs that.)

Ok, it looks like that it works starting from command-line (at least the wifi-
interface is setup correctly). Check the following:

adb shell
su
cd /data/data/android.tether/bin
./tether start 1
./iwconfig eth0

Report the output.
(by the way ... "./tether stop 1" stops tethering again)

When started from commandline ... do you see "something" named "AndroidTether" 
when 
doing a network-scan on your computer? If yes, are you able to join this 
network? Do 
you get an ip-address?

Original comment by harald....@gmail.com on 3 Jun 2010 at 5:16

GoogleCodeExporter commented 9 years ago
No, su doesn't exist there. Currently the EVO doesn't have /system access from 
the handset even after 
root. Has to do with NAND protection from what I've been reading. I believe 
that root was achieved in a 
similar method as the Desire. Do we have any options since su isn't in /system?

Also, when the phone was rooted, there was no Superuser Permission app in the 
ROM. Where do we go 
from here?

Original comment by Love2Shred on 3 Jun 2010 at 5:22

GoogleCodeExporter commented 9 years ago
But ... you can execute su via adb? So, there must be a su-binary located 
somewhere. What is the output 
of:
adb shell
which su

And ... please check what I've written above:
adb shell
su
cd /data/data/android.tether/bin
./tether start 1
./iwconfig eth0

Report the output.
(by the way ... "./tether stop 1" stops tethering again)

When started from commandline ... do you see "something" named "AndroidTether" 
when 
doing a network-scan on your computer? If yes, are you able to join this 
network? Do 
you get an ip-address?

Original comment by harald....@gmail.com on 3 Jun 2010 at 5:32

GoogleCodeExporter commented 9 years ago
I'm at work now, I won't be able to do this until late tonight. I believe it 
works through adb because shell 
has su correct? Sorry, still learning a little.

Original comment by Love2Shred on 3 Jun 2010 at 5:39

GoogleCodeExporter commented 9 years ago
permanent root in normal android mode is obtained after applying this ROM 
(STOCK ROM
with su and superuser added). this will be required to test wifi-tether.
http://forum.xda-developers.com/showthread.php?t=693980

otherwise, you'll only have root in recovery mode with the current released 
software
root methods by toastcfh.

Original comment by krim_...@hotmail.com on 3 Jun 2010 at 6:27

GoogleCodeExporter commented 9 years ago
Okay I tested with the custom rom installed with superuser and it installs fine 
and
even starts up okay however when connecting any device automatically (tested 
macbook
pro, ipad, and windows 7 machine) it gives the ip address 192.254.56.118 and 
subnet
255.255.0.0 - and nothing else 

Original comment by prsal...@gmail.com on 3 Jun 2010 at 8:06

GoogleCodeExporter commented 9 years ago
/data/data/android.tether/conf/tether.conf! - where is this file in the SD Card?

Original comment by prsal...@gmail.com on 3 Jun 2010 at 8:14

GoogleCodeExporter commented 9 years ago
It's not on the card, it's in the phone's filesystem. You need to either use 
Root Explorer from 
the phone or get the file via adb.

Original comment by Love2Shred on 3 Jun 2010 at 8:17

GoogleCodeExporter commented 9 years ago
Ok, we have probably the same issue here like on htc desire-devices.
Could you guys please check if that is working:
http://code.google.com/p/android-wifi-tether/issues/detail?id=330#c23

1. Set WiFi Card static IP on the PC (Windows 7) to 192.168.2.100/24 with a 
gateway 
of 192.168.2.254
2. Started WiFi Thether App with defaults only.
3. PC associates with the WiFi Tether access point.
4. Using a terminal emulator on the desire issued command 'ping -c 3 
192.168.2.100'
5. No response to the ping command (100% packet loss)
6. A few seconds later the PC says its online. 
7. Web page loaded (google.co.uk)

Original comment by harald....@gmail.com on 3 Jun 2010 at 8:32

GoogleCodeExporter commented 9 years ago
I couldn't get that working but I could've easily done it wrong - someone else 
please
try as well

Original comment by prsal...@gmail.com on 3 Jun 2010 at 8:45

GoogleCodeExporter commented 9 years ago
I'll give it a shot tomorrow around 10am EST.

Original comment by tyler.da...@gmail.com on 3 Jun 2010 at 8:59

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
i dunno if this means anything but..
ip.gateway=192.168.2.254
wifi.setup=wpa_supplicant
wifi.encryption=disabled
wifi.channel=6
tether.mode=wifi
ip.network=192.168.2.0
ip.netmask=255.255.255.0
wifi.wepkey=
wifi.driver=wext
wifi.txpower=disabled
wifi.essid=AndroidTether
wifi.interface=eth0
device.type=nexusone

Original comment by prsal...@gmail.com on 3 Jun 2010 at 9:34

GoogleCodeExporter commented 9 years ago
@prsales8: The config looks good as well.

Please start tethering via the gui! Then do the following:
adb shell
cd /data/data/android.tether/bin
./iwconfig eth0

Report the output. And ... if you do a network-scan on your computer. Do you 
see a 
"network" named AndroidTether?

Original comment by harald....@gmail.com on 3 Jun 2010 at 10:10

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
# cd /data/data/android.tether/bin
# 
# ./iwconfig eth0
eth0      IEEE 802.11-DS  ESSID:"AndroidTether"  Nickname:""
          Mode:Ad-Hoc  Frequency:2.437 GHz  Cell: A6:EB:27:5E:75:EE   
          Bit Rate=1 Mb/s   Tx-Power:32 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Managementmode:All packets received
          Link Quality=5/5  Signal level=-57 dBm  Noise level=-57 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:12  Invalid misc:0   Missed beacon:0

Original comment by prsal...@gmail.com on 3 Jun 2010 at 10:25

GoogleCodeExporter commented 9 years ago
did it one more time for you don't know if it will help
# cd /data/data/android.tether/bin
# ./iwconfig eth0
eth0      IEEE 802.11-DS  ESSID:"AndroidTether"  Nickname:""
          Mode:Ad-Hoc  Frequency:2.437 GHz  Cell: A6:EB:27:5E:75:EE   
          Bit Rate=1 Mb/s   Tx-Power:32 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Managementmode:All packets received
          Link Quality=5/5  Signal level=-57 dBm  Noise level=-57 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:14  Invalid misc:0   Missed beacon:0

Seems like the excessive retries is increasing...

Original comment by prsal...@gmail.com on 3 Jun 2010 at 10:27

GoogleCodeExporter commented 9 years ago
@prsales8: Looks good! Do you see a network named AndroidTether when doing a 
network-
scan? (you should)

And ... what is the output of:
cat /proc/sys/net/ipv4/conf/eth0/arp_filter

Original comment by harald....@gmail.com on 3 Jun 2010 at 10:29

GoogleCodeExporter commented 9 years ago
Do the network-scan on computer with wifi-card. 

Original comment by harald....@gmail.com on 3 Jun 2010 at 10:31

GoogleCodeExporter commented 9 years ago
Macintosh-2:tools Peter$ ./adb shell
# cat /proc/sys/net/ipv4/conf/eth0/arp_filter
0
# 

thats what I get... yeap i see AndroidTether listed as a device 

Original comment by prsal...@gmail.com on 3 Jun 2010 at 10:33

GoogleCodeExporter commented 9 years ago
when i try and connect 

AirPort has the self-assigned IP address 169.254.47.39 and will not be able to 
connect to the Internet.

Original comment by prsal...@gmail.com on 3 Jun 2010 at 10:35

GoogleCodeExporter commented 9 years ago
Now. When you join that network now you have mentioned that you get a 
ip-address ... 
something like ... 192.254.56.118 with subnet-mask 255.255.0.0? Correct?

Original comment by harald....@gmail.com on 3 Jun 2010 at 10:39

GoogleCodeExporter commented 9 years ago
Mmmhh ... ok. You don't get an ip-address from the dhcp-server running on the 
phone. 
Looks like we have the same issue like on the desire.

Original comment by harald....@gmail.com on 3 Jun 2010 at 10:41

GoogleCodeExporter commented 9 years ago
I'm getting a self assigned 169.254.47.39
subnet 255.255.0.0

Original comment by prsal...@gmail.com on 3 Jun 2010 at 10:44

GoogleCodeExporter commented 9 years ago
Please try the desire-"workaround":

1. Set WiFi Card static IP on the PC (Windows 7) to 192.168.2.100/24 with a 
gateway 
of 192.168.2.254 (the dns-server is 192.168.2.254)
2. Started WiFi Thether App with defaults only.
3. PC associates with the WiFi Tether access point.
4. Using a terminal emulator on the evo issued command 'ping -c 3 192.168.2.100'
5. No response to the ping command (100% packet loss)
6. A few seconds later the PC says its online. 
7. Web page loaded (google.co.uk)

Try to ping the defalt-gateway which is 192.168.2.254 from your pc/mac:
ping 192.168.2.254

Original comment by harald....@gmail.com on 3 Jun 2010 at 10:46

GoogleCodeExporter commented 9 years ago
how do you add a /24 to the ip address as far as I know you can only have 
digits and periods.... is the ping 
command within the android terminal or the computer shell/command line  

Original comment by prsal...@gmail.com on 3 Jun 2010 at 10:48

GoogleCodeExporter commented 9 years ago
192.168.2.100/24 is just a different notation for ipaddress 192.168.2.100 
subnetmask 
255.255.255.0 ...

to configure the client-computer/mac:
ipaddress: 192.168.2.100
subnetmask: 255.255.255.0
gateway: 192.168.2.254
dns: 192.168.2.254

Original comment by harald....@gmail.com on 3 Jun 2010 at 10:52

GoogleCodeExporter commented 9 years ago
well.. that does infact work... after the ping command is sent via android 
terminal... i can connect to the internet 
on my mac 

Original comment by prsal...@gmail.com on 3 Jun 2010 at 10:53

GoogleCodeExporter commented 9 years ago
very very strange... whats the deal with the ping command?  is there anyway to 
integrate that into the application 
so that it does it automatically?

Original comment by prsal...@gmail.com on 3 Jun 2010 at 10:54

GoogleCodeExporter commented 9 years ago
also are there any plans for a workaround for the desire and the evo?  i'm sure 
many will want this feature on the 
evo to simply work haha 

Original comment by prsal...@gmail.com on 3 Jun 2010 at 10:56

GoogleCodeExporter commented 9 years ago
surprisingly... it works on their 4G network as well after the ping command is 
sent...- as far as i cant tell at 
least---- unless the app is running the off the 3g network in the 
background....?

Original comment by prsal...@gmail.com on 3 Jun 2010 at 11:00

GoogleCodeExporter commented 9 years ago
The problem seems to be that the arp-table is not populated automatically with 
new 
entries. If you do an "arp -a" (on the phone) before you that ping-command is 
executed there will be no entry for the wifi-interface (mac-address) of your 
pc/mac. 
When you do that ping-command ... that entry is added and tethering starts to 
work.

The problem is I don't have an evo or an desire available for testing and I 
didn't 
find a solution for it so far. By the way ...

What is the output for:
cat /proc/sys/net/ipv4/conf/all/arp_filter

Original comment by harald....@gmail.com on 3 Jun 2010 at 11:03

GoogleCodeExporter commented 9 years ago
that tethering is working on the 4g network is no surprise. "wireless tether" 
can make 
use of any type of connection which is established by the phone. it should even 
work if 
you switch from wimax to cdma and vice versa. The problem is the arp-table 
which should 
be solved.

Original comment by harald....@gmail.com on 3 Jun 2010 at 11:07

GoogleCodeExporter commented 9 years ago
Is there any way to automate the ping command into the app itself which would 
be a special evo/desire build

Original comment by prsal...@gmail.com on 3 Jun 2010 at 11:07

GoogleCodeExporter commented 9 years ago
I'll be back at my computer shortly and ill send the results of that 
command 

Original comment by prsal...@gmail.com on 3 Jun 2010 at 11:11

GoogleCodeExporter commented 9 years ago
We could add a static arp-entry but this is only possible (as far as I know) if 
we know 
the mac-address of the client (pc/mac). And to do that ... you would have to 
configure 
the mac-address in the app (which is not very userfriendly).

HTC has made some changes which makes live harder for us. But I'm sure there is 
a 
simple workaround for this - we just don't know it.

Original comment by harald....@gmail.com on 3 Jun 2010 at 11:19

GoogleCodeExporter commented 9 years ago
Understandable... humm do you want me to run that command after I 
have the connection running on the evo and the computer 

Original comment by prsal...@gmail.com on 3 Jun 2010 at 11:30

GoogleCodeExporter commented 9 years ago
Please give me the output for all commands:

cat /proc/sys/net/ipv4/conf/eth0/arp_accept
cat /proc/sys/net/ipv4/conf/eth0/arp_announce
cat /proc/sys/net/ipv4/conf/eth0/arp_filter
cat /proc/sys/net/ipv4/conf/eth0/arp_ignore
cat /proc/sys/net/ipv4/conf/eth0/arp_notify
cat /proc/sys/net/ipv4/conf/eth0/proxy_arp
cat /proc/sys/net/ipv4/conf/eth0/accept_source_route
cat /proc/sys/net/ipv4/conf/eth0/secure_redirects
cat /proc/sys/net/ipv4/conf/eth0/send_redirects

Good night.

Original comment by harald....@gmail.com on 3 Jun 2010 at 11:31

GoogleCodeExporter commented 9 years ago
Please run all commands after you have started tethering.

Original comment by harald....@gmail.com on 3 Jun 2010 at 11:32

GoogleCodeExporter commented 9 years ago
# cat /proc/sys/net/ipv4/conf/eth0/arp_accept
0
# cat /proc/sys/net/ipv4/conf/eth0/arp_announce
0
# cat /proc/sys/net/ipv4/conf/eth0/arp_filter
0
# cat /proc/sys/net/ipv4/conf/eth0/arp_filter
0
# cat /proc/sys/net/ipv4/conf/eth0/arp_ignore
0
# cat /proc/sys/net/ipv4/conf/eth0/arp_notify
/proc/sys/net/ipv4/conf/eth0/arp_notify: No such file or directory
# cat /proc/sys/net/ipv4/conf/eth0/proxy_arp
0
# cat /proc/sys/net/ipv4/conf/eth0/accept_source_route
1
# cat /proc/sys/net/ipv4/conf/eth0/secure_redirects
1
# cat /proc/sys/net/ipv4/conf/eth0/send_redirects
1
# 

Original comment by prsal...@gmail.com on 3 Jun 2010 at 11:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Issue 365 has been merged into this issue.

Original comment by harald....@gmail.com on 4 Jun 2010 at 9:05

GoogleCodeExporter commented 9 years ago
Ok, I can't see a difference to my nexusone.

I really don't know if the routing-tables are part of that 
problem but that's still something which has not been checked so far.

What I see from a system-dump ...
cat /system/etc/iproute2/rt_table
1 wifi
2 gprs
3 mms
4 wap
5 j2me
6 game
7 stream
8 other
9 vpn
10 hipri
11 netshare

So, what's the deal with those routing-tables? As already mentioned I've only 
seen 
such tables on two device: htc desire and htc evo 4g ... and we have the same 
problems on both.

So, what is the output of following commands:
ip route show dev eth0 table wifi
ip route show dev eth0 table gprs
ip route show dev eth0 table other
ip route show dev eth0 table netshare 

Original comment by harald....@gmail.com on 4 Jun 2010 at 9:19

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
why cant we add a icon on home screen or button on the app for evo/desire users 
that fixes the arp? so we can 
use ipad or other non computer teathers?

Original comment by rubber4...@gmail.com on 4 Jun 2010 at 10:05

GoogleCodeExporter commented 9 years ago
I see the same routing tables. Executing 'ip route show dev eth0' while the 
tether 
application is running gives me 

192.168.2.0/24  proto kernel  scope link  src 192.168.2.254

Executing the commands you listed shows all empty tables.

I've downloaded the source and loaded it up in eclipse to tweak and see if I 
can't 
figure something out, although it's been a long time since I've played with 
routing 
on linux or developed in Java. 

Original comment by andrew.r...@gmail.com on 5 Jun 2010 at 1:51