New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wifi isn't working on Galaxy S II #19
Comments
A bunch of vendor files are missing From a clean device: ~/workspace/android-sdk-mac_x86/platform-tools/adb pull /system/etc/wifi/bcm4330_aps.bin . Then on B2G mount -o remount,rw /system and ~/workspace/android-sdk-mac_x86/platform-tools/adb push bcm4330_aps.bin /system/etc/wifi Reboot and wpa_supplicant starts crashing. A wpa_supplicant from a production rom crashes as well, so something else must be wrong. Here is the crash btw: E/WifiHW ( 2683): Supplicant not running, cannot connect |
This looks like a permission issue. The current config is read from /data/misc/wifi and /data/system/, and the wpa_supplicant runs as user wifi and it seems the java part can't attach to the socket. http://blog.linuxconsulting.ro/2010/04/porting-wifi-drivers-to-android.html The driver and the wpa_supplement exec are ok otherwise. Still trying to make it work. |
Alright, so android really wants to talk to wpa_supplicant at E/WifiHW ( 4340): Unable to open connection to supplicant on "/data/system/wpa_supplicant/eth0": No such file or directory but all the config is in /data/misc/wifi (including eth0), so all we really need is a link from /data/misc/wifi to /data/system/wpa_supplicant I also added some stuff to init.rc while experimenting but thats likely not needed: mkdir /system/etc/wifi 0770 wifi wifi wpa_supplicant socket (unix socket mode)mkdir /data/system/wpa_supplicant 0771 wifi wifi someone should reproduce this with minimal steps and post them here @cgjones? |
Something is still wonky, dhcp fails, but I get network scans and the PSK auth completes V/WifiStateTracker( 5008): Changing supplicant state: SCANNING ==> DORMANT |
Yeah its dhcpcd E/WifiStateTracker( 5008): DHCP request failed: Timed out waiting for dhcpcd to start |
I can bring up the interface by hand and it works just fine (PSK works too) ifconfig eth0 192.168.1.120 netmask 255.255.255.0 route 192.168.1.1 up dhcpcd still doesn't like me, but this should be fixable there is definitely nothing wrong with the supplicant |
I can reproduce the issue of wpa_supplicant crash with following message: The reason is, wpa_supplicant created control socket at /data/misc/wifi but libhardware_legacy/wifi/wifi.c connecting it at /data/system/wpa_supplicant. One solution is to modify libhardware_legacy/wifi/wifi.c to use correct path. |
Nice diagnosis. Thank you. mrbkap, can you take a look? We should pull the library off the device when we configure and then put it in the right spot. |
Again, it seems we have to use "libnetutils.so" from original S2 device. Now the whole wifi is working on my S2. |
This is really sad, I have no idea what Samsung was thinking. For now it probably makes sense to use the custom binaries from the device and not mess with this. @mrbkap? |
Below are files needed from original S2 device to make wifi working on my S2.
|
I basically did what shianyow said in joneschrisg/android_device_samsung_galaxys2@10b8906 |
Did you merge your changes? I don't see them in the tree. |
After the merge, I get this error running |make config-galaxy-s2| remote object '/system/etc/wifi/bcm4330_aps.bin' does not exist Was that file needed? I'll try removing it from extract-files.sh tomorrow. |
After removing the _aps.bin file and reflashing, I get http://pastebin.mozilla.org/1370728 in logcat, and my sgs2 stays hung at the start screen ("yellow triangle"). Looks like netd is failing to start and preventing the startup process from succeeding. |
Fixed my problems in 046c243 (firmware too old). Let's close this out now. |
Can anyone guide me how to fix this porblem on 2.3.4 XXKI4? |
There's a message about not being able to find a /system/etc/wifi/bcm[something].cfg file, and after that there are error messages from the wpa_supplicant. Wifi acts like it's enabled, but no scans succeed.
The text was updated successfully, but these errors were encountered: