My team is developing an application that will be used by tech- clueless consumers. All data is displayed in a portrait screen orientation, and our application is intended to run directly from startup in place of the default Hildon launcher.

Because of this, we need to provide our own UI for selecting a WLAN connection. We've tried using both LIBOSSO and Linux wireless tools without success.

#####libosso using python
        import osso
        osso_c=osso.Context("wifi","0.0.1",False)
ret=osso_c.rpc_run("com.nokia.icd","/com/nokia/ icd","com.nokia.icd","get_ipinfo",wait_reply=True,use_system_bus=True)
#####lend python

It always seems to complain about an interface not found (or something similar like that). We've tried many variants of this without success: ret=osso_c.rpc_run("com.nokia.icd","/com/nokia/ icd","com.nokia.icd","connect",rpc_args=[name, 1],wait_reply=True,use_system_bus=True)

Our second approach was to write code that will bring up the wlan network and then scan for hotspots:
#####file wifi_scan.sh
        sudo gainroot < /sbin/ifconfig wlan0 down
        /sbin/ifconfig wlan0 up
        /usr/sbin/iwlist wlan0 scanning
        END

Here's the code that will connect to the network (at least partially):
#####file wifi_connect.sh
        sudo gainroot < /usr/sbin/iwconfig wlan0 essid $1
        /usr/sbin/iwconfig wlan0 key $2
        /usr/sbin/iwconfig wlan0 commit
        END

Running it as ./wifi_connect.sh MyNetworkSid MyWEPpassword works, except that when geting the wifi info (using /usr/sbin/iwconfig or / sbin/ifconfig) it doesn't seem to assign an IP address to the network interface (or at least something is preventing the internet from working).

Assuming that the problem with the wifi_connect.sh script is that the DHCP isn't working, then there may be extra logic needed to link to dhcp server on the router…. There is code under /etc/udhcpc/ that appears to drive the assignment of ip addresses to the Nokia via DHCP from the network you become connected to. We haven't been able to get it to do anything useful. There is some vague info on this directory at http:// stefans.datenbruch.de/nokia770/.

The only other last-ditch idea we've thought about (and we have no idea if this is even remotely feasible) was to use the built-in Connection Manager, but hide it behind our application's window and somehow send stylus click events to it.

Right now, this mailing list is all that stands between us and dropping support for wifi connectivity in our application (ouch).

Your wise counsel is humbly sought,
Scott_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to