Pree configuring Wifi in android rom - Fire TV Q&A, Help & Troubleshooting

hello mates
i am customizing a ROM for TV sticks and i need to pre configure (hardcoded) ssid and password for the wifi.
so that if i flashed another or same device with the rom it should take that same ssid and passwd in that network.
so what i did is i connected the device to a wifi network gave ssid and passwd and pull the /data/misc/wifi/wpa_supplicant.conf(which will conatain the network ssid and pass) using "adb shell"
now "forget" the wifi network and pushed the file using 'adb shell' as soon as i pushed and turn on the wifi it took the ssid and paswd and connected to the network .
but the problem occure when i reboot the device and tried to turn on the wifi it stucks in "Turning on wifi" and in advance settings the MAC is also unavailable.
its like some permission is preventing to start the wifi..
i have tried : rm wpa_supplicant.conf and push new wpa_supplicant.conf
/*###############################*/
this is my wpa_supplicant incase you need to see
ctrl_interface=wlan0
update_config=1
eapol_version=1
ap_scan=1
fast_reauth=1
device_name=rk31sdk
manufacturer=rockchip
model_name=MK908II
model_number=MK908II
serial_number=V8GCU6JBJL
device_type=10-0050F204-5
config_methods=physical_display virtual_push_button keypad
network={
ssid='airtel'
psk='randomwifipasswd'
key_mgmt=WPA-PSK
scan_ssid=1
priority=1
}
/*##############################################*/
ps:urgent help needed..

Hi there,
Please wait until mods will move this thread to the device specific forum for more relevant answers.
Stand by

Solved it ...
hey i actually solved the problem...
The problem was when i was pushing the file it was not having particular permission..
the above problem can be solved by using 2 commands
after pushing the custome wpa_supplicant.conf file
those are
adb shell chown system:wifi /data/misc/wifi/wpa_supplicant.conf
adb shell chmod 0644 /data/misc/wifi/wpa_supplicant.conf

I did this. Now my fire stick still shows "Scanning for networks" after a ROM install / factory reset, but is actually connected to my network!? How do I skip into the home screen after a factory reset?

Related

Wifi keeps going to unable to connect

Hello,
On each reboot of my EVO the wifi is "unable to connect"
I've found the solution to the problem and that is to edit the /data/misc/wifi/wpa_supplicant.conf file which reverts to -rw--r-- or something.
I issue the command chmod 777 wpa_supplicant.conf and everything works fine.
My issue is how do I make it stick? each reboot it seems to go back to the non-working state.
Some Background: I had messed with the Phone.apk and didn't realize that that was why I had lost cell connectivity. I pushed the /data folder back up from my PC. I assume this is why this happened in the first place.
If you have Ideas I'll be happy to try them.
Thanks.
Sorry if this is the wrong section. The other sections did not seem right since this is a issue s dev would likely deal with.
Ok I got it figured out. I flashede a new rom and that didn't fix it so I dug in a little deeper. I compaired my other phones result of "ls -l" and saw that it was -rw--rw--- system wifi wpa_supplicant.conf and this one showed -rw--rw--- root root wpa_supplicant.conf. This means the user and group was wrong. I did a chown system wpa_supplicant.conf which corrected the owner but the group was still wrong. It didn't seem to matter though. I tried chgrp wifi wpa_supplicant.conf but it seems there is not a wifi group on this rom/phone.
I thought I'd post back in case someone else has this problem.
my wifi seems to be taking FOREVER to connect... it just keeps going over and over and over and says unable to obtain ip adress. im using my wifi right now on my laptop..
notown775 said:
my wifi seems to be taking FOREVER to connect... it just keeps going over and over and over and says unable to obtain ip adress. im using my wifi right now on my laptop..
Click to expand...
Click to collapse
Does it eventually connect though. My problem was that it would take a few minutes then time out. You could really only tell in settings>wireless and networks. I would say "unable to connect"
Test solution is to open connect bot on phone.
type:
#su
#cd /data/misc/wifi
#chmod wpa_supplicant.conf
Now try to connect again from settings>wireless and network. If it connects then yo may need to to a Chown.
joeavery2 said:
Does it eventually connect though. My problem was that it would take a few minutes then time out. You could really only tell in settings>wireless and networks. I would say "unable to connect"
Test solution is to open connect bot on phone.
type:
#su
#cd /data/misc/wifi
#chmod wpa_supplicant.conf
Now try to connect again from settings>wireless and network. If it connects then yo may need to to a Chown.
Click to expand...
Click to collapse
i mean eventually as in like 3hrs later, i wish i was.. were... (which one is it) exaggerating,
EPIC
I am having this same problem on the EPIC, it connects initially to my WIFI @ Home but then for some reason refuses to reconnect back to it later and even though it sees the SSID of the WIFI connection refuses to connect.
I am running a trace on the router itself and I do not see a request from the MAC Address to DHCP, so apparently it is failing to communicate?
It was connected fine before.

[Q] 802.1x Enterprise with PEAP GTC wireless connection problem

Hi everybody.
I just bought a desire hd. i can connect every wireless connection WEP, WPA, WPA2 etc. but i can not connect 802.1x Enterprise with peap gtc network
My friend has a Galaxy Ace he can connect same with 802.1x peap gtc network. his firmware also Android 2.2
I'm configuring same as he did but still can not connect it.
I don't know what is my Desire HDs problem?
can anybody help me?
I solved my problem
t is very sad that WPA2-Enterprise is not available to be configured in the WIFI-Settings dialog. But if you know how to configure it by hand you can get it to work. I want to use my schools WPA2-Enterprise so I tried it and found out how to get it working. I will explain my taken steps below so you can as well get it to work. The trick behind is that you edit the /data/misc/wifi/wpa_supplicant.conf by hand. In that file the configuration of the wifi-networks is saved. You need to add the following lines: (in my example for the HSR-Secure network)
network={
ssid="HSR-Secure"
key_mgmt=WPA-EAP
identity="<username without 'hsr\'>"
password="<your password>"
}
For those who don’t know how to do that here some more explanation. To edit the mentioned file above your phone has to be rooted. Than you need the Android SDK installed on your computer (we will need adb.exe). You need the usb cable to connect the phone to your computer. Open a command line shell and go to your android-sdk tools folder and then do the following (thanks to Thomas Kälin for this easier version):
# Copy the config file from the phone to your computer:
adb pull /data/misc/wifi/wpa_supplicant.conf C:/MyFolder
# Now Edit your wpa_supplicant.conf with your favorite editor and load it back to your phone:
adb push C:/MyFolder/wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf
Now go to the wifi settings in your phone. Turn wifi off and on again. It should successfully connect now. Here some pictures to show how it should look like when working.
android-hsr-secure android-hsr-secure2
I hope this helps some of you to get WPA2-Enterprise working.
Have fun surfing the internet with your phone at work/school .
Click to expand...
Click to collapse
Source: blog.pboos.ch/2009/04/android-using-wpa2-enterprise/
Yes finally got this working using the FULL WIFI App from the market. Thanks for the help I did use some suggestions.
maydin said:
I solved my problem
Source: blog.pboos.ch/2009/04/android-using-wpa2-enterprise/
Click to expand...
Click to collapse
Adding the password line worked perfectly.

Got Ad-hoc wifi working on my Xoom! (binaries inside)

I've managed to build a version of wpa_supplicant that has ad-hoc enabled, by forward porting the patch in this thread:
http://forum.xda-developers.com/showthread.php?t=754961
After building and a couple of tests, it works.
To install, you need a rooted Xoom, of course, and just push the file to system/bin/wpa_supplicant.
Because zipfiles don't store permission, you have to make it executable as well.
Code:
adb remount
adb push system/bin/wpa_supplicant /system/bin/wpa_supplicant
adb shell chmod 755 /system/bin/wpa_supplicant
I also had to change the permissions on /data/misc/wifi/wpa_supplicant.conf for some reason:
Code:
adb shell chown system.wifi /data/misc/wifi/wpa_supplicant.conf
Then reboot, and try it!
It works with my Nokia N8 with JoikuSpot; I can't tether it any other way as the N8 doesn't support the PAN Bluetooth profile, and Android doesn't support DUN.
Don't forget to backup your files, and I am not liable, etc, etc.
The code I used is here:
https://github.com/kelvie/android-wpa_supplicant
Ok heres what happened to me..
I was able to push the first file and when I input the adb shell code it said the device was not connected I am rooted and had no problems rooting or access shell before
So I got a little cocky and thought that the port 5037 that adb communicates with was blocked so I typed adb tcpip 5036 to see if I could get shell access on that port well now when I type adb remount it immediately tells me error: device not found....help!
Got myself stuck without wifi (error)
Thanks for developing such a great app. If i m not wrong i think its working with all 3G carriers.
You can also turn your Motorola Xoom tablets to WiFi hotspot without rooting by enabling setting which are given here http://goo.gl/mgwdn
Also my xoom has been in debug mode and now all of a sudden I noticed that its not entering debug mode when connected there used to a little icon come up and not anymore it acts like nothing yet i can access it on my computer by going my computer and I see Xoom
Ok I got debugging mode back and xoom is plugged in now my problem is when the daemon server starts in adb shell it starts on port 5038
So when I try to copy "adb shell chmod +x /system/bin/wpa_supplicant" it still says device not found and thats if I copy and paste it exactly if I type adb shell it gives me the # Symbol then i put it "chmod +x /system/bin/wpa_supplicant" and it says bad mode
One good thing is I can now type /remount again so what I am doing wrong still stuck without wifi ;\
Ok I've tried everything except reflash my devices I've literally only been able to do step 1 which leaves me with no wifi because i cannot execute the shell commands so please a little help it's been a long night messing with this appreciate your time and I'd love to get this working!
kelvie said:
I've managed to build a version of wpa_supplicant that has ad-hoc enabled, by forward porting the patch in this thread:
http://forum.xda-developers.com/showthread.php?t=754961
After building and a couple of tests, it works.
To install, you need a rooted Xoom, of course, and just push the file to system/bin/wpa_supplicant.
Because zipfiles don't store permission, you have to make it executable as well.
Code:
adb remount
adb push system/bin/wpa_supplicant /system/bin/wpa_supplicant
adb shell chmod +x /system/bin/wpa_supplicant
I also had to change the permissions on /data/misc/wifi/wpa_supplicant.conf for some reason:
Code:
adb shell chown system.wifi /data/misc/wifi/wpa_supplicant.conf
Then reboot, and try it!
It works with my Nokia N8 with JoikuSpot; I can't tether it any other way as the N8 doesn't support the PAN Bluetooth profile, and Android doesn't support DUN.
Don't forget to backup your files, and I am not liable, etc, etc.
The code I used is here:
https://github.com/kelvie/android-wpa_supplicant
Click to expand...
Click to collapse
Ok...I tried this and got the same "bad mode" error at the
"adb shell chmod +x /system/bin/wpa_supplicant" stage.
So, I instead did "adb shell chmod 700 /system/bin/wpa_supplicant" and that was successful, so I finished the steps listed and can see my cell on my Xoom. I have a Windows Mobile 6.5 cell and my Xoom can NOW see my ad-hoc network. Thanks a lot Kelvie.
If not for the SDCard update from BRD, I think this thread would be getting alot more attention.
Not to be too mistrusting, but I am hesitant about loading this on my Xoom when it is posted by a new user with only one post.
Fusius said:
Ok...I tried this and got the same "bad mode" error at the
"adb shell chmod +x /system/bin/wpa_supplicant" stage.
So, I instead did "adb shell chmod 700 /system/bin/wpa_supplicant" and that was successful, so I finished the steps listed and can see my cell on my Xoom. I have a Windows Mobile 6.5 cell and my Xoom can NOW see my ad-hoc network. Thanks a lot Kelvie.
Click to expand...
Click to collapse
Hey that worked instantly love you!
PengLord said:
If not for the SDCard update from BRD, I think this thread would be getting alot more attention.
Not to be too mistrusting, but I am hesitant about loading this on my Xoom when it is posted by a new user with only one post.
Click to expand...
Click to collapse
I completely understand where you're coming from; but check my github repo, and google for me, I do leave a small internet trail...
I (mostly used to, don't do much anymore but answer the odd email) maintain an open source project (Basket for KDE), and try to participate in open source communities as much as I can.
I just did this to tether my Xoom Wifi to my phone, as I had no other way to get internet on the go.
Nice work. I tried to do this myself last week but ran into trouble just getting wpa_supplicant from the Android git to compile (with or without the changes)
First off, wow man thank you so much. I've been playing with this for a while and I've tried a number of different wpa supplicant files but they failed to initiate a scan of wireless networks. I just tried this one and it works great. I wanted to explain a different way to install it however for the people having ADB issues.
First you want to turn off your wifi. I have used the ADB method a couple of times but I find it easier to use Root explorer. Save the file to your Xoom, Copy it using root explorer, navigate to the system/bin folder and click mount R/W then paste the file into the folder replacing the original (make sure to make a backup!) then long hold on the file and view permissions, check all the boxes in the first two columns and the first 2 in the last column. (chmod 775) You can then restart your wifi and enjoy ad-hoc networks (no reboot needed.)
I've done this a couple of times and it works great. Thanks again.
First off, thanks a ton to the OP for getting this working!
Also, thanks to mr_wrong_0 for the root explorer directions. Not that I'm incapable of using the command prompt, it was just easier to do it this way.
mr_wrong_0 said:
First off, wow man thank you so much. I've been playing with this for a while and I've tried a number of different wpa supplicant files but they failed to initiate a scan of wireless networks. I just tried this one and it works great. I wanted to explain a different way to install it however for the people having ADB issues.
First you want to turn off your wifi. I have used the ADB method a couple of times but I find it easier to use Root explorer. Save the file to your Xoom, Copy it using root explorer, navigate to the system/bin folder and click mount R/W then paste the file into the folder replacing the original (make sure to make a backup!) then long hold on the file and view permissions, check all the boxes in the first two columns and the first 2 in the last column. (chmod 775) You can then restart your wifi and enjoy ad-hoc networks (no reboot needed.)
I've done this a couple of times and it works great. Thanks again.
Click to expand...
Click to collapse
Thanks so much for this! No issues at all. Wifi Xoom is tethered to my HTC Hero now.
Congrats on a killer mod! We are making progress nice and steady.
Installed, works great.
Thank you.
Great, thanks for your hard word.
I do have a question for those how have done this hack. I currently have an old iPhone 3g with tetherme installed and use Bluetooth tethering to give my Xoom (wifi only) internet access. This works great for me.
Is there are speed/battery life advantage to using wifi tethering instead?
Cheers
I don't know for sure. From what I understand wifi is potentially faster than bluetooth, but it can vary from device to device. I have noticed that my Epic seems to stay cooler and use less battery when broadcasting an Ad-hoc network vs broadcasting in infrastructure mode (using wifi tether 3.0.) But I've never been able to get my phone to tether with bluetooth so I don't know about battery life. One advantage of connecting over wifi is file sharing via apps like wifi file explorer. I have used that a lot to transfer files between my Xoom and my phone as well as the computer.
Noob question
Hello all,
Thank you very much for the patch.
I would like to try it out, but before that, I need to make sure of one thing;
If I root my Xoom, will I still be getting future updates from Motorola for the device if there is one? Or once I root it, is it impossible for me to update them from the manufacturer?
Thank you!
Thanks so much to the OP! I've been waiting for a reason to root my wifi Xoom. SDCard access was tempting, but I think this is the thing that pushes me over the edge!!
Thanks!!

Connect an HTC desire to an ad-hoc network

Ok, i found this tutorial.
ott.net/knowledge/htc-desire-adhoc/
Installed apk and trying to terminal adb shell command and getting error
abd: not found
what is wrong?
this terminal i runned from phone not from pc..
You have to run adb from pc. A guide for installing it can be found in my signature.
TouchPaled from Oxygen with Transparent XDA App
I started adb shell and when enter:
insmod /system/lib/modules/bcm4329.ko
I have this error:
insmod: init_module '/system/lib/modules/bcm4329.ko' failed (Operation not permitted)
atlantisu21 said:
I started adb shell and when enter:
insmod /system/lib/modules/bcm4329.ko
I have this error:
insmod: init_module '/system/lib/modules/bcm4329.ko' failed (Operation not permitted)
Click to expand...
Click to collapse
I have spent some time yesterday trying the exact same thing, I didn't succeed.
For your question:
Try using the command "su" before starting insmod.
Also remember to assign execute permissions to iwconfig, else it will not work either!
I probably did something wrong (or it just doesn't work on my ROM (I'm on redux2)) because i couldnt get it to work.
Also the app ad-hoc (follow the links on his page i think) fails for me. Wifi will go to error state and only reboot makes it work again.
If you succeed please tell us how you did it because I'm veeery interested!
Doesn't work with su command...
I trying to change bcm4329.ko permission with root explorer but nothing happening.
Maybe this is the problem?
And where is located iwconfig file?
Can I change file permission from adb shell and how?
Finaly WORKS!!!!!!!!!!!!!!
Because, I cant enable ad hoc on my Desire (I try many ways and nothinhg...),
I found another way to share wifi internet from pc to android phone.
This is my way:
Download VirtualRouter
Download fresh wifi drivers for Windows 7 64bit/32bit
Disable IP6 (if you have Windows 7 64bit)
After install VirtualRouter, reset your PC and VirtualRouter will start with your Windows in system tray.
In Network Connections, enable Microsoft Virtual WiFi Miniport Adapter if disabled.
Go to Local Area Connection (your default internet connection), properties -> sharing and check all box. Select home network connection -> Microsoft Virtual WiFi Miniport Adapter or Wireless Network Connection 2.
Run cmd as admin and type this:
netsh wlan set hostednetwork mode=allow ssid=Test key=password
netsh wlan start hostednetwork
VR automaticly write ssid and key and starting virtual network.
Desire CAN SEE this network, and you CAN CONNECT!
If you have problems go here.
atlantisu21 said:
Finaly WORKS!!!!!!!!!!!!!!
Because, I cant enable ad hoc on my Desire (I try many ways and nothinhg...),
I found another way to share wifi internet from pc to android phone.
[
Click to expand...
Click to collapse
I work in the same way (with connectify)>
Too bad you couldn't get ad-hoc to work, i would like to have that solution, it is more elegant.

WiFi Connection Issues

Has anyone else noticed this problem:
After upgrading to an ICS leak (currently stock rooted FE22, although noticed so far on all leaks), my WiFi in the presence of a weak signal will stay connected, but not have an active data connection. For example, at work I get 1 bar of WiFi signal shown, and when I first connect I can use data over the WiFi network (market, browser, email, etc.) but after I let my phone sit at my desk for a while and go to use it again, it still shows it's connected to the WiFi network with 1 bar, but there is no data connection (can't communicate to market, browser, etc.). If I disconnect and reconnect to the WiFi network it will once again get active data for a period of time. I have the WiFi setting to always stay connected. If I set it to 'Only When Plugged In' it works fine because it reconnects when I wake it up, but I have a weak cellular signal at work, so this kills the battery faster during background data. It worked fine on the current OTA release of GB with the 'Always On' setting. Any insight/confirmation about this issue would be appreciated. Thanks!
Are you running a customized wpa_supplicant.conf? If so can you please send a copy by PM or copy/paste here after removing any info that you need to (SSID, pw, etc)? Might help understand what's going on - my PEAP/MSCHAPV2 does a "nod-off" but then comes right back up at times. Thought maybe it's a power saving feature as it only seems to happen at times of low demand for data.
I haven't modified anything at all and am running the unmodified FE22 leak, except for root. Here's what my wpa_supplicant.conf file says in its entirety:
from /system/etc/wifi:
update_config=1
ctrl_interface=wlan0
eapol_version=1
ap_scan=1
fast_reauth=1
p2p_listen_reg_class=81
p2p_listen_channel=1
p2p_oper_reg_class=81
p2p_oper_channel=11
from /data/misc/wifi:
ctrl_interface=wlan0
driver_param=use_p2p_group_interface=1
update_config=1
device_type=0-00000000-0
p2p_listen_reg_class=81
p2p_listen_channel=1
p2p_oper_reg_class=81
p2p_oper_channel=11
network={
ssid="HOME AP"
psk=<removed>
key_mgmt=WPA-PSK
priority=1
}
network={
ssid="WORK AP"
psk=<removed>
key_mgmt=WPA-PSK
priority=2
}
network={
ssid="attwifi"
key_mgmt=NONE
priority=3
}
CHeil402 said:
I haven't modified anything at all and am running the unmodified FE22 leak, except for root. Here's what my wpa_supplicant.conf file says in its entirety:
<snip>
Click to expand...
Click to collapse
Pretty straight forward... no surprises there. Do you keep the sleep setting normally as "Always On"? As I mentioned before I've seen mine nod off (go down to zero bars) and then reconnect - usually when the phone is idling.
*Edit* Noticed 3 lines missing from the default:
Code:
eapol_version=1
ap_scan=1
fast_reauth=1
If you're familiar with editing wpa_supplicant.conf you could try to add these lines in and see if it helps. Just don't forget to reset the permissions and ownership or it may give an error when starting the wi-fi.
garwynn said:
Pretty straight forward... no surprises there. Do you keep the sleep setting normally as "Always On"? As I mentioned before I've seen mine nod off (go down to zero bars) and then reconnect - usually when the phone is idling.
*Edit* Noticed 3 lines missing from the default:
Code:
eapol_version=1
ap_scan=1
fast_reauth=1
If you're familiar with editing wpa_supplicant.conf you could try to add these lines in and see if it helps. Just don't forget to reset the permissions and ownership or it may give an error when starting the wi-fi.
Click to expand...
Click to collapse
I tried adding these lines in /data/misc/wifiwpa_supplicant.conf, but then wifi wouldn't turn on. So I reverted back to the old one and now it still won't turn on! I used ES File Explorer to edit the text of the file, and set the permissions to rw-rw---- as it was before then restarted my phone. Any ideas?
CHeil402 said:
I tried adding these lines in /data/misc/wifiwpa_supplicant.conf, but then wifi wouldn't turn on. So I reverted back to the old one and now it still won't turn on! I used ES File Explorer to edit the text of the file, and set the permissions to rw-rw---- as it was before then restarted my phone. Any ideas?
Click to expand...
Click to collapse
Well, in a worst case, deleting it will force it to be copied and restore the service... but let's try something else first.
1) Turn off wi-fi (always needs to be off before modifying that file.)
2) inside adb shell please enter the following commands:
Code:
su
cd /data/misc/wifi
chmod 660 wpa_supplicant.conf
chown system.wifi wpa_supplicant.conf
3) Exit and turn back on wi-fi.
If it was the permissions this will fix it.
garwynn said:
Well, in a worst case, deleting it will force it to be copied and restore the service... but let's try something else first.
1) Turn off wi-fi (always needs to be off before modifying that file.)
2) inside adb shell please enter the following commands:
Code:
su
cd /data/misc/wifi
chmod 660 wpa_supplicant.conf
chown system.wifi wpa_supplicant.conf
3) Exit and turn back on wi-fi.
If it was the permissions this will fix it.[/QUOTE]
THANK YOU! Apparently, I forgot to set the ownership. I only changed the permissions. I also re-added the lines you mentioned. I'll have to see if that works... I'll let you know.
Click to expand...
Click to collapse
**UPDATE- Still no improvement. It will connect initially, and have active data. But then it will still show as connected with 1/3 WiFi bars, but no active data unless I disconnect and reconnect to the AP and then the same problem repeats itself.
OK, I'm having the same but in all fairness could be because I did 2 nodata updates. Will suggest if you can to backup your stuff and flash the full rooted version of FE22 and see if that fixes it - or hold tight and wait for OTA to drop if it's just nagging you and you don't want to do it now.

Categories

Resources