elgenuino / jellytime

Automatically exported from code.google.com/p/jellytime
1 stars 0 forks source link

Wi-Fi hotspot not working - can connect but no internet connection on client #243

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Clean install R28 or R29 after full wipe
2. Switch on hotspot and connect client
3. Try to browse internet on client

What is the expected output? What do you see instead?
Expect to browse internet, but get timeouts.

What version of the product are you using? On what operating system?
R29, client is Nexus 7 running CM10, Laptop running Ubuntu 12.10

Please provide any additional information below.
Logcat at: http://pastebin.com/A3an16M0

I tried fixing permissions but no change.

Original issue reported on code.google.com by thomas...@gmail.com on 30 Nov 2012 at 10:00

GoogleCodeExporter commented 8 years ago
Dev needs log! therefore Your request have been marked as invalid. The issue 
will be deleted within 48 hours if You do not provide more info. 

Original comment by geko1966...@gmail.com on 3 Dec 2012 at 11:24

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
The logcat is in pastebin as indicated in the

"Please provide any additional information below." section of the report.  
Would you like me to attach it as a file as well?

Original comment by thomas...@gmail.com on 3 Dec 2012 at 3:30

GoogleCodeExporter commented 8 years ago
Have the same issue as mentionned on the forum.
Don't seems to impact all users.
In my case logcat show noting.
i did tcpdump to folow what is happening on the DHD as hotspot and notices that 
the hotspot was reliying client request using the LAN IP... no NAT?!
I'll try to attach some log later

Original comment by j.el...@gmail.com on 19 Dec 2012 at 3:11

GoogleCodeExporter commented 8 years ago
some logs if anyone can let me not the expected behaviour or other log to take

adb shell netcfg
lo       UP                                   127.0.0.1/8   0x00000049 
00:00:00:00:00:00
gannet0  DOWN                                   0.0.0.0/0   0x00001082 
76:0d:de:45:67:8e
dummy0   DOWN                                   0.0.0.0/0   0x00000082 
7a:22:29:31:44:42
ifb0     DOWN                                   0.0.0.0/0   0x00000082 
aa:26:93:ea:df:0f
ifb1     DOWN                                   0.0.0.0/0   0x00000082 
62:8b:a4:0d:53:5e
rmnet0   UP                                10.78.77.227/29  0x00001043 
62:77:1c:d9:9d:2e
rmnet1   DOWN                                   0.0.0.0/0   0x00001002 
56:18:8e:38:04:16
rmnet2   DOWN                                   0.0.0.0/0   0x00001002 
e6:e2:91:d5:c9:84
rmnet3   DOWN                                   0.0.0.0/0   0x00001002 
ce:5d:ab:98:d3:b3
rmnet4   DOWN                                   0.0.0.0/0   0x00001002 
92:cb:b8:ec:0d:25
rmnet5   DOWN                                   0.0.0.0/0   0x00001002 
7a:15:de:ea:23:10
rmnet6   DOWN                                   0.0.0.0/0   0x00001002 
8e:66:1f:09:09:99
rmnet7   DOWN                                   0.0.0.0/0   0x00001002 
ca:e0:42:e1:b2:34
sit0     DOWN                                   0.0.0.0/0   0x00000080 
00:00:00:00:00:00
ip6tnl0  DOWN                                   0.0.0.0/0   0x00000080 
00:00:00:00:00:00
wlan0    UP                                192.168.43.1/24  0x00001043 
7c:61:93:38:1c:c4
mon.wlan0 UP                                     0.0.0.0/0   0x00001043 
00:00:00:00:00:00

tcpdump on hostap showing that the host try to reach internet using private LAN 
IP?!
adb shell tcpdump -i rmnet0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on rmnet0, link-type EN10MB (Ethernet), capture size 96 bytes
16:59:07.101578 IP 192.168.43.64.56187 > 173.194.34.4.www: S 
939459596:939459596(0) win 14600 <mss 1460,sackOK,timestamp 9061875 
0,nop,wscale 6>
16:59:08.107712 IP 192.168.43.64.56187 > 173.194.34.4.www: S 
939459596:939459596(0) win 14600 <mss 1460,sackOK,timestamp 9062075 
0,nop,wscale 6>
16:59:09.744706 IP 192.168.43.64.34368 > 173.194.78.188.5228: S 
3571766787:3571766787(0) win 14600 <mss 1460,sackOK,timestamp 9062402 
0,nop,wscale 6>
16:59:10.103440 IP 192.168.43.64.56187 > 173.194.34.4.www: S 
939459596:939459596(0) win 14600 <mss 1460,sackOK,timestamp 9062476 
0,nop,wscale 6>
16:59:11.260544 IP 192.168.43.64.49162 > 173.194.34.7.https: S 
3479626834:3479626834(0) win 14600 <mss 1460,sackOK,timestamp 9062707 
0,nop,wscale 6>
16:59:11.578660 IP 192.168.43.64.54656 > 80.125.163.172.www: S 
7475907:7475907(0) win 14600 <mss 1460,sackOK,timestamp 9062771 0,nop,wscale 6>
16:59:11.828721 IP 192.168.43.64.54657 > 80.125.163.172.www: S 
1083539562:1083539562(0) win 14600 <mss 1460,sackOK,timestamp 9062821 
0,nop,wscale 6>
16:59:12.257462 IP 192.168.43.64.49162 > 173.194.34.7.https: S 
3479626834:3479626834(0) win 14600 <mss 1460,sackOK,timestamp 9062907 
0,nop,wscale 6>
16:59:12.578721 IP 192.168.43.64.54656 > 80.125.163.172.www: S 
7475907:7475907(0) win 14600 <mss 1460,sackOK,timestamp 9062971 0,nop,wscale 6>
16:59:12.830338 IP 192.168.43.64.54657 > 80.125.163.172.www: S 
1083539562:1083539562(0) win 14600 <mss 1460,sackOK,timestamp 9063021 
0,nop,wscale 6>
16:59:14.112748 IP 192.168.43.64.56187 > 173.194.34.4.www: S 
939459596:939459596(0) win 14600 <mss 1460,sackOK,timestamp 9063278 
0,nop,wscale 6>
16:59:14.267014 IP 192.168.43.64.49162 > 173.194.34.7.https: S 
3479626834:3479626834(0) win 14600 <mss 1460,sackOK,timestamp 9063308 
0,nop,wscale 6>
16:59:14.582688 IP 192.168.43.64.54656 > 80.125.163.172.www: S 
7475907:7475907(0) win 14600 <mss 1460,sackOK,timestamp 9063372 0,nop,wscale 6>
16:59:14.832261 IP 192.168.43.64.54657 > 80.125.163.172.www: S 
1083539562:1083539562(0) win 14600 <mss 1460,sackOK,timestamp 9063422 
0,nop,wscale 6>
16:59:17.142563 IP 192.168.43.64.34934 > 173.194.34.3.www: S 
3054483204:3054483204(0) win 14600 <mss 1460,sackOK,timestamp 9063882 
0,nop,wscale 6>
16:59:17.762070 IP 192.168.43.64.34368 > 173.194.78.188.5228: S 
3571766787:3571766787(0) win 14600 <mss 1460,sackOK,timestamp 9064008 
0,nop,wscale 6>
16:59:18.141617 IP 192.168.43.64.34934 > 173.194.34.3.www: S 
3054483204:3054483204(0) win 14600 <mss 1460,sackOK,timestamp 9064082 
0,nop,wscale 6>
16:59:18.271897 IP 192.168.43.64.49162 > 173.194.34.7.https: S 
3479626834:3479626834(0) win 14600 <mss 1460,sackOK,timestamp 9064110 
0,nop,wscale 6>
16:59:18.591965 IP 192.168.43.64.54656 > 80.125.163.172.www: S 
7475907:7475907(0) win 14600 <mss 1460,sackOK,timestamp 9064174 0,nop,wscale 6>
16:59:18.842270 IP 192.168.43.64.54657 > 80.125.163.172.www: S 
1083539562:1083539562(0) win 14600 <mss 1460,sackOK,timestamp 9064224 
0,nop,wscale 6>
16:59:20.144700 IP 192.168.43.64.34934 > 173.194.34.3.www: S 
3054483204:3054483204(0) win 14600 <mss 1460,sackOK,timestamp 9064483 
0,nop,wscale 6>
16:59:24.156815 IP 192.168.43.64.34934 > 173.194.34.3.www: S 
3054483204:3054483204(0) win 14600 <mss 1460,sackOK,timestamp 9065284 
0,nop,wscale 6>
16:59:25.153092 arp who-has 10.78.77.225 tell 10.78.77.227
16:59:25.154313 arp reply 10.78.77.225 is-at 02:50:f3:00:00:00 (oui Unknown)
16:59:26.294480 IP 192.168.43.64.49162 > 173.194.34.7.https: S 
3479626834:3479626834(0) win 14600 <mss 1460,sackOK,timestamp 9065712 
0,nop,wscale 6>
16:59:26.604477 IP 192.168.43.64.54656 > 80.125.163.172.www: S 
7475907:7475907(0) win 14600 <mss 1460,sackOK,timestamp 9065776 0,nop,wscale 6>
16:59:26.865098 IP 192.168.43.64.54657 > 80.125.163.172.www: S 
1083539562:1083539562(0) win 14600 <mss 1460,sackOK,timestamp 9065828 
0,nop,wscale 6>
16:59:27.176285 IP 192.168.43.64.55161 > 173.194.34.2.www: S 
2048021111:2048021111(0) win 14600 <mss 1460,sackOK,timestamp 9065890 
0,nop,wscale 6>
16:59:28.180008 IP 192.168.43.64.55161 > 173.194.34.2.www: S 
2048021111:2048021111(0) win 14600 <mss 1460,sackOK,timestamp 9066091 
0,nop,wscale 6>
16:59:30.193924 IP 192.168.43.64.55161 > 173.194.34.2.www: S 
2048021111:2048021111(0) win 14600 <mss 1460,sackOK,timestamp 9066492 
0,nop,wscale 6>
16:59:30.644822 IP 173.194.67.95.https > 10.78.77.227.41213: F 
1345792055:1345792055(0) ack 3462620461 win 541 <nop,nop,timestamp 529922766 
6198454>
16:59:30.683182 IP 10.78.77.227.41213 > 173.194.67.95.https: . ack 1 win 3917 
<nop,nop,timestamp 6222454 529922766>
16:59:33.812821 IP 192.168.43.64.34368 > 173.194.78.188.5228: S 
3571766787:3571766787(0) win 14600 <mss 1460,sackOK,timestamp 9067216 
0,nop,wscale 6>
16:59:34.194474 IP 192.168.43.64.55161 > 173.194.34.2.www: S 
2048021111:2048021111(0) win 14600 <mss 1460,sackOK,timestamp 9067294 
0,nop,wscale 6>
16:59:37.249375 IP 192.168.43.64.43320 > 173.194.34.9.www: S 
858093420:858093420(0) win 14600 <mss 1460,sackOK,timestamp 9067903 
0,nop,wscale 6>
16:59:38.238694 IP 192.168.43.64.43320 > 173.194.34.9.www: S 
858093420:858093420(0) win 14600 <mss 1460,sackOK,timestamp 9068103 
0,nop,wscale 6>
16:59:40.253373 IP 192.168.43.64.43320 > 173.194.34.9.www: S 
858093420:858093420(0) win 14600 <mss 1460,sackOK,timestamp 9068504 
0,nop,wscale 6>
16:59:42.331772 IP 192.168.43.64.49162 > 173.194.34.7.https: S 
3479626834:3479626834(0) win 14600 <mss 1460,sackOK,timestamp 9068920 
0,nop,wscale 6>
16:59:44.257126 IP 192.168.43.64.43320 > 173.194.34.9.www: S 
858093420:858093420(0) win 14600 <mss 1460,sackOK,timestamp 9069306 
0,nop,wscale 6>

iptables rules
Hostspot nat rules not set properly for masquerading?!
root@android:/ # iptables -t nat -vL                                           
Chain PREROUTING (policy ACCEPT 391 packets, 27143 bytes)
 pkts bytes target     prot opt in     out     source               destination         
  391 27143 idletimer_nat_PREROUTING  all  --  any    any     anywhere             anywhere            

Chain INPUT (policy ACCEPT 194 packets, 15323 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 3484 packets, 293K bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain POSTROUTING (policy ACCEPT 3673 packets, 305K bytes)
 pkts bytes target     prot opt in     out     source               destination         
 3673  305K idletimer_nat_POSTROUTING  all  --  any    any     anywhere             anywhere            
 3673  305K natctrl_nat_POSTROUTING  all  --  any    any     anywhere             anywhere            

Chain idletimer_nat_POSTROUTING (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain idletimer_nat_PREROUTING (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain natctrl_nat_POSTROUTING (1 references)
 pkts bytes target     prot opt in     out     source               destination    

Original comment by j.el...@gmail.com on 19 Dec 2012 at 4:24

GoogleCodeExporter commented 8 years ago
FYI the workaround for me is to install a web proxy on DHD and make the client 
use the webproxy when connected to the DHD hotspot.

Original comment by j.el...@gmail.com on 19 Dec 2012 at 4:47

GoogleCodeExporter commented 8 years ago
Still an issue for me on R30.

Bluetooth tether is not working either. 

It works perfectly on IceCreamSandwich so I guess my hardware is OK. Thanks for 
the workaround which works for browsing for me with chrome but nothing else. 
Probably a setup issue with the proxy. 

Original comment by thomas...@gmail.com on 23 Dec 2012 at 10:13

GoogleCodeExporter commented 8 years ago

Original comment by geko1966...@gmail.com on 2 Jan 2013 at 7:45

GoogleCodeExporter commented 8 years ago
This is also an issue for me on multiple 4.1 and 4.2 ROMs not just jellytime. 
Connects to WiFi but no data. Tried proxy as above but didn't work with mobile 
chrome. Reflashed ice cold sandwich and it's working again. I am using an 
orange UK HTC desire HD. Bluetooth tether also the same.

Original comment by samleigh...@gmail.com on 17 Feb 2013 at 6:53

GoogleCodeExporter commented 8 years ago
Good/Bad news
The issue is still present on R7 (and all previous) 
I did full wipe, and reinstall stock (because of rotation issue)  update radio 
(because of GPS issue) 
But the wifi hotspot still doesn't give internet access only local access. 
The issue is 100% reproducible. 
Today I confirmed my previous diagnostique: there is an issue with masquerade! 
So I come with a better workaround until there is a fix: you need to manually 
create the masquerade rule.
iptables -t nat -I POSTROUTING -s 192.168.43.0/24 -j MASQUERADE
do this in command line as root
This is not persistent to reboot so I guess a script in init.d should do the 
trick
Checkout you hotspot ip range, mine is 192.168.43.0/24 yours may be different. 
I'm willing to help the dev tracking down the issue. 
I bet bluetooth  tethering issue has the same root cause. 
If someone with a working hotspot could post the result of this command 
iptables -t nat -vL
what is the script that is supposed to take care of the routing rules for 
tether? I cause except the masquerade everything else is good (ip_forward 
parameters etc...) 

Original comment by j.el...@gmail.com on 8 May 2013 at 7:49

GoogleCodeExporter commented 8 years ago
Found this tutorial, should exactly fit the purpose. 
http://hippowise.com/how-to-fix-lte-wifi-tethering-for-the-nexus-4/
the rules seems even better and I guess the missing rules on our devices should 
have looked like this. 

Original comment by j.el...@gmail.com on 8 May 2013 at 9:45