maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   How to connect to specific wlan in Terminal (dbus, iwconfig?) (https://talk.maemo.org/showthread.php?t=43685)

rooted 2010-02-07 20:05

How to connect to specific wlan in Terminal (dbus, iwconfig?)
 
I would like to schedule connection to specific wlans with fcron method (http://talk.maemo.org/showthread.php?t=38417). For example: connect every day at 6 pm to wlan "Home".

But I don't know which dbus call to use to connect to specific wlan (which is saved in N900). I suspect this is not possible so I was thinking further, to do it via iwconfig (wireless tools), but in a way that it would be integrated well in Maemo. dbus calls work superb so I would prefer this option. However, I couldn't find anything useful with dbus-monitor.

techdork 2010-02-07 20:27

Re: How to connect to specific wlan in Terminal (dbus, iwconfig?)
 
One could easily script this in bash and run it as a cron... dbus isn't needed.

Matan 2010-02-07 23:50

Re: How to connect to specific wlan in Terminal (dbus, iwconfig?)
 
It is possible. See here for example.

http://www.mail-archive.com/maemo-us.../msg02507.html

You might (depending upon use case) to send a disconnect command first, since connect command is ignored if already connected.

Note that you don't use connection name, but connection ID.

rooted 2010-02-08 17:01

Re: How to connect to specific wlan in Terminal (dbus, iwconfig?)
 
It works! dbus call is:

Code:

dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:IAP uint32:0
IAP is internet access point identifier and can be obtained with:

gconftool -R /system/osso/connectivity/IAP

Also keep in mind that phone has to be disconnected in order to connect via this call.

But one question still remains: how to automatically connect to GPRS AP? This method DOES NOT work for GPRS unfortunately.


All times are GMT. The time now is 20:18.

vBulletin® Version 3.8.8