Jump to content


Photo

Ad hoc network?


  • Please log in to reply
32 replies to this topic

#21 MrSmith317

MrSmith317

    Member

  • Jr. Member
  • PipPip
  • 26 posts

Posted 09 August 2010 - 08:03 AM

That helped greatly junk00, I've been playing with this all weekend to no avail. Now I can connect to my droid tether and use this thing anywhere. If it wasn't for the resistive touch screen this thing would be a true gem.

#22 axel06

axel06

    Member

  • Jr. Member
  • PipPip
  • 19 posts

Posted 09 August 2010 - 09:01 AM

Could you list, by chance, the entire edited/ complete wpa_supplicant.conf ? It would be really helpful. Thanks...

#23 collindv

collindv

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 75 posts

Posted 09 August 2010 - 11:14 AM

or even post you're .conf file. I tried almost exactly that same setup and couldn't connect I will try again after work.Are you connecting to a Droid?

#24 junk00

junk00

    Newbie

  • Jr. Member
  • Pip
  • 4 posts

Posted 09 August 2010 - 11:58 AM

wpa_supplicant.conf edit ctrl_interface=/data/misc/wifi/wpa_supplicantctrl_interface_group=1010update_config=1ap_scan=2#added ap_scan=2 so it scans all networks including ad-hoc#this causes priorities to be ignored below. #it just goes through the networks one by one. # this can really slow things down. #I recommend putting a simple file like this with the ad-hoc network at the top#on your sdcard and then just copy to /data/misc/wifi directory when needed. #I sure someone could write a script to backup current and swap in adhoc one.#added my ad-hoc network. network={ ssid="YourSSID" key_mgmt=NONE#wep_key0 only needed if you use wep. "" if ascii / no "" if hex wep_key0="1234567890123"#mode=1 needed to indicate ad-hoc mode=1 priority=25}#normal access point networknetwork={ ssid="exampleAP" key_mgmt=NONE auth_alg=OPEN SHARED wep_key0=01234567890123456789012345 priority=8}Hope this helps others.

This is my .conf file. I just added the # comments to try and explain things.Use this file without the # lines. Put in your own SSID info and key. I first did the ad-hoc network without any WEP or other key so that I could confirm it works. I suggest you do the same.Put this as your first network in the config file after ap_scan=2 and turn off all security on the ad-hoc network.network={ssid="YourSSID"key_mgmt=NONEmode=1}

#25 collindv

collindv

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 75 posts

Posted 09 August 2010 - 06:49 PM

Didn't work for me. I get the same result. It shows my ad-hoc network whether it's on or not and ends up "unsuccessful" when trying to obtain an IP address.

#26 collindv

collindv

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 75 posts

Posted 09 August 2010 - 07:06 PM

What is in your /system/etc/wifi/wpa_supplicant.conf file? I may have changed something there I shouldn't have.

#27 collindv

collindv

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 75 posts

Posted 11 August 2010 - 01:34 PM

Bump. Any updates here?

#28 collindv

collindv

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 75 posts

Posted 17 August 2010 - 08:10 PM

After much consternation I can now say that this does work. I have gotten it working multiple times, after reboots, etc. I don't have the final details ironed out yet but it is a combination of several things found in this thread. Right now I have it where I boot my gentouch, turn on wifi, execute a script (copies a wpa_supplicant.conf file from the SD card, runs a few wpa_cli commands), turn off wifi, then turn it back on. It then connects automatically to my droid ad hoc running wireless tether 2.0.5 pre-8 (I think). Possibly unnecessarily complicated but right now it works!!Maybe I will eventually distil it all into a script from the home screen.

#29 ollieisamuppet_droid

ollieisamuppet_droid

    Newbie

  • Jr. Member
  • Pip
  • 1 posts

Posted 10 December 2010 - 06:44 AM

JUNK, you are my hero! This worked straight off. So I thought I'd register and share my experience so it may help others..

I received a TELECHIPS 8902 based Android tab yesterday (Storage Options Scroll). I knew off the bat that ad-hoc would be a problem, but as I use my phone as an ad-hoc AP, it needed to work.

On my device there is another copy of wpa_supplicant.conf in /system/etc/wifi which I had been editing. Stupidly, I didn't realise I should've been editing the one in /data/misc/wifi

All I did was pulled with adb (over wifi - there's no usb driver for these stupid tabs so I had to connect to another wifi (non-adhoc) and install "adb over wifi widget" from the marketplace. Then I could issue adb commands as normal ("adb connect ip:port" - adb over wifi will give you ip/port info - but you have to be rooted first - download z4root (google is your friend) and stick on memcard and install to root before running adb over wifi)

Then I edited to reflect my ad-hoc ap. Here's my config:

ctrl_interface=DIR=/data/misc/wifi/wpa_supplicant GROUP=wifi
ctrl_interface_group=1010
update_config=1
ap_scan=2

network={
	ssid="Virus test"
	key_mgmt=NONE
	mode=1
	priority=50
}

(if you're wondering what the SSID is all about - it's to stop noobs connecting to my open network in public places :P (when they see the word "Virus" it scares them, hehe)

Stick your network at the top of the list, save and push back with adb. Turn wifi off, then on again and you should connect to your ad-hoc network automatically! If not, you may need to manually assign IPs through your device.

Hope this helps. I thought I was never gonna get it working for a while :) If it's useful, my tab is running Eclair (2.1)

Good luck

#30 pingram3541

pingram3541

    Member

  • Jr. Member
  • PipPip
  • 15 posts
  • LocationSoCal

Posted 28 January 2011 - 07:53 PM

I can say from trial and error that before you do anything with the original file:

cp wpa_supplicant.conf wpa.bak

I had to perform a restore due to disabling my wireless altogether and found out the reason why was some hidden carriage returns that won't show up in windoze notepad editor.  I used copy and paste between in notepad to copy the actual "hidden" carriage returns and then carefully edited the extra lines I needed.  Was a bit tedious and I'm sure I could have downloaded an editor that alleviates this trouble but I got it working to the point that my wireless shows both my home network and my Dx Ad-hoc but seems to always want to connect to the home network...maybe because the signal is stronger...I'm gonna go for a walk and see what happens.

#31 pingram3541

pingram3541

    Member

  • Jr. Member
  • PipPip
  • 15 posts
  • LocationSoCal

Posted 31 January 2011 - 10:21 AM

Ok, the weird thing was when I included my home network it only attempted a connection to my tethered droidx once but eventually timed out and connected to my home network.  After that over a few days I noticed that it would never show my droidx wifi in range even though the phone was literally sitting right next to my tab.  I liked what ollieisamuppet suggested about using the "virus" scare tactic in the wifi SSID.  Here was the config I was using and I don't know why it wouldn't work:

ctrl_interface=DIR=/data/misc/wifi/wpa_supplicant GROUP=wifi
ctrl_interface_group=1010
update_config=1
ap_scan=2

network={
	ssid="virustest"
	key_mgmt=NONE
	mode=1
	priority=25
}


network={
	ssid="MYHOME"
	psk="somecrazylongasssecuritystringthatnobodaywilleverguess"
}

After it started showing no signal or "not in range" I checked the file from the vi editor and it had actually been changed by the system to:

ctrl_interface=DIR=/data/misc/wifi/wpa_supplicant GROUP=wifi
ctrl_interface_group=1010
update_config=1

network={
	ssid="virustest"
	key_mgmt=NONE
	priority=25
}


network={
	ssid="MYHOME"
	psk="somecrazylongasssecuritystringthatnobodaywilleverguess"
	priority=27
}

Notice the lines ap_scan=2 and mode=1 have been removed.  Not sure why this was happening but it did it again when I copied the file over again.  Eventually I created a new file with just the droidx wifi and it seems to be holding out and I can browse the internet just fine.

ctrl_interface=DIR=/data/misc/wifi/wpa_supplicant GROUP=wifi
ctrl_interface_group=1010
update_config=1
ap_scan=2

network={
	ssid="virustest"
	key_mgmt=NONE
	mode=1
	priority=25
}
[code]


#32 dus10

dus10

    Newbie

  • Jr. Member
  • Pip
  • 1 posts

Posted 19 July 2011 - 12:49 PM

ollieisamuppet_droid I used your edit and it worked great. I'm one of those guys who just registered because i finally found the answer to a problem me and my iPhone adhoc have been looking for for months. I gave up and then just happened to be bored on a day off. I'm pretty noob but this was easy as cake. The exception I used and I suggest to others is using sshdroid (marketplace) to "pull" and "push" files from tablets. If anyone has any questions the answers are in ollieisamuppet_droid 's post.

#33 Fred Chevitarese

Fred Chevitarese

    Newbie

  • Jr. Member
  • Pip
  • 1 posts

Posted 11 January 2013 - 07:15 AM

Hello all!

Well, i have an android device too and editing this file didn't work for me, but it's cause after i reboot, the device turns the file as the original was.

Anyone knows why is that happening?

Any help would be appreciated ;)

Cheers and thanks in advance!