Latest product reviews |
---|
![]() |
![]() |
Smartphones ![]() |
TV Connect ![]() |
![]() |
ClockworkMod (CWM) Recovery easy install for RK3066 and RK3188 -- TWRP/CWM Flash-Tool and root for RK3288
Please donate to support OMA and CrewRKTablets firmware work, thank you !


Contributor
2013/07/09

I'm porting RK3188 JB kernel to KK. Pretty much everything works fine, but I'm having problems with wifi module. Logcat returns the following errors:
E/WifiHW ( 426): wifi_load_driver: get wifi_ifname(PRIMARY) fail
E/WifiHW ( 426): wifi_power_ctrl(0)
E/WifiHW ( 426): wifi_power_ctrl: open(/sys/class/rkwifi/power) for write failed: Permission denied (13)
D/SoftapController( 109): Softap fwReload - Ok
W/CommandListener( 109): Failed to retrieve HW addr for wlan0 (No such device)
D/CommandListener( 109): Setting iface cfg
E/WifiStateMachine( 426): Unable to change interface settings: java.lang.IllegalStateException: command '9 interface setcfg wlan0 0.0.0.0 0 down' failed with '400 9 Failed to set address (No such device)'
D/WifiHW ( 426): check_wifi_ifname_from_proc: find lo
D/WifiHW ( 426): check_wifi_ifname_from_proc: find sit0
D/WifiHW ( 426): check_wifi_ifname_from_proc: find ip6tnl0
E/WifiHW ( 426): update_ctrl_interface: get wifi_ifname(PRIMARY) fail
D/WifiHW ( 426): check_wifi_ifname_from_proc: find lo
D/WifiHW ( 426): check_wifi_ifname_from_proc: find sit0
D/WifiHW ( 426): check_wifi_ifname_from_proc: find ip6tnl0
E/WifiHW ( 426): update_ctrl_interface: get wifi_ifname(PRIMARY) fail
E/WifiHW ( 426): Wi-Fi will not be enabled
E/WifiStateMachine( 426): Failed to start supplicant!
E/WifiStateMachine( 426): wifi sta open fail, disable
D/WifiService( 426): setWifiEnabled: false pid=426, uid=1000
I suspect that the problem might be resolved by compiling rtl8188eu module against existing kernel source, however there are some differences between jellybean and kitkat kernels that I don't understand. In JB sources folder drivers/net/wireless/rkusbwifi/rtl8188eu contains only Kconfig with the following lines:
config RTL8188EU
tristate "Realtek 8188EU USB WiFi Support"
select WIRELESS_EXT
select WEXT_PRIV
select IEEE80211
---help---
Help message of RTL8188EU & RTL8189ES
On the other hand, in KitKat same folder contains full source for rtl8188eu and the module is built into kernel. Now the question is: why is the kernel module 8188eu.ko still present in /system/lib/modules in the firmware if the module is built into kernel? If it's built-in then there should be no need for an external module.
Another question is: if the external module is needed, then how do I compile it? I tried cross-compiling but I always ended up with "modpost 0 modules" for some reason.
Here is my defconfig, if it helps.
P.S.: Happy holidays!


Contributor
2013/07/09

Ok, so apparently Rockchip SDK is a mess. They decided to include 8188 sources into the kernel in this commit, however wifi supplicant still depends on the external module for some reason.
I've updated wireless drivers to the latest stable-3.0 linux-rockchip branch and I can get wifi working now:
# insmod /system/lib/modules/8188eu.ko
# cat /sys/kernel/debug/usb/devices
...
T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0bda ProdID=0179 Rev= 0.00
S: Manufacturer=Realtek
S: Product=802.11n NIC
S: SerialNumber=08D833303245
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=rtl8188eu
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
...
# svc wifi enable
# iwconfig
lo no wireless extensions.
sit0 no wireless extensions.
ip6tnl0 no wireless extensions.
iw_get_stats return success.
wlan0 unassociated Nickname:"<WIFI@REALTEK>"
Mode:Auto Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=0/100 Signal level=0 dBm Noise level=0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
iw_get_stats return success.
wlan1 unassociated Nickname:"<WIFI@REALTEK>"
Mode:Auto Frequency=2.412 GHz Access Point: Not-Associated
Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=0/100 Signal level=0 dBm Noise level=0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
However, I have to insmod the module manually and I can't enable wifi from gui. This is the logcat output after I toggle wireless switch:
I/dalvikvm( 1419): DexOpt: not all deps represented
E/dalvikvm( 1419): /system/framework/svc.jar odex has stale dependencies
D/dalvikvm( 1419): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
E/memtrack( 1419): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1419): failed to load memtrack module: -2
D/AndroidRuntime( 1419): Calling main entry com.android.commands.svc.Svc
D/WifiService( 429): setWifiEnabled: true pid=1419, uid=0
D/AndroidRuntime( 1419): Shutting down VM
E/WifiHW ( 429): wifi_power_ctrl(1)
D/dalvikvm( 1419): GC_CONCURRENT freed 95K, 16% free 560K/660K, paused 9ms+2ms, total 20ms
E/BluetoothAdapter( 622): Bluetooth binder is null
D/dalvikvm( 622): GC_CONCURRENT freed 279K, 12% free 4166K/4708K, paused 9ms+20ms, total 123ms
D/WifiHW ( 429): check_wifi_ifname_from_proc: find lo
D/WifiHW ( 429): check_wifi_ifname_from_proc: find sit0
D/WifiHW ( 429): check_wifi_ifname_from_proc: find ip6tnl0
D/WifiHW ( 429): check_wifi_ifname_from_proc: find wlan0
D/WifiHW ( 429): check_wifi_ifname_from_proc: find wlan1
D/SoftapController( 110): Softap fwReload - Ok
D/CommandListener( 110): Setting iface cfg
D/CommandListener( 110): Trying to bring down wlan0
D/WifiHW ( 429): check_wifi_ifname_from_proc: find lo
D/WifiHW ( 429): check_wifi_ifname_from_proc: find sit0
D/WifiHW ( 429): check_wifi_ifname_from_proc: find ip6tnl0
D/WifiHW ( 429): check_wifi_ifname_from_proc: find wlan0
D/WifiHW ( 429): check_wifi_ifname_from_proc: find wlan1
...
D/WifiHW ( 429): check_wifi_ifname_from_proc: find ip6tnl0
D/WifiHW ( 429): check_wifi_ifname_from_proc: find wlan0
D/WifiHW ( 429): check_wifi_ifname_from_proc: find wlan1
E/WifiHW ( 429): wifi_start_supplicant get wifi_ifname(SECONDARY) fail
E/WifiStateMachine( 429): Failed to start supplicant!
E/WifiStateMachine( 429): wifi sta open fail, disable
D/WifiService( 429): setWifiEnabled: false pid=429, uid=1000
Enabling wireless from GUI works fine with the kernel under android 4.2.2, but not in 4.4.4. Any ideas?


Contributor
2013/07/09

Well, problem solved by using a precompiled libhardware_legacy with overrides for insmod and rmmod functions. The 8188eu.ko module is indeed redundant and can be safely removed from the system if the module is built-in. No idea why it's left there, I guess rockchip sdk is a joke.
.. I just love talking to myself in this thread -__-
The following users say thank you to lujji for this useful post:
ADz83

Contributor
2013/04/01

Hi lujji, I see you are using g7 KK kernel as a base for the port. I have a newer RK source in my github ready for Android 4.4.4 in case you need it, though I don't think it changes too much, but in case you want to take a look at it.
The following users say thank you to skelton for this useful post:
lujji

Contributor
2013/07/09

Hi skelton, your G7 repo was very helpful Porting the kernel was easier than I expected, but still not a piece of cake. I actually thought that g7 was also 4.4.4 but it's not a big deal, I try to update parts of the kernel to the linux-rockchip stable branch anyway.
If tincore agrees to let me pack slightly outdated versions of his Keymapper and Quickflasher apps, then I'll publish a rom with the new kernel.
I'm a bit concerned with battery indication, stock KK kernel had a random number generator instead. In JB I used BATTERY_RK30_ADC config but it is no good in KK, so I switched to BATTERY_RK30_ADC_FAC because it allows me to set voltage divider values. Indication is better but seems slightly off.
Which option would you recommend? I looked at your G5 defconfig and I can find neither of theses definitions.


Contributor
2013/04/01

To be honest I have never changed anything related to battery, so I didn't know g5a came with no defintions at all.
However in g7 it comes with:
CONFIG_BATTERY_RK30_ADC_FAC=y
CONFIG_BATTERY_RK30_VOL3V8=y
But g7 and g5a use different boards, so I suppose it depends on the board.
in g5a, g58 and q88+ it comes with no definition, unless it is controlled by:
CONFIG_POWER_RT5025=y , though Í think 7800 does not use rt5025 regulator.
So honestly no idea which one can be used in 7800, I am afraid only choice is to keep trying with the different options.
Or look for another source of a device that use the phonepad board to see a better reference.
The following users say thank you to skelton for this useful post:
lujjiMost Users Ever Online: 749
Currently Online: Daryel
96 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Devices in use: Desktop (87), Phone (9), Tablet (1)
Top Posters:
finless: 604
DarthJabba: 551
maikal: 394
mussonero1: 350
alex: 252
damo: 243
DanielVd: 237
Mark06: 222
Newest Members:
dubsiki
dubsi
vblxcimdwqgcztgrve
billcamp1984
simoxor33
kontra007
Forum Stats:
Groups: 10
Forums: 185
Topics: 6037
Posts: 60500
Member Stats:
Guest Posters: 43
Members: 262194
Moderators: 5
Admins: 1
Administrators: admin
Moderators: globula_neagra, exelletor, JochenKauz, Oma7144, cracktech
CrewRKTablets moderators: JochenKauz and Astralix