{"id":983,"date":"2012-06-03T11:08:45","date_gmt":"2012-06-03T18:08:45","guid":{"rendered":"http:\/\/www.stevenbrown.ca\/blog\/?p=983"},"modified":"2014-02-07T00:16:51","modified_gmt":"2014-02-07T08:16:51","slug":"script-wireless-strength-pollinglogginggraphing","status":"publish","type":"post","link":"https:\/\/www.stevenbrown.ca\/blog\/archives\/983","title":{"rendered":"Script: Wireless Strength Polling\/Logging\/Graphing"},"content":{"rendered":"<p>Initially, I wrote this script to give me frequent feedback on the signal strength.  This is useful when adjusting antennas to that sweet spot that give stronger signals; <em>especially<\/em> if you&#8217;re testing some <a href=\"https:\/\/www.stevenbrown.ca\/blog\/archives\/970\">homemade tinfoil parabolic reflectors<\/a>!  \ud83d\ude09  If  you have a portable wireless device, like a netbook, you can <code>ssh<\/code> into your (wireless) desktop and run <code>wireless-strength<\/code> to get realtime feedback on adjustments to the access point&#8217;s antenna&#8230; assuming the connection doesn&#8217;t break.  \ud83d\ude1b  And, of course, you can just walk around running it on your mobile device to create a kind of wireless heatmap.<\/p>\n<p>If you have <a href=\"http:\/\/www.gnuplot.info\/\" title=\"gnuplot\">gnuplot<\/a>, you can also generate graphs from the data with <code>ws-plot<\/code>.  This is me walking around my house with my notebook:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.stevenbrown.ca\/blog\/wordpress\/..\/files\/2012\/05\/2012.05.27-17.06.16.dat_.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1237\" data-permalink=\"https:\/\/www.stevenbrown.ca\/blog\/archives\/983\/2012-05-27-17-06-16-dat\" data-orig-file=\"https:\/\/i0.wp.com\/www.stevenbrown.ca\/blog\/wordpress\/..\/files\/2012\/05\/2012.05.27-17.06.16.dat_.png?fit=640%2C480&amp;ssl=1\" data-orig-size=\"640,480\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"2012.05.27-17.06.16.dat\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.stevenbrown.ca\/blog\/wordpress\/..\/files\/2012\/05\/2012.05.27-17.06.16.dat_.png?fit=300%2C225&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.stevenbrown.ca\/blog\/wordpress\/..\/files\/2012\/05\/2012.05.27-17.06.16.dat_.png?fit=640%2C480&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.stevenbrown.ca\/blog\/wordpress\/..\/files\/2012\/05\/2012.05.27-17.06.16.dat_.png?resize=300%2C225&#038;ssl=1\" alt=\"\" title=\"2012.05.27-17.06.16.dat\" width=\"300\" height=\"225\" class=\"alignnone size-medium wp-image-1237\" srcset=\"https:\/\/i0.wp.com\/www.stevenbrown.ca\/blog\/wordpress\/..\/files\/2012\/05\/2012.05.27-17.06.16.dat_.png?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.stevenbrown.ca\/blog\/wordpress\/..\/files\/2012\/05\/2012.05.27-17.06.16.dat_.png?w=640&amp;ssl=1 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I started in my room (40% \ud83d\ude41 ), which is where the first peak is &#8211; near the window.  Left my room, back to 40%, peak near window again, then bathroom&#8230; 40%.  The climb from 40-80% is me walking towards the TV room (PS3 lives in a solid 80% zone, at least!).  Walked upstairs, got 100% in most areas (that&#8217;s where the Access Point is) &#8211; tried a bedroom, dropped to 40%.<\/p>\n<p>Download the scripts and get more details here: <a href=\"https:\/\/github.com\/izm\/wireless-strength\">https:\/\/github.com\/izm\/wireless-strength<\/a><\/p>\n<h3>Nerdy Ramblings<\/h3>\n<p>This script originated years back, but I recently tried using it on my laptop and it didn&#8217;t work!  Unacceptable!  The original parsed the output of <code>iwconfig<\/code>.  But what showed up as &#8220;Quality=30\/70&#8221; on my desktop, would show up as &#8220;Quality:4&#8221; on my laptop.  COMPLETELY DIFFERENT.  Even the character after &#8220;Quality&#8221; was different!  o.O  The output of iwconfig is driver dependent, which is why I looked to <code>network-manager<\/code>.  I figured there&#8217;s probably a nice dbus command I can send to network-manager for that purpose &#8211; but I got tired of looking and decided to just parse output again.  :\/  Luckily, network-manager includes <code>nm-tool<\/code>.  It&#8217;s certainly not a clean solution, but it works for now.<\/p>\n<p>I also used <del datetime=\"2012-05-28T06:46:36+00:00\">updating<\/del> rewriting the script as an excuse to get better acquainted with git &#8211; which I&#8217;m really liking.<\/p>\n<p>Every time I do a <code>bash<\/code> script, I vow to do the next script in Python.  I like Python and I don&#8217;t like Bash&#8230; but there&#8217;s a certain&#8230; nativeness or dependency-free elegance to bash scripts.  Still, I hate writing them, and the next script&#8217;s in Python!  \ud83d\ude1b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Initially, I wrote this script to give me frequent feedback on the signal strength. This is useful when adjusting antennas to that sweet spot that give stronger signals; especially if you&#8217;re testing some homemade tinfoil parabolic reflectors! \ud83d\ude09 If you have a portable wireless device, like a netbook, you can ssh into your (wireless) desktop&hellip; <a class=\"more-link\" href=\"https:\/\/www.stevenbrown.ca\/blog\/archives\/983\">Continue reading <span class=\"screen-reader-text\">Script: Wireless Strength Polling\/Logging\/Graphing<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3,11],"tags":[197,48,235,222,42,4,176,200],"class_list":["post-983","post","type-post","status-publish","format-standard","hentry","category-geek","category-projects","tag-bash","tag-code","tag-gnuplot","tag-graphs","tag-how-to","tag-linux","tag-scripts","tag-wireless","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4jEMb-fR","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/posts\/983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/comments?post=983"}],"version-history":[{"count":10,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/posts\/983\/revisions"}],"predecessor-version":[{"id":1288,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/posts\/983\/revisions\/1288"}],"wp:attachment":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/media?parent=983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/categories?post=983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/tags?post=983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}