<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Doc's Random Thoughts]]></title><description><![CDATA[Doc's Random Thoughts]]></description><link>http://blog.wiredgoats.com/</link><image><url>http://blog.wiredgoats.com/favicon.png</url><title>Doc&apos;s Random Thoughts</title><link>http://blog.wiredgoats.com/</link></image><generator>Ghost 5.27</generator><lastBuildDate>Tue, 16 Jun 2026 18:51:19 GMT</lastBuildDate><atom:link href="http://blog.wiredgoats.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Software setup for Adafruit's LED Matrix Sand Toy]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>As I talked about in <a href="http://blog.wiredgoats.com/working-with-adafruits-rgb-matrix-bonnet/">my post where I was working with Adafruit&apos;s Matrix Bonnet</a>, Adafruit takes a lot of shortcuts in their tutorial when it comes to working with the software side of the <a href="https://adafruit.com/product/3211">Matrix Bonnet</a>. I don&apos;t think that&apos;s a problem for</p>]]></description><link>http://blog.wiredgoats.com/software-setup-for-adafruits-led-matrix-sand-toy/</link><guid isPermaLink="false">6680767eca40810001a9524b</guid><dc:creator><![CDATA[Dustin Mollo]]></dc:creator><pubDate>Mon, 18 Jun 2018 20:38:47 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>As I talked about in <a href="http://blog.wiredgoats.com/working-with-adafruits-rgb-matrix-bonnet/">my post where I was working with Adafruit&apos;s Matrix Bonnet</a>, Adafruit takes a lot of shortcuts in their tutorial when it comes to working with the software side of the <a href="https://adafruit.com/product/3211">Matrix Bonnet</a>. I don&apos;t think that&apos;s a problem for the main audience they are going for, but I like to know what&apos;s going on behind the scenes. So as I did for my other Matrix Bonnet writeup, I&apos;m going to break out the details of what I did to get their LED Matrix Sand Toy up and running.</p>
<p>Obviously, you&apos;re going to want a Pi Zero, or Zero W, with the latest and greatest Raspbian Lite on it. Next, I grabbed <a href="https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/rgb-matrix.sh">their setup script</a> and started figuring out what else I wanted to tweak.</p>
<p>Since they&apos;re using the hardware mod to decrease flicker, and this is a purpose-built setup, as opposed to my previous one which was just for testing and experimenting, I&apos;m going to compile the software to default to use the Adafruit hardware. Also, technically, I just needed to compile the Python-related parts, but I opted to get everything set up just in case I wanted to play around with the other demos.</p>
<p><code>cd rpi-rgb-led-matrix/ make -C examples-api-use HARDWARE_DESC=adafruit-hat-pwm cd utils/ make HARDWARE_DESC=adafruit-hat-pwm cd ../bindings/python/ make build-python HARDWARE_DESC=adafruit-hat-pwm sudo make install-python HARDWARE_DESC=adafruit-hat-pwm sudo make clean make build-python HARDWARE_DESC=adafruit-hat-pwm PYTHON=$(which python3) sudo make install-python HARDWARE_DESC=adafruit-hat-pwm PYTHON=$(which python3) sudo chown -R pi:pi .</code></p>
<p>Next, we should disable the built-in audio hardware. Edit /boot/config.txt and set audio to off:</p>
<p><code>dtparam=audio=off</code></p>
<p>Once all the above is done, you&apos;ll need to reboot the Pi for the audio driver change to take effect.</p>
<p>After the reboot, I followed the rest of the tutorial and cloned the <a href="https://github.com/adafruit/Adafruit_PixelDust.git">Adafruit Pixel Dust repo</a>, enabled I2C via raspi-config and finally compiled the code.</p>
<p>I then opted to make the Raspberry Pi read-only. I followed <a href="https://petr.io/en/blog/2015/11/09/read-only-raspberry-pi-with-jessie/">the petr.io site</a> that Adafruit linked to, instead of running Adafruit&apos;s script. I skipped into step 2 and did the following:</p>
<p><code>sudo apt-get remove --purge wolfram-engine triggerhappy cron logrotate dbus dphys-swapfile xserver-common lightdm fake-hwclock sudo apt-get autoremove --purge sudo apt-get install busybox-syslogd; dpkg --purge rsyslog</code></p>
<p>In his Step 3, I noticed the Stretch-based kernel command line looks different, but I did end up adding the &quot;fastboot noswap ro&quot; to the end of the command line and that ended up working fine.</p>
<p>I then followed Step 4, 5 and 6 as-is. I did some reading up on the UsePrivilegeSeparation option for OpenSSH and it looks like it&apos;s been deprecated. I didn&apos;t bother diving much deeper to understand what will need to be done in the future. Sorry, Future Dustin.</p>
<p>In Step 7, I moved the /etc/resolv.conf file to the /tmp name and location and then created the symlink.</p>
<p>I skipped the watchdog part, but I did end up adding the bashrc items to both the pi user&apos;s .bashrc and to /etc/bash.bashrc. The local user&apos;s .bashrc ends up overriding the PS1 variable, so at the very least, you have to tweak that file...or just put the block in both places. I opted for the lazy option and put it in both locations.</p>
<p>After all of that, everything works great. Another great project idea from Adafruit!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Pimoroni's Scroll Bot]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>I finally got around to putting together Pimoroni&apos;s great <a href="https://shop.pimoroni.com/products/scroll-bot-pi-zero-w-project-kit">Scroll Bot kit</a>. Once put together and the attached Pi Zero W configured, it looks something like this:</p>
<p><img src="http://blog.wiredgoats.com/content/images/2018/03/scrollbotkit.png" alt="picture of a completed scroll bot kit" loading="lazy"></p>
<p>This kit is great and all, but their tutorial is geared toward someone who just wants to put it together and</p>]]></description><link>http://blog.wiredgoats.com/pimoronis-scroll-bot/</link><guid isPermaLink="false">6680767eca40810001a9524a</guid><dc:creator><![CDATA[Dustin Mollo]]></dc:creator><pubDate>Sun, 18 Mar 2018 21:31:35 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>I finally got around to putting together Pimoroni&apos;s great <a href="https://shop.pimoroni.com/products/scroll-bot-pi-zero-w-project-kit">Scroll Bot kit</a>. Once put together and the attached Pi Zero W configured, it looks something like this:</p>
<p><img src="http://blog.wiredgoats.com/content/images/2018/03/scrollbotkit.png" alt="picture of a completed scroll bot kit" loading="lazy"></p>
<p>This kit is great and all, but their tutorial is geared toward someone who just wants to put it together and go, so they provide a shell script that takes care of installing all sorts of things for you. Where&apos;s the fun in that?!?! Here are my notes for making this work on a fresh Raspbian Lite (the Stretch version as of this writing) image.</p>
<p>First, install the packages you&apos;ll need:<br>
<code>sudo apt-get install git python-scrollphathd python3-scrollphathd python-flask python3-flask python-pil python3-pil</code></p>
<p>After the above is complete, you should be able to light a single dot:</p>
<pre><code>import scrollphathd as sphd
sphd.rotate(180)
sphd.set_pixel(0, 1, 0.5)
sphd.show()
</code></pre>
<p>You can clear the dot with:</p>
<pre><code>sphd.clear()
sphd.show()
</code></pre>
<p>From there, you&apos;re on your own. If you want to try out the Scroll Bot demo (ie, draw the image as seen on Pimoroni&apos;s store front), you&apos;ll have to clone their repo:<br>
<code>git clone https://github.com/pimoroni/scroll-phat-hd.git</code></p>
<p>And then you can run the demo:<br>
<code>cd scroll-phat-hd/examples/; ./robot-mouth.py</code></p>
<p>That&apos;s it...have fun!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Working with Adafruit's RGB Matrix Bonnet]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>I opted to follow the library author&apos;s docs after using the tutorial to get familiar with the hardware. The library and CLI tools are at:</p>
<p><a href="https://github.com/hzeller/rpi-rgb-led-matrix">https://github.com/hzeller/rpi-rgb-led-matrix</a></p>
<p>Clean up un-needed cruft:<br>
<code>sudo apt-get autoremove --purge bluez bluez-firmware pi-bluetooth triggerhappy pigpio </code></p>
<p>Install some needed dependencies and</p>]]></description><link>http://blog.wiredgoats.com/working-with-adafruits-rgb-matrix-bonnet/</link><guid isPermaLink="false">6680767eca40810001a95249</guid><dc:creator><![CDATA[Dustin Mollo]]></dc:creator><pubDate>Fri, 16 Mar 2018 22:47:21 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>I opted to follow the library author&apos;s docs after using the tutorial to get familiar with the hardware. The library and CLI tools are at:</p>
<p><a href="https://github.com/hzeller/rpi-rgb-led-matrix">https://github.com/hzeller/rpi-rgb-led-matrix</a></p>
<p>Clean up un-needed cruft:<br>
<code>sudo apt-get autoremove --purge bluez bluez-firmware pi-bluetooth triggerhappy pigpio </code></p>
<p>Install some needed dependencies and tools:<br>
<code>sudo apt-get install joe git python2.7-dev python-pillow python3-dev python3-pillow libgraphicsmagick++-dev libwebp-dev </code></p>
<p>Clone the repo:<br>
<code>git clone https://github.com/hzeller/rpi-rgb-led-matrix.git</code></p>
<p>Build things:<br>
<code>cd rpi-rgb-led-matrix/ make -C examples-api-use cd utils/ make cd ../bindings/python/ make build-python make build-python PYTHON=$(which python3) sudo make install-python sudo make install-python PYTHON=$(which python3) </code></p>
<p>((get some coffee....))</p>
<p>The Python build above, obviously, only builds for Python 3. I&apos;m not going to bother with 2.x...figure if I&apos;m going to play with Python, I should learn the future rather than the past.</p>
<p>Another note about the build steps I&apos;ve followed above, is that they assume you&apos;re going to pass the correct argument (--led-gpio-mapping=adafruit-hat or --led-gpio-mapping=adafruit-hat-pwm as appropriate) to tell the tool/command/whatever to use the Adafruit Bonnet.</p>
<p>And I lied... I just read further in the Python library docs, and the author has this:</p>
<blockquote>
<p>Also interesting: Python3 is a little bit slower than Python2.7. So if you can, stick with Python2.7 for now.</p>
</blockquote>
<p>Heavy sigh...I&apos;ve gone back and edited the build commands above to include building for Python 2.7.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Getting Started with Adafruit's WICED Feather on Fedora]]></title><description><![CDATA[<!--kg-card-begin: markdown--><hr>
<p><strong>UPDATE, 2016-04-04:</strong> Quick update to clarify how the new udev rules get applied after creating the file. No reboot or service restart required.</p>
<p><strong>UPDATE, 2016-04-03:</strong> Just as I was about to post this write-up, I discovered some of the info below is included in the <a href="https://github.com/adafruit/Adafruit_WICED_Arduino/blob/master/README.md">README.md</a> included in the</p>]]></description><link>http://blog.wiredgoats.com/getting-started-with-adafruits-wiced-feather-on-fedora/</link><guid isPermaLink="false">6680767eca40810001a95248</guid><dc:creator><![CDATA[Dustin Mollo]]></dc:creator><pubDate>Sun, 03 Apr 2016 17:34:07 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><hr>
<p><strong>UPDATE, 2016-04-04:</strong> Quick update to clarify how the new udev rules get applied after creating the file. No reboot or service restart required.</p>
<p><strong>UPDATE, 2016-04-03:</strong> Just as I was about to post this write-up, I discovered some of the info below is included in the <a href="https://github.com/adafruit/Adafruit_WICED_Arduino/blob/master/README.md">README.md</a> included in the BSP files. Their information is only for Debian/Ubuntu distros and they incorrectly state that you need to restart udev for the rules changes to take effect. But hey - the info was there if you knew where to look.</p>
<hr>
<p>I recently picked up Adafruit&apos;s latest Feather board - the <a href="https://www.adafruit.com/products/3056">the WICED Feather</a>. They have a really great <a href="https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi/">tutorial</a> but it&apos;s light on tips and tricks for using the boards under Linux. I thought I&apos;d write down what I had to do to start working with the board on my system in the hopes that it&apos;s useful to others. Or at least to me in the future ;)</p>
<p><strong>NOTE:</strong> My desktop is running Fedora 23, so the file locations and package names are based on that. They should be similar to Debian or Debian-based systems, but you&apos;ll likely have to translate appropriately.</p>
<h2 id="udevprereqs">udev Prereqs</h2>
<p>If you&apos;ve ever programmed Arduinos or other microcontrollers on Linux, you probably know what a pain in the butt it is to deal with permissions and the udev rules needed to make things work for a normal, non-root user. The WICED is extra special because it will identify itself as two different USB PIDs to your host system depending on which mode it is in. In normal mode, it uses PID 0010 and in DFU mode, it uses 0008. This tripped me up until I double checked my kernel output and found the second PID when the WICED goes into DFU mode.</p>
<p>When in normal mode, here is an example of what you should see when you connect the board to your Linux box. I&apos;ve removed the date/time and hostname to make it easier to read.</p>
<pre><code>kernel: usb 3-9.1: USB disconnect, device number 18
kernel: usb 3-9.1: new full-speed USB device number 19 using xhci_hcd
kernel: usb 3-9.1: New USB device found, idVendor=239a, idProduct=0010
kernel: usb 3-9.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: usb 3-9.1: Product: WICED Feather Board
kernel: usb 3-9.1: Manufacturer: Adafruit Industries
kernel: usb 3-9.1: SerialNumber: 00000000001B
kernel: cdc_acm 3-9.1:1.0: ttyACM0: USB ACM device
kernel: cdc_acm 3-9.1:1.2: ttyACM1: USB ACM device
</code></pre>
<p>Notice Adafruit&apos;s VID (239a) and the board&apos;s PID (0010). When you put the board into DFU mode, either manually (double-clicking the reset button) or when uploading code via the Arduino IDE, you&apos;ll see something like this in your kernel logs:</p>
<pre><code>kernel: usb 3-9.1: USB disconnect, device number 19
kernel: usb 3-9.1: new full-speed USB device number 20 using xhci_hcd
kernel: usb 3-9.1: New USB device found, idVendor=239a, idProduct=0008
kernel: usb 3-9.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: usb 3-9.1: Product: WICED Feather DFU
kernel: usb 3-9.1: Manufacturer: Adafruit Industries
kernel: usb 3-9.1: SerialNumber: 00000000001C
</code></pre>
<p>Notice that bot the PID and SerialNumber have changed, but the VID has stayed the same. We&apos;ll need to account for both of these PIDs in our udev rules. I have the following in <em>/etc/udev/rules.d/50-arduino.rules</em>:</p>
<pre><code># Adafruit devices
ATTRS{idVendor}==&quot;239a&quot;, ENV{ID_MM_DEVICE_IGNORE}=&quot;1&quot;
# WICED Feather
ATTRS{idVendor}==&quot;239a&quot;, ATTRS{idProduct}==&quot;0010&quot;, ENV{ID_MM_DEVICE_IGNORE}=&quot;1&quot;
ATTRS{idVendor}==&quot;239a&quot;, ATTRS{idProduct}==&quot;0010&quot;, ENV{MTP_NO_PROBE}=&quot;1&quot;
SUBSYSTEMS==&quot;usb&quot;, ATTRS{idVendor}==&quot;239a&quot;, ATTRS{idProduct}==&quot;0010&quot;, GROUP:=&quot;wheel&quot;, MODE:=&quot;0660&quot;
ATTRS{idVendor}==&quot;239a&quot;, ATTRS{idProduct}==&quot;0008&quot;, ENV{ID_MM_DEVICE_IGNORE}=&quot;1&quot;
ATTRS{idVendor}==&quot;239a&quot;, ATTRS{idProduct}==&quot;0008&quot;, ENV{MTP_NO_PROBE}=&quot;1&quot;
SUBSYSTEMS==&quot;usb&quot;, ATTRS{idVendor}==&quot;239a&quot;, ATTRS{idProduct}==&quot;0008&quot;, GROUP:=&quot;wheel&quot;, MODE:=&quot;0660&quot;
</code></pre>
<p>Note that I set the group ownership above to the <em>wheel</em> group. You can use whatever group you want, so long as the the user you&apos;re logging in as is a member of that group.</p>
<p>I&apos;ve also added lines to prevent the MTP and ModemManager subsystems from probing the device when connected.</p>
<p>Once you have your udev rules file all set up, all you need to do is connect your device and the proper files with your specified permissions and ownership will be created. No need to reboot or restart services. If you already had your Feather connected to your host before you created the rules file, simply disconnect, count to five or so, and reconnect.</p>
<h2 id="additionalospackages">Additional OS Packages</h2>
<p>Next, you&apos;ll need to install some support packages that are either required by the BSP provided by Adafruit, or are handy when working with the board.</p>
<p><code>sudo dnf install pyusb python-click dfu-util</code></p>
<p>The pyusb and python-click packages are used by the <a href="https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi/feather-dfu-dot-py"><em>feather_dfu.py</em></a>  command that is part of the BSP. The <em>dfu-util</em> binary is included for OS X and Windows in the BSP, but not Linux - it relies on the tool installed elsewhere on the system.</p>
<h2 id="arduinobsp">Arduino BSP</h2>
<p>Make sure you have the Arduino IDE/environment installed and functioning. I downloaded the latest as of this writing (1.6.8) and so far I haven&apos;t had any issues.</p>
<p>Now you can follow the Adafruit tutorial&apos;s <a href="https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi/get-the-wiced-bsp">instructions to install the BSP</a>. I used the git option and things worked fine.</p>
<h2 id="serialportoptions">Serial Port options</h2>
<p>Per <a href="https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi/arduino-ide-setup#selecting-the-serial-port">the Adafruit tutorial</a>, the serial ports ended up being ordered as-described. <em>/dev/ttyACM0</em> is the &quot;programming&quot; port and should be used as the target in the Arduino IDE and <em>/dev/ttyACM1</em> is the &quot;debug&quot; port that currently responds to AT-style commands.</p>
<h2 id="quirksandwrapup">Quirks and Wrap-up</h2>
<p>That&apos;s it - you should be able to flash your WICED Feather with your code now.</p>
<p>I will note that I&apos;ve seen the following output when I flash code:</p>
<pre><code class="language-text">Sketch uses 27,104 bytes (20%) of program storage space. Maximum is 131,072 bytes.
Global variables use 5,560 bytes of dynamic memory.
dfu-util 0.8

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Opening DFU capable USB device...
ID 239a:0008
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: &quot;Internal Flash   &quot;
Downloading to address = 0x080e0000, size = 32264
Download	[=========================] 100%        32264 bytes
Download done.
File downloaded successfully
dfu-util: Error during download get_status
</code></pre>
<p>Ignoring <em>dfu-util</em> complaining about an invalid suffix signature (???), even though the last message is an error, note that it does show that the code downloaded successfully and it does in fact work. I&apos;m writing this off as part of the &quot;Developer Edition&quot; quirks mentioned on the product page. I was clearly warned and I expected this.</p>
<p>Happy flying with your new Feather(s)!</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Getting my SSL house in order]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Last week&apos;s <a href="http://www.cs.sonoma.edu/colloquium/">Sonoma State Computer Science Colloquium</a> welcomed Jeremy Gillula from the <a href="https://eff.org">EFF</a> to talk about their <a href="https://letsencrypt.org/">Let&apos;s Encrypt project</a>. The have many goals, but basically they want to make it easy and free to encrypt all websites.</p>
<p>This got me thinking that I needed to</p>]]></description><link>http://blog.wiredgoats.com/getting-my-ssl-house-in-order-2/</link><guid isPermaLink="false">6680767eca40810001a95246</guid><dc:creator><![CDATA[Dustin Mollo]]></dc:creator><pubDate>Sun, 27 Sep 2015 19:19:14 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Last week&apos;s <a href="http://www.cs.sonoma.edu/colloquium/">Sonoma State Computer Science Colloquium</a> welcomed Jeremy Gillula from the <a href="https://eff.org">EFF</a> to talk about their <a href="https://letsencrypt.org/">Let&apos;s Encrypt project</a>. The have many goals, but basically they want to make it easy and free to encrypt all websites.</p>
<p>This got me thinking that I needed to get the SSL certificate I use here re-issued to move away from SHA-1. In resolving that problem, I wanted to see if I could up my <a href="https://www.ssllabs.com/index.html">Qualys SSL Labs</a> score. I was able to get my certificate re-issued relatively easily, but I had some chain issues. One of the reasons why Let&apos;s Encrypt exists, is because encryption is hard. Jeremy even made the point many of us sysadmins do all the time - it&apos;s even hard for people like us who have been doing computers for years.</p>
<p>I always thought chains only mattered on the client, so that you could very the server&apos;s certificate all the way back to the CA. Turns out, you should be configuring your server to also present the chain to the client. My certificate vendor sent me the two chain files and the CA file. All I had to do was place the files on the server, and add in the correct Apache config directives.</p>
<pre><code class="language-#">  SSLCACertificateFile    /etc/apache2/ssl.crt/AddTrustExternalCARoot.crt

  # Server Certificate Chain:
  SSLCertificateChainFile /etc/apache2/ssl.crt/COMODORSAAddTrustCA.crt

  # Server Certificate Chain:
  SSLCertificateChainFile /etc/apache2/ssl.crt/COMODORSADomainValidationSecureServerCA.crt
</code></pre>
<p>After reloading Apache&apos;s config, I was able to get an &quot;A&quot; on the Qualys SSL report. Turns out it wasn&apos;t as hard as I thought.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Beginning the JeeNode Adventure]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p><em><strong>Update 2013-04-05: I got thinking and realized the SMD version of the JeeNode includes the activity LED - the normal version does not. So while the Hello World sample makes sense, it would be nice if they reminded folks of the SMD difference. I also found a reference to the</strong></em></p>]]></description><link>http://blog.wiredgoats.com/beginning-the-jeenode-adventure/</link><guid isPermaLink="false">6680767eca40810001a95245</guid><category><![CDATA[jeenode]]></category><category><![CDATA[arduino]]></category><category><![CDATA[electronics]]></category><category><![CDATA[hardware]]></category><dc:creator><![CDATA[Dustin Mollo]]></dc:creator><pubDate>Sat, 05 Apr 2014 00:56:54 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p><em><strong>Update 2013-04-05: I got thinking and realized the SMD version of the JeeNode includes the activity LED - the normal version does not. So while the Hello World sample makes sense, it would be nice if they reminded folks of the SMD difference. I also found a reference to the activity LED and the RF12demo command to control it: <a href="http://jeelabs.org/2009/11/06/activity-led/">&quot;Activity LED&quot;</a></strong></em></p>
<p>So I took this week off to play around with some electronics projects I&apos;ve been thinking about for a while. One of those is the <a href="http://jeelabs.net/projects/hardware/wiki/JeeNode">JeeNode</a>. The JeeNode is, yet another, Arduino-compatible device. The cool thing is it has a built-in radio and supporting library. Glancing around that website, the <a href="http://moderndevice.com/">Modern Device</a> website (the U.S. partner) and the <a href="http://jeelabs.org/">JeeLabs Blog</a>, it looked like there was tons of documentation that would be helpful in getting started. Little did I know what I was getting myself into.</p>
<p><img src="http://wiredgoats.com/imgs/jeenode-first-bits.png" alt="Picture of JeeNode bits" loading="lazy"></p>
<p>In the picture above, you can see the collection of parts I purchased. I also ordered a battery box and some extra header pins. From top to bottom, that&apos;s a BUB II (a USB to TTL serial adapter to make programming the JeeNode easier), a JeeNode SMD, a JeeLink (a JeeNode in a USB key form factor that makes it easy for a host to communicate with your JeeNode network), and a Room Board kit. I opted to forgo the SHT11 sensor, because it adds about 30 bucks to the cost of the kit. I&apos;m waiting for a DS18B20 to arrive, that I&apos;ll be using instead.</p>
<p>I got the node and BUB soldered up and went to the web to read up on first use guidance. Instead of finding helpful advice, I was met with broken links and either out-dated references to older revisions of the boards or perhaps the info is just plain wrong. It didn&apos;t help that I have exactly zero experience with the Arduino universe. In hindsight, I probably should have started there before jumping into the JeeNode world.</p>
<h1 id="firststep">First Step</h1>
<p>So in hindsight, I should have installed the Arduino IDE first. I tried talking to the JeeNode using minicom, which worked, but I wasn&apos;t sure if the lack of output was a minicom configuration issue (oh how I didn&apos;t miss you at all, serial communications) or I was doing something wrong with the node. On Fedora, the latest stable Arduino IDE was available, so I installed that:</p>
<p><code>sudo yum install arduino</code></p>
<p>I ignored everything I read online about chmod&apos;ing etc. When I first ran the IDE, it suggested my user be added to a couple of groups and offered to do it for me. It runs the appropriate <code>usermod</code> commands for you and then requests you to logout and back in for the group changes to take affect. Once you have the IDE up and functioning, you can launch the Serial Monitor and start playing with the RF12demo sketch that comes pre-installed. The initial output from RF12demo is a usage screen.</p>
<p>The commands are awkward and unclear, unless you read the RF12demo documentation. In hindsight, I should have read it, but I wanted to see my node <strong>do</strong> something! Both my JeeNode SMD and JeeLink came with an older version of the demo sketch (v7). If you type <code>1l</code> and send it to the node, a blue LED on the node will light (<code>0l</code> will turn it off). The current version (v12 as of this writing) doesn&apos;t list the <code>l</code> command as an option, but it&apos;s still in there and will work just dandy. It lives!!!</p>
<p>Next, I mistakenly tried to perform the <a href="http://jeelabs.net/projects/cafe/wiki/POF_02_-_Hello_world">&quot;Hello World&quot;</a> demo on their site. What they don&apos;t bother to tell you is that B1 pin the sketch is going to pull high also happens to be what the blue LED on the node is attached to. The other big problem you&apos;ll run into if you&apos;ve never played with the Arduino language, is that sketch <em>will not work</em> as written. I have no idea if it did in an older version of the IDE or what....but I can&apos;t believe they haven&apos;t updated it or at least added clarification. Whatever. Luckily, I already know how to code, so I read the output from the IDE and tweaked things accordingly. Here is what the sketch should look like:</p>
<pre><code>#define LED_PIN 9
void setup () {
  pinMode(LED_PIN, OUTPUT);
}

void loop () {
  digitalWrite(LED_PIN, 1);
  delay(500);
  digitalWrite(LED_PIN, 0);
  delay(500);
}

int main () {
  init();
  setup();
  for(;;)
  loop();
  return 0;
}
</code></pre>
<h1 id="factoryreset">Factory reset?</h1>
<p>OK, so I got the demo sketch working. But now I had lost the RF12demo. Crap. Luckily, everything is Open Source and on GitHub! Check out the <a href="https://github.com/jcw/jeelib">JeeLib Project</a>. They have a <a href="http://jeelabs.net/projects/jeelib/wiki">JeeLib Wiki page</a>, but guess what - it doesn&apos;t tell you about the Arduino gotchas when trying to load the library! The first mistake I made, was to assume that I needed to unzip the file. Nope - the IDE expects you to provide it a zip file. The second problem is that the IDE doesn&apos;t like anything but alphanumberics in the top directory of the zip file. If you download the zip file of the master branch, the top directory in the zip file is called &quot;jeelib-master&quot; and the IDE chokes. You&apos;ll have unzip, rename, then re-zip the directory tree to get the library to properly import.</p>
<p>Once you have the library imported, you can go to the File menu, then examples, then JeeLib. In there you can navigate to the RF12demo. Compile and download it to your node (or link) and you&apos;re back to factory defaults.</p>
<h1 id="whatsnext">What&apos;s next</h1>
<p>Well that&apos;s enough for now. I need some dinner and a break - my eyes are starting to bleed. I have some more bits coming next week (like the Dallas Semi part), so truly useful things are still a ways off. This weekend I&apos;ll clean my circuit boards and play around with coding some simple network demos so I can get the feel for using the radios.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[HP EliteBook 840 G1 & Fedora 20]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>Some random notes on getting Fedora 20 working on an HP EliteBook 840 G1.</p>
<ul>
<li><strong>Brightness keys don&apos;t work</strong>
<ul>
<li>Edit /etc/default/grub and add <code>acpi_backlight=vendor</code> to the <code>GRUB_CMDLINE_LINUX</code> line.</li>
<li>Depending on how you&apos;re booting,run the appropriate command to regenerate the grub2</li></ul></li></ul>]]></description><link>http://blog.wiredgoats.com/hp-elitebook-840-fedora-20/</link><guid isPermaLink="false">6680767eca40810001a95243</guid><dc:creator><![CDATA[Dustin Mollo]]></dc:creator><pubDate>Fri, 04 Apr 2014 23:50:52 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>Some random notes on getting Fedora 20 working on an HP EliteBook 840 G1.</p>
<ul>
<li><strong>Brightness keys don&apos;t work</strong>
<ul>
<li>Edit /etc/default/grub and add <code>acpi_backlight=vendor</code> to the <code>GRUB_CMDLINE_LINUX</code> line.</li>
<li>Depending on how you&apos;re booting,run the appropriate command to regenerate the grub2 config
<ul>
<li>BIOS: <code>grub2-mkconfig -o /boot/grub2/grub.cfg</code></li>
<li>UEFI: <code>grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg</code></li>
</ul>
</li>
<li>Good backlight tips: <a href="https://wiki.archlinux.org/index.php/backlight">https://wiki.archlinux.org/index.php/backlight</a></li>
</ul>
</li>
<li><strong>Installing w/ bcache</strong>
<ul>
<li>If your 840 was purchased with the small SSD cache drive, you can use it to accelerate the hard drive by using bcache. There&apos;s a good post on the Fedora Forums: <a href="http://forums.fedoraforum.org/showthread.php?t=296015">http://forums.fedoraforum.org/showthread.php?t=296015</a> I didn&apos;t follow his post exactly. For example, I use LVM2. I&apos;ll update this post later with info on that.</li>
</ul>
</li>
</ul>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>