Results 1 to 3 of 3
  1.    #1  
    Hey!

    • Sprint Pre (not launch)
    • webOS 1.4.1.1


    I'm wondering if there's a way to turn on (and off) WiFi from a shell script. I manually rsync my personal stuff in /media/internal (pics/vids, ringtones, etc.) to my main machine via rsync. I enable WiFi so I can talk to my local network because I don't want to enable rsync outside.

    I'd like to be able to schedule this sync to run at night so I don't have to manually enable WiFi and sit there will it syncs with my machine but for the script to run, WiFi needs to be enabled first (and hopefully disabled after).

    Any ideas?


    M.
  2. pbnjay's Avatar
    Posts
    20 Posts
    Global Posts
    26 Global Posts
    #2  
    search for mode switcher. It should work for what you want to do.
  3.    #3  
    Hey!

    I got it.

    After finding this page in the Wiki:

    Luna Send - WebOS Internals

    I went ahead and did what it says about tailing the dbus output and doing what I was trying to find the system calls for. I ended up with this:

    Code:
    luna-send -n 1 palm://com.palm.wifi/setstate '{"state":"enabled"}'
    luna-send -n 1 palm://com.palm.wifi/findnetworks '{""}'
    Those two lines turn on the WiFi radio and then search (and connect) to any known AP in range.

    This turns off WiFi:

    Code:
    luna-send -n 1 palm://com.palm.wifi/setstate '{"state":"disabled"}'

    Word.


    M.

Tags for this Thread

Posting Permissions