Open GoogleCodeExporter opened 9 years ago
I've tested and this is not currently working Issue 189
(http://code.google.com/p/android-wifi-tether/issues/detail?id=189) has been
created
to request this feature.
Original comment by dylan.th...@gmail.com
on 9 Dec 2009 at 8:03
There will be a new version which can (hopefully) handle droids wifi-interface.
Original comment by harald....@gmail.com
on 9 Dec 2009 at 8:19
I've put a new version together which includes some droid-related changes:
http://android-wifi-tether.googlecode.com/files/wireless_tether_1_70-alpha1_droi
d.apk
Please make sure to have a rooted device and check if "su"-binary is located in
/system/bin/ - consult this howto if unsure:
http://forum.xda-developers.com/showthread.php?t=597175
Please help to debug. Any kind of information might be helpful. Check the log -
press
[menu] and select [Show log].
You could also try to start manually (via adb or console) this might generate
some
additional output:
/data/data/android.tether/bin/tether start
Thanks.
Original comment by harald....@gmail.com
on 9 Dec 2009 at 9:56
#/data/data/android.tether/bin/tether start
Set property wlan.driver.status = ok - Ok
iptables v1.3.7: can't initialize iptables table `filter': iptables who? (do
you need
to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Original comment by afms...@gmail.com
on 9 Dec 2009 at 10:10
Issue 189 has been merged into this issue.
Original comment by harald....@gmail.com
on 9 Dec 2009 at 10:11
Netfilter-support is missing in kernel.
Anyways ... if you do a wifi-scan on a pc/laptop - do you see a "network" named
"AndroidTether"?
Original comment by harald....@gmail.com
on 9 Dec 2009 at 10:13
The application started and ran with no errors, but I do not see any new access
points.
No AndroidTether.
Original comment by tash.rob...@gmail.com
on 9 Dec 2009 at 10:16
if i run via adb, i never see the process even kick off in my task manager.
Perhaps
it's user based though. the app appears to be running the second time i kick
it off
on the phone, but still no networks show up scanning.
Original comment by afms...@gmail.com
on 9 Dec 2009 at 10:19
Mmmmh ... what output do you get if you type:
ifconfig tiwlan0
in a console after starting the tether app?
Does "adb logcat" give any additional (helpful) "information"?
Original comment by harald....@gmail.com
on 9 Dec 2009 at 10:23
# ifconfig tiwlan0
tiwlan0: ip 192.168.2.254 mask 255.255.255.0 flags [up broadcast running
multicast]
lots of these incrementing
# logcat
D/TETHER -> CoreTask( 1747): Reading lines from file: /proc/net/dev
D/TETHER -> CoreTask( 1747): Data rx: 0, tx: 0
D/dalvikvm( 1747): GC freed 115 objects / 31856 bytes in 101m
Original comment by afms...@gmail.com
on 9 Dec 2009 at 10:29
I am running 2.01. After a reboot and installing alpha3 running the application
the
main activity comes up fine. When I click on the button I get the following
I/ActivityManager( 1028): Displayed activity android.tether/.MainActivity: 1265
ms
(total 1265 ms)
D/TETHER -> WebserviceTask( 1431): Request returned status HTTP/1.1 404 Not
Found
D/TETHER -> MainActivity( 1431): StartBtn pressed ...
I/TETHER -> NativeTask( 1431): Trying to load libNativeTask.so
D/dalvikvm( 1431): Trying to load lib
/data/data/android.tether/library/libNativeTask.so 0x4479b020
D/dalvikvm( 1431): Added shared lib
/data/data/android.tether/library/libNativeTask.so 0x4479b020
D/dalvikvm( 1431): No JNI_OnLoad found in
/data/data/android.tether/library/libNativeTask.so 0x4479b020
D/dalvikvm( 1431): +++ not scanning '/system/lib/libwebcore.so' for 'getProp'
(wrong CL)
D/dalvikvm( 1431): +++ not scanning '/system/lib/libmedia_jni.so' for 'getProp'
(wrong CL)
D/dalvikvm( 1431): +++ not scanning '/system/lib/libexif.so' for 'getProp'
(wrong CL)
D/TETHER -> CoreTask( 1431): Writing 51 bytes to file:
/data/data/android.tether/conf/resolv.conf
D/TETHER -> CoreTask( 1431): Root-Command ==> su -c
"/data/data/android.tether/bin/tether start"
D/dalvikvm( 1431): +++ not scanning '/system/lib/libwebcore.so' for 'runCommand'
(wrong CL)
D/dalvikvm( 1431): +++ not scanning '/system/lib/libmedia_jni.so' for
'runCommand'
(wrong CL)
D/dalvikvm( 1431): +++ not scanning '/system/lib/libexif.so' for 'runCommand'
(wrong CL)
D/TETHER -> MainActivity( 1431): Unable to start tethering!
-------------------
in the Log everything looks fine except Setting up firewall rules...which is
failed.
The initial state of my Wi-fi was turned off.
as said earlier if running from adb shell I get the following...
Set property wlan.driver.status = ok - Ok
iptables v1.3.7: can't initialize iptables table `filter': iptables who? (do
you need
to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Original comment by keene...@gmail.com
on 10 Dec 2009 at 12:44
i'm running 2.0 and version alpha1 (couldn't find any other downloads) and am
having
the exact same issue listed above. is there some kind of additional files or
packages i need to install?
Original comment by sonofsky...@gmail.com
on 10 Dec 2009 at 1:29
worked with harald.mue a bit this evening. seems that the settings when
manually
done with iwconfig show up as an ad-hoc now, but only last for a few seconds.
the
commit doesn't save the settings with this error:
Error for wireless request "Commit changes" (8B00) :
SET failed on device tiwlan0 ; Operation not supported on transport endpoint
though in the shared_prefs/android.tether_preferences.xml the settings are hard
coded. perhaps not being read? also in /system/etc/wifi/tiwlan.ini after
copying
from my g1 gives me 'Cross-device link'
Original comment by afms...@gmail.com
on 10 Dec 2009 at 1:37
horrible developer but i see this potentially trying to be read in the code
which
doesn't exist on either device...
/data/data/android.tether/conf/lan_network.conf
Original comment by afms...@gmail.com
on 10 Dec 2009 at 1:41
email sonofskywalker3@gmail.com please feel free to contact me if i can help in
any
way. i have rooted my droid and can't wait for your software to work properly.
will
donate if you can get this working.
Original comment by sonofsky...@gmail.com
on 10 Dec 2009 at 2:40
I'll chime in for getting this to work on Droid now that we have root. I'll be
watching this thread if anyone needs help from someone with a rooted phone.
Original comment by tris...@gmail.com
on 10 Dec 2009 at 8:03
I too will be awaiting for this. Want this very much on my Moto DROID.
Original comment by SwordOf...@gmail.com
on 11 Dec 2009 at 12:07
Donated before when first introduced. Will donate again gladly when droid
support is
ready! Good luck guys. Keep up the good work!
Original comment by derek...@gmail.com
on 11 Dec 2009 at 12:27
I have ADB working (Can grab ADB logs), can use Log Collector app for user
logs, I
have root, can install and test .apk files from my gmail account....
Let me know if I can help troubleshoot the issue to get this working ASAP.
Watched a
video of this on YouTube running on the G1 and really want to check this out on
my
Motorola DROID.
My email is the same as my username here, with @gmail.com on the end. Hit me up
devs
if I can help.
Original comment by SwordOf...@gmail.com
on 11 Dec 2009 at 12:37
Same here, if I can be of any help, please let me know. You've got a definite
donation from
me too.
Original comment by aaronear...@gmail.com
on 11 Dec 2009 at 3:16
Android version: 2.0.1
Wifi-tether version: 1.70 alpha3
Running from adb shell with wifi turned on:
# ./tether start
Set property wlan.driver.status = ok - Ok
Error for wireless request "Set Mode" (8B06) :
SET failed on device tiwlan0 ; No such device.
Error for wireless request "Set ESSID" (8B1A) :
SET failed on device tiwlan0 ; No such device.
Error for wireless request "Set Frequency" (8B04) :
SET failed on device tiwlan0 ; No such device.
iptables v1.3.7: can't initialize iptables table `filter': iptables who? (do
you need
to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
/data/data/android.tether/bin/iwconfig tiwlan0 channel 6
Running with adb shell with wifi turned off:
iptables v1.3.7: can't initialize iptables table `filter': iptables who? (do
you need
to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
/data/data/android.tether/bin/iwconfig tiwlan0 channel 6
# ifconfig tiwlan0
tiwlan0: ip 192.168.2.254 mask 255.255.255.0 flags [up broadcast running
multicast]
Original comment by crl...@gmail.com
on 11 Dec 2009 at 5:04
We need to figure out how to bring the wifi-interface in ad-hoc mode. If you
take a
look into /system/etc/wifi you will find a file named tiwlan.ini. In that file
there
is an entry "WiFiAdhoc = 0".
What I've done so far is to modify the tiwlan.ini-file and set "WiFiAdoc = 1".
(Please note that all htc-devices have texas-instruments wifi-chip built-in
like
motorola droid has and set "WiFiAdoc = 1" does the trick on those devices.) The
modified tiwlan.ini-file is located in "/data/data/android.tether/conf".
Experienced
users could try this:
1) disable wifi via settings
2) load the wifi-kernel-module
# insmod /system/lib/modules/tiwlan_drv.ko
3) load the wifi config
# wlan_loader -f /system/etc/wifi/fw_wlan1271.bin -e /proc/calibration -i
/data/data/android.tether/conf/tiwlan.ini
This should bring up the wifi-interface in adhoc-mode. If you do now a
wifi-scan on
your computer you should see a network named "AndroidTether". Watch out for
error-
messages or anything useful. Try without that "-e /proc/calibration" - try to
modify
the tiwlan.ini-file in /data/data/android.tether/conf (comments in the original
file
/system/etc/wifi/tiwlan.ini might be helpful) ... be creative. It's the most
important thing to have adhoc mode!
The latest alpha-package: http://android-wifi-
tether.googlecode.com/files/wireless_tether_1_70-alpha4_droid.apk includes the
iwconfig binary. We have used iwconfig for the samsung galaxy - adhoc-mode you
know.
So try it after you have entered above commands.
/data/data/android.tether/bin/iwconfig tiwlan0 mode ad-hoc
/data/data/android.tether/bin/iwconfig tiwlan0 essid AndroidTether
/data/data/android.tether/bin/iwconfig tiwlan0 channel 6
I'm sorry that I don't have a droid for testing so I have to count on you! ;-)
Original comment by harald....@gmail.com
on 12 Dec 2009 at 12:55
I followed the instructions
1) disable wifi via settings
2) load the wifi-kernel-module
# insmod /system/lib/modules/tiwlan_drv.ko
3) load the wifi config
# wlan_loader -f /system/etc/wifi/fw_wlan1271.bin -e /proc/calibration -i
/data/data/android.tether/conf/tiwlan.ini
And recieved the message
Set property wlan.driver.status = ok 0k
Network scanner found nothing
Then did the other 3 commands
/data/data/android.tether/bin/iwconfig tiwlan0 mode ad-hoc
/data/data/android.tether/bin/iwconfig tiwlan0 essid AndroidTether
/data/data/android.tether/bin/iwconfig tiwlan0 channel 6
Still nothing
Started the actual program and started the tethering from there
I successfully found the network with the scanner software, but it cannot find
the ssid
Original comment by KC2...@gmail.com
on 12 Dec 2009 at 1:41
I'm not sure on the status of Nandroid running on the Droid. If it's not there
yet, I
can take a hack at recompiling it. Once you have it running, you can use the
Rooted
Droid's img files and load them into the SDK Emulator. This should save you a
lot of
the delays that you're seeing now.
Procedure is (sort of) explained here:
http://forum.xda-developers.com/showthread.php?t=531576
If you need, I can clean up the instructions.
Original comment by marc.leb...@gmail.com
on 12 Dec 2009 at 5:31
@marc: Thanks for that but the emulator is in that case not that what I need. I
have
to deal with kernel-modules and stuff like that so the emulator is a no go (I
wish
that would work).
The bluetooth-api has changed in android 2.0 - I've modified the bluetooth-part
of
the app to support bluetooth-tethering for android 2.0. So, at least this is
working
now. BUT netfilter-support is still missing in the droid-kernel so we have to
wait
till motorola has published the sources (the kernel is gpl-licensed - so they
have to
publish it). Small steps ...
Anyways ... for wifi tethering we have to figure-out how to bring the
wifi-interface
in adhoc-mode ...
Original comment by harald....@gmail.com
on 13 Dec 2009 at 1:28
Here's a dump of my session that may be of interest, including some output from
dmesg
and iwconfig. Note the "ancient version" comments with iwconfig about the
tiwlan0
device. Running the iwconfig for changing the mode and essid does not work, and
maybe
this explains why? Would an older version of iwconfig work?
I've also attached a few files: the one labeled droid-2.0.1-tiwlan.ini is the
droid's
original file from /system/etc/wifi/tiwlan.ini and the droid-tiwlan.ini is the
new
version I modified with the suggestions made here. I also included the actual
tiwlan_drv.ko file in case you want to dig through it for anything interesting
using
strings or whatever.
# insmod /system/lib/modules/tiwlan_drv.ko
<6>[ 2282.229064] TIWLAN: driver init
<6>[ 2282.232604] TIWLAN SDIO init
<6>[ 2282.236114] TIWLAN SDIO probe: initializing mmc2 device
<6>[ 2282.242218] SDIO clock Configuration is now set to 24Mhz
<6>[ 2282.249420] tiwlan0 (): not using net_device_ops yet
<4>[ 2282.257751] hPlatform_Wlan_Hardware_Init
<4>[ 2282.263427] sholes_wifi_power: 0
<4>[ 2282.284667] drv->irq = 225, 2
# wlan_loader -f /system/etc/wifi/fw_wlan1271.bin -e /proc/calibration -i
/data/data/android.tether/conf/droid-tiwlan.ini
Set property wlan.driver.status = ok - Ok
# iwconfig
lo no wireless extensions.
sit0 no wireless extensions.
ip6tnl0 no wireless extensions.
ppp0 no wireless extensions.
Warning: Driver for device tiwlan0 has been compiled with an ancient version
of Wireless Extension, while this program support version 11 and later.
Some things may be broken...
tiwlan0 ESSID:off/any Nickname:""
Mode:Unknown/bug Channel:0 Access Point: FF:FF:58:F4:00:00
Sensitivity=-1092307600 dBm
RTS thr=-1092307600 B Fragment thr=-1092307600 B
Encryption key:<too big>
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 invalid crypt:0 invalid misc:0
# iwconfig -v
iwconfig Wireless-Tools version 29
Compatible with Wireless Extension v11 to v22.
Kernel Currently compiled with Wireless Extension v22.
tiwlan0 Recommend Wireless Extension v0 or later,
Currently compiled with Wireless Extension v0.
Original comment by apocalyp...@gmail.com
on 13 Dec 2009 at 7:11
Attachments:
[deleted comment]
[deleted comment]
I was able to get the Ad-Hoc mode running but DHCPCD and IPTables is not set so
I am
not receiving an IP address. I built a shell script to help you easily recreate
the
commands. Please copy and run the command from the android.tether/bin folder. I
changed my /etc/wifi/tiwlan.ini to WiFiAdoc = 1 I am excited to see this
working.
Original comment by keene...@gmail.com
on 14 Dec 2009 at 2:38
Attachments:
So I noticed that AndroidTether ESSID was not taking or would come up and then
go
back down. I changed it to android and now it stays up. I am not sure if there
is an
issue with ESSIDs that are capitalized or not. Using my computer I connected to
the
ad-hoc network and set a static IP address to 192.168.2.2 then I did
ifconfig tiwlan0 192.168.2.254
I can now ping between my computer and my Droid through the ad-hoc connection.
Does anyone know the commands to start up dhcpcd daemon or the iptables
commands to
make the Droid route to the cell network?
Original comment by keene...@gmail.com
on 14 Dec 2009 at 3:09
I'm probably in way over my head. However, I believe these are the iptables
commands
you want:
iptables -I FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -I FORWARD -s 192.168.2.0/24 -j ACCEPT
iptables -P FORWARD DROP
iptables -t nat -I POSTROUTING -s 192.168.2.0/24 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
More reading:
http://forum.xda-developers.com/showthread.php?t=444004&highlight=iptables
Original comment by marc.leb...@gmail.com
on 14 Dec 2009 at 3:21
@keener2u: So you are able to bring the wifi-interface into adhoc-mode with
these
commands? And that's only working if you configure the ssid in lowercase? I've
checked the iwconfig-method with afmsage some days ago BUT it looked like that
something was interfering because the network disappeared after a short time.
Motorola has released some sourcecode in the meantime:
https://opensource.motorola.com/sf/sfmain/do/go/rel1310
(Didn't look into it so far.)
It's probably possible with this to recompile the kernel with enabled
netfilter/iptables support.
Original comment by harald....@gmail.com
on 15 Dec 2009 at 9:31
I'm not new to compiling a kernel, but this will be the first for a cross arch.
I'll
see what I can find, and will definitely need help packaging. Links/help
appreciated.
Original comment by afms...@gmail.com
on 15 Dec 2009 at 7:50
@harald.mue yes those commands in that exact order using android as the ESSID
bring
up a network connection that I can ping from my computer to the droid and from
the
droid to my computer.
As for the Motorola sourcecode release. I think that rel1310 may be for the
milestone
not the VZW Droid. I am worried that rel1310 may not have the source for the
CDMA
radio. The question was asked 3 days ago on the moto dev board but there hasn't
been
a reply back yet.
http://community.developer.motorola.com/mtrl/board/message?board.id=Android_Deve
lopment&thread.id=426
Once we do get the source I would be willing to try it as long as there is a
nandroid
recovery image that I could reflash to. That being said I am new to compiling
kernels
for android but do have experience compiling on linux. I am running through the
noisedroid FAQ and have just setup a make environment. Once the code is release
hopefully I can just pop in the proprietary source to the /vendor/hardware area
can
cross compile.
Original comment by keene...@gmail.com
on 15 Dec 2009 at 7:53
@afmsage I am new to compiling on Android also so hopefully we can help each
other
out. So far I have gathered the following links on compiling and packaging for
Android OS.
http://delicious.com/keener2u/android+compile
Original comment by keene...@gmail.com
on 15 Dec 2009 at 8:20
Are we sure that there isn't any kind of support for packet filtering on the
Droid?
Did they perhaps include ipchains or ipfwadm?
Original comment by marc.leb...@gmail.com
on 16 Dec 2009 at 1:40
This looks promising. http://www.sholes.info/2009/12/15/custom-kernels/
Original comment by keene...@gmail.com
on 16 Dec 2009 at 4:06
They have the kernel for download here... http://www.sholes.info/hg
Original comment by KJHaweko...@gmail.com
on 16 Dec 2009 at 6:21
So motorola says all the source code has already been released.
https://opensource.motorola.com/sf/discussion/do/listPosts/projects.sitewide/dis
cussion.opensource_feedback.topc1994
I found what seems to be the .config for the kernel at
http://android.git.kernel.org/?p=kernel/omap.git;a=blob;f=arch/arm/configs/shole
s_defconfig;h=11f24c95bf478254063da8609d8ec5222b3e05ad;hb=04df51fd4bd1baf07493b6
dd41ffcfce521e4e55
I setup my environment and am using the following to build the kernel module
http://andblogs.net/2008/12/compiling-your-own-g1-kernel-modules/
When I make menuconfig I am not seeing any option under Network to include
iptables
or netfilter. Will I need to patch the kernel?
Original comment by keene...@gmail.com
on 16 Dec 2009 at 7:34
So I cross compiled and added x_tables as a module in the kernel. I have about
5 .ko
files in the /net/netfilter/ folder. I tried copying over x_tables.ko and
running
insmod against it. The following comes up when I run dmesg
-- x_tables: no symbol version for struct_module
Does this at least mean I am cross compiling correctly?
Original comment by keene...@gmail.com
on 16 Dec 2009 at 9:04
There is at least one option which has to compiled into the kernel itself. If I
remember correctly it was: CONFIG_NETFILTER=y (can't be compiled as module).
I've compiled a kernel which supports netfilter for the G1 - the config which
was
used is here:
http://android-wifi-tether.googlecode.com/files/adp-1_6-kernel-config.gz
(check for netfilter-entries).
I've followed this guide:
https://noisebridge.net/wiki/NoisedroidHacking
And I had the replace the complete boot.img. I've attached two perl-scripts
(can't
remember who has written these) which allow to unpack and repack such a
img-file. So,
what I've done was to extract the current kernel-config from the phone - on a
G1/Magic/Hero (all HTC devices) this config is stored in /proc/config.gz -
enable all
needed netfilter-options, recompile it and repacked the boot.img.
I'm sorry that I can't help more ...
Original comment by harald....@gmail.com
on 16 Dec 2009 at 11:05
Attachments:
Yay ... http://www.sholes.info/important-files/
Kernel with netfilter support?
Original comment by harald....@gmail.com
on 16 Dec 2009 at 11:11
@keener2u: I'm going to change the startup-procedure of the alpha-app exactly
like
you are doing in your test.sh - will post here when it's available for download.
Original comment by harald....@gmail.com
on 16 Dec 2009 at 11:14
This is actually correct, and verified. If you use lowercase letters as the
essid,
the connection stays alive. I was able to connect, but no ip was
assigned...Just
confirming.
Original comment by afms...@gmail.com
on 16 Dec 2009 at 10:57
Correction...still only works for a few moments still...drat :)
Original comment by afms...@gmail.com
on 16 Dec 2009 at 11:00
@afsmage yeah I just tested it and you are right. If you just bring up the adhoc
network and dont connect to it, it goes down about a minute later. But, it does
seem
to stay up after you connect to the ad-hoc network with a computer. I have been
able
to ping the android phone from my computer through the ad-hoc network hours
later.
@harald.mu unfortunately it looks like config.gz was not included in the build.
However I was able to find a default config for the sholes up on the
android.git.kernel.org
//Matt
Original comment by keene...@gmail.com
on 16 Dec 2009 at 11:18
So we will need to have a custom kernel to run this app?
Might this conflict with official/custom rom images?
Original comment by SwordOf...@gmail.com
on 16 Dec 2009 at 11:46
@SwirdOfWar: This app requires root-permission and a netfilter-enabled kernel.
So,
yes it needs a custom kernel.
Original comment by harald....@gmail.com
on 17 Dec 2009 at 12:04
So I reflashed my boot image using the kernel with netfilter in it created by
the
sholes.info crew. Unfortunately now tiwlan.ko is not working because of kernel
version. But running iptables now gives me the following error.
./iptables -I FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
getsockopt for multiport failed strangely: No such file or directory
getsockopt for multiport failed strangely: No such file or directory
iptables v1.3.7: can't initialize iptables table `filter': Table does not exist
(do
you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
....baby steps, baby steps :)
Original comment by keene...@gmail.com
on 17 Dec 2009 at 1:16
Hey,
This is directed to the developers of this project. If you guys could
contact me privately I can help you port your project to the Motorola
Sholes. We have a fully functioning kernel and wireless driver. Full
details are going to be released in the near future by [mbm]. But in
the mean time, I would love to see your project make progress on the
sholes. Currently the application locks up the phone and then it
reboots. However wireless does function entirely.
Contact me and we can chat :)
Michael Purcell (from sholes.info if your curious as to who I am)
Original comment by mxcellm...@gmail.com
on 18 Dec 2009 at 6:25
Original issue reported on code.google.com by
Love2Shred
on 9 Dec 2009 at 7:23