Announcement

Collapse
No announcement yet.

wifiproximity - generic AP based events processor

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • wifiproximity - generic AP based events processor

    This is a generic daemon (GPL) I wrote that will integrate with NetworkManager and perform a number of actions when pre-defined wifi access points are within range of the system.

    This is useful for doing things like automatic synchronization with home PC's when you arrive home. It can also perform these events after the access point goes out of range as well.

    It's really rough right now, but it's a good start. This won't be a part of the OpenICE 1.0 platform, but hopefully it will be accepted in 2.0 as it matures.

    If anyone is willing to make a simple event editor GUI, that would be awesome!

    Here is an example "event" that will create a file, and issue an rsync command in my home dir:

    Code:
    <event  ssid="linksys" trigger="OnAdded" strengthMin="20" connect="true">
    	<command type="system" bin="/usr/bin/touch" >
    		<arg>/home/kev/rsync/linksys-was-in-range.txt</arg>
    	</command>
    	<command type="system" bin="/usr/bin/rsync">
    		<arg>-arvuz</arg>
    		<arg>/home/kev/rsync/</arg>
    		<arg>/home/kev/rsync-dest</arg>
    	</command>
    </event>
    Hope it comes in handy! The source is in the linuxice repo: https://linuxice.svn.sourceforge.net.../wifiproximity
    Former author of LinuxICE, nghost, nobdy.
    Current author of Automotive Message Broker (AMB).
    Works on Tizen IVI. Does not represent anyone or anything but himself.

  • #2
    Dude, you are a madman! I'll put this in my top 10 of useful tools for a carputer so look forward to checking it out.

    Comment


    • #3
      UPDATE:

      I just added a couple new features and fixed some bugs:

      * use "Auto" device to have wifiproximity use the first managed wifi device
      * use "HwAddr" in addition to "Ssid" for access point identification (in case there are many "linksys" access points out there, and you don't want to connect to all of them heaven forbid...)
      * wifiproximity will not longer connect to the AP, if a connection has already been made (in the case of networkmanager auto connecting before wifiproximity does).
      * -D switch to run in daemon mode, or regular mode (default).

      I just realized this, and it could be a cool feature in the future: You could run multiple instances of wifiproximity with different devices and have them do different things based upon what they see... WarDriving ftw? I'll have to add the -e [/path/to/eventfile] option.
      Former author of LinuxICE, nghost, nobdy.
      Current author of Automotive Message Broker (AMB).
      Works on Tizen IVI. Does not represent anyone or anything but himself.

      Comment


      • #4
        I like the idea you have here. I am working on a configuration gui for this app, but I was hoping you could give me a breakdown of what tag has what attributes, what sub tags it can have, etc.
        Mozilla Search Plugin

        Comment


        • #5
          Originally posted by nottastocker View Post
          I like the idea you have here. I am working on a configuration gui for this app, but I was hoping you could give me a breakdown of what tag has what attributes, what sub tags it can have, etc.
          Awesome!

          Here's a more full example:
          https://linuxice.svn.sourceforge.net...src/events.xml

          All possible attributes and nodes are in that example.

          In an event there are only two types of triggers "OnAdded" and "OnRemoved". Obviously, strengthMin and connect attributes don't apply to an event with an OnRemoved trigger.

          Right now, the only valid children for an event are <command> nodes. Also, the "type" attribute on the <command> node is ignored right now. Everything is treated as a system command.

          <arg> has no attributes.

          Let me know if you have any other questions. I'm looking forward to seeing the GUI in action.
          Former author of LinuxICE, nghost, nobdy.
          Current author of Automotive Message Broker (AMB).
          Works on Tizen IVI. Does not represent anyone or anything but himself.

          Comment

          Working...
          X