[Commotion-dev] Boilerplate Android code pushed

Hans-Christoph Steiner hans at at.or.at
Tue Feb 7 03:16:55 UTC 2012


I've tried now wiping the cache and doing a whole system update, and still no luck.  I haven't tried wiping the data yet.

- after a reboot, tiwlan0_drv is not loaded
- insmod /system/lib/modules/tiwlan_drv.ko works fine
- after insmod, "Wireless & network settings" says: Wi-Fi Error
- /system/bin/wlan_loader -f /system/etc/wifi/fw_wlan1271.bin -e /proc/calibration -i /system/etc/wifi/tiwlan.ini gives me:
   Set property wlan.driver.status = ok - Fail

If you want, I can hook this phone up to a computer where I can give you a shell, and you can hunt around. Its even got a Debian chroot on it, you can get a full Debian shell by running /data/local/bin/debian, thanks to LilDebi.apk.  :)

.hc

On Feb 2, 2012, at 8:26 PM, Jeremy Lakeman wrote:

> We've got a lot of cheap Huewai IDEOS phones, CPU and flash is quite
> slow and they have ridiculously tiny screens.
> 
> Samsung galaxy's work quite well, at least with the stock firmware.
> I've also seen them work with CM, so I assume those roms have the same
> driver files in the same locations so we aren't hitting the same
> issue.
> 
> If we can disable our "generic" profile for CM phones, we could work
> towards supporting the built in modified wpa supplicant. We shouldn't
> actually need to load the wifi driver ourselves since Cyanogen
> supports joining adhoc networks anyway. Not sure if we can initiate a
> network though.
> 
> I wonder if your phone is having trouble loading the (at a guess)
> tiwlan_drv.ko module.
> 
> On stock Droids we do something like;
> insmod /system/lib/modules/tiwlan_drv.ko
> /system/bin/wlan_loader -f /system/etc/wifi/fw_wlan1271.bin -e
> /proc/calibration -i [path]/tiwlan.ini
> Then use ifconfig / iwconfig to get the network running
> 
> If you have firmware binaries in different places we wouldn't use this
> script and would fall back to trying "generic"
> 
> On Fri, Feb 3, 2012 at 11:25 AM, Hans-Christoph Steiner
> <hans at guardianproject.info> wrote:
>> 
>> I poked around a little bit, my /data/misc/wifi/wpa_supplicant.conf file
>> seems intact.  "netcfg tiwlan0 up" and down no longer work, it tells me:
>> 
>> # /system/bin/netcfg tiwlan0 up
>> action 'up' failed (No such device)
>> 
>> I rebooted and cleared the cache, no luck there. I'll try flashing CM7.1
>> again.  Do you have a phone you recommend for wifi hacking with Android?
>> We have a good collection, so we probably have a better one than a
>> Droid/Milestone running CM7.1.
>> 
>> .hc
>> 
>> 
>> On 02/02/2012 04:58 PM, Jeremy Lakeman wrote:
>>> Ah, we've had some strange reports like that from CM7 users.
>>> No we don't write over any files in the system folder. At least not directly.
>>> We'll probably end up trying to use our "generic" chipset profile
>>> which will try to call /system/lib/libhardware_legacy.so
>>> wifi_load_driver() / wifi_unload_driver().
>>> CM7 seems to include this library, but using it might be the cause of
>>> this issue. We haven't flashed CM7 onto any of our phones yet to test
>>> what the root cause is.
>>> You may need to boot into recovery mode and clear the cache, or worst
>>> case do a factory reset.
>>> 
>>> On Fri, Feb 3, 2012 at 3:48 AM, Hans-Christoph Steiner
>>> <hans at guardianproject.info> wrote:
>>> 
>>> I got it running on my Droid with CM7.1, but then I couldn't make it
>>> stop running ;)  Every time I turned on my wifi since setting up
>>> Serval, the Serval app would then show up and turn it back off.  I
>>> first clicked the "Suspend" button, and it turned to "Start".  I then
>>> clicked "Reset".  I then force closed it, and cleared the data.
>>> 
>>> Now I've removed it entirely, and my wifi isn't working any more.  It
>>> turns on, but never scans for any networks and it seems to have
>>> cleared all the saved networks in my phone.  I cannot manually add
>>> networks either.
>>> 
>>> Does this app mess with the wpa_supplicant.conf that comes with the
>>> phone, or any of the standard Android files?
>>> 
>>> .hc
>>> 
>>> On 01/10/2012 10:08 PM, Jeremy Lakeman wrote:
>>>>>> If that process completely locks up (and it can) you may need to
>>>>>> force close the application or reboot. After that it will disable
>>>>>> running the same process for turning on adhoc mode.
>>>>>> 
>>>>>> Let me know if you manage to get past that step, or you are still
>>>>>> having issues.
>>>>>> 
>>>>>> On Wed, Jan 11, 2012 at 1:14 PM, Hans-Christoph Steiner
>>>>>> <hans at at.or.at> wrote:
>>>>>>> 
>>>>>>> A little bug report, in case you're interested:
>>>>>>> 
>>>>>>> I just downloaded Serval Mesh from the Marketplace on my Droid
>>>>>>> running CM7.1.  It gets thru "Unpacking the stuff I need",
>>>>>>> "Checking for root access", and "I think I know how to control
>>>>>>> your wifi", then says "Skipped check for experimental support
>>>>>>> since we already support your handset.", and gets stuck on "Test
>>>>>>> if WiFi control works".  It just seems to try again and again.
>>>>>>> 
>>>>>>> .hc
>>>>>>> 
>>>>>>> On Jan 10, 2012, at 6:54 PM, Jeremy Lakeman wrote:
>>>>>>> 
>>>>>>>> Serval's software is available here
>>>>>>>> https://github.com/servalproject/batphone The specific pieces
>>>>>>>> you might want to look at are;
>>>>>>>> 
>>>>>>>> data/conf/wifichipsets/
>>>>>>>> src/org/servalproject/system/ChipsetDetection.java
>>>>>>>> src/org/servalproject/system/WiFiRadio.java
>>>>>>>> 
>>>>>>>> and the edify scripts are interpreted by (including the call
>>>>>>>> to libhardware_legacy wifi_load_driver / wifi_unload_driver);
>>>>>>>> native/adhoc-edify/
>>>>>>>> 
>>>>>>>> (The data directory is zipped in the build process, and
>>>>>>>> unzipped by our first run process into
>>>>>>>> /data/data/org.servalproject)
>>>>>>>> 
>>>>>>>> And the apk is available on the market;
>>>>>>>> https://market.android.com/details?id=org.servalproject
>>>>>>>> 
>>>>>>>> This approach works with a fair number of stock (but rooted)
>>>>>>>> handsets. We haven't gotten around to trying to using wifi
>>>>>>>> supplicants that already support adhoc mode.
>>>>>>>> 
>>>>>>>> On Wed, Jan 11, 2012 at 9:45 AM, Hans-Christoph Steiner
>>>>>>>> <hans at at.or.at> wrote:
>>>>>>>>> 
>>>>>>>>> Wow, that sounds quite elaborate, I'd like to see it in
>>>>>>>>> action :)  Can you point us towards the code that is doing
>>>>>>>>> all this?
>>>>>>>>> 
>>>>>>>>> My guess is that the level of detail will be needed to handle
>>>>>>>>> a lot of cases, but I think we have a good chance of
>>>>>>>>> simplifying things in the long run by including our own
>>>>>>>>> binaries in the app for things that are not kernel mods.
>>>>>>>>> 
>>>>>>>>> I'd love to find a way to include kernel mods that work
>>>>>>>>> across kernel versions, but I have not found a way to do
>>>>>>>>> that.  It must be possible, since people like nvidia are
>>>>>>>>> shipping binary kernel mods that work across a number of
>>>>>>>>> kernel versions.
>>>>>>>>> 
>>>>>>>>> .hc
>>>>>>>>> 
>>>>>>>>> On Jan 10, 2012, at 5:28 PM, Jeremy Lakeman wrote:
>>>>>>>>> 
>>>>>>>>>> Getting Adhoc and olsrd running is something the Serval
>>>>>>>>>> Mesh software is already trying to do. We default to BATMAN
>>>>>>>>>> but we have a setting to run olsr instead.
>>>>>>>>>> 
>>>>>>>>>> We started with wifi tether's adhoc support and have tried
>>>>>>>>>> to improve on it. We've written a generic approach to
>>>>>>>>>> discovering how to control the wifi driver on each handset.
>>>>>>>>>> For the handsets that need something different, we've got a
>>>>>>>>>> bunch of text files describing file names we should be
>>>>>>>>>> looking for, and a matching control script.
>>>>>>>>>> 
>>>>>>>>>> But if we don't have a specific script that matches this
>>>>>>>>>> handset, we look through the filesystem looking for *.ko.
>>>>>>>>>> Then read through every short script in /system looking for
>>>>>>>>>> insmod commands and any arguments that we need to pass
>>>>>>>>>> through. And we've got a fallback method that tries a load
>>>>>>>>>> driver library call that may or may not work.
>>>>>>>>>> 
>>>>>>>>>> Hopefully one of these approaches will succeed.
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> On Wed, Jan 11, 2012 at 7:11 AM, Hans-Christoph Steiner
>>>>>>>>>> <hans at at.or.at> wrote:
>>>>>>>>>>> 
>>>>>>>>>>> Hey Brian,
>>>>>>>>>>> 
>>>>>>>>>>> I briefly checked out your code, I'll dig in more soon.
>>>>>>>>>>> Did you get ad-hoc mode running after all?  I assume so
>>>>>>>>>>> since you said you got olsrd running.  Apparently, on
>>>>>>>>>>> some devices, you have to replace the wpa_supplicant
>>>>>>>>>>> binary in order to get ad-hoc mode working:
>>>>>>>>>>> http://forum.xda-developers.com/showthread.php?t=929865
>>>>>>>>>>> 
>>>>>>>>>>> Cyanogenmod seems to include everything needed to run
>>>>>>>>>>> ad-hoc though.
>>>>>>>>>>> 
>>>>>>>>>>> I just found this, which looks like it should provide us
>>>>>>>>>>> with some useful code:
>>>>>>>>>>> http://code.google.com/p/adhoc-on-android/
>>>>>>>>>>> 
>>>>>>>>>>> On approach that might work for us is to include our own
>>>>>>>>>>> custom wpa_supplicant in the app.
>>>>>>>>>>> 
>>>>>>>>>>> .hc
>>>>>>>>>>> 
>>>>>>>>>>> On Jan 10, 2012, at 2:47 PM, Brian Duggan wrote:
>>>>>>>>>>> 
>>>>>> Hi Commoters,
>>>>>> 
>>>>>> I've been doing some preliminary work on getting olsrd to work in
>>>>>> a user-friendly way on Android. The first challenge is creating an
>>>>>> ad-hoc interface. Google doesn't support this, and doesn't look
>>>>>> like they will support ad-hoc because they feel WiFi Direct is
>>>>>> functions as a replacement. See bug 82:
>>>>>> 
>>>>>> http://code.google.com/p/android/issues/detail?id=82
>>>>>> 
>>>>>> I pushed some code to the redux branch of the commotion-android
>>>>>> repository. It's half code, half comments describing what will need
>>>>>> to be done to automate the entire process of creating an ad-hoc
>>>>>> interface the Android Way.
>>>>>> 
>>>>>> It doesn't address current olsrd incompatibility with some Android
>>>>>> wifi drivers, namely the dhd driver. To date, I've only been able
>>>>>> to get olsrd to run stably on devices using the bcm4325 driver.
>>>>>> 
>>>>>> Check it out, if you're interested:
>>>>>> 
>>>>>> git clone -b redux
>>>>>> git://git.chambana.net/commotion/commotion-android
>>>>>> 
>>>>>> The master branch is still an Android Wifi Tether overlay, but will
>>>>>> get olsrd up and running on bcm4325 (and other non-dhd?) devices.
>>>>>> Some testing would be appreciated here. It would be great to start
>>>>>> probing which devices olsrd works on and which don't.
>>>>>> 
>>>>>> Thanks! Brian
>>>>>> 
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Commotion-dev mailing list
>>>>>>>>>>>> Commotion-dev at lists.chambana.net
>>>>>>>>>>>> http://lists.chambana.net/mailman/listinfo/commotion-dev
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>>> 
>>> -
>>> ----------------------------------------------------------------------------
>>>>>>>>>>> 
>>>>>>>>>>> Man has survived hitherto because he was too ignorant to
>>>>>>>>>>> know how to realize his wishes.  Now that he can realize
>>>>>>>>>>> them, he must either change them, or perish.    -William
>>>>>>>>>>> Carlos Williams
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Commotion-dev mailing list
>>>>>>>>>>> Commotion-dev at lists.chambana.net
>>>>>>>>>>> http://lists.chambana.net/mailman/listinfo/commotion-dev
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Commotion-dev mailing list
>>>>>>>>>> Commotion-dev at lists.chambana.net
>>>>>>>>>> http://lists.chambana.net/mailman/listinfo/commotion-dev
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> ----------------------------------------------------------------------------
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>> There is no way to peace, peace is the way.       -A.J. Muste
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> _______________________________________________ Commotion-dev
>>>>>>>> mailing list Commotion-dev at lists.chambana.net
>>>>>>>> http://lists.chambana.net/mailman/listinfo/commotion-dev
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> ----------------------------------------------------------------------------
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>> I have always wished for my computer to be as easy to use as my
>>> telephone; my wish has come true because I can no longer figure out how
>>> to use my telephone."  --Bjarne Stroustrup (creator of C++)
>>>>>>> 



----------------------------------------------------------------------------

I spent 33 years and four months in active military service and during that period I spent most of my time as a high class muscle man for Big Business, for Wall Street and the bankers.      - General Smedley Butler




More information about the Commotion-dev mailing list