sssemil / android-wifi-tether

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

Sprint HTC Hero Support #188

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Since the Sprint/CDMA Hero has now been rooted, we Android fans need our
long awaited Wifi Tether! The app runs and clients can connect to the phone
fine, there just isn't any Internet access.

Thanks ahead of time from all of us.

Original issue reported on code.google.com by dalto12...@gmail.com on 8 Nov 2009 at 7:32

GoogleCodeExporter commented 9 years ago
I'm having the same issue.  I am getting the proper IP addy, just no internet 
access.  Also, when encryption (WEP) is enabled, I would expect to be prompted 
for 
the WEP code, but nothing.  I tried to just create a wifi profile with the WEP 
and 
SSID, but still the same issues.  Any ideas?

Original comment by scottwal...@gmail.com on 8 Nov 2009 at 6:25

GoogleCodeExporter commented 9 years ago
I can't seem to make this work please help

Original comment by sffred...@gmail.com on 8 Nov 2009 at 6:50

GoogleCodeExporter commented 9 years ago
It runs and creates the WiFi point with the correct ssid, but it never has any 
WEP encryption and the 
devices don't get any internet. This is the biggest reason that I rooted my 
phone. Please fix.

Thanks In advance.

Original comment by planeman...@gmail.com on 8 Nov 2009 at 9:27

GoogleCodeExporter commented 9 years ago
We developers don't have such a device available for testing. So, we need some 
input 
from your side to make this work.

1) How did you root your phone? Which alternative rom are you using now?

2) Any error in log. On the main-screen (of the app) press [menu] and select 
"Show 
log". Any errors here?

3) Try to start tethering from command-line. Open a terminal emulator (see 
Android 
Market) become root (type "su") and start tethering (type 
"/data/data/android.tether/bin/tether start"). Any errors or additional 
information 
printed on console?

4) Please share the kernel-config of your phone. Pull the file from your phone 
(via 
adb) and upload it here. 

(Windows command prompt or Linux shell):
"adb pull /proc/config.gz ." 

Original comment by harald....@gmail.com on 8 Nov 2009 at 9:54

GoogleCodeExporter commented 9 years ago
To answer the second question, there were no errors in the log built into the 
app.

Original comment by gnarlymtb@gmail.com on 9 Nov 2009 at 1:05

GoogleCodeExporter commented 9 years ago
I'm now able to use Wifi Tether after I flashed my Hero to the new CDMA HERO 
MoDaCo
Custom ROM Core featuring WaveSecure.

Original comment by dalto12...@gmail.com on 9 Nov 2009 at 4:23

GoogleCodeExporter commented 9 years ago
Just as an FYI, I gained access by using the AndroidSDK (1.6), and the tutorial 
on 
Unlockr.  I did not flash a ROM, I just gained Root access.  At that point, 
WiFi 
Tether started working, but oviously with the errors listed above. I don't have 
any 
errors in the log FYI.

Original comment by scottwal...@gmail.com on 9 Nov 2009 at 6:31

GoogleCodeExporter commented 9 years ago
This whole thread could have been avoided if it was stressed enough everywhere 
around
here that the application won't work with the stock system! It appears that the
Sprint Hero has the same limitation as the ordinary one with the WiFi.

Original comment by zwzser...@gmail.com on 9 Nov 2009 at 8:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I'm having the same issue. See below for details requested.

1) rooted with asroot2, no alternative ROM installed
2) no errors in the log
3) this was successful, nothing displayed on console - no errors
4) kernel-config attached

Please help, I'd like to get this working without flashing a new ROM if 
possible.

Original comment by caruso.t...@gmail.com on 9 Nov 2009 at 9:49

Attachments:

GoogleCodeExporter commented 9 years ago
Same issue:

1) Rooted With: asroot2, default ROM
2) no errors in the log
3) Success / No Errors

Original comment by moque...@gmail.com on 11 Nov 2009 at 3:30

GoogleCodeExporter commented 9 years ago
If the default ROM does not work but the modaco ROM does ... some 
kernel-options are
probably missing. Could somebody upload the config.gz from modaco? I've asked 
modaco
- but I didn't get a response.

I don't have a hero for testing ...

Original comment by harald....@gmail.com on 11 Nov 2009 at 9:01

GoogleCodeExporter commented 9 years ago
This is the config.gz from the modaco ROM 2.9

Original comment by dot...@gmail.com on 11 Nov 2009 at 8:32

Attachments:

GoogleCodeExporter commented 9 years ago
This is a major issue that appears to be around in different descriptions 
through out
this board.  Please provide some kind of guidance so the sprint htc users could 
have
internet access.  We all can connect to the wifi but no internet

Original comment by meaba...@gmail.com on 12 Nov 2009 at 4:08

GoogleCodeExporter commented 9 years ago
This is only an issue which affects hero-devices. Please note, htc has modified 
big
parts of the rom and those changes were not opensourced. And we developers 
don't have
a hero for testing.

The madoco-rom seems to work (at least wifi tethering). It looks like that the
original kernel supports netfilter/iptables which is mandatory. I've compared 
both
kernel-configs (original/madoco) and can't find something which could cause 
described
behavior. I've asked madoco some months ago what he changed to make it work - he
didn't know.

We had that all in issue 122 and maybe the last post
http://code.google.com/p/android-wifi-tether/issues/detail?id=122&can=1&q=traffi
c#c91
could light-up some things. So, could you please check what pwhung suggested?

The original-kernel looks ok (netfilter/iptables) - maybe there is something 
wrong
with routing ...

Original comment by harald....@gmail.com on 12 Nov 2009 at 9:35

GoogleCodeExporter commented 9 years ago
I must note that the config.gz file from Modaco's ROM that was added here by 
dotbox, 
is NOT for the Sprint Hero. Modaco;s 2.9 Version is for the GSM hero. The 
Modaco ROM 
for Sprint Hero is currently in version 1.1 I really have no idea if the 
config.gz 
file from the 1.1 ROM is different from the GSM 2.9, but at least I guess it 
would 
be usefull if someone having the Modaco 1.1 for CDMA Sprint Hero would post 
his/her 
config.gz file. (I don't have Modaco's ROM installed so I can;t provide it).

Original comment by davidagr...@gmail.com on 12 Nov 2009 at 7:28

GoogleCodeExporter commented 9 years ago
By going through this note and all other (ex. 122) I cannot tell if any hero 
releases have been made to work wifi tether.  If some one has this working on 
any 
platform please provide name and any special config/ROMs used to make it work.  
Thanks

Original comment by meaba...@gmail.com on 12 Nov 2009 at 9:15

GoogleCodeExporter commented 9 years ago
Status for this note is "need input".  I can't tell what input is requested?

Original comment by meaba...@gmail.com on 12 Nov 2009 at 9:17

GoogleCodeExporter commented 9 years ago
"NeedInput" means that I have _no idea_ how to solve this issue. I've said it 
100 
times now - we developers don't have a hero for testing. We can't debug and we 
are 
not able to find a solution for this hero-rom related issue without the help of 
hero-
owners!

We will fix whenever we know what's wrong (and if it's app related). Please do 
the 
checks mentiond here: 
http://code.google.com/p/android-wifi-tether/issues/detail?
id=122#c3 ... some checks if the phone is reachable from your computer 
(pingable).

Please try to activate that usb modem (tethering thing) which is supported by 
the 
hero rom and try again!

Also provide the output of "ip route" and "netstat -rn" (type in a terminal 
emulator 
on your phone or connect via adb). 

Original comment by harald....@gmail.com on 12 Nov 2009 at 10:00

GoogleCodeExporter commented 9 years ago
MoDaCo ROM 1.1 (CDMA Hero) kernel config attached

Original comment by hellomo...@gmail.com on 12 Nov 2009 at 11:10

Attachments:

GoogleCodeExporter commented 9 years ago
I don't see anything different between MoDaCo 1.1 kernel config posted and the 
stock
Sprint Hero config I posted earlier.

Original comment by caruso.t...@gmail.com on 13 Nov 2009 at 4:54

GoogleCodeExporter commented 9 years ago
As posted in another Hero issue, there appears to be some sort of routing issue 
going
on with rmnet0.  I have a CDMA Hero and I'll be damned if I can figure out what 
is
going on but I'll see if I can give as much info as possible.

I manually started the wireless:
insmod /system/lib/modules/wlan.ko
wlan_loader -f /system/etc/wifi/Fw1251r1c.bin -e /proc/calibration -i
/data/data/android.tether/conf/tiwlan.ini
ifconfig tiwlan0 192.168.2.254 netmask 255.255.255.0
ifconfig tiwlan0 up

Gave my laptop a static address and connected to the adhoc.  Pings of 
192.158.2.254
failed, but tiwlan0's Rx bytes was going up as was rmnet0's Tx bytes.  iptables
showed nothing in either the nat table or the normal table.  I checked the route
table and it looked like this:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
173.102.201.88  *               255.255.255.248 U     0      0        0 rmnet0
192.168.2.0     *               255.255.255.0   U     0      0        0 tiwlan0
default         173.102.201.89  0.0.0.0         UG    0      0        0 rmnet0

I could not delete any of the routes with route or busybox's route.  Eventually 
I
give up and just:
ifconfig rmnet0 down

And pings work.  There's *something* causing data bound for 192.168.2.0/24 to 
go out
rmnet0 and I can't figure it out.  Any idea where else I can look?

Original comment by capnbry on 13 Nov 2009 at 3:46

GoogleCodeExporter commented 9 years ago
The USB Tethering option enabled makes the app give the error "The phone is an
unknown state, please reboot".  Disabling it seems to resolve the issue.

I went through the checks for a Sprint Hero (rooted on the stock ROM) and 
here's the
output.

1) Check if ip-forwarding is enabled:
type: cat /proc/sys/net/ipv4/ip_forward
This should return "1". (Sprint Hero Result: 1)

2) Check if a dnsmasq-process is running.
type: ps
You should find a line similiar to this:
root     713   1     784   332   c00afc70 afe0c584 S
/data/data/android.tether/bin/dnsmasq

See attached output from ps (I did a "ps > /sdcard/psout.txt" and adb pulled it 
off).
"root     2369  1     784   332   c00c8614 afe0c584 S
/data/data/android.tether/bin/dnsmasq" is present.

--------------------
On the computer side of things:
1) Check the wifi-interface.
type: ipconfig

Wireless LAN adapter Wireless Network Connection:

   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 192.168.2.103
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.2.254

2) Are you able to ping the gateway? (FAIL)
ping 192.168.2.254

Pinging 192.168.2.254 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.2.254:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

3) Does the DNS (translation of domainnames) work? (FAIL, likely due to above)
type: nslookup android.com 192.168.2.254

DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  192.168.2.254

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
*** Request to UnKnown timed-out

4.) Check if your kernel supports ip-tables/netfilter
Attached config.gz, relevant options: CONFIG_NETFILTER=y

I read through the rest of the thread and didn't see any further checks...I may 
have
missed some though.

Original comment by codemon...@gmail.com on 13 Nov 2009 at 5:47

Attachments:

GoogleCodeExporter commented 9 years ago
I can verify that this is the exact same issue as seen here:
http://code.google.com/p/android-wifi-tether/issues/detail?id=122#c91

If I ping specifying the interface as tiwlan0, the android can ping the windows
client, but if you don't specify the interface the ping fails.  If the ping 
fails,
the Tx count goes up on the rmnet0 interface so it is definitely getting 
misrouted.

Here's my ip route if that helps but it looks right to me:
173.132.189.40/30 dev rmnet0  proto kernel  scope link  src 173.132.189.40
192.168.2.0/24 dev tiwlan0  proto kernel  scope link  src 192.168.2.254
default via 173.132.189.41 dev rmnet0

For comparison, if I use the HTC Hero tethering (which works if I execute it 
from the
command line) it looks like this:
173.132.189.40/30 dev rmnet0  proto kernel  scope link  src 173.132.189.40
192.168.100.0/24 dev usb0 proto kernel  scope link  src 192.168.100.254
default via 173.132.189.41 dev rmnet0

Original comment by capnbry on 13 Nov 2009 at 9:28

GoogleCodeExporter commented 9 years ago
Something to check perhaps, I noticed in MoDaCo's update.zip, there's a 
directory
with iproute2...might this have something to do with why it works in MoDaCo's 
ROM but
not the stock ROM?  I'd be glad to install it and test if I knew how (running a
rooted stock ROM here)

Original comment by codemon...@gmail.com on 13 Nov 2009 at 10:25

GoogleCodeExporter commented 9 years ago
Figured it out.  ip rule lists this:
0:      from all lookup local
2000:   from all lookup gprs
3002:   from all lookup gprs
32766:  from all lookup main
32767:  from all lookup default

And ip route list table gprs:
68.242.160.192/29 dev rmnet0  scope link  src 68.242.160.195
default via 68.242.160.193 dev rmnet0

So the problem is that the gprs table has a default route on it, and it has a 
higher
priority than main, which is where the wireless route goes.  If you `ip route 
delete
table gprs` after starting android.tether everything works like a charm.

Now the question is, can this be done programmatically?

Original comment by capnbry on 14 Nov 2009 at 3:54

GoogleCodeExporter commented 9 years ago
I believe it can be...I was poking around the code to the project and saw a 
number of
system commands being passed. :)

Thanks for the fix capnbry! :D

Original comment by codemon...@gmail.com on 14 Nov 2009 at 4:04

GoogleCodeExporter commented 9 years ago
Would gprs need to be restored on teardown to ensure proper operation of the 
phone
afterwards?

Original comment by ryan.sch...@gmail.com on 14 Nov 2009 at 4:43

GoogleCodeExporter commented 9 years ago
No, there is still a default route under the route table main.  The phone's 
internet
still works both when android.tether is running and after it is disabled.  The 
phone
will re-add this second default route if you disable and re-enable "Mobile 
network"
but doesn't seem to do it on its own (not sure about after roaming though).

Original comment by capnbry on 14 Nov 2009 at 4:51

GoogleCodeExporter commented 9 years ago
@capnbry: Oh, good job! Deleting that route can be done programmatically. Please
check possible side-effects! I can put a quick version together which will 
delete
this routing-rule. And ... we could add this rule after stop tethering as well 
- but
I have no idea if that make sense. Could you please check that?

Original comment by harald....@gmail.com on 14 Nov 2009 at 7:02

GoogleCodeExporter commented 9 years ago
fantastic job... Now can a guide/script be put together to allow dummy's like 
me to
run/follow?  Thanks again!

Original comment by meaba...@gmail.com on 14 Nov 2009 at 8:57

GoogleCodeExporter commented 9 years ago
I can't think of any side effects as the OS still has a default route pointed 
to the
same IP.  The also have some other routing tables named, but not in use:
cat /etc/iproute2/rt_tables
1 wifi
2 gprs
3 mms
4 wap
5 j2me
6 game
7 stream
8 other

I've taken the phone out to where I am roaming and back again and the gprs 
default
route does not come back, but it does come back after switching to "Airplane 
Mode" or
disabling and re-enabling "Mobile network".  I don't know if you really need to 
add
it back after tethering stops because it is just a duplicate.

I've checked every function I can think of with that route deleted: sms, mms,
browser, background data sync, app store.  All work as expected.

Original comment by capnbry on 14 Nov 2009 at 9:21

GoogleCodeExporter commented 9 years ago
Oh also you should probably only delete the route if the property 
ro.product.device
is heroc.

Now to look at why the bluetooth pand doesn't work!

Original comment by capnbry on 14 Nov 2009 at 9:27

GoogleCodeExporter commented 9 years ago
@capnbry: regarding bluetooth/pand ... maybe this helps
http://code.google.com/p/android-wifi-tether/issues/detail?id=140#c12

Original comment by harald....@gmail.com on 14 Nov 2009 at 10:08

GoogleCodeExporter commented 9 years ago
Yeah I saw that.  I also get the error about pand can not connect to sdp 
socket, I
checked the filesystem and there's no sdpd at all so I don't know what's 
handling
service registration.  All the client sees is the voice gateway service.

Original comment by capnbry on 14 Nov 2009 at 11:43

GoogleCodeExporter commented 9 years ago
New pre-version available:
http://android-wifi-tether.googlecode.com/files/wireless_tether_1_61-pre1_htc.ap
k

If you open "Show log" you should see an entry "Deleteing routing-rule" ... all
changes are here r303

Original comment by harald....@gmail.com on 14 Nov 2009 at 11:50

GoogleCodeExporter commented 9 years ago
Works like a champ.  Posting this from a rooted Sprint Hero.  Nice work!

Original comment by capnbry on 15 Nov 2009 at 1:53

GoogleCodeExporter commented 9 years ago
I can also confirm this works...posting from it now in fact. :)

Rooted Sprint Hero (Stock ROM)

Original comment by codemon...@gmail.com on 15 Nov 2009 at 5:02

GoogleCodeExporter commented 9 years ago
Yes, I'm good as well! Nice work on a Saturday! Thanks guys. Now I will keep 
the hero.

Original comment by shann...@gmail.com on 15 Nov 2009 at 6:04

GoogleCodeExporter commented 9 years ago
works great!!!!   However the only issue I have is now the only way to use the 
wifi 
is w/ tethering. Now i cant connect to my home network with my phone.

My Hero is a 
Rooted Sprint Hero (Stock ROM)

Original comment by simpsonf...@gmail.com on 15 Nov 2009 at 7:01

GoogleCodeExporter commented 9 years ago
Great, works perfect on a HTC Hero with Modaco ROM 2.9

Original comment by dot...@gmail.com on 15 Nov 2009 at 1:46

GoogleCodeExporter commented 9 years ago
@dotbox: Are you sure? Please see issue 194.

Original comment by harald....@gmail.com on 15 Nov 2009 at 1:51

GoogleCodeExporter commented 9 years ago
I am not experiencing the same behavior reported by simpsonfam.js.  After 
tethering,
I am able to connect to my 802.11g w/ WPA2 as a client without any problem. 
Tested
thusly:
Start with WiFi off
Launch android.tether, start sharing
Connect adhoc with laptop, verify connectivity
Stop sharing
Turn WiFi on
Connect as client to a new wireless AP, enter password, verify connectivity

Original comment by capnbry on 15 Nov 2009 at 2:46

GoogleCodeExporter commented 9 years ago
Could you please check if wep-encryption works? That's not working on 
modaco-roms!
Thanks.

Original comment by harald....@gmail.com on 15 Nov 2009 at 2:49

GoogleCodeExporter commented 9 years ago
Ah ... another question capnbry ... what happens if you "Start with WiFi on"? 
Does to
phone connect to wifi again after tethering was stopped?

Original comment by harald....@gmail.com on 15 Nov 2009 at 2:51

GoogleCodeExporter commented 9 years ago
after following the instructions by capnbry I still have no wifi connection 
after 
tethering was stopped.

Original comment by simpsonf...@gmail.com on 15 Nov 2009 at 9:46

GoogleCodeExporter commented 9 years ago
Can someone give me a step by step to make this work? I have NO idea what to do.

I have already rooted my hero.

Original comment by iamerikb...@gmail.com on 15 Nov 2009 at 10:08

GoogleCodeExporter commented 9 years ago
@iamerikbrown: install the application. start tethering by tapping on the icon. 
search 
for wifi-network named "G1Tether" and connect.

Original comment by harald....@gmail.com on 15 Nov 2009 at 11:18

GoogleCodeExporter commented 9 years ago
Okay, well, this is a thread about the problem the wi-fi tether is having with 
the
hero. I can connect to it find but no internet. Like it is stated in this issue 
thread...

Original comment by iamerikb...@gmail.com on 16 Nov 2009 at 1:30

GoogleCodeExporter commented 9 years ago
Issue 184 has been merged into this issue.

Original comment by harald....@gmail.com on 16 Nov 2009 at 10:29