Hi All, trying to nail down this issue with ethernet/wifi and dhcp, it looks like it tracks back to fa-network-service and how it handles calling dhcpcd, if there is a cable connected and it can get an IP address, then dhcpcd works correctly for the wifi when it's service gets called as well. But if the cable is unplugged, dhcpcd called by fa-network-service fails to get an IP address, I believe this causes dhcpcd to continue running until after the wifi dhcpcd service is called, which causes the wifi dhcpcd service to fail, this also sets up a condition where the wifi dhcpcd service will continuously restart because of the way it's setup to try and recover, because dhcpcd started by fa-network-service is still running. Is there any chance Friendly Arm can give us instructions on how to setup fa-network-service? Or provide the source code? I know that it does stuff in data/system/fa_network.conf but can't see how to configure it. Regards, Reggie.
How do we configure fa-network-service?
Hi Reggie, Still no response on this. I have found that the power to the WiFi (GPJ3_5) on the Mini210 gets disconnected after about 6 mins of inactivity. I have been sifting through the source code of the Kernel and Android trying to find out where this happens. So far I have only found the setup for this GPIO port for the mini210 init in file mach-mini210.c I can't seem to find any source for the WiFi and wondering if FriendlyArm provide this as pre-built only. Dave...
I guess it depends on the rootfs for a start, winCE I have no idea about, linux should be easier to control (there are most likely drivers knocking around, it's a fairly common chipset), not sure about android but it will have power saving stuff going as a default.
Hi Reggie, I am still hunting through the Android and Kernel source and still have not found which driver actually controls the GPIO port to the WiFi chipset. I know it is being powered down as I can see the GPIO output going low with a scope. I can see were is gets enabled but not when it goes low. This is a nightmare. The issue is that even when I get notification that the WiFi is down, I can't bring it back up with any Android calls unless I type in NETCFG WLAN0 UP via the debug port. Then it comes up and remains for 6 mins as before. Only good thing is that I am learning more about the Android kernel in the process! :) Dave...
are you sure it's not just the natural 'sleep' function in android? if it is, then you just need to set a 'wakelock' on the thing ot prevent it going to sleep.
No. If I set a wakelock so that the system never enters sleep, the LCD then remains on and the system is at full power but the WiFi still drops after 6 mins of no activity. This would normally not be a problem as I should be able to wake it up again from code. Android allows this if you have the permissions set. The trouble is that the code to do this has no effect because it does not bring up the power to the WiFi device. I just see lots of "Failed to initial AP scan" messages in logcat. netcfg still shows the WLAN0 as down at this point. This must be in FA_NETWORKS as I can't find any code so far that is doing the power down. Nothing in power.c etc. Thanks goodness I am lacking in hair already! :) Dave...
what happens if you manually call dhcpd after the wifi has died? I seem to recall something stupid where dhcpd was called twice (once for eth0 and once for wifi), I wonder if it's trying to re-call it but can't because the original call to dhcpd is still running?
Hi Reggie, Something very interesting tonight. I got my SDIO WiFi plugged into my Tiny210CAP board and the WiFi on that stays active with no applications running. I saw something on the Wiki about FriendlyArm working on a fix for DHCP with WiFi and wondering if they fixed this in 4.0.3 that is running on the Tiny210CAP. It also starts the WiFi on bootup too if already working before switching off. This is encouraging. I would switch my development to the Tiny210CAP but for the lack of GPIO on that board I cannot. Dave...