View Single Post
Posts: 215 | Thanked: 158 times | Joined on Jan 2010
#10
I saw some people complaining about this bug again in bugzilla and came back to revisit the problem. I have two N900s now and only one sim card so I always want the other to be on wifi.

hutchinsfairy - sorry I am not smart enough to get your script to work for me. Here is what happens when I run it:

Code:
$ sudo /usr/bin/run-standalone.sh ~/MyDocs/scripts/hutchinsfairy 'nasa'
Current connection: wlan0 IEEE 802.11bg ESSID:""
sh: IEEE: unknown operand
SSID "" not found

My old script does seem to still be more-or-less working for me, but I did not include enough information for anyone else to be able to use it too.

1) i don't know if there are any dependencies, except bash obviously

2) You have to manually replace my SSID with yours in two places in the script.

2a) In line 7, my ssid is nasa. Replace that with yours:

Code:
if [ $LIST = '"nasa"' ]; then
note both the single and double quotes around the ssid.

2b) The second-to-last line looks like this:

Code:
dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:5f027850-3445-4eef-ac3f-76b423515990 uint32:0
we are concerned about the part in the middle that says:

Code:
string:5f027850-3445-4eef-ac3f-76b423515990
that somehow identifies the wifi network to connect to. I don't know why, and I haven't figured out a way to replace that with something simple, like the ssid, BUT you can replace that long string with the one for your network. Open a terminal and type:

Code:
gconftool -R /system/osso/connectivity/IAP
That will list a bunch of info about all your networks, search through it and find the IAP string for your wifi network and paste it into the script over mine. Then save.

(I had better luck connecting to the network and then using the gconftool command and near the top there is a line that says "last used network: blahblahblah". I used that string.)

3) you need to have a folder under MyDocs called scripts. put the script there.

4) To run the script, type:

Code:
sudo bash nameofscript
5) if it works, use alarmd to run the scripts routinely during business hours.

6) if you test it, let us know how it went.

Last edited by Flynx; 2011-10-20 at 23:39.