Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Linux


Reply
 
Share Thread Tools Display Modes
Old 06-09-2009, 10:36 AM   #1
licensed to kill
 
kev000's Avatar
 
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,039
kev000 will become famous soon enough
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
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development

Last edited by kev000; 06-09-2009 at 10:39 AM.
kev000 is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 06-09-2009, 11:17 AM   #2
Constant Bitrate
 
Join Date: Aug 2007
Location: Northern VA
Posts: 125
cgalpin is an unknown quantity at this point
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.
cgalpin is offline   Reply With Quote
Old 06-20-2009, 08:41 AM   #3
licensed to kill
 
kev000's Avatar
 
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,039
kev000 will become famous soon enough
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.
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development
kev000 is offline   Reply With Quote
Old 07-12-2009, 01:14 AM   #4
Variable Bitrate
 
nottastocker's Avatar
 
Join Date: Jun 2003
Location: Shenandoah, VA
Posts: 332
nottastocker is on a distinguished road
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
nottastocker is offline   Reply With Quote
Old 07-12-2009, 06:21 AM   #5
licensed to kill
 
kev000's Avatar
 
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,039
kev000 will become famous soon enough
Quote: 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.
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development
kev000 is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Core Duo / Core 2 Duo Mini-ITX boards RedGTiVR6 General Hardware Discussion 149 08-14-2009 10:54 PM
RR 01/2009 ... Plenty of news.. guino Road Runner 165 03-03-2009 01:21 PM
Triggering events based on GPS location electron GPS 5 09-16-2004 12:57 PM



All times are GMT -5. The time now is 02:24 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics