<?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>Beaglebone Black &#8211; Diary of an Emacs tragic</title>
	<atom:link href="https://emacstragic.net/tag/beaglebone-black/feed/" rel="self" type="application/rss+xml" />
	<link>https://emacstragic.net</link>
	<description>Jason Lewis</description>
	<lastBuildDate>Fri, 23 Sep 2022 01:12:22 +0000</lastBuildDate>
	<language>en-AU</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://emacstragic.net/wp-content/uploads/2018/12/cropped-jason-lewis-profile-picture-square-150x150.jpg</url>
	<title>Beaglebone Black &#8211; Diary of an Emacs tragic</title>
	<link>https://emacstragic.net</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">38469313</site>	<item>
		<title>Howto quickly find your Beaglebone Black&#8217;s IP address</title>
		<link>https://emacstragic.net/uncategorized/howto-quickly-find-beaglebone-blacks-ip-address/</link>
					<comments>https://emacstragic.net/uncategorized/howto-quickly-find-beaglebone-blacks-ip-address/#comments</comments>
		
		<dc:creator><![CDATA[Jason]]></dc:creator>
		<pubDate>Wed, 23 Jul 2014 02:46:01 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[BBB]]></category>
		<category><![CDATA[Beaglebone Black]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[LED Clock]]></category>
		<guid isPermaLink="false">https://emacstragic.net/?p=1086</guid>

					<description><![CDATA[Whenever I connect my Beaglebone Black (BBB) to a network, I have to work out it&#8217;s IP address so I can ssh into it. This can be tricky. Some of your options are: connect to the serial terminal, or connect over the usb network interface which gives the BBB the address 192.168.7.2, log in and [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Whenever I connect my Beaglebone Black (BBB) to a network, I have to work out it&#8217;s IP address so I can ssh into it. This can be tricky. Some of your options are:</p>
<ol>
<li>connect to the serial terminal, or connect over the usb network interface which gives the BBB the address 192.168.7.2, log in and issue the command <code>ip addr</code>.</li>
<li>use <code>nmap</code> to try and search out its IP address on your subnet but this is time consuming and not very accurate I have found.</li>
<li>use <code>avahi-browse -rat</code> (thanks <a href="http://www.madox.net/blog/">Madox</a> for that tip.)</li>
</ol>
<p>Last night I came up with a Better Way<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" />. Rather than trying to determine the BBB&#8217;s address, why not use a fully qualified domain name and a dynamic dns service? I could then just type <code>ssh myfqdn.com</code> or whatever and log in. Think how that would simplify one&#8217;s life!<br />
To implement this, set up a dynamic DNS somewhere with a FQDN for your BBB. If you happen to have your own domain name already you can use a sub-domain from that. I think its fairly common for DNS hosts to offer an API to update your IP address. I happen to use Rimu Hosting and they have their own simple web api.<br />
Then you just need to write a little script to update the IP address every time the DHCP client receives a new IP address, and drop it into <code>/etc/dhcp/dhclient-exit-hooks.d/</code><br />
Here is my script. This will only work with Rimu Hosting as they have their own privately developed API, and you&#8217;d need to insert your own KEY into the script.</p>
<pre lang="bash">#!/bin/bash
# update ip address with rimu hosting. See https://rimuhosting.com/dns/dyndns.jsp
if [[ ! -z ${new_ip_address} ]]
then
   echo $(date +"%F %T") ${new_ip_address} &gt;&gt; /root/ddns.txt
   curl "https://rimuhosting.com/dns/dyndns.jsp?action=SET&amp;name=clock.emacstragic.net&amp;value=${new_ip_address}&amp;type=A&amp;api_key=XXX"
else
    echo "got no ip"
fi
</pre>
<h2>Update:</h2>
<p>I discovered this didn&#8217;t work at home. Turns out that dnsmasq in OpenWRT is set to ignore this kind of dns request, due to potential security risks. There is a solution to that. Add a <code>list rebind_domain</code> line to your /etc/config/dhcp line on the router.</p>
<pre>config dnsmasq
	.
	.
	.
	list    rebind_domain 'clock.emacstragic.net'
</pre>
<p>Thanks to Michal Čihař for <a href="http://blog.cihar.com/archives/2011/01/31/openwrt-and-resolving-private-ranges/">the solution</a> to that.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://emacstragic.net/uncategorized/howto-quickly-find-beaglebone-blacks-ip-address/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1086</post-id>	</item>
		<item>
		<title>Backup your Beaglebone Black</title>
		<link>https://emacstragic.net/uncategorized/backup-beaglebone-black/</link>
					<comments>https://emacstragic.net/uncategorized/backup-beaglebone-black/#respond</comments>
		
		<dc:creator><![CDATA[Jason]]></dc:creator>
		<pubDate>Fri, 23 May 2014 04:12:12 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Making things]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Beaglebone Black]]></category>
		<guid isPermaLink="false">https://emacstragic.net/?p=1045</guid>

					<description><![CDATA[Using a method I previously wrote about, it&#8217;s quite easy to backup your Beaglebone Black over the network. ssh root@bbb 'tar cf - / 2>/dev/null' &#124; pv -cN tar \ &#124; bzip2 &#124; pv -cN bzip2 > bbb-backup-tar.bz2 It runs the bzip compression locally because presumably it will be faster than on the Beaglebone Black. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Using a method I <a href="/pull-a-backup-from-a-remote-host-with-ssh-and-tar/" title="Pull a backup from a remote host with ssh and tar">previously wrote about</a>, it&#8217;s quite easy to backup your Beaglebone Black over the network.</p>
<pre LANG=bash>
ssh root@bbb 'tar cf - / 2>/dev/null' | pv -cN tar \
   | bzip2 | pv -cN bzip2 > bbb-backup-tar.bz2
</pre>
<p>It runs the bzip compression locally because presumably it will be faster than on the Beaglebone Black. I didn&#8217;t actually test that hypothesis though.<br />
pv gives nice little indicators:</p>
<pre LANG=bash>
    bzip2: 1.81MB 0:00:12 [ 995kB/s] [      <=>                               ]
      tar: 36.2MB 0:00:12 [3.84MB/s] [                             <=>        ]
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://emacstragic.net/uncategorized/backup-beaglebone-black/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1045</post-id>	</item>
		<item>
		<title>LED Clock Project</title>
		<link>https://emacstragic.net/uncategorized/led-clock-project/</link>
					<comments>https://emacstragic.net/uncategorized/led-clock-project/#respond</comments>
		
		<dc:creator><![CDATA[Jason]]></dc:creator>
		<pubDate>Mon, 14 Apr 2014 14:39:07 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Making things]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[BBB]]></category>
		<category><![CDATA[Beaglebone Black]]></category>
		<category><![CDATA[LED Clock]]></category>
		<guid isPermaLink="false">https://emacstragic.net/?p=988</guid>

					<description><![CDATA[For a long time I have wanted a bedside clock that would keep accurate time via some external mechanism, and would take care of daylight savings automatically. I eventually decided that the best approach would be to use a wifi enabled device and use the NTP protocol for keeping the time accurate. After wasting several [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>For a long time I have wanted a bedside clock that would keep accurate time via some external mechanism, and would take care of daylight savings automatically. I eventually decided that the best approach would be to use a wifi enabled device and use the NTP protocol for keeping the time accurate.<br />
After wasting several months hacking away on an Olimex IMX 233 that never worked reliably, I decided to change platform to the Beaglebone Black (BBB).<br />
Along the way I realised there were a few other features I needed:</p>
<ul>
<li>LEDs should dim with the ambient light so the clock doesn&#8217;t light up the whole bedroom</li>
<li>The display needs to be big enough for me to read from across the bedroom without my glasses on.<br />
To make them dimmable I decided to get a pair of <a href="https://www.adafruit.com/products/1429" title="Adafruit 24-Channel 12-bit PWM LED Driver"></a><br />
I also needed a power supply that could give 12v for the LED drivers but 5v for the BBB. I found a nice little board on ebay for a few bucks that seems to do the trick. Its called the Benq 12v-5v-3.3v<br />
I hooked that up tonight so now I only need the one power supply to run the LEDs and the BBB.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://emacstragic.net/uncategorized/led-clock-project/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">988</post-id>	</item>
	</channel>
</rss>
