alex1491163117 / android-wifi-tether

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

Motorola Droid - Developing & Testing #205

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Which device (manufacturer, type)?
Motorola Droid
Which firmware is installed?
2.0.1
What version of wireless tether are you using?
None yet

Can we use one of the existing versions on the Droid now that we have root?
Or will a new version have to be written? Thanks

Original issue reported on code.google.com by Love2Shred on 9 Dec 2009 at 7:23

GoogleCodeExporter commented 9 years ago
ok everything is moved over and i started program and it says unable to start
tethering please try again

does that mean its still working or did i mess somethign up

Original comment by saifsh...@gmail.com on 21 Dec 2009 at 7:19

GoogleCodeExporter commented 9 years ago
The program will report that starting tether failed, but you should see the 
bandwidth 
indicators, and you should be able to connect to the ad-hoc network (android)

Original comment by webacous...@gmail.com on 21 Dec 2009 at 7:39

GoogleCodeExporter commented 9 years ago
i dont get the indicators and no adhoc comes up on the computer where do u 
think i
might have messed up

Original comment by saifsh...@gmail.com on 21 Dec 2009 at 7:40

GoogleCodeExporter commented 9 years ago
@crdnilfan You'll need to use the Android SDK tool, adb to open a shell while 
in 
recovery mode. Please check the tutorial, I've updated the instructions to 
include a bit 
about that.

@saifshaya please post the contents of the program's log

Original comment by webacous...@gmail.com on 21 Dec 2009 at 7:43

GoogleCodeExporter commented 9 years ago
it says unable to open log file

Original comment by saifsh...@gmail.com on 21 Dec 2009 at 7:48

GoogleCodeExporter commented 9 years ago
It sounds like you didn't run the program first before copying the new tether 
program.. 
can you try removing the app and installing it again-- then run it once, and 
apply the 
update? Make sure the app status bubble says that its installed some files 
before you 
close it.

Original comment by webacous...@gmail.com on 21 Dec 2009 at 7:54

GoogleCodeExporter commented 9 years ago
i just tried again with ur instructions webacoustics but still no go by the way 
i
totally appreciate the support man u have no idea how cool this is of u 

Original comment by saifsh...@gmail.com on 21 Dec 2009 at 8:00

GoogleCodeExporter commented 9 years ago
Hey, no problem-- someone just commented on the thread that they had to reboot 
after patching the program before it would work.

Original comment by webacous...@gmail.com on 21 Dec 2009 at 8:02

GoogleCodeExporter commented 9 years ago
ya i reinstalled waited till it said files installed then i appled the 
tether.txt
rebooted and still get unable to start tethering please try again and no status
indicators   does it matter im on 2.1?

Original comment by saifsh...@gmail.com on 21 Dec 2009 at 8:09

GoogleCodeExporter commented 9 years ago
The app hasn't been tested on 2.1-- I imagine its related to that. This hack is 
only 
tested to work on 2.0.1.

Original comment by webacous...@gmail.com on 21 Dec 2009 at 8:13

GoogleCodeExporter commented 9 years ago
does anyone have it working on 2.1?

Original comment by saifsh...@gmail.com on 21 Dec 2009 at 8:14

GoogleCodeExporter commented 9 years ago
Just so everyone who is getting the "no such file or directory" error 
knows...you have to 
unmount your SD card before you are able to access it, move files to and from, 
and 
especially run the recovery image. And to all who knew that I am sorry for my 
redundancy.

Original comment by KJHaweko...@gmail.com on 21 Dec 2009 at 11:05

GoogleCodeExporter commented 9 years ago
@harald.mue I believe the 2.1 issue is related to the way you're finding the 
path for 
the tether script-- I made several changes to the script, including replacing 
it with a 
simple `exit 0`, and nothing yielded a successful result in the gui. My 
conclusion 
based on reviewing the java code was that the GUI app never found the 
`bin/tether 
start` correctly in the first place. I'd love to create a new apk that fixes 
this and the 
other issues relating to the necessary iwconfig calls, but I'm not set up to 
re-compile 
the project.

Merry Christmas (or whatever) everyone!!

Original comment by webacous...@gmail.com on 22 Dec 2009 at 3:58

GoogleCodeExporter commented 9 years ago
Nice work, Harald and webacoustics... Putting this all together I was able to 
get the
ad-hoc network connected to one of my Linux machines (though only once with one
machine; no other machines were able to connect either before or after).

The ESSID doesn't stick around for long though, looks like the tether script 
and app
are fighting with some other process for control of the wireless device.  The
wireless device itself often disappears, indicating that something is unloading 
the
kernel module altogether.  I only briefly looked at the process list, but I 
didn't
see anything that looked like an interface manager type process (though I 
killed a
few, no luck).

Anyway, thanks again, look forward to your updates!

Original comment by jbarnes...@gmail.com on 22 Dec 2009 at 7:19

GoogleCodeExporter commented 9 years ago
@webacoustics thank you very much!! on a drive to st. louis now typing this 
using this 
form of tethering :)

Original comment by crdnil...@gmail.com on 22 Dec 2009 at 10:45

GoogleCodeExporter commented 9 years ago
Thank you all for all your work on the project....
I just got done installing per the howto, had to reinstall the wifi driver 
after all
the updates and installs, not sure why but after doing so it started working.

Original comment by scicomru...@gmail.com on 23 Dec 2009 at 3:56

GoogleCodeExporter commented 9 years ago
@webacoustic: I'm currently on vacation and have only limited access to the 
internet. So, putting a new version together (which support the droid) will 
take 
maybe two weeks or so ... but it will be done. Thanks for all - good work.

Original comment by harald....@gmail.com on 23 Dec 2009 at 4:40

GoogleCodeExporter commented 9 years ago
@harald.mue Thanks, happy to help. Please feel free to tap me for testing when 
you get 
back from vacation.

Original comment by webacous...@gmail.com on 23 Dec 2009 at 11:09

GoogleCodeExporter commented 9 years ago
congrats webacoustics uve got a engadget posting
http://www.engadget.com/2009/12/23/motorola-droid-now-just-a-hacked-firmware-upd
ate-away-from-wif/

Original comment by saifsh...@gmail.com on 23 Dec 2009 at 4:57

GoogleCodeExporter commented 9 years ago
Here's an updated tether-1.txt that gets rid of that pesky error message when 
you start 
tethering.

Original comment by webacous...@gmail.com on 23 Dec 2009 at 10:58

Attachments:

GoogleCodeExporter commented 9 years ago
Waiting for my flight... here's another version that will use busybox to find 
your SSID 
and Channel settings from the gui (you have to install busybox to your 
/system/bin 
directory

Original comment by webacous...@gmail.com on 23 Dec 2009 at 11:31

Attachments:

GoogleCodeExporter commented 9 years ago
sorry, left a test value in there.. here's the good script

Original comment by webacous...@gmail.com on 23 Dec 2009 at 11:35

Attachments:

GoogleCodeExporter commented 9 years ago
Another note, you'll have to symlink /system/bin/sh to /system/bin/busybox for 
this to 
work (android's default shell program doesn't like the commands I'm using). 
I'll update 
the howto to include the busybox support assuming my flight has wifi.

Original comment by webacous...@gmail.com on 23 Dec 2009 at 11:40

GoogleCodeExporter commented 9 years ago
Sorry, one more thing.. the script tries to set the wep key (if enabled), but 
for some 
reason the network is still coming up as open. If anyone has ideas of why that 
is, please 
let us know

Original comment by webacous...@gmail.com on 23 Dec 2009 at 11:40

GoogleCodeExporter commented 9 years ago
Ok, thank you GoGo free passes-- I updated the script to grab the settings from 
the 
GUI, and a section that attempts to activate WEP if enabled.. but it doesn't 
seem to 
work. Anyone have ideas about that?

Original comment by phpt...@gmail.com on 24 Dec 2009 at 5:25

Attachments:

GoogleCodeExporter commented 9 years ago
when using the new script, the network now shows up as "Other Network" through 
windows, 
and requests an SSID from me when attempting to connect, i enter "android", and 
the 
connection then instantly fails.

Original comment by crdnil...@gmail.com on 24 Dec 2009 at 6:42

GoogleCodeExporter commented 9 years ago
Is anyone else able to check with windows? Note that with the new script and 
busybox you will need to 
set up the said and channel in the GUI. I was able to do this on my mac and 
itouch

Original comment by webacous...@gmail.com on 24 Dec 2009 at 7:10

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Alright, I've gone through your tutorial about 4 times and I am getting the 
exact same 
problem that saifshaya was getting. I tried all the recommendations but I'm 
still getting 
nothing. I am on 2.0.1. One thing that I did do differently was the initial 
install of the 
tethering program. I just used Androzip and the package installer to get the 
tether 
program installed, you think that could be problem? If so, how would I go about 
installing 
the app through adb? I'm kind confused on what the code would be (I'm somewhat 
new to 
the android scene). Thanks in advance!

Original comment by jamko...@gmail.com on 25 Dec 2009 at 10:58

GoogleCodeExporter commented 9 years ago
 i also wanted to add that I have no /data/data/android.tether directory, any ideas why?

Original comment by jamko...@gmail.com on 25 Dec 2009 at 11:14

GoogleCodeExporter commented 9 years ago
I can confirm this works with Windows -- but I cant get the Ubuntu box to 
connect. 
Im currently using 2.1 Greek3T  rev 0.03 release.  I start the script from the
command line, although I believe the GUI somehow set the parameters.  Can these 
be
specified on command line or through editing of a .conf package?  

The major problem I am having is that the tether script needs to be cycled
(start/stop) about 5 times before a successful adhoc connection can be made.  I 
can
only make a connection with windows, and not ubuntu as stated earlier.  In each
successful try, I can confirm seeing the network using a network scanner.  It 
seems
like the time the ssid is visible however is extremely short -- in some cases 
10 sec
and in others 30 sec.  It seems very inconsistent.  After making a connection, I
pulled data through the bridge for about 5 minutes without any hangups or any 
random
disconnects.  

The hangup problem reminds me of one I used to have with broadcom drivers in old
versions of the linux kernel where to disconnect and reconnect, I had to 
ifconfig
down, rmmod, then insmod and finally ifconfig up (cycle the driver as I would 
call
it), to get the module working again.  I'm wondering if there is a similar 
problem here.

Original comment by kevhil...@gmail.com on 25 Dec 2009 at 11:16

GoogleCodeExporter commented 9 years ago
@jamko101 I would try via adb. Its a simple tool, just download the sdk and 
look in the 
tools directory. From there you can use `adb push <apk file>` to install apks 
and `adb 
shell` to open a shell on the phone from your computer.

Original comment by phpt...@gmail.com on 26 Dec 2009 at 7:10

GoogleCodeExporter commented 9 years ago
@kevhilton a connection with Ubuntu is a pain in the but, and it shouldent be. 
I am
using Ubuntu 9.10 and use my old "iPhone" to hold the wifi connection open until
Network Manager can take its sweet time to find the android network. Some times 
even
then Ubuntu will thumb its nose at the android network. (I think this has 
something
to do with an ad-hoc network, or its something with the dhcp assignment, but 
not sure
yet.) I have set the connection settings from dhcp to static and have had 
better luck
connecting, some times.
If you want to know what IP settings to use for static connect with windows and 
then
use that is shown in that connection for IP, Mask, Gateway, and DNS.

Original comment by scicomru...@gmail.com on 26 Dec 2009 at 7:17

GoogleCodeExporter commented 9 years ago
I've found that mac devices connect very well due to their fast network scans.. 
windows 
and linux not so much

Original comment by phpt...@gmail.com on 27 Dec 2009 at 2:54

GoogleCodeExporter commented 9 years ago
For windows --- here is a hint.  Start the tether script from the adb shell or 
on the
device itself using a Terminal Emulator::
sh tether stop:
sh tether start

Then use the Wireless Networking GUI within Windows to scan for available 
networks
(Refresh Network List).

The AndroidTether network should then be listed in the Wireless Network List.

Stop the tether script within the adb shell or on the device itself using a 
Terminal
Emulator::
sh tether stop

Then restart the tether script within the adb shell or on the device itself 
using a
Terminal Emulator:
sh tether start

On Windows, do not rescan for networks, but now try connecting the the listed
AndroidTether Network.  It should now connect.

In summary what Ive found within Windows is that you cant do a network scan and
attempt to complete a wireless handshake within the same tether script run. I'm 
not
sure the reason for this. 

Original comment by vsab...@gmail.com on 28 Dec 2009 at 12:30

GoogleCodeExporter commented 9 years ago
Is anyone set up to compile this project? I believe the problem with 2.1 GUI is 
the 
libnativetask shared object-- it doesn't seem to be executing properly under 2.1

Original comment by phpt...@gmail.com on 28 Dec 2009 at 4:00

GoogleCodeExporter commented 9 years ago
Another finding -- 

Still not able to connect with Linux with use of two different chipsets 
(broadcom
using b43 and Atheros using madwifi) using both WICD and manual command line 
parameters.

Another issue
I have 2 droids -- one has tethering application installed.  The other can see 
the
ad-hoc network but can not connect to it.  So I cant tether two phones together
either.  Not sure if its designed this way on purpose

Original comment by vsab...@gmail.com on 29 Dec 2009 at 12:02

GoogleCodeExporter commented 9 years ago
I am running 2.1 and tether and it works just fine.  Will not launch from the 
GUI,
but I can start from adb shell and have connected.  I wrote a little 'helper' 
APK
that is a widget I have sitting next to this tether app.  I click it once and 
tether
starts; then I click the real tether app, it goes right in and shows a 
connection. 
If anyone wants it, it is attached.  It works for me, hopefully it can help 
someone
else out.  I used the instructions at this link to get it working:

http://www.droidforums.net/forum/droid-hacks/10219-tether-capability-android-wif
i-tether-wireless-tether-root-users.html

Original comment by twinturb...@gmail.com on 31 Dec 2009 at 7:58

Attachments:

GoogleCodeExporter commented 9 years ago
Alright I looked into WEP a bit (I'm not a dev at all by the way, this is just 
what 
I've discovered, I believe its correct). Here's my shell:

# ./iwconfig tiwlan0 enc 1234512345123
./iwconfig tiwlan0 enc 1234512345123
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device tiwlan0 ; Operation not supported on transport endpoint
.
# ./iwconfig tiwlan0 key 1234512345123
./iwconfig tiwlan0 key 1234512345123
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device tiwlan0 ; Operation not supported on transport endpoint
.

I tried both key and enc for setting the wep key, neither worked.  

I also noticed that you can easily reassign the ESSID if it stops broadcasting, 
additionally you can reassign the essid even if you're already connected 
without 
having any issues. So here's a script to reassign the essid if you don't get 
connected in time. Just run "sh id" (first edit the script and customize it to 
whatever ssid you want, now its just android) and your network will reappear.

Don't forget to 
chmod 700 /data/data/android.tether/bin/id
before you try and use it.

Original comment by crdnil...@gmail.com on 5 Jan 2010 at 10:53

Attachments:

GoogleCodeExporter commented 9 years ago
@crdnilfan thanks for this fix. I've added that command as a simple daemon to 
run in 
the background. Attached is the updated tether script.

The idea behind the script/daemon is that the process will check every 2 
seconds to 
see if the SSID is still present (by using iwconfig), and if it isn't, run the 
command to 
reset the SSID. This shouldn't cause problems with connectivity, since the ssid 
persists after a successful client connection.

Please let me know if anyone runs in to problems!

Original comment by webacous...@gmail.com on 6 Jan 2010 at 9:18

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Our syntax was definitely wrong for WEP, 
"To set the current encryption key, just enter the key in hex digits as 
XXXX-XXXX-
XXXX-XXXX or XXXXXXXX. To set a key other than the current key, prepend or 
append 
[index] to the key itself (this won't change which is the active key). You can 
also 
enter the key as an ASCII string by using the s: prefix"

so /data/data/android.tether/bin/iwconfig tiwlan0 key s:1234512345123
is the command we need. sadly that doesn't work still, i attempted 
/data/data/android.tether/bin/iwconfig tiwlan0 key restricted s:1234512345123
but it stays in open mode.
i would really like to get WEP working...but I think i've reached my limit, 
I'll 
probably keep trying, but my knowledge just isn't enough to make any more 
progress.

Original comment by crdnil...@gmail.com on 7 Jan 2010 at 4:32

GoogleCodeExporter commented 9 years ago
oh, i see the latest tether-2 actually had that update (tether-2 never actually 
worked 
for me, so i didn't ever use it). sorry about double post, but does anybody 
else have 
an ideas for WEP?

Original comment by crdnil...@gmail.com on 8 Jan 2010 at 4:46

GoogleCodeExporter commented 9 years ago
I've gotten it to work, but found that the speed of tethered devices is much 
slower
than the device itself. Doing a test with Speedtest.net, I got 350kbps down and
170kbps up from my tethered laptop, and 1220kbps down and 664kbps up with the 
phone.

There are also (relatively) long delays when connecting to anything.

Should I open a separate issue for this?

Original comment by haxney on 16 Jan 2010 at 5:25

GoogleCodeExporter commented 9 years ago
I do believe the dev on this project is now working solely on the NexusOne, 
which means 
currently the only improvements that will be seen are with the tether script, 
not the 
app itself, unless somebody else wants to go through somebody else's code and 
learn 
their logic then start making improvements.

Also the dev MIGHT come back after the NexusOne's Wifi Tether app is finished, 
but I 
have absolutely no idea whether he will or not.

Original comment by crdnil...@gmail.com on 17 Jan 2010 at 3:41

GoogleCodeExporter commented 9 years ago
@crdnilfan: No, not true.

You might have noticed that we need to make modification in the app to support
different devices. This would lead into different versions of the app - each 
would
support another device. That's not maintainable for us. Ben has introduced 
something
to solve this problem by using "a kind of scripting-language" which is called 
edify.
(Edify is used for OTA update scripts for instance.)

Ben owns a NexusOne and he has used this device to implement and test this 
solution!
We developers STILL don't have a Motorola Droid available for testing - 
donations are
very welcome.

Anyway ... I've uploaded a new version of wirless tether - it's version 
2.0-pre1 -
available here:
http://code.google.com/p/android-wifi-tether/downloads/list?can=2&q=NexusOne

This version is tested and working for the NexusOne (including wep-encryption 
and
other stuff). It makes use of "edify" and theoretically supports the Motorola 
Droid
as well. In "/data/data/android.tether/conf" you will find a file named
"tether.edify". Also available in SVN ->
http://code.google.com/p/android-wifi-tether/source/browse/trunk/res/raw/tether_
edify. Here
you can find a "Motorla Droid"-section:

      #
      # Motorola droid
      #
      module_loaded("tiwlan_drv") || log(insmod("/system/lib/modules/tiwlan_drv.ko",
""), "Loading tiwlan_drv.ko module");
      run_program("/system/bin/wlan_loader -f /system/etc/wifi/fw_wlan1271.bin -e " +
                  "/proc/calibration -i /data/data/android.tether/conf/tiwlan.ini");
      sleep("5");
      log(run_program("/data/data/android.tether/bin/iwconfig " +
getcfg("wifi.interface")
                      + " mode ad-hoc"), "Setting ad-hoc mode.");
      log(run_program("/data/data/android.tether/bin/iwconfig " +
getcfg("wifi.interface")
                      + " essid " + getcfg("wifi.essid")), "Setting essid.");
      log(run_program("/data/data/android.tether/bin/iwconfig " +
getcfg("wifi.interface")
                      + " channel " + getcfg("wifi.channel")), "Setting channel.");
      run_program("/data/data/android.tether/bin/iwconfig " + getcfg("wifi.interface")
                      + " commit");                  
    );

This file can be edited without recompiling. 

PLEASE NOTE: IT'S NOT TESTED FOR THE MOTOROLA DROID. It might work or ... NOT. 
We
will probably get a droid (for a short time) to do some testing within the next 
days.
Please be patient! Thanks.

Original comment by harald....@gmail.com on 17 Jan 2010 at 9:00

GoogleCodeExporter commented 9 years ago
Oh well I'm definitely wrong then. My bad. 

I did test it on the Droid though, it went black screen and never fully loaded, 
then 
FC.

Original comment by crdnil...@gmail.com on 17 Jan 2010 at 2:31

GoogleCodeExporter commented 9 years ago
@crdnilfan: if you a app named "superuser" installed - please make sure:
1) USB-Debugging is enabled
2) Maybe the "superuser"-app is fucked-up. Do something like: 
adb shell rm /data/data/org.zenthought.android.su/databases/permissions.sqlite

Otherwise ... check with "adb logcat" what the exact error-message is!

Original comment by harald....@gmail.com on 17 Jan 2010 at 2:45

GoogleCodeExporter commented 9 years ago
Ya I feel pretty ridiculous, like a lot of apps if the su request takes too 
long they'll FC, so after giving it 
perm su access it loaded successfully. I have no wifi device close, but the log 
stated that wep has 
activated successfully!

Original comment by crdnil...@gmail.com on 17 Jan 2010 at 5:43

GoogleCodeExporter commented 9 years ago
Tried runing 2.0 pre-1 as is on droid...failed
app runs but I can't seem to pick up any signal on psp.
Could have something to do with psp will try other devices.

Original comment by madde...@gmail.com on 18 Jan 2010 at 8:11