<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jason's Computer Science Blog</title>
	<atom:link href="http://www.jasonernst.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonernst.com</link>
	<description>By Jason Ernst</description>
	<lastBuildDate>Thu, 23 May 2013 14:08:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Notes on NS3 &#8211; IEEE 802.11 Wi-Fi Association</title>
		<link>http://www.jasonernst.com/2013/05/09/notes-on-ns3-ieee-802-11-wi-fi-association/</link>
		<comments>http://www.jasonernst.com/2013/05/09/notes-on-ns3-ieee-802-11-wi-fi-association/#comments</comments>
		<pubDate>Thu, 09 May 2013 11:46:11 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Simulation]]></category>
		<category><![CDATA[active]]></category>
		<category><![CDATA[AP]]></category>
		<category><![CDATA[association]]></category>
		<category><![CDATA[beacons]]></category>
		<category><![CDATA[ns3]]></category>
		<category><![CDATA[passive]]></category>
		<category><![CDATA[probe]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[selection]]></category>
		<category><![CDATA[station]]></category>
		<category><![CDATA[Wi-Fi]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=3910</guid>
		<description><![CDATA[For some of my research I have been delving into the details on how exactly station devices in an IEEE 802.11 network associate with an access point. As far as I understand from the standard station nodes have two possibilities. 1. Active In this case the station nodes send out probe requests to see if [...]]]></description>
				<content:encoded><![CDATA[<p>For some of my research I have been delving into the details on how exactly station devices in an IEEE 802.11 network associate with an access point. As far as I understand from the standard station nodes have two possibilities.</p>
<p>1. Active<br />
In this case the station nodes send out probe requests to see if any access points respond during a timeout period</p>
<p>2. Passive<br />
In this case the station nodes just sit and listen over a timeout period to see if any aps send out beacons.</p>
<p>In either case, according to the standard, the station node is supposed to rank the APs according to received signal strength (RSS). While this is recognized as a bad method for various reasons &#8211; it is a simple and quick way to select an AP.</p>
<p>In NS3 (3.16), as far as I can tell, there is no measure of RSS. The station node simply associates with the first AP that it receives either a probe response or beacon from (depending on active or passive). Usually this ends up being the closest AP to the user station because it has the lowest propagation delay due to the lower distance. However, depending on when the stations start up, a farther station is sometimes selected &#8211; at least initially until enough beacons are missed that an AP disassociation occurs, and the process starts over with the closer AP being selected.</p>
<p>In NS 3.16, the code which controls AP association is located in src/wifi/model/sta-wifi-mac.cc. </p>
<p>Looking at the code details, and confirming with some extra logging I added &#8211; a Wi-Fi station when starting, broadcasts a probe request (in active probing mode). It then waits for a probe response.</p>
<p>If you look in the &#8220;StaWifiMac::Receive (Ptr<Packet> packet, const WifiMacHeader *hdr)&#8221; function, you can see that immediately when it receives one of these responses, it sends an association request to the AP. This is one place where changes must occur if one wishes to make a smarter decision for selecting an AP. In my case, instead of immediately sending an association request, I record the probe response and continue to wait for more until the probe timeout occurs.</p>
<p>If you look at &#8220;StaWifiMac::ProbeRequestTimeout (void)&#8221; you can see this is where you can now implement the association decision. After the timeout has occured, we now have a list of all of the received probe packets and can make the decision and associate like before.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2013/05/09/notes-on-ns3-ieee-802-11-wi-fi-association/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Second Times a Charm?</title>
		<link>http://www.jasonernst.com/2013/04/10/second-times-a-charm/</link>
		<comments>http://www.jasonernst.com/2013/04/10/second-times-a-charm/#comments</comments>
		<pubDate>Wed, 10 Apr 2013 15:44:05 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Grad School]]></category>
		<category><![CDATA[Ph.D.]]></category>
		<category><![CDATA[Qualifying Exam]]></category>
		<category><![CDATA[Thesis]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=3893</guid>
		<description><![CDATA[After what seems like eternity, I have completed my second (and a half?) qualifying exam document at Guelph. For people who know me, or who have read a bit of my blog, you may know that I am on my third advisor for my PhD. The advisor I came to the University for suddenly passed [...]]]></description>
				<content:encoded><![CDATA[<p>After what seems like eternity, I have completed my second (and a half?) qualifying exam document at Guelph. For people who know me, or who have read a bit of my blog, you may know that I am on my third advisor for my PhD. The advisor I came to the University for suddenly passed away and the second advisor after that resigned right before my last QE was supposed to happen. So after starting with my third (and hopefully final) advisor, I decided to start my QE fresh so that it was something I was proud of and confident in before I presented it. For those of you who don&#8217;t know, a QE document is a sort of research proposal (<= 50 pages) of the work you intend to do for you PhD. It contains the literature review, motivation and sometimes initial results, as well as the planned methodology for the research.</p>
<p>So anyway, I have completed the document and after several rounds of edits with my advisor it is ready and off to the committee. Here&#8217;s hoping I&#8217;ll make it to the exam stage this time and pass quickly so I can move on with the real work!</p>
<p>Stay tuned for some posts that are more technical instead of these boring updates on my progress. Now that things are moving along I think I&#8217;ll actually have something to post <img src='http://www.jasonernst.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2013/04/10/second-times-a-charm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hostmonster auto update IP address of subdomain</title>
		<link>http://www.jasonernst.com/2012/12/18/hostmonster-auto-update-ip-address-of-subdomain/</link>
		<comments>http://www.jasonernst.com/2012/12/18/hostmonster-auto-update-ip-address-of-subdomain/#comments</comments>
		<pubDate>Tue, 18 Dec 2012 17:58:55 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[auto]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[Hostmonster]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[subdomain]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=3589</guid>
		<description><![CDATA[With my Hostmonster account, I host this website with my www.jasonernst.com domain, but I also have many other machines that are referred to with subdomains. For example, dev.jasonernst.com is my home machine and lab.jasonernst.com is my office machine at school. However, as you can imagine with the home machine in particular the IP is prone [...]]]></description>
				<content:encoded><![CDATA[<p>With my Hostmonster account, I host this website with my www.jasonernst.com domain, but I also have many other machines that are referred to with subdomains. For example, dev.jasonernst.com is my home machine and lab.jasonernst.com is my office machine at school.</p>
<p>However, as you can imagine with the home machine in particular the IP is prone to change occasionally since it is given from the ISP using DHCP. So I searched around for some script to be able to change the zone file in Hostmonster since this controls the IP addresses of all my subdomains.</p>
<p>** Of course the obvious and easy way to do this is with some kind of dyndns account, but I&#8217;m picky and like to have everything working under my own domain <img src='http://www.jasonernst.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>I was looking for some type of SSH script way to do it, but it looks like there is no easy way to do this, but I found a ruby script here: http://deathwarrior.wordpress.com/ which allows me to do what I want. Unfortunately the script was written a little while ago and some of it needs to be changed a bit to work.</p>
<p>The first part is the required libraries that must be installed. This has changed because the ruby-mechanize library does not seem to be found in the Ubuntu 12.04 repos. This should do the trick though:</p>
<p><code>sudo apt-get install libwww-mechanize-ruby ruby-json ruby</code></p>
<p>The other problem is in the ruby script itself. It seems verify_mode does not exist anymore, so just comment that line out. Another problem is the user-agent which does not seem to be found in the version I was using with Ubuntu. So you can change that to &#8220;Windows IE 7&#8243; and it should fix it. Here is the code with the changes:</p>
<p><pre><code>
#!/usr/bin/env ruby

require &#039;mechanize&#039;
require &#039;json&#039;

USERNAME&nbsp;&nbsp;= &#039;MY_USERNAME&#039;
PASSWORD&nbsp;&nbsp;= &#039;MY_PASSWD&#039;
DOMAIN&nbsp;&nbsp;&nbsp;&nbsp;= &#039;positrones.net&#039;
SUBDOMAIN&nbsp;&nbsp;= &#039;my_subdomain&#039;
ADDRESS&nbsp;&nbsp;&nbsp;&nbsp;= &#039;0.0.0.0&#039; # If nil then try to get automagicaly

URLS = {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;login&#039;&nbsp;&nbsp;&nbsp;&nbsp;=&gt; &#039;https://login.hostmonster.com/?&#039;,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;drecords&#039;&nbsp;&nbsp;=&gt; &#039;https://my.hostmonster.com/cgi/dm/zoneedit/ajax&#039;
&nbsp;&nbsp;&nbsp;&nbsp;}

USER_AGENT = &#039;Windows IE 7&#039;

m = Mechanize.new do |a|
&nbsp;&nbsp;#a.verify_mode = OpenSSL::SSL::VERIFY_NONE
&nbsp;&nbsp;a.user_agent_alias = USER_AGENT
end

def get_ip
&nbsp;&nbsp;r = Net::HTTP.get(&#039;jasonernst.com&#039;, &#039;/ip.php&#039;)
&nbsp;&nbsp;ip = r.match(/\d{1,4}\.\d{1,4}\.\d{1,4}\.\d{1,4}/)

&nbsp;&nbsp;ip[0].to_s
end

# Do the login stuff
print &quot;Checking user and password... &quot;
page = m.get( URLS[&#039;login&#039;] );
form = page.form_with( :name =&gt; &#039;theform&#039; )
form[&#039;login&#039;] = USERNAME
form[&#039;password&#039;] = PASSWORD
send_button = form.button_with(:value =&gt; &#039;Login&#039;)
form.click_button(send_button)
page = page.links[0].click
puts &quot;done!&quot;

# Edit the DNS Zone
page = page.link_with(:text =&gt; &#039;DNS Zone Editor&#039;).click
print &quot;Getting old zone records... &quot;
json = JSON.parse( m.post( URLS[&#039;drecords&#039;], {&#039;op&#039; =&gt; &#039;getzonerecords&#039;, &#039;domain&#039; =&gt; DOMAIN} ).body )
puts &quot;done!&quot;

print &quot;Trying to get subdomain old info... &quot;
json[&#039;data&#039;].each do |r|
&nbsp;&nbsp;if r[&#039;name&#039;] == SUBDOMAIN
&nbsp;&nbsp;&nbsp;&nbsp;print &quot;done!\nSaving new address[#{r[&#039;address&#039;]} =&gt; #{ADDRESS||get_ip}]... &quot;
&nbsp;&nbsp;&nbsp;&nbsp;json = m.post( URLS[&#039;drecords&#039;], {&#039;op&#039;&nbsp;&nbsp;&nbsp;&nbsp;=&gt; &#039;editzonerecord&#039;,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;domain&#039;&nbsp;&nbsp;&nbsp;&nbsp;=&gt; DOMAIN,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;name&#039;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&gt; SUBDOMAIN,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;orig__name&#039;&nbsp;&nbsp;=&gt; SUBDOMAIN,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;address&#039;&nbsp;&nbsp;&nbsp;&nbsp;=&gt; ADDRESS||get_ip,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;orig__adress&#039;&nbsp;&nbsp;=&gt; r[&#039;address&#039;],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;ttl&#039;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&gt; r[&#039;ttl&#039;],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;orig__ttl&#039;&nbsp;&nbsp;&nbsp;&nbsp;=&gt; r[&#039;ttl&#039;],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;Line&#039;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&gt; r[&#039;Line&#039;],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#039;type&#039;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&gt; r[&#039;type&#039;]}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)
&nbsp;&nbsp;&nbsp;&nbsp;json = JSON.parse(json.body)

&nbsp;&nbsp;&nbsp;&nbsp;if( json[&#039;result&#039;] == 1 )
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts &quot;done!\nAddress changed succesfully!&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kernel::exit(0)
&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts &quot;\nAn error has ocurred trying to save new address :(&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kernel::exit(1)
&nbsp;&nbsp;&nbsp;&nbsp;end
&nbsp;&nbsp;end
end

puts &quot;The subdomain #{SUBDOMAIN} cannot be found!&quot;
Kernel::exit(1)
</code></pre></p>
<p>The last thing that should be done is a server page somewhere for this code to find out it&#8217;s own IP address. All the page should return is the IP address itself, not any HTML. You can leave the default in the script which will use my IP script, or you can make your own. It&#8217;s as simple as this:</p>
<p><code>&lt;? echo $_SERVER[&#039;REMOTE_ADDR&#039;]; ?&gt;</code></p>
<p>And one more thing, if you are so inclined is to add the script as a chronjob. I have mine set to run every hour, but you can do it more or less often according to your preferences.</p>
<p><code>crontab -e</code></p>
<p>I named put my script in a /scripts/ folder I made and named it &#8220;hostmonster-auto-ip.sh&#8221;</p>
<p>So the crontab entry is:</p>
<p><code>@hourly /scripts/hostmonster-auto-ip.sh</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2012/12/18/hostmonster-auto-update-ip-address-of-subdomain/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Blog stats</title>
		<link>http://www.jasonernst.com/2012/10/23/blog-stats/</link>
		<comments>http://www.jasonernst.com/2012/10/23/blog-stats/#comments</comments>
		<pubDate>Tue, 23 Oct 2012 19:04:59 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Jason B. Ernst]]></category>
		<category><![CDATA[Jason's Computer Science Blog]]></category>
		<category><![CDATA[Stats]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=3069</guid>
		<description><![CDATA[This blog has been running for quite a few years now and I got thinking about the traffic patterns on it today in an earlier post, so I thought I&#8217;d put some of the info together into a post Here are the visits in the last three years (74,000 hits) And in just the last [...]]]></description>
				<content:encoded><![CDATA[<p>This blog has been running for quite a few years now and I got thinking about the traffic patterns on it today in an earlier post, so I thought I&#8217;d put some of the info together into a post <img src='http://www.jasonernst.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here are the visits in the last three years (74,000 hits)<br />
<center>
<div class="image"><a href="http://www.jasonernst.com/wp-content/uploads/2012/10/visits.jpg"><img src="http://www.jasonernst.com/wp-content/uploads/2012/10/visits-300x135.jpg" alt="" title="visits" width="300" height="135" class="aligncenter size-medium wp-image-3072" /></a></div>
<p></center></p>
<p>And in just the last year (30,000 hits)<br />
<center>
<div class="image"><a href="http://www.jasonernst.com/wp-content/uploads/2012/10/visits_year.jpg"><img src="http://www.jasonernst.com/wp-content/uploads/2012/10/visits_year-300x137.jpg" alt="" title="visits_year" width="300" height="137" class="aligncenter size-medium wp-image-3073" /></a></div>
<p></center></p>
<p>The average time on the site remained about the same when looking back one or three years and in both cases is about two minutes.</p>
<p>Here is a world map showing the countries where most of the traffic comes from. The top three were US, India and Canada. The darkest colour represents almost 6000 hits.</p>
<p><center>
<div class="image"><a href="http://www.jasonernst.com/wp-content/uploads/2012/10/world_map.jpg"><img src="http://www.jasonernst.com/wp-content/uploads/2012/10/world_map-300x172.jpg" alt="" title="world_map" width="300" height="172" class="aligncenter size-medium wp-image-3074" /></a></div>
<p></center></p>
<p>The most popular browser with visitors of my site is Firefox, followed by Chrome, IE and Safari. I was a bit surprised that Safari did more poorly than IE, but I guess it can be expected when you see the next figure with OS&#8217;s.<br />
<center>
<div class="image"><a href="http://www.jasonernst.com/wp-content/uploads/2012/10/browser.jpg"><img src="http://www.jasonernst.com/wp-content/uploads/2012/10/browser-300x88.jpg" alt="" title="browser" width="300" height="88" class="aligncenter size-medium wp-image-3077" /></a></div>
<p></center></p>
<p>The most popular OS&#8217;s for my site: Windows, Linux, Mac. This makes me a little sad that Linux wasn&#8217;t the highest proportion, given the content of my site&#8230;but it was at least respectable.<br />
<center>
<div class="image"><a href="http://www.jasonernst.com/wp-content/uploads/2012/10/os.jpg"><img src="http://www.jasonernst.com/wp-content/uploads/2012/10/os-300x79.jpg" alt="" title="os" width="300" height="79" class="aligncenter size-medium wp-image-3086" /></a></div>
<p></center></p>
<p>Lastly, here is the posting frequency. There have been 83 posts total according to the wordpress admin page.<br />
<center>
<div class="image"><a href="http://www.jasonernst.com/wp-content/uploads/2012/10/posts.jpg"><img src="http://www.jasonernst.com/wp-content/uploads/2012/10/posts-300x170.jpg" alt="" title="posts" width="300" height="170" class="aligncenter size-medium wp-image-3084" /></a></div>
<p></center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2012/10/23/blog-stats/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Including Blogs in Tenure &amp; Promotion</title>
		<link>http://www.jasonernst.com/2012/10/23/including-blogs-in-tenure-promotion/</link>
		<comments>http://www.jasonernst.com/2012/10/23/including-blogs-in-tenure-promotion/#comments</comments>
		<pubDate>Tue, 23 Oct 2012 14:14:44 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Academia]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Jason B. Ernst]]></category>
		<category><![CDATA[Promotion]]></category>
		<category><![CDATA[Tenure]]></category>
		<category><![CDATA[University]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=3063</guid>
		<description><![CDATA[Inspired by this blog post: http://andreweckford.blogspot.ca/2012/10/would-you-include-your-blog-in-your-t.html and the ensuing twitter conversation: https://twitter.com/andreweckford/status/260737094056542210 I decided to write a more in-depth response on my blog. Compared to the rest of the group in the twitter convo, I am probably the most junior being a grad student still (the others are librarians and professors in various stages). The [...]]]></description>
				<content:encoded><![CDATA[<p>Inspired by this blog post: <a href="http://andreweckford.blogspot.ca/2012/10/would-you-include-your-blog-in-your-t.html" title="http://andreweckford.blogspot.ca/2012/10/would-you-include-your-blog-in-your-t.html">http://andreweckford.blogspot.ca/2012/10/would-you-include-your-blog-in-your-t.html</a> and the ensuing twitter conversation: <a href="https://twitter.com/andreweckford/status/260737094056542210" title="https://twitter.com/andreweckford/status/260737094056542210">https://twitter.com/andreweckford/status/260737094056542210</a> I decided to write a more in-depth response on my blog.</p>
<p>Compared to the rest of the group in the twitter convo, I am probably the most junior being a grad student still (the others are librarians and professors in various stages). The general consensus seems to be that while a forward facing department may consider a blog in their criteria, there are not clear cut rules to support blogs in the process and most people would not include it.</p>
<p>When I get to that stage in my career, however, I&#8217;ll try my best to shoehorn it in somehow. I&#8217;m of the opinion that any modern academic department should be considering blogs and even social media accounts in the T&#038;P process. These types of things show how engaged an academic is with the public. We need more engaged professors and research students. The general public pays for our work (for the most part) and we should make them aware of what they are paying for.</p>
<p>As mentioned in the twitter conversation, the benefits of blogging and social media alone in terms of connections and collaborations with other researchers end up showing up on the resume anyways with publications and projects. However, I think there is also value in the quality of a blog itself.</p>
<p>As for the less professional posts, I think these also have some value. As long as they aren&#8217;t the type someone should be embarrassed about, I think they also still add value. They humanize the professor for the students and the general public and make the professor more approachable. Sometimes its also nice to read these peoples&#8217; opinions on issues outside of their expertise.</p>
<p>My blog has been going for about three or four years now, and while I think the quality of the posts are not as good as the others in the Twitter conversation, it has some value since it has documented some of the journey through grad school, some of the work I&#8217;ve done and some of my thoughts that would otherwise just disappeared into the ether. Clearly this is something people are interested in since I regularly get around 2500 hits per month on the site. These types of statistics may be the type of thing to include in T&#038;P files. The number of hits, followers on twitter, retweets, &#8220;klout&#8221; &#8211; all show the level of engagement of the professor. On the other hand, this could just lead to a race to the bottom of constant meaningless social engagement, but I&#8217;d still prefer a prof who tweets too much to one who is alone in their bubble.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2012/10/23/including-blogs-in-tenure-promotion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Recent Computer Related Events</title>
		<link>http://www.jasonernst.com/2012/09/19/recent-computer-related-events/</link>
		<comments>http://www.jasonernst.com/2012/09/19/recent-computer-related-events/#comments</comments>
		<pubDate>Wed, 19 Sep 2012 18:28:38 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[App Development]]></category>
		<category><![CDATA[BB10]]></category>
		<category><![CDATA[Cognitive Agents]]></category>
		<category><![CDATA[Grad School]]></category>
		<category><![CDATA[Job Interviews]]></category>
		<category><![CDATA[Playbook]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Traffic]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=2297</guid>
		<description><![CDATA[The last few months have been crazy. I&#8217;ve had a couple of job interviews with tech companies in California, attended a BB10Jam, released a couple of playbook apps, started on some side research projects at school. So this post is all about talking a bit about each of those things. Job Interviews in Grad School [...]]]></description>
				<content:encoded><![CDATA[<p>The last few months have been crazy.</p>
<p>I&#8217;ve had a couple of job interviews with tech companies in California, attended a BB10Jam, released a couple of playbook apps, started on some side research projects at school. So this post is all about talking a bit about each of those things.</p>
<p><strong>Job Interviews in Grad School</strong><br />
If you are like me and don&#8217;t like to say no to anything, you&#8217;ll probably go along with the whole interview process &#8211; just to see where it takes you. Also if you are like me and a busy grad student &#8211; you probably will not have time to prepare properly for the interviews. This is probably a big mistake (or maybe not). From my perspective, the technical questions in the interviews went pretty well when they were directly in my areas of expertise. As soon as they meandered to peripheral areas, things got a little ugly. Worse still was the coding questions. While I do try to keep up my skills in this area, grad students (particularly PhD) students in comp sci aren&#8217;t always well known for being code monkeys. We spend most of our time reading papers, proposing algorithms and mechanisms for solving problems. We then either 1) Hire an undergraduate student for the programming or 2) Make use of as many open source tools as possible and &#8220;macgyver&#8221; them into suiting our needs. In the extreme case we may code some specialized tool for what we need as well. So as you can guess, my coding skills were rusty. If I were to prepare in the future, I&#8217;d focus on this for as much time as I could before starting the interview processes. But since these interviews all contacted me first, that wasn&#8217;t an option.</p>
<p><strong>BB10Jam</strong><br />
Despite all the doom and gloom in Waterloo these days about RIM, I still like to develop apps for the Playbook for a few reasons. 1) RIM lives where I live. 2) I got a free Playbook at a conference. 3) The AppWorld is not saturated with a million of the same type of app yet.</p>
<div class="image left" style="text-align:center;">
<a href="http://www.jasonernst.com/wp-content/uploads/2012/09/46e33798ed2111e19b6422000a1e95d8_7.jpg"><img src="http://www.jasonernst.com/wp-content/uploads/2012/09/46e33798ed2111e19b6422000a1e95d8_7-300x300.jpg" alt="" title="46e33798ed2111e19b6422000a1e95d8_7" width="300" height="300" class="aligncenter size-medium wp-image-2303" /></a> <a href="http://www.jasonernst.com/wp-content/uploads/2012/09/7c54792cee0d11e199a722000a1e882b_7.jpg"><img src="http://www.jasonernst.com/wp-content/uploads/2012/09/7c54792cee0d11e199a722000a1e882b_7-300x300.jpg" alt="" title="7c54792cee0d11e199a722000a1e882b_7" width="300" height="300" class="aligncenter size-medium wp-image-2304" /></a></div>
<div class="clear">&nbsp;</div>
<p>So after developing a couple of apps I noticed they were having a BB10Jam here in Waterloo and went. The event was really good. The people were friendly and nice, and it was much less stuffy than some of the previous RIM events I have attended. Maybe it is a sign things are starting to reverse. Beyond just that though, the platform looks pretty good. I also got a developer device and am working on some apps for it now. The biggest selling point in developing for them right now for BB10 is the $10,000 reward for any app that can make $1,000 in the first year. Also at the event there were many stats showing increasing numbers of developers and apps in the store which all sounds good. Another interesting bit of info was that BB users are more likely to pay for their apps compared to other platforms. All of this makes it increasingly attractive to develop for the platform. So at the end of the BB10Jam I came away pretty excited to get at it. Just need to find the time now!</p>
<p><strong>BB Playbook Apps</strong><br />
If you have read this blog previously, you may noticed something about one of my apps. The first one I made was a telnet application. I had the intention to also include ssh, but have not had the time to include this bit of code yet. The biggest challenge with that app was developing a console library for displaying the text. At the time Cascades was not available yet, and this type of thing was a bit tricky. There&#8217;s more info on it here: http://www.jasonernst.com/2012/01/24/opengl-console-library-for-blackberry-native-sdk-playbook/. The app is available here for free on the appworld: http://appworld.blackberry.com/webstore/content/77778/?lang=en</p>
<p>The second app I created is a web server. The inspiration for this was that I wanted to be able to serve images from the camera onto a website hosted on the playbook. This way you can leave your playbook setup as a sort of security camera. So the first step was creating the web-server to serve the content. Right now it just supports serving static content &#8211; no php, perl, python etc, but maybe in the future. The next step will be to hook into the camera and serve up a continuously changing image that is polled from the camera regularly. The app is available here: http://appworld.blackberry.com/webstore/content/124979/?lang=en</p>
<p><strong>Side Research Projects</strong><br />
The last thing is the side research projects I have taken on in the past couple of months. I have been collaborating with researchers in the math department on two projects. First is a cognitive agent project. In this project we are interested in the intelligence required for a creature to cross a busy street. The first creatures are oblivious to the conditions in which danger may exist so they cross the road. As some of them are hit, the creatures which follow can observe the conditions and avoid crossing. Eventually they start to learn when it is safe to cross. The focus of the work is the underlying learning mechanisms for this problem.</p>
<p>The second project I am involved in is a vehicular traffic simulation tool. An existing tool was developed several years ago, however there were some shortcomings in the model. The model is based on the Nagel-Schreckenberg traffic model, however the ramps on the highway were only one cell. Because of this limitation, it becomes difficult to properly simulate certain highway configurations such as clover-leaf ramps. My recent work on this project has extended the model to address this limitation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2012/09/19/recent-computer-related-events/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IEEE ICC 2012 &#8211; Ottawa</title>
		<link>http://www.jasonernst.com/2012/06/20/ieee-icc-2012-ottawa/</link>
		<comments>http://www.jasonernst.com/2012/06/20/ieee-icc-2012-ottawa/#comments</comments>
		<pubDate>Wed, 20 Jun 2012 15:52:02 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Wireless Networks]]></category>
		<category><![CDATA[2012]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[ICC]]></category>
		<category><![CDATA[Interference]]></category>
		<category><![CDATA[Ottawa]]></category>
		<category><![CDATA[Wi-Fi]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=2190</guid>
		<description><![CDATA[Last week I presented a paper at IEEE ICC, and since its been a while since I have posted I thought I put up a bit of a summary about my work. For people who have looked at my site a bit, you might know my research is on Heterogeneous Wireless Networking (making wireless technologies [...]]]></description>
				<content:encoded><![CDATA[<p>Last week I presented a paper at IEEE ICC, and since its been a while since I have posted I thought I put up a bit of a summary about my work. For people who have looked at my site a bit, you might know my research is on Heterogeneous Wireless Networking (making wireless technologies work together seamlessly). The goal of my work is to enable devices with Bluetooth, Wi-Fi, 3G, 4G, LTE and future radios to be able to switch easily between connections or use more than one at a time. There are still many problems which make this impossible right now. For instance, if you are using Skype on a Wi-Fi connection on your phone and you leave a building and switch to the 4G network outside, chance are you will be disconnected from Skype (Seamless Handover is not supported).</p>
<p>Another problem may be a lack of co-ordination between radio access technologies (RATs). For instance, while Bluetooth supports adaptive frequency hopping (AFH) to try to avoid the same channels Wi-Fi is being used on, this may not be enough to ensure interference between the technologies is avoided. What happens when you are in a dense area where Wi-Fi is being used across all channels, or there are many devices? (Apartment buildings, dense cities etc.)</p>
<p>As you may know, lots of wireless research is done using simulation because in many cases it is faster and cheaper. Many simulation tools support interference within a particular technology (ie Wi-Fi nodes interfering with other Wi-Fi nodes) but not many support interference between technologies (ie Wi-Fi nodes interfering with Bluetooth nodes). The paper I presented at ICC tries to understand how much of an impact this makes.</p>
<p>I&#8217;ll spare most of the details since they are in the paper, but essentially the findings are that Wi-Fi -> Bluetooth interference causes a drop in around 10-15kbps of the total 50kpbs Bluetooth was able to achieve in our lab setup (About 30% drop).</p>
<p>In the other direction, the interference was mostly insignificant. However, this was expected since the setup used close ranges (Wi-Fi power is much greater than that of Bluetooth).</p>
<p>The future work includes looking at varying distances (It seems like it will be interesting when we use a range that makes the Wi-Fi and Bluetooth powers similar). Eventually the goal is to create an interference model that can be used in simulation. If you want more details &#8211; see the attached paper and slides.</p>
<p><a href='http://www.jasonernst.com/wp-content/uploads/2012/06/icc2012.pptx'>icc2012 (slides pptx)</a><br />
<a href='http://www.jasonernst.com/wp-content/uploads/2012/06/1569517745-2.pdf'>icc20122 (paper pdf)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2012/06/20/ieee-icc-2012-ottawa/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Toshiba Laptop + Ubuntu, Wireless Switch Problem</title>
		<link>http://www.jasonernst.com/2012/03/05/toshiba-laptop-ubuntu-wireless-switch-problem/</link>
		<comments>http://www.jasonernst.com/2012/03/05/toshiba-laptop-ubuntu-wireless-switch-problem/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 01:29:31 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Wireless Networks]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Off]]></category>
		<category><![CDATA[Realtek]]></category>
		<category><![CDATA[Satellite]]></category>
		<category><![CDATA[Switch]]></category>
		<category><![CDATA[Toshiba]]></category>
		<category><![CDATA[Turned]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Wireless]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=1992</guid>
		<description><![CDATA[Just a quick post, about an annoyance with my Toshiba Satellite laptop. Maybe it will help someone, but the wireless card had no power because the &#8220;hardware switch&#8221; was turned off. This laptop has no power switch. The function keys which turn it on/off in Windows do not seem to work in Ubuntu. The solution [...]]]></description>
				<content:encoded><![CDATA[<p>Just a quick post, about an annoyance with my Toshiba Satellite laptop. Maybe it will help someone, but the wireless card had no power because the &#8220;hardware switch&#8221; was turned off. This laptop has no power switch. The function keys which turn it on/off in Windows do not seem to work in Ubuntu. The solution was found originally in the post below, but to save some time, the solution for me was to power the laptop off, take out batter for 30 seconds, holding down the power button. Then when the laptop is powered back on, the wireless in Ubuntu works. Hopefully this won&#8217;t need to be repeated over and over, but at least its working now.</p>
<p>http://askubuntu.com/questions/106568/my-wireless-has-suddenly-became-disabled-by-hardware-switch-bios-rfkill-fnf8</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2012/03/05/toshiba-laptop-ubuntu-wireless-switch-problem/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OpenGL Console Library for Blackberry Native SDK (Playbook)</title>
		<link>http://www.jasonernst.com/2012/01/24/opengl-console-library-for-blackberry-native-sdk-playbook/</link>
		<comments>http://www.jasonernst.com/2012/01/24/opengl-console-library-for-blackberry-native-sdk-playbook/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 20:41:29 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[Console]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Guide]]></category>
		<category><![CDATA[Native]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Playbook]]></category>
		<category><![CDATA[SDK]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=1897</guid>
		<description><![CDATA[Over the break, I decided to try my hand at some Blackberry native SDK programming since I recently got a playbook. I looked around the App World and noticed there weren&#8217;t any telnet/ssh tools available for free (that worked the way I wanted) so I thought this would be a good starter project. However, for [...]]]></description>
				<content:encoded><![CDATA[<p>Over the break, I decided to try my hand at some Blackberry native SDK programming since I recently got a playbook. I looked around the App World and noticed there weren&#8217;t any telnet/ssh tools available for free (that worked the way I wanted) so I thought this would be a good starter project.</p>
<p>However, for the look I wanted, I wanted to maximize the screen space for the console application to show as much text as possible and worked off the hello world example on the SDK webpage. Essentially, the simple &#8220;library&#8221; (note: library is used very loosely here) initializes the display, shows the keyboard and supports some simple output using putch and puts functions that I implemented. It can also show a blinking cursor and user input at a prompt. In case someone else can use the code I have made it available. Check back soon to see the source for the telnet portion of the app I made as well or look for it on the App World.</p>
<p><center>
<div class="image"><a href="http://www.jasonernst.com/wp-content/uploads/2012/01/simple_telnet.png"><img src="http://www.jasonernst.com/wp-content/uploads/2012/01/simple_telnet-300x185.png" alt="Simple Telnet - Example Application" title="Simple Telnet - Example Application" width="300" height="185" class="aligncenter size-medium wp-image-1902" /></a><br/>Simple Telnet &#8211; Example Application using the conosole library</div>
<p></center></p>
<p>In order to use the library, you need to make use of the bbutil.c and bbutil.h files that are included in many of the examples provided by RIM. I have provided them here alongside my own code so that it is easier to follow along. I also provide two more files: glconsole.c and glconsole.h. You just need to #include &#8220;glconsole.h&#8221; in your source in order to use the library. All of the functions available to you are listed in the &#8220;glconsole.h&#8221; file as well. I will go over the important ones in this article.</p>
<p>First is gl_init(). This function initializes the library, the screen, font etc. This function should be called before using anything else in the library. Similarly, gl_cleanup() is used to free memory and should be called before your app is terminated.</p>
<p>After initialization, you may now use the puts and putch functions to display characters to the screen. gl_putch(char c) takes a single character and displays it onto the screen. It can handle newlines which are represented as &#8216;\n&#8217; and tabs which are represented as &#8216;\t&#8217;. Backspaces by user input is handled as a &#8216;\b&#8217; character. This is similar to how people on <a href="http://forum.osdev.org/">The osdev.rg website</a> often handle character output in their custom operating systems. I&#8217;m not sure how it relates with normal c standards, but I imagine it is similar. Eventually I hope to implement a printf() type of function, but at the moment the putch() and puts() functions serve what I am doing well enough. Note: puts() is the same as putch() but instead takes a (char *) ie) a string. The string should also be null-terminated, or it will just continue until it hits a null character. The characters are automatically scrolled when the bottom of the screen is reached. </p>
<p>The only other really important function is gl_render(). This function is what should be called everytime the screen needs to be refreshed. This is usually in a for loop within your main() function in your app.</p>
<p>It is also possible to resize the screen using the gl_resize() function. By default the screen starts at 80X29 which is the maximum size with no virtualkeyboard showing, at the font size I selected. When the keyboard shows up, it fits 80&#215;14. In some sample code I&#8217;ll also show how keyboard input can be handled, how to blink the cursor and how to detect when the keyboard is shown or hidden.</p>
<p>For the rest of this guide, I&#8217;ll assume you are using the QNX Momentix IDE available from RIM&#8217;s developer website. To start, create a new project by going to File->New Blackberry Tablet OS C/C++ Project. Name it whatever you like, click next. Then choose the C language, and empty Application Project. You can now drag the gl_console.c, glconsole.h, bbutil.c and bbutil.h files into the src folder within the IDE to include them. You will probably want to copy the files and not link them when it asks. Before compiling, there are several libaries which must be linked to the project. You can do this by right clicking your project, going to properties. Then go to C/C++ General->Paths and Symbols->Libraries. Here you can add libraries. Each time you add one, be sure to check &#8220;add to all Configurations&#8221; so that you don&#8217;t need to do this again if you change from a device-debug to device-release build. The following libraries should be included:</p>
<ul style="margin-left:30px; margin-bottom: 10px;">
<li>bps</li>
<li>EGL</li>
<li>GLESv1_CM</li>
<li>freetype</li>
<li>png</li>
</ul>
<p>Now that all this is setup, it is possible to start you main() function and use the library. If you like you can right click on your src folder and click &#8220;new file&#8221; and create a main.c file or whatever you like to name it. While this isn&#8217;t the typical way you would include a library into a project, this way lets you edit the library source to your liking in case you want to further extend it. </p>
<p>The following example shows a skeleton of what is required to get the code to display some text:</p>
<div class="snippet"><pre><code>#include &lt;stdlib.h&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* EXIT_FAILURE */
#include &lt;stddef.h&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* NULL */
#include &lt;bps/bps.h&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* BPS_SUCCESS */
#include &lt;bps/screen.h&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* screen_event_get_event() */
#include &lt;bps/navigator.h&gt;&nbsp;&nbsp;/* NAVIGATOR_EXIT */
#include &quot;glconsole.h&quot;

void handleScreenEvent(bps_event_t *event);

int main(int argc, char * argv[])
{
&nbsp;&nbsp;int exit_application = 0;

&nbsp;&nbsp;if(EXIT_SUCCESS != gl_init())
&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;fprintf(stderr, &quot;error init\n&quot;);
&nbsp;&nbsp;&nbsp;&nbsp;return 0;
&nbsp;&nbsp;}

&nbsp;&nbsp;gl_puts(&quot;Hello gl console world!\n&quot;);

&nbsp;&nbsp;for(;;)
&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;bps_event_t *event = NULL;
&nbsp;&nbsp;&nbsp;&nbsp;if (bps_get_event(&amp;event, 0) != BPS_SUCCESS)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return EXIT_FAILURE;

&nbsp;&nbsp;&nbsp;&nbsp;if (event)
&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int domain = bps_event_get_domain(event);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (domain == screen_get_domain())
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;handleScreenEvent(event);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else if ((domain == navigator_get_domain()) &amp;&amp; (NAVIGATOR_EXIT == bps_event_get_code(event)))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit_application = 1;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (exit_application)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;gl_render();
&nbsp;&nbsp;}

&nbsp;&nbsp;gl_cleanup();
&nbsp;&nbsp;return 0;
}

void handleScreenEvent(bps_event_t *event)
{
&nbsp;&nbsp;/* do normal event handling here, see other bb examples */
}</code></pre></div>
<p>The key parts are calling gl_init() which initializes the library. Then within the main loop, the gl_render() function should be called which will actually render the text. Finally gl_cleanup() should be called before termination to properly free memory.</p>
<p>In the near future I plan to add some support to handle ansi encoded text (specifically for my telnet application) so that it can display colours and move the cursor around the screen using this standard.</p>
<p>Here are the files:<br />
<a href='http://www.jasonernst.com/wp-content/uploads/2012/01/glconsole.h'>glconsole.h</a><br />
<a href='http://www.jasonernst.com/wp-content/uploads/2012/01/glconsole.c'>glconsole.c</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2012/01/24/opengl-console-library-for-blackberry-native-sdk-playbook/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating a Bluetooth Access point (NAP) in Ubuntu 11.10</title>
		<link>http://www.jasonernst.com/2011/11/29/creating-a-bluetooth-access-point-nap-in-ubuntu-11-10/</link>
		<comments>http://www.jasonernst.com/2011/11/29/creating-a-bluetooth-access-point-nap-in-ubuntu-11-10/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 01:06:13 +0000</pubDate>
		<dc:creator>Jason Ernst</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wireless Networks]]></category>
		<category><![CDATA[11.10]]></category>
		<category><![CDATA[2011]]></category>
		<category><![CDATA[Access Point]]></category>
		<category><![CDATA[Bluetooth]]></category>
		<category><![CDATA[Bluez]]></category>
		<category><![CDATA[NAP]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.jasonernst.com/?p=1848</guid>
		<description><![CDATA[A Bluetooth NAP is similar to a Wi-Fi access point. In this case, we will be using NAP to share an Internet connection to another computer with Bluetooth. It is supposed to be able to support 7 or 8 devices connected at once in this manner. Eventually my personal goal is to use this in [...]]]></description>
				<content:encoded><![CDATA[<p>A Bluetooth NAP is similar to a Wi-Fi access point. In this case, we will be using NAP to share an Internet connection to another computer with Bluetooth. It is supposed to be able to support 7 or 8 devices connected at once in this manner. Eventually my personal goal is to use this in conjunction with a Wi-Fi connection to get slightly more speed at once or for some redundancy to help achieve a more ubiquitous/pervasive connection.</p>
<p>It turns out what should be a simple process is a bit tricky in Ubuntu. You would expect to be able to create an IP access point fairly easily so that you can share your Internet connection to other devices using Bluetooth. (It turns out it may be possible with Blueman &#8211; http://blog.larsstrand.org/2009/04/sharing-internet-connection-over.html, but I&#8217;ve never had any luck with setting it up this way.) Here&#8217;s some of the steps and resources I used to get it to work. I am using one laptop with a generic usb dongle and another toshiba netbook with built-in Bluetooth for this.</p>
<p>Before anything is started, you need to make sure the devices are paired and trusted with one another. I found the easiest way to get this to work is with blueman (it is in the Ubuntu repos). Also it seems to work better if you initiate the pairing from the client (the computer not sharing the connection).</p>
<p>First, you need a bridge interface. This is easy enough in Ubuntu, by editing the /etc/network/interfaces file. If the interface you wish to share is eth0 (if you want to share a Wi-Fi connection instead, you could switch this with something like wlan0 or whatever your Wi-Fi interface is), you could add something like this:</p>
<p><pre><pre>auto br1
iface br1 inet dhcp
&nbsp;&nbsp;bridge_ports eth0
&nbsp;&nbsp;bridge_fd 9
&nbsp;&nbsp;bridge_hello 2
&nbsp;&nbsp;bridge_maxage 12
&nbsp;&nbsp;bridge_stp off
</pre></pre></p>
<p>Next you need to make sure both computers can see each other via Bluetooth. This requires enabling scanning and turning the NAP into a master and the client(s) into slaves. This can be done as follows:<br />
<pre>sudo hciconfig hci0 piscan</pre><br />
and<br />
<pre>sudo hciconfig hci0 lm MASTER,ACCEPT</pre><br />
or<br />
<pre>sudo hciconfig hci0 lm SLAVE,ACCEPT</pre></p>
<p>You can now check to see if each of the computers can see each other on bluetooth by running:<br />
<pre>hcitool scan</pre><br />
where you should be able to see the opposite computer on each. </p>
<p>Next you want to start the NAP server on the computer you wish to share the connection from. (This is the computer with the bridge device). This script, which is available on the git repository will allow you to start up the NAP server. (it may also be possible to use pand, but I haven&#8217;t had any luck yet with it)<br />
This script is called test-nap. It takes a single argument, which is the name of the bridge device. So in our case we would first need to chmod +x the file (to make it executable), then run it like this: <pre>./test-nap br1</pre></p>
<div class="snippet"><pre><code>#!/usr/bin/python

import sys
import time
import dbus
from optparse import OptionParser, make_option

bus = dbus.SystemBus()

manager = dbus.Interface(bus.get_object(&quot;org.bluez&quot;, &quot;/&quot;),
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;org.bluez.Manager&quot;)

option_list = [
&nbsp;&nbsp;&nbsp;&nbsp;make_option(&quot;-i&quot;, &quot;--device&quot;, action=&quot;store&quot;,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type=&quot;string&quot;, dest=&quot;dev_id&quot;),
&nbsp;&nbsp;&nbsp;&nbsp;]
parser = OptionParser(option_list=option_list)

(options, args) = parser.parse_args()

if options.dev_id:
&nbsp;&nbsp;adapter_path = manager.FindAdapter(options.dev_id)
else:
&nbsp;&nbsp;adapter_path = manager.DefaultAdapter()

server = dbus.Interface(bus.get_object(&quot;org.bluez&quot;, adapter_path),
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;org.bluez.NetworkServer&quot;)

service = &quot;nap&quot;

if (len(args) &lt; 1):
&nbsp;&nbsp;bridge = &quot;tether&quot;
else:
&nbsp;&nbsp;bridge = args[0]

server.Register(service, bridge)

print &quot;Server for %s registered for %s&quot; % (service, bridge)

print &quot;Press CTRL-C to disconnect&quot;

try:
&nbsp;&nbsp;time.sleep(1000)
&nbsp;&nbsp;print &quot;Terminating connection&quot;
except:
&nbsp;&nbsp;pass

server.Unregister(service)</code></pre></div>
<p>After this, you can search from the client to see if the NAP service can be discovered with the command:<br />
<pre>sdptool search NAP</pre><br />
You should be able to see the NAP service from your server machine at this point.</p>
<p>The last thing to do is edit the /etc/network/interfaces file on the client side (the device which will connect to the Internet via Bluetooth. When pand connects, it uses a bnep0 interface. You need to add the following to your file:<br />
<pre>iface bnep0 inet dhcp</pre></p>
<p>Now we are ready to connect. This is how you connect:<br />
<pre><pre>pand -c &lt;mac address of your server BT device&gt;
sudo ifup bnep0</pre></pre></p>
<h3>Links:</h3>
<ul style="margin-left: 15px;">
<li><a href="http://global.hkepc.com/forum/redirect.php?tid=1710030&#038;goto=lastpost">http://global.hkepc.com/forum/redirect.php?tid=1710030&#038;goto=lastpost</a></li>
<li><a href="https://www.linux.com/learn/tutorials/346552-personal-area-networking-with-bluetooth">https://www.linux.com/learn/tutorials/346552-personal-area-networking-with-bluetooth</a></li>
<li><a href="http://ubuntuforums.org/showthread.php?t=1632825">http://ubuntuforums.org/showthread.php?t=1632825</a></li>
<li><a href="http://forum.doozan.com/read.php?2,2698">http://forum.doozan.com/read.php?2,2698</a></li>
<li><a href="http://xn--9bi.net/2009/06/17/tethering-iphone-3-0-to-ubuntu-9-04/">http://xn--9bi.net/2009/06/17/tethering-iphone-3-0-to-ubuntu-9-04/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonernst.com/2011/11/29/creating-a-bluetooth-access-point-nap-in-ubuntu-11-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
