December 8, 2014
The Strategic Wi-Fi Maintainer is a utility designed to keep an active Wi-Fi connection at all costs. The utility keeps an updated database of all available connections, and will attempt to connect to the most viable connection upon losing a working Wi-Fi connection.
(You may attach a PNG, GIF, or JPG file. Please note the
Attach: syntax for doing this. After you save the wiki page, you will see the
Attach: link with a blue triangle. Click on the link, and then you will be brought to a page where you can upload the attachment. After you upload the attachment, the link goes away and you see the image instead.)
1/6 of the project grade is based on which concepts from OPL are demonstrated in your project. Please identify them here. Be brief; a simple list and one-sentence explanation for each concept should be adequate; e.g.:
- Large usage of lists for the connection database
- Iteration for traversing the connection database
External Technology and Libraries
This racket library gives us the ability to invoke system commands such as ifconfig, etc. using the (system "command") function.
Favorite Lines of Code
Each partner should identify a favorite line of code, Scheme expression, or entire procedure written by himself / herself in the entire project, and explain what it does. E.g.:
- Ruslan Nabioullin:
(define (trim-iwlist-SSID SSID-list)
(if (empty? SSID-list) '() (cons (string-trim (string-trim (car SSID-list) " ESSID:\"" #:right? #f) "\"" #:left? #f) (trim-iwlist-SSID (cdr SSID-list)))))
This function recursively trims string(s) in a list, which state the network name(s) of Wi-Fi network(s) and are obtained from the Wi-Fi status utility iwlist.
- Tylor Reeves:
(define (prune-db network-age)
(define (prune-iter db newdb) (cond ((null? db) newdb) ((> (current-inexact-milliseconds) (+ (car (cdr (cdr (car db)))) network-age)) (prune-iter (cdr db) (append newdb (list (car db))))) (else (prune-iter (cdr db) newdb)))) (set! ssid-db (prune-iter ssid-db '())))
This segment of code will take the ssid-db, which is a list of lists containing the names of connections of which connections were attempted to be made to along with whether or not the attempt was successful, and remove all entries which are older than a given time in milliseconds "network-age". This function is needed during long periods of usage of the utility to ensure that the ssid-db does not become cluttered with old, outdated entries that are no longer needed.
Technology Used Block Diagram
Please use this area to include any additional information you would like to include that did not fit into any of the previous categories.
The total write-up, including screen shot and block diagram, should be two to three pages in length (when printed).