MEAM-Ware / android-wifi-tether

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

Support for rooted HTC Desire #330

Closed GoogleCodeExporter closed 9 years ago

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

Unlocked HTC Desire.

Which firmware is installed?

MoDaCo rooted.

http://android.modaco.com/content/htc-desire-desire-modaco-com/307365/28-
apr-r1-htc-desire-rooting-guide-now-with-a2sd-radio-update/#entry1254167

What version of wireless tether are you using?

2.0

What steps will reproduce the problem?
1. Enable tethering on phone, no access control, no encryption.
2. Try to associate the PC to the ad-hoc network.
3.

What is the expected output? What do you see instead?

It sees the SSID, but DHCP does not get a response, and it doesn't show on 
connected clients on the phone either.

Please provide any additional information below.

Willing to help ;-)

Original issue reported on code.google.com by skanda...@gmail.com on 29 Apr 2010 at 6:47

GoogleCodeExporter commented 9 years ago
is there news on this one?

Original comment by gae...@gmail.com on 21 May 2010 at 9:15

GoogleCodeExporter commented 9 years ago
There is a new test-version of the app online. This new version renames the 
name of
the wireless-interface. No idea if that helps for this issue here but ... give 
it a
shot please and report your results.
http://android-wifi-tether.googlecode.com/files/wireless_tether_2_0_2-pre10.apk

The name of the interface is now "wt0" instead of "tiwlan0". 

Original comment by harald....@gmail.com on 25 May 2010 at 10:48

GoogleCodeExporter commented 9 years ago
Same problem with pre10.
Can connect but dhcp don't work.
Waiting froyo...

Original comment by urbain.n...@gmail.com on 26 May 2010 at 12:54

GoogleCodeExporter commented 9 years ago
confirm same problem modoco rom and pre10 

Original comment by col.but...@gmail.com on 27 May 2010 at 2:24

GoogleCodeExporter commented 9 years ago
Ok, I have a new idea. So basically it looks like that the interface is 
blocking 
traffic. I know there is a similar problem with all samsung galaxy roms based 
on 
android 2.1. The interesting part is that the galaxy is using a 
broadcom-wifi-chip 
like the desire and nexusone. There is a workaround for this galaxy-issue - if 
we 
replace the wifi-firmware with the one from android 1.5 release it starts 
working 
again.

What you guys could test now. The nexus-one has the same wifi-chip built-in 
like the 
desire. And we know that wifi-tethering is working fine on the nexusone.

The latest -pre13 (http://android-wifi-
tether.googlecode.com/files/wireless_tether_2_0_2-pre13.apk) allows to load 
wifi-
firmwares from sdcard. So, we could test now if it makes any difference when 
loading 
the nexus-firmware!

So try to do the following (at your own risk of course):

1) Download a rom for the nexus-one - I would recommend cyanogenmod:
http://n0rp.chemlab.org/android/nexus/update-cm-5.0.7.1-N1-signed.zip
2) Unzip the rom to the harddisk of your computer.
3) In /system/etc/firmware you will find a file named "fw_bcm4329.bin".
4) Mount you sdcard and create a directory named "android.tether"
5) Open this newly created directory and copy the file "fw_bcm4329.bin" into it.
6) Uninstall old versions of wireless tether and install above mentioned 
pre-version.
7) Start tethering. Check logs (make a screenshot of "Show log" if possible)... 
report your findings here ...

I really have no idea if that makes any difference ... but it's not worth to 
try.
Thanks.

Original comment by harald....@gmail.com on 30 May 2010 at 7:04

GoogleCodeExporter commented 9 years ago
Tried it harald.mue, in the logs it loads the fw_bcm4329 firmware, but with my 
desire 
(MCR 3.1 with MCK1.1) and the iPad dosen´t work, with and without wep 
encryption.

The last pre that I tried dont worked with the wep encryption (ipad don´t ask 
for 
it), but with pre13 wep encryption works, but no DHCP server, no valid IP, nor 
with 
manual IP config (192.168.2.100, 255.255.255.255, 192.168.2.254 for router and 
DNS)

Sorry for my VERY poor english. 
Hope it works sometime, WANT froyo from HTC with sense!

Original comment by antx...@gmail.com on 31 May 2010 at 3:41

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Ok. I've reverted all changes I've made for -pre13 because it didn't make any 
difference.

BUT ... I have a new idea what you guys could try:
1) Download the latest 2.0.2-pre-version of the app.
2) Start tethering via gui.
3) open a console on your phone or connect with "adb shell"
4) Check if you are root ... if not type "su"
5) type "ip link set dev eth0 arp on"
6) Try to connect (don't configure ip-address, netmask and gateway statically - 
use 
dhcp)
7) Check with "arp -a" if a new entry is added.

Maybe the NOARP-flag is set by default.

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

GoogleCodeExporter commented 9 years ago
Followed your steps exactly on my desire.
All I get after arp -a is one entry,
"? (89.102.239.***) at 02:50:f3:00:00:00 [ether] on rmnet0".
Damn it. D:

Original comment by seth.sk...@gmail.com on 3 Jun 2010 at 9:29

GoogleCodeExporter commented 9 years ago
Mmmmhh. Damn.
One thing I see from a system-dump is ... it seems some routing-tables are 
configured. Check /system/etc/iproute2/rt_table! This is something I didn't see 
on 
any other device so far. So, I believe that this might cause the issue we have. 
(I 
wish I would have a desire available for testing.)

If someone is out there who has a good knowledge of such stuff and holds a 
desire in 
his hands please check if our issue is caused by these routing-tables.
http://linux-ip.net/html/routing-tables.html

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

GoogleCodeExporter commented 9 years ago
And ... could you guys please give me the output of:
"ip route show dev eth0"
after you have started tethering?

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

GoogleCodeExporter commented 9 years ago
And the output of:
adb shell
cat /proc/sys/net/ipv4/conf/all/arp_filter
and
cat /proc/sys/net/ipv4/conf/eth0/arp_filter

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

GoogleCodeExporter commented 9 years ago
Hi,

'ip route show dev eth0' shows following on my Desire:
192.168.2.0/24  proto kernel  scope link  src 192.168.2.254

both 'cat /proc/sys/net/ipv4/conf/all/arp_filter' and
...eth0... returns '0'.

When I try to optain an IP address locally on the phone
it also can't get one. Both testet with 'dhcpcd eth0' /
'dhcpcd eth0:1' and with 'dhclient eth0' / :1 (Fedora ARM
chrooted on a SD-card partition).
When Tether is on the iptables nat rule looks good.
But - wow - tcpdump shows the incomming DHCP request:

[root@localhost /]# tcpdump -ni eth0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
02:07:46.549835 02:23:76:da:b2:d7 > 00:23:76:da:b2:d7, ethernet Unknown 
(0x886c),
length 72:
       0x0000:  8001 0064 0000 1018 0001 0001 0000 0000  ...d............
       0x0010:  0014 0000 0002 0000 0000 0000 0000 0000  ................
       0x0020:  0000 0011 2233 4455 776c 3000 0000 0000  ...."3DUwl0.....
       0x0030:  0000 0000 0000 0000 0000                 ..........
02:08:12.981719 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request 
from
00:23:76:da:b2:d7, length: 300
^C
2 packets captured
4 packets received by filter
0 packets dropped by kernel
[root@localhost /]#

It seems that the MAC address of the sender (a Laptop) is replaced
by the MAC of the Desire (and that's not good for Ethernet communication).
There may be a weirdness in the kernel used here.

My Desire EU version has following system specs:
- Android 2.1-update1
- Baseband Version: 32.30.00.28U_4.05.00.11
- Kernel 2.6.29-97da29ed htc-kernel@and18-2 #1
- Build Number: 1.15.405.4 CL155070 release-keys
- Software Number: 1.15.405.4
- Browser: WebKit 3.1

Unix name:
Linux localhost 2.6.29-97da29ed #1 PREEMPT Mon Mar 15 20:17:52 CST 2010 armv7l 
armv7l
armv7l GNU/Linux

Original comment by brisch1...@gmail.com on 4 Jun 2010 at 12:24

GoogleCodeExporter commented 9 years ago
Wow, that's super-weird. 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 
(or replace the eth0 with the device which is used for usb-tethering ... I 
don't know 
- play around with a bit - maybe you'll find something)

But it might be a kernel-issue as well ... I have absolutely no idea. Sources 
are 
here:
http://member.america.htc.com/download/RomCode/Source_and_Binaries/bravo_54b7033
a.tar
.gz

Original comment by harald....@gmail.com on 4 Jun 2010 at 1:48

GoogleCodeExporter commented 9 years ago
On my Desire the /system/etc/iproute2/rt_tables
lists the tables up to '9 vpn'. The two last entries
(hipri and netshare) are missing.

The routing tables 'wifi' 'gprs' and 'other' are
empty as well for eth0 as for usb0. The table
'netshare' does not exist.

I suppose that the problem is to be found in the ARP
layer and does not have to do with routing.
The weirdness could also be caused by the wireless
firmware, which is not designed for the Wifi acting
as an access point (even in adhoc mode). Fixed IP
does also work correctly for me, which is the normal
way for running ad-hoc networks.

I will look into the sources.

BS 

Original comment by brisch1...@gmail.com on 4 Jun 2010 at 10:19

GoogleCodeExporter commented 9 years ago
You guys might have noticed that we had exactly the same issue on the htc evo 
4g. And
... yeah, we found a workaround for it (issue 362).

It seems that the wifi-firmware is responsible for this weird behavior. This
workaround did the trick:
See: http://code.google.com/p/android-wifi-tether/issues/detail?id=362#c59

So what you guys could try now:
1) Download a HTC Evo 4g system-dump (use google search - I bet you will find 
one)
2) Extract a file named fw_bcm4329_ap.bin (located in /system/etc/firmware)
3) Mount your sdcard
4) Create a directory named "android.tether" (without quotes)
5) Open this directory and copy fw_bcm4329_ap.bin into it.
6) Rename fw_bcm4329_ap.bin to fw_bcm4329.bin
7) Uninstall old versions of "wireless tether"
8) Install the latest 2.0.2-pre release.

If you open "Show log" you should see a log-entry (first one) similar to this
http://code.google.com/p/android-wifi-tether/issues/detail?id=362#c59 here

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

GoogleCodeExporter commented 9 years ago
That works! Without any static IP adress settings and pings etc.

Thanks a lot!

best regs
Michael

Original comment by Helikill...@gmail.com on 7 Jun 2010 at 5:22

GoogleCodeExporter commented 9 years ago
Yeah, I can also confirm that this works perfectly!

I downloaded the file and re-uploaded it on it's own here,
http://www.multiupload.com/XVP8WH5MZU for anyone else who needs it.

Great work guys!

Original comment by sead...@gmail.com on 7 Jun 2010 at 5:35

GoogleCodeExporter commented 9 years ago
Great!

I confirm it's working too. I'm just posting it through the wifi tether :-D

Original comment by skanda...@gmail.com on 7 Jun 2010 at 6:10

GoogleCodeExporter commented 9 years ago
work fine for me too :D

Original comment by urbain.n...@gmail.com on 7 Jun 2010 at 7:46

GoogleCodeExporter commented 9 years ago
Thanks a lot to all the users that helped to make working the wireless tether 
app in the Desire, and to herald.mue for that usefull program :D

Original comment by antx...@gmail.com on 7 Jun 2010 at 7:57

GoogleCodeExporter commented 9 years ago
Thanks to all who persevered in trying to solve this issue.

Works like a charm for me now too. 
Sending this mail through laptop while being wirelessly tethered to rooted 
Desire.

Cheers!

Original comment by litenin...@gmail.com on 7 Jun 2010 at 11:30

GoogleCodeExporter commented 9 years ago
Alternative download is at http://dl.dropbox.com/u/1496809/fw_bcm4329.bin

Original comment by weir...@gmail.com on 7 Jun 2010 at 11:54

GoogleCodeExporter commented 9 years ago
Ok. good. I'm closing this. Thanks to all for testing - well done :-)

Original comment by harald....@gmail.com on 8 Jun 2010 at 7:27

GoogleCodeExporter commented 9 years ago
Hi all,

I've had this working in the past, but since reverted to a rooted version of 
the recent stock rom.  Cannot now get it working for love nor money... tried 
umpteen different versions of the tether program.. anybody any ideas?

Original comment by seanetmu...@gmail.com on 24 Jun 2010 at 7:42

GoogleCodeExporter commented 9 years ago
I can't make it connect to Internet too, dhcp response after I put 
"fw_bcm4329.bin" in /sdcard/android.tether/
but I still can't get Internet connection on my laptop.
after I execute
ip route add table gprs 192.168.2.0/24 dev eth0 proto kernel scope link src 
192.168.2.254
with root priv, it got work.
Is this issue depend on different kernel or rom or anything else?

Original comment by notex...@gmail.com on 21 Jul 2010 at 7:33

GoogleCodeExporter commented 9 years ago
so does wireless_tether_2_0_5-pre3.apk work on incredible? the reason i ask is 
because it not listed as one of the device.

I am currently using wireless_tether_2_0_2.apk with no problem.  However i 
wanted to try the new version as i heard now WAP is supported.

Original comment by beeshj...@gmail.com on 23 Jul 2010 at 4:38