<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Programming | Breek Een Been</title>
    <link>https://blog.breekeenbeen.nl/tag/programming/</link>
      <atom:link href="https://blog.breekeenbeen.nl/tag/programming/index.xml" rel="self" type="application/rss+xml" />
    <description>Programming</description>
    <generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>en-us</language><copyright>Rob Maas</copyright><lastBuildDate>Tue, 24 Jul 2012 15:51:01 +0200</lastBuildDate>
    <image>
      <url>https://blog.breekeenbeen.nl/images/icon_hue0c3a5851739ca8a2afc787728ee763e_182872_512x512_fill_lanczos_center_3.png</url>
      <title>Programming</title>
      <link>https://blog.breekeenbeen.nl/tag/programming/</link>
    </image>
    
    <item>
      <title>Building an Awesome Led Cube 8x8x8</title>
      <link>https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/</link>
      <pubDate>Tue, 24 Jul 2012 15:51:01 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/</guid>
      <description>&lt;p&gt;It has been a long time since I posted something really &amp;ldquo;techie&amp;rdquo; out here. In the mean time I was however busy with a very technical project at least is was for me. It had to do with &amp;ldquo;digital&amp;rdquo; electronics and Microcontroller(s), while this stuff is not completely new for me, it was at least a bit rusty. Sometimes (more than sometimes in my case), you see something on the Internet which is extremely cool and you can resist it get it yourself. This was the case when I accidentally saw this YouTube video.&lt;/p&gt;

&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;
  &lt;iframe src=&#34;https://www.youtube.com/embed/6mXM-oGggrM&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; allowfullscreen title=&#34;YouTube Video&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;Call it &amp;ldquo;nerdy&amp;rdquo; or whatever you want, I thought this was cool, so I went to the 
&lt;a href=&#34;http://www.instructables.com/id/Led-Cube-8x8x8/&#34; title=&#34;Instructable Led Cube 8x8x8&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Instructable&lt;/a&gt; site and started building one myself. First the small (4x4x4) cube to practice a bit and after some lessons learned, I started building the big 8x8x8 cube. Below you find some pictures of the 4x4x4 cube, the hardest part of this cube was to order the right components, before you can order the right components it is wise to read the instructable and to understand the inner workings of the cube. Some things I&amp;rsquo;ve learned from the 4x4x4&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Don&amp;rsquo;t use S39, it will oxidize and give nasty brown spots on your cube, unless you&amp;rsquo;re willing to clean these spots with some vinegar, don&amp;rsquo;t use it. Use resin core solder instead.&lt;/li&gt;
&lt;li&gt;Test every LED before soldering it into the cube.&lt;/li&gt;
&lt;li&gt;Practice soldering on the PCB, especially for the 8x8x8, the guys on the instructable site, have some good vids about it.&lt;/li&gt;
&lt;li&gt;Just check and double check every connection you make, it can save you a lot of troubles.&lt;/li&gt;
&lt;li&gt;Read the specifications of the components, especially when you choose other components then described in the tutorial.&lt;/li&gt;
&lt;li&gt;Just start and don&amp;rsquo;t give up!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The 4x4x4 cube isn&amp;rsquo;t that hard to make, especially when you discover how it actually works. I think it should be doable in about two days, it took me about a week, but that was because I used an Atmega324PV for my first run, unfortunately I didn&amp;rsquo;t read the specs well enough to see that this microcontroller wasn&amp;rsquo;t working with 14Mhz. So after figuring this out, thanks to the guys of 
&lt;a href=&#34;http://www.avrfreaks.net/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;avrfreaks&lt;/a&gt; I replaced it with an Atmega32.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/20120216_064205_hue2280fc868fe951cec4f8de486a999e1_103489_2000x2000_fit_q90_lanczos.jpg&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/20120216_064205_hue2280fc868fe951cec4f8de486a999e1_103489_2000x2000_fit_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;600&#34; height=&#34;800&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Finally the 4x4x4 looks like this:&lt;/p&gt;

&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;
  &lt;iframe src=&#34;https://www.youtube.com/embed/nJfaPXtqk64&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; allowfullscreen title=&#34;YouTube Video&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
Now the 4x4x4 cube was working, it was time to start with the big 8x8x8 cube. The first part, just like the 4x4x4 is to soldering the LED&amp;rsquo;s to create the layers and eventually the cube. This is not a very hard task, but due the amount of LED&amp;rsquo;s it takes a while.&lt;/p&gt;








  
  


&lt;div class=&#34;gallery&#34;&gt;

  
  
  
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Leds&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120505_144329.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120505_144329_hu64a88feb21721cd7d3dfc0bdd8a224d2_403327_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Leds&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120505_150212.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120505_150212_hu740069172e346f90ff0cb3146b0eb163_405855_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Leds&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120506_112834.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120506_112834_hu25a34bc96b8abfe274fe3a69e3317124_440743_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Leds&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120520_122423.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120520_122423_hufe0bb4679cb7945c2f9d4f6b64724a69_515397_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Leds&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120520_140235.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120520_140235_hud9c0b967b98aa97b5c7279d5a119cc32_484378_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Leds&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120520_152226.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120520_152226_hubb0b3b0cf114b0d747d998350fe666a5_478303_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Leds&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120528_132703.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120528_132703_hu92a7222eb3c96b712b27086d54fab545_641123_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Leds&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120528_132917.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Leds/img_20120528_132917_hu7bee745fc0b33b9f00147e5e26cff33b_562320_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  

  
&lt;/div&gt;
&lt;p&gt;&lt;br&gt;
Now that the Cube was done, I took a look at the &amp;ldquo;latches&amp;rdquo; or &amp;ldquo;flip/flops&amp;rdquo;, to see how they actually works, I understood the theory, but it is always better to practice. This give me a better understanding about how the inner-workings of the cube works. After all it is a nice educational project :-)&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/img_20120609_153122_hu10baed7ca4aadeba58272af5ded49581_484367_2000x2000_fit_q90_lanczos.jpg&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/img_20120609_153122_hu10baed7ca4aadeba58272af5ded49581_484367_2000x2000_fit_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;800&#34; height=&#34;600&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Now I knew how the cube was working, I was able to design the PCB. The basics of the design came from the instructable site, but my design was a bit different, I had not exactly the same components (especially the male connectors) and I was not planning to use an RS232 (serial) connection. So my goal was to make the design fit on a single PCB. This wasn&amp;rsquo;t as easy as I thought, but I managed it.&lt;/p&gt;
&lt;p&gt;One of the best tips from the tutorial was to use &amp;ldquo;power&amp;rdquo; and &amp;ldquo;ground&amp;rdquo; lines all over the PCB, so components can be easily attached. There was only one small thing that seems an good idea, but turned out not to be or at least give me some extra work. I turned the 3-to-8 Line decoder, so that I could solder straight lines between the microcontroller and the line decoder. So the input of the line decoder (A1, A2, A3) where connected to port B (B2, B1, B0) on the microcontroller, in precisely that order. This means that I had to re-map the value between those components e.g. sending 3 (binary low to high) 110 to B0-B2, would turn out to be 6 on the line decoder (011 (A1-A3)). It was not to hard to solve in the code, but the code would look simpler if I didn&amp;rsquo;t turn around the line decoder on the other hand it keeps the PCB soldering simple :). Last thing about the PCB, it took a lot more time to solder, than I imagined.&lt;/p&gt;








  
  


&lt;div class=&#34;gallery&#34;&gt;

  
  
  
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube PCB&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120609_161018.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120609_161018_hu1151baa8783d9cf166863e51cc7f706b_409824_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube PCB&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120612_143445.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120612_143445_hud03a4d450f9183d2fa14fca5f0a5872f_495608_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube PCB&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120612_153625.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120612_153625_hu874695d1d07b175f3433f03e23e0cd56_673278_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube PCB&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120613_160137.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120613_160137_hu43ecea3cc5995642236e121d3faf429c_612208_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube PCB&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120613_160151.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120613_160151_hu003ffd5f5365cbbfd8f8f4672f02f7db_449590_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube PCB&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120613_160401.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120613_160401_hu8c185630424dad632a4a927d619229b1_510583_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube PCB&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120617_090051.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120617_090051_hu8fbd28f8f7ba222d230e76c0c69f1a72_496276_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube PCB&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120617_090136.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120617_090136_hua3a5455409a1ad9d29aeba414f8438a7_579969_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube PCB&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120617_102248.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120617_102248_hu98bfd0ded0d31534929e7620553dc1e8_563652_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube PCB&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120620_194444.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120620_194444_huc8444c3ada5e2edb3eb8e38d143bee45_604022_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube PCB&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120625_163708.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120625_163708_hu4055e475597c44941e64b23a6e8ffbf3_568242_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube PCB&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120625_163719.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120625_163719_hub2221e25518e373dcde06aefc6e16496_172316_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;143&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube PCB&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120625_171303.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20PCB/img_20120625_171303_hu906f75ef3d7757da59a6dcddedcb6a39_562960_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  

  
&lt;/div&gt;
&lt;p&gt;&lt;br&gt;
Now that the PCB was ready, there where two things left a base for the cube and the connection between the cube and the PCB. For the base I asked someone to help me, since I&amp;rsquo;m not a carpenter and I would the base to look cool and be the finishing touch of the cube, well I think that has be accomplished.&lt;/p&gt;








  
  


&lt;div class=&#34;gallery&#34;&gt;

  
  
  
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Plateau&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plateau/img_20120630_101606.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plateau/img_20120630_101606_hue2f8d58cb21a9e13060d92adcf4326df_577172_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Plateau&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plateau/img_20120630_104223.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plateau/img_20120630_104223_hud92d5928b75dda040d6db64556954ea4_166491_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;143&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Plateau&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plateau/img_20120630_133935.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plateau/img_20120630_133935_hub104bdd6cb5e6c40e84544b912d6e05a_156360_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;143&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Plateau&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plateau/img_20120630_133957.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plateau/img_20120630_133957_hu1180d3949648e9c692be703d3024611c_523979_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  

  
&lt;/div&gt;
&lt;p&gt;&lt;br&gt;
The last part of the cube was the connection between the cube and the PCB and of course programming the microcontroller and not to forget, especially for protection I created a perspex case which fitts nicely around the cube.&lt;/p&gt;








  
  


&lt;div class=&#34;gallery&#34;&gt;

  
  
  
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Plexi&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120708_122028.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120708_122028_hu78db4ccc64ab4c7badc61e8637ca0f88_477366_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Plexi&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120718_064022.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120718_064022_hu813391f9069feeff465f63108c2e3d48_412185_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Plexi&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120718_065312.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120718_065312_hu3bee7625cf9a5ed8e6a01230a2b1be40_396585_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Plexi&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120718_212710.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120718_212710_huae3dc2c98883d78697ad9ea297aa0d1f_469443_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Plexi&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120718_213153.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120718_213153_huda8e822c2931b4b585bd3a2cb9cdb281_499077_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Plexi&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120718_214335.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120718_214335_hu467b392dfcd8bbcecfead5593ca3ef50_488082_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Plexi&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120719_063422.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120719_063422_hued2de2116ec8539c68978be3abe1fd13_436841_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Plexi&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120719_063455.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120719_063455_huc8e811669fe867752f2d49ed7548837e_441638_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  
    
    
    
    
    
  &lt;a data-fancybox=&#34;gallery-Led Cube Plexi&#34; href=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120720_081808.jpg&#34; &gt;
  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/building-an-awesome-led-cube-8x8x8/Led%20Cube%20Plexi/img_20120720_081808_hu2e445f3184ef11ae7220ef09ea44d507_488906_0x190_resize_q90_lanczos.jpg&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;253&#34; height=&#34;190&#34;&gt;
  &lt;/a&gt;
  

  
&lt;/div&gt;
&lt;p&gt;&lt;br&gt;
And of course here it is how it finally looks in action. The reflection you see is from the perspex, luckily I can easily remove it whenever I want.&lt;/p&gt;

&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;
  &lt;iframe src=&#34;https://www.youtube.com/embed/P3GZvuqHE3M&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; allowfullscreen title=&#34;YouTube Video&#34;&gt;&lt;/iframe&gt;
&lt;/div&gt;

</description>
    </item>
    
    <item>
      <title>Nac Getting in Control of Your Mab Enabled Clients</title>
      <link>https://blog.breekeenbeen.nl/post/nac-getting-in-control-of-your-mab-enabled-clients/</link>
      <pubDate>Fri, 25 Mar 2011 19:11:08 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/nac-getting-in-control-of-your-mab-enabled-clients/</guid>
      <description>&lt;p&gt;It has been a while since I wrote a paper about the implementation of NAC. Now almost a year later it is finally in progress of implementation. One of the most time consuming processes and error sensitive ones is the adding of MAC addresses to the Active Directory of devices which doesn’t support Dot1X. Unfortunately there are a lot of devices which don’t speak Dot1X or having troubles with it. So if you want to do it right (IMO) you put these devices in different categories (and subnets) so you can put ACL’s on it (MAC spoofing can be easily done). At this moment we have three different categories within MAB authentication, which may grow in the near future; Thin clients, Printers and temporarily devices. To keep an clean view of all these MAC addresses in the AD I categories these MAC address in different OU’s, so I have three different OU’s which represent the different devices. We use Microsoft NPS server as Radius server and unfortunately you can’t (at least I didn’t find it) use the OU as a hit for a rule. So you also need to make three groups in which you place the MAC addresses (these are user objects in the AD). You also want to delete the “Domain User” group from the MAC address. Otherwise people would be able to login with MAC address on you domain members. So there you have already three different steps to just add one MAC address.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Add the MAC address to the right OU.&lt;/li&gt;
&lt;li&gt;Add the MAC address to the right group.&lt;/li&gt;
&lt;li&gt;Delete the group Domain Users (to accomplish this, set the other group as primary.)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This isn’t a problem, but if you have to add MAC addresses regularly, this is quiet annoying and you easily forget one of those steps. Another thing you might consider is that most of the time MAC addresses are added by other persons, it would be nice if you give them a tool which makes it easier for them and less faulty. To accomplish this I wrote a Powershell script (actual my first one, so be nice :-) ). This scripts draws a simple menu where a user simply can add or delete a MAC address. Since we in the same project move the printers to DHCP (reservations) I also added this option.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/nac-getting-in-control-of-your-mab-enabled-clients/featured_huf5f5d64bde187248f53e9689e6e5531f_63190_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/nac-getting-in-control-of-your-mab-enabled-clients/featured_huf5f5d64bde187248f53e9689e6e5531f_63190_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;492&#34; height=&#34;236&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Below you find the powershell script, make sure the users have rights to the right OU in the AD, in the example it is “Network Access” and also give them rights on the User folder in the AD, otherwise the “Domain Users” group can’t be deleted (Took me almost an hour). If you also want to use the DHCP functionality, make sure they have rights there too. The script makes use of Quest &amp;ldquo;
&lt;a href=&#34;http://www.quest.com/powershell/activeroles-server.aspx&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;ActiveRoles Management Shelf&lt;/a&gt;&amp;rdquo;, so this one needs to be installed. I tried to translate all the Dutch comment, to English and I also filled the variables with fictional values. If you have any comments or improvements, please let me know. Since it is my first powershell script, I’m sure there are.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-powershell&#34;&gt;# =============================================================
#	 NAAM: nac_menu.ps1
#  AUTEUR: Rob Maas
#   DATUM: 21-03-2011
# COMMENT: Adding/deleting MAC addresses to the AD for MAB.
# =============================================================

#[ GENERAL ]
# DHCP Settings
$dhcpServer 		= &amp;quot;DHCPSERVER1&amp;quot;
$dhcpScopePrinters 	= &amp;quot;192.168.1.0&amp;quot;

# Apparaat specifieke eigenschappen
$printer 	= @{&amp;quot;Name&amp;quot; = &amp;quot;Printer&amp;quot;; `
		       &amp;quot;OU&amp;quot; = &amp;quot;ou=Printers,ou=MAC,ou=Network Access,ou=corporation,dc=domain,dc=com&amp;quot;; `
		       &amp;quot;GRP&amp;quot; = &amp;quot;NA_Printers&amp;quot;}
$thinclient	= @{&amp;quot;Name&amp;quot; = &amp;quot;Thin Client&amp;quot;; `
		       &amp;quot;OU&amp;quot; = &amp;quot;ou=Thin Client,ou=MAC,ou=Network Access,ou=corporation,dc=domain,dc=com&amp;quot;; `
		       &amp;quot;GRP&amp;quot; = &amp;quot;NA_Thinclient&amp;quot;}
$temporary = @{&amp;quot;Name&amp;quot; = &amp;quot;Temporarily device&amp;quot;; `
		       &amp;quot;OU&amp;quot; = &amp;quot;ou=Temporarily,ou=MAC,ou=Network Access,ou=corporation,dc=domain,dc=com&amp;quot;; `
		       &amp;quot;GRP&amp;quot; = &amp;quot;NA_Temporarily&amp;quot;}

#[ MENU Declaration ]
# MAINMENU
$mnuMainTitle = &amp;quot;NAC Menu&amp;quot;	#Title
# Name
$mnuMainItems = @((0..4),(0..4))	#Dummy values
$mnuMainItems[0][0] = &amp;quot;Add MAC address&amp;quot;
$mnuMainItems[0][1] = &amp;quot;Delete MAC address&amp;quot;
$mnuMainItems[0][2] = &amp;quot;Add printer to DHCP &amp;quot;
$mnuMainItems[0][3] = &amp;quot;Delete printer from DHCP&amp;quot;
$mnuMainItems[0][4] = &amp;quot;Exit&amp;quot;
# Corresponding functions
$mnuMainItems[1][0] = {ShowAddMacMenu}
$mnuMainItems[1][1] = {DelMAC}
$mnuMainItems[1][2] = {AddPrinterToDHCP}
$mnuMainItems[1][3] = {DelPrinterFromDHCP}
$mnuMainItems[1][4] = {Exit}

#ADDMAC MENU
$mnuAddMacTitle = &amp;quot;Add MAC address&amp;quot;
$mnuAddMAC = @((0..3),(0..3))
#Name
$mnuAddMac[0][0] = &amp;quot;Add Thinclient&amp;quot;
$mnuAddMac[0][1] = &amp;quot;Add printer&amp;quot;
$mnuAddMac[0][2] = &amp;quot;Add temporarily device&amp;quot;
$mnuAddMac[0][3] = &amp;quot;Main menu&amp;quot;
#Corresponding
$mnuAddMac[1][0] = {AddMac $thinclient}
$mnuAddMac[1][1] = {AddMac $printer}
$mnuAddMac[1][2] = {AddMac $temporarily}
$mnuAddMac[1][3] = {ShowMainMenu}

#[ -- SCRIPT -- ]
#Methods in alphabeticall order

function AddMac{
	param($device)
	$address = GetMac;
	#New device
	Write-Host &amp;quot;Give in the&amp;quot; $device[&amp;quot;Name&amp;quot;] &amp;quot;name: &amp;quot; -NoNewline
	$name = $Host.UI.ReadLine()
	New-QADUser -Name $address -UserPassword $address `
		-DisplayName $address `
		-LastName $address `
		-FirstName $address `
		-UserPrincipalName $address `
		-Description $name `
		-SamAccountName $address `
		-ParentContainer $device[&amp;quot;OU&amp;quot;]
	#Unable to change password
	Set-QADUser -Identity $address -PasswordNeverExpires $true | Out-Null
	#Add to right group and delete &amp;quot;domain users&amp;quot; group
	Add-QADGroupMember -Identity $device[&amp;quot;GRP&amp;quot;] -Member $address | Out-Null
	Set-QADUser -Identity $address -ObjectAttributes @{PrimaryGroupID=(Get-QADGroup -Identity $device[&amp;quot;GRP&amp;quot;]).PrimaryGroupToken } #| Out-Null
	Remove-QADGroupMember -Identity &amp;quot;Domain Users&amp;quot; -Member $address #| Out-Null
	Write-Host &amp;quot;Account is created !!!&amp;quot; -ForegroundColor Yellow
	#If it is a printer, add to DHCP?
	if ($device -eq $printer){
		$dhcp = Read-Host &amp;quot;Add the printer to DHCP? (Y|N) ?&amp;quot;
		if ($dhcp -eq &amp;quot;y&amp;quot;) {AddPrinterToDHCP $name $address}
	}
	if (Again) {AddMac $device} else {ShowMainMenu}
}

function Again{
	$again = Read-Host &amp;quot;Again (Y|N) ? &amp;quot;
	switch ($again){
		&amp;quot;Y&amp;quot; {return $true}
		default {return $false}
	}
}

#Add printer to DHCP
function AddPrinterToDHCP{
	param($name, $address)
	if (($address -eq $null) -or ($name -eq $null)){
		$name = Read-Host &amp;quot;Printer name: &amp;quot;
		$address = GetMac $false
	}
	$ip = Read-Host &amp;quot;The IP address of the printer (192.168.1.0)?&amp;quot;
	Write-Host &amp;quot;Printer: `t $name&amp;quot;
	Write-Host &amp;quot;IP: `t`t $ip&amp;quot;
	Write-Host &amp;quot;MAC: `t`t $address&amp;quot;
	$ok = Read-Host &amp;quot;Are the above details correct (Y|N|X = Menu) ?&amp;quot;
	switch ($ok){
		&amp;quot;y&amp;quot; {
			 Invoke-Expression -Command &amp;quot;netsh dhcp server $dhcpServer scope $dhcpScopePrinters add reservedip $ip $address $name&amp;quot; | Out-Null
			 Invoke-Expression -Command &amp;quot;netsh dhcp server $dhcpserver scope $dhcpScopePrinters set reservedoptionvalue $ip 012 STRING $name&amp;quot;
			 if (Again) {AddPrinterToDHCP} else {ShowMainMenu}
			 break}
		&amp;quot;n&amp;quot; {$name = $null
			 $address = $null
			 AddPrinterToDHCP
			 break}
		&amp;quot;x&amp;quot; {ShowMainMenu
			 break}
	}
	$name = $null
	$address = $null
	if (Again) {AddPrinterToDHCP} else {ShowMainMenu}
}

function DelMaC{
	$address = GetMac $false $true
	$delete = Read-Host &amp;quot;Are you sure, you want to delete $address (Y|N) ? &amp;quot;
	switch ($delete){
		&amp;quot;y&amp;quot; {Remove-QADObject -Force -Identity $address | Out-Null
			 Write-Host &amp;quot;$address verwijderd!&amp;quot; -ForegroundColor Yellow
			 if (Again) {DelMac} else {ShowMainMenu}
			 break}
		default {ShowMainMenu
				 break}
	}
}

function DelPrinterFromDHCP{
	$address = GetMac $false $true
	$ip = Read-Host &amp;quot;The IP address of the printer (192.168.1.0)?&amp;quot;
	Write-Host &amp;quot;MAC Adres: `t $address&amp;quot;
	Write-Host &amp;quot;IP Adres: `t $ip&amp;quot;
	$ok = Read-Host &amp;quot;Are the above details correc (Y|N|X = Menu) ?&amp;quot;
	switch ($ok){
		&amp;quot;y&amp;quot; {
			 Invoke-Expression -Command &amp;quot;netsh dhcp server $dhcpServer scope $dhcpScopePrinters delete reservedip $ip $address&amp;quot;
			 if (Again) {DelPrinterFromDHCP} else {ShowMainMenu}
			 ShowMainMenu
			 break}
		&amp;quot;n&amp;quot; {$address = $Null
			 DelPrinterFromDHCP
			 break}
		&amp;quot;x&amp;quot; {ShowMainMenu
			 break}
	}
}

function DrawMenu{
	param($menuItems, $menuTitle, $menuPosition)
	$fgColor = $Host.UI.RawUI.ForegroundColor
	$bgColor = $Host.UI.RawUI.BackgroundColor
	cls
	$l = $menuItems[0].Length - 1;
	$menuWidth = $menuTitle.Length + 8
	Write-Host &amp;quot;`t&amp;quot; -NoNewline
	Write-Host (&amp;quot;*&amp;quot; * $menuWidth) -ForegroundColor $fgColor -BackgroundColor $bgColor
	Write-Host &amp;quot;`t&amp;quot; -NoNewline
	Write-Host &amp;quot;*   $menuTitle   *&amp;quot; -ForegroundColor $fgColor -BackgroundColor $bgColor
	Write-Host &amp;quot;`t&amp;quot; -NoNewline
	Write-Host (&amp;quot;*&amp;quot; * $menuWidth) -ForegroundColor $fgColor -BackgroundColor $bgColor
	Write-Host &amp;quot;&amp;quot;
	Write-Debug &amp;quot;L: $l MenuItems: $menuItems MenuPosition: $menuPosition&amp;quot;
	for ($i = 0; $i -le $l; $i++){
		Write-Host &amp;quot;`t&amp;quot; -NoNewline
		if ($i -eq $menuPosition){
			Write-Host &amp;quot; $($menuItems[0][$i])&amp;quot; -ForegroundColor $bgcolor -BackgroundColor $fgColor
		} else {
			Write-Host &amp;quot; $($menuItems[0][$i])&amp;quot; -ForegroundColor $fgcolor -BackgroundColor $bgColor
		}
	}
	Write-Host
}

function Exit{
	Invoke-Expression -Command &amp;quot;exit&amp;quot;

}

#Check if the given MAC address is valid.
function GetMAC{
	param([bool]$new = $true,		#Has to be new in the AD
		  [bool]$exist = $false)	#Must exist in the AD
	$mac = Read-Host &amp;quot;Give in the MAC address in lowercase and withouth punctuations: &amp;quot;
	#Check if the address has a length of 12
	If ($mac.length -ne 12){
		Write-Host &amp;quot;Invalid address!&amp;quot; -ForegroundColor Red
		if (Again) {GetMac $new $exist; return} else {ShowMainMenu; return}
	}
	If (($new) -and (Get-QADUser -Name $mac)){
		# Already exist
		Write-Host &amp;quot;Address already exist!&amp;quot; -ForegroundColor Red
		if (Again) {GetMAC $new $exist; return} else {ShowMainMenu; return}
	}
	if ((-not $new) -and ($exist) -and (-not (Get-QADUser -Name $mac))){
		#Address not found
		Write-Host &amp;quot;Address not found! &amp;quot; -ForegroundColor Red
		if (Again) {GetMAC $new $exist; return} else {ShowMainMenu; return}
	}
	return $mac
}

function Menu{
	param($menuItems, $menuTitle)
	$vkeyCode = 0
	$menuPosition = 0
	DrawMenu $menuItems $menuTitle $menuPosition
	While ($vkeycode -ne 13){
		$press = $Host.UI.RawUI.ReadKey(&amp;quot;NoEcho,IncludeKeyDown&amp;quot;)
		$vkeyCode = $press.virtualkeycode
		Write-Host &amp;quot;$($press.character)&amp;quot; -NoNewLine
		If ($vkeyCode -eq 38) {$menuPosition--}	#Down
		If ($vkeyCode -eq 40) {$menuPosition++}	#Up
		If ($menuPosition -lt 0) {$menuPosition = $menuItems[0].Length - 1}
		If ($menuPosition -ge $menuItems[0].Length) {$menuPosition = 0}
		DrawMenu $menuItems $menuTitle $menuPosition
	}
	$($menuItems[1][$menuPosition]).Invoke()
}

function ShowAddMACMenu{
	Menu $mnuAddMac $mnuAddMacTitle
}

function ShowMainMenu{
	Menu $mnuMainItems $mnuMainTitle
}

ShowMainMenu
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>MPTVAdmin2 Beta - Import Dreambox channels into MediaPortal</title>
      <link>https://blog.breekeenbeen.nl/post/mptvadmin2-beta/</link>
      <pubDate>Mon, 07 Feb 2011 19:24:00 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/mptvadmin2-beta/</guid>
      <description>&lt;p&gt;A bit longer then a month ago I posted my “early” alpha version of tool which can import Dreambox channellists into MediaPortal TV-Server. While this tool, was just a try-out if it was possible and lacked all the error handling it was still a small success. I decided to start over (with a bit of the old code :-)), so I created MPTVAdmin2, which should be more stable and easier to use. It is still a beta, but I like to hear your comments on it. You can find the tool in 
&lt;a href=&#34;http://forum.team-mediaportal.com/tv-server-plugins-294/mptvadmin-import-dreambox-channel-group-lists-easily-manage-groups-93164/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;this thread&lt;/a&gt; on the MediaPortal forums.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Create Your Own Rescue Partition With Easy Restore Option at No Costs</title>
      <link>https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/</link>
      <pubDate>Thu, 06 Jan 2011 13:56:14 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/</guid>
      <description>&lt;p&gt;When you are a bit handy with computers, you soon become a kind of computer god to your family and friends and if you don’t watch out, you get overloaded with questions and problems. If that is not enough you find yourself (re)installing each computer over and over again. Wouldn’t it be nice, if they can help there selves and you are just needed once in a (long) while?&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/featured_hu286829eec76385b3f03b1ebdc53bdb13_5355_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/featured_hu286829eec76385b3f03b1ebdc53bdb13_5355_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;277&#34; height=&#34;199&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Lots of computer manufactures, deliver there systems with a so called rescue partition or CD/DVD. Which can restore the system in its original state. With this option they hope to give there customers a easy way to “fix” there computer. Even if you have such an option I still recommend to create your own option, cause most of those “restore” actions not only restore the OS, but also all the software you (probably) don’t need. Also after a couple of months you probably need to install tons of OS updates after a restore. Before you start, it is good to know that some of the actions are quite risky and may destroy your installation or partition table. So watch out and test(or practice) in an “test” environment. If you don’t have the hardware for testing, then a Virtual environment, like VMWare, VirtualPC, 
&lt;a href=&#34;http://www.virtualbox.org/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Virtualbox&lt;/a&gt;, etc. is very handy.&lt;/p&gt;
&lt;h2 id=&#34;lets-start&#34;&gt;Let’s start&lt;/h2&gt;
&lt;p&gt;The idea is simple, we create an extra partition on the hard drive, which is going to store the rescue image (sort of packed installation of an OS). We add a boot menu to the boot order, which gives us the opportunity to boot into the extra partition. After booting in this extra partition it shows us a menu, which gives us the option to restore the system or to create a new image. We need the following software, a boot manager and a small Linux distribution. In this post I use 
&lt;a href=&#34;http://www.plop.at/en/ploplinux.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Plop Linux&lt;/a&gt; and 
&lt;a href=&#34;http://www.plop.at/en/bootmanager.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Plop bootmanager&lt;/a&gt;. Which both can be found 
&lt;a href=&#34;http://www.plop.at/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;here&lt;/a&gt;. Thanks to Elmar for creating this excellent free tools! (For this test I use Windows XP as the “primary” installation, but you can use any OS you like. If they need another file system, you need to edit the rescue script).&lt;/p&gt;
&lt;h2 id=&#34;step-1--downloading-the-tools&#34;&gt;Step 1 – Downloading the tools&lt;/h2&gt;
&lt;p&gt;For this blog I use version 
&lt;a href=&#34;http://download.plop.at/tmp/ploplinux-4.1.1-test3.iso&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;4.1.1 test 3&lt;/a&gt; of Plop Linux cause 4.1.1 was giving some 
&lt;a href=&#34;http://forum.plop.at/index.php/topic,1014.0.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;problems&lt;/a&gt;. If you are testing on a physical system burn the ISO to a CD.&lt;/p&gt;
&lt;h2 id=&#34;step-2--prepare-the-system-partitioning-and-installing-windows&#34;&gt;Step 2 – Prepare the system (Partitioning and Installing Windows)&lt;/h2&gt;
&lt;p&gt;I just assume, you didn’t install any OS yet. So we can delete and create partitions without being afraid of losing some data. If you already have an OS running and do not have some spare space for a rescue partition, you need a partition manager which is capable of resizing and creating partitions without losing any data. For now we just use the Windows XP installation for partitioning the system. Start the installation and make just one partitions (not the whole disk!) for the actual Windows installation, the rest of the space is needed for the rescue partition. I normally make the rescue partition at least the same size or a bit bigger then the “primary” partition. (Sorry a bit Dutch ;-)) We don’t care about the second partition for now.  Just install Windows.&lt;/p&gt;
&lt;h2 id=&#34;step-3--creating-the-rescue-partition-after-the-install-of-windows-boot-from-the-plop-cd-or-image&#34;&gt;Step 3 – Creating the rescue partition** After the install of Windows boot from the Plop CD (or image).&lt;/h2&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image_thumb2_huba311094c6c93558fa3d4eebb847d6d2_19320_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image_thumb2_huba311094c6c93558fa3d4eebb847d6d2_19320_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;542&#34; height=&#34;130&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;With the command fdisk –l, you can check the connected disks and the available partitions.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image2_hu830ac8fb3306f213f265fd3506d54a5c_4522_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image2_hu830ac8fb3306f213f265fd3506d54a5c_4522_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;586&#34; height=&#34;66&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Start fdisk with the right harddisk to create the “rescue” partition. In my case, the commando is. “fdisk /dev/hda” In the menu press “n” for creating a new partition and press “p” for making it a primary partition. In our case it is partition 2 and it uses the full size (enter twice). If you press “p” you see, what the partition table looks like if you write it to disk.&lt;/p&gt;















&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;image3.png&#34; &gt;


  &lt;img src=&#34;image3.png&#34; alt=&#34;&#34;  &gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;If you are ok with it, press “w” to write the partition table. Reboot the system from CD to make sure the partition table is correctly loaded. When running fdisk –l again it should show something like the picture below.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image4_hu2c66b0626e6bd7c5296533cc6c43bf38_5681_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image4_hu2c66b0626e6bd7c5296533cc6c43bf38_5681_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;590&#34; height=&#34;85&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Now we can install Plop. For this, type “installplop”. Make sure you enter the right destination drive, in our case “/dev/hda2” and also make sure you don’t write anything to the MBR. Do not run “plpinstall.sh” !&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image5_hued25ec040995502bf366f3345ccd83b8_5493_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image5_hued25ec040995502bf366f3345ccd83b8_5493_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;398&#34; height=&#34;110&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;We need to make some slight enhancements to the installation script. You can edit the script, by typing “nano /tmp/plpinstall.sh”. Find the lines:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;prompt timeout=20 default=ploplinux boot=/dev/hda2 map=/boot/map lba32 vga=1 compact
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And change them to.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#prompt #timeout=20 default=ploplinux boot=/dev/hda2 map=/boot/map lba32 vga=0x317 compact
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Save the file and exit nano (CTRL+X). Now we’re ready to install Plop, by typing “/tmp/plpinstall.sh”.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image6_hubda78c5b8211226aae866650424b8863_10634_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image6_hubda78c5b8211226aae866650424b8863_10634_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;543&#34; height=&#34;157&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Now it is save to reboot and continue with step 3.&lt;/p&gt;
&lt;h3 id=&#34;remark&#34;&gt;Remark&lt;/h3&gt;
&lt;p&gt;If you get some errors like:&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image7_hu72faef79abfc8b9c90dcb86dd0712ef1_5082_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image7_hu72faef79abfc8b9c90dcb86dd0712ef1_5082_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;573&#34; height=&#34;51&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;You also need the change the line “chroot $MNT lilo” to “chroot $MNT lilo –P ignore” and run the installscript again.&lt;/p&gt;
&lt;h2 id=&#34;step-4--creating-the-boot-menu&#34;&gt;Step 4 – Creating the boot Menu&lt;/h2&gt;
&lt;p&gt;Boot your system from the Plop Linux CD (or by mounting the ISO).&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image8_hu07e00f29989d971a8169df8bdc426296_106511_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image8_hu07e00f29989d971a8169df8bdc426296_106511_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;480&#34; height=&#34;293&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Choose the option “plop boot manager installer”. Make sure that you install the boot manager to the correct hard disk (option 7), after this you can install the boot manager, option 1.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image9_huc39eb1e9fe5753a17b5d1c81dc5a6731_5155_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image9_huc39eb1e9fe5753a17b5d1c81dc5a6731_5155_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;454&#34; height=&#34;160&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;That’s it, the boot manager is installed. Reboot the system, so we can configure the boot manager.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image10_hu5c84d2d89f2ce648ccbf7f7800137bcd_3396_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image10_hu5c84d2d89f2ce648ccbf7f7800137bcd_3396_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;422&#34; height=&#34;114&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;I usually make the menu plain and simple, so that there are only two options, the “default” which will start after a certain amount of time and the “rescue” option. Go to setup –&amp;gt; bootmanager and make the following settings.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;boot countdown: yes 
edit 
boot countdown: 5 seconds 
select at start: default profile 
show floppy 
boot: no show cdrom 
boot: no show usb 
boot: no
&lt;/code&gt;&lt;/pre&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image_thumb12_hua15711fe00f341b90f65d7db4b050b6b_67475_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image_thumb12_hua15711fe00f341b90f65d7db4b050b6b_67475_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;540&#34; height=&#34;185&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Now the menu is simple, we create the two profiles. Go to settings – profiles, select the first profile and press enter. Edit the label to something useful like “Windows XP”. To make sure Windows doesn’t see, the “rescue” partition, we need to go to “linked partitions”. Make sure the first partition is set to “boot partition”, this can be done by pressing “b”. Set the rest of the partitions to “clear”, this makes the partition(s) invisible to Windows.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image12_hu853f485a16eb5da7d2c070cc2f41dcb4_7200_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image12_hu853f485a16eb5da7d2c070cc2f41dcb4_7200_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;271&#34; height=&#34;252&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Next we create the “rescue” profile, so go to settings – profiles and press the down key once. This selects the second profile, even if it is empty, press enter, to configure this profile. Type a name, like “rescue” and set visibility in the menu to “yes”.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image13_hu01f5bc5c779881f67feb6a41b5d85d25_3195_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image13_hu01f5bc5c779881f67feb6a41b5d85d25_3195_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;448&#34; height=&#34;71&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Go to linked partitions and make sure both partitions are visible. Also make sure that the second partition is the boot partition, you can accomplish this by pressing the “b”.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image14_hu2ba129e8faf88bee72a88968a2ce7019_7400_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image14_hu2ba129e8faf88bee72a88968a2ce7019_7400_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;271&#34; height=&#34;248&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;Test it, by going to the menu and boot Windows and the second time boot the Rescue profile. If they both work you can continue with step 4.## Step 4 – Making the “rescue” / image script&lt;/p&gt;
&lt;p&gt;Now we can boot into Windows and a small Linux distribution it is time to create the “rescue” script. We don’t want a user to worry about Linux commands it is just a simple restore. First of all I’m not a BASH guru, so probably not everything is done in the most efficient way. In order to make the rescue process possible, we need to create two directories.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;mkdir /mnt/images mkdir /mnt/script&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The first directory is going to store the created images and the second one stores the script. Now we make the script.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;nano /mnt/script/rescue.sh&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Fill in the code below for a basic “script”.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#!/bin/bash
#
#	AUTOIMAGE SCRIPT
#
#	CHANGES:	ROB	2010-12-30	First attempt.
#	TODO:
#

#Expects the &amp;quot;next function&amp;quot; as a parameter
CheckPassword(){
	clear
	echo &amp;quot;To continue, give in the password&amp;quot;
	echo
	read password
	if [ &amp;quot;$password&amp;quot; == &amp;quot;the password&amp;quot; ]; then
	    $1 $2
	fi
	MainMenu
}

#Delete image, expects the filename as parameter
RemoveImage(){
	clear
	echo &amp;quot;Are you sure, you want to remove $1 ? [Y/N]&amp;quot;
	echo
	read ok
	case &amp;quot;$ok&amp;quot; in
		&amp;quot;Y&amp;quot; | &amp;quot;y&amp;quot; | &amp;quot;J&amp;quot; | &amp;quot;j&amp;quot; )
		    rm $1
		    MainMenu
		;;
		* ) #MainMenu
		    MainMenu
		;;
	esac
}

#Verwacht als parameter de vervolgfunctie
ListImages(){
	clear
	echo &amp;quot;Available images&amp;quot;
	i=1
	for test in /mnt/images/*
	do
	    echo [$i] $test
	    array[$i]=$test
	    let i=$i+1
	done
	echo
	echo &amp;quot;Make a choice&amp;quot;
	read choice
	CHOICE=${array[choice]}
	$1 $CHOICE
}

MainMenu(){
	clear

	echo  &amp;quot;RESCUE MENU&amp;quot;
	echo
	echo  &amp;quot;Make a choice, followed by enter:&amp;quot;
	echo  &amp;quot;[1] Restore system&amp;quot;
	echo
	echo  &amp;quot;Administrator options&amp;quot;
	echo  &amp;quot;[2] Create a new image&amp;quot;
	echo  &amp;quot;[3] Set a new default image&amp;quot;
	echo  &amp;quot;[4] Restore a specific image&amp;quot;
	echo  &amp;quot;[5] Remove image&amp;quot;
	echo
	echo  &amp;quot;[0] Reboot system&amp;quot;
	echo
	read choice

	case &amp;quot;$choice&amp;quot; in
		&amp;quot;0&amp;quot; ) #Reboot
		      shutdown -r now
		;;
		&amp;quot;1&amp;quot; ) #Restore System
		      PutImage /mnt/images/default.000
		;;
		&amp;quot;2&amp;quot; ) #Create a new image
		      CheckPassword PullImage
		;;
		&amp;quot;3&amp;quot; ) #Set a new default image
		      CheckPassword ListImages SetStandardImage
		;;
		&amp;quot;4&amp;quot; ) #Restore a specific image
		      CheckPassword ListImages PutImage
		;;
		&amp;quot;5&amp;quot; ) #Remove image
		      CheckPassword ListImages RemoveImage
		;;
		* ) #Bad choice
		    MainMenu
		;;
	esac
}

#Create an image
PullImage(){
	clear
	echo &amp;quot;Give in an image name.&amp;quot;
	echo
	echo &amp;quot;TIP!: Put the date in the filename, like 010111_WinUpdates&amp;quot;
	read name
	clear
	echo &amp;quot;Create an image with the following name $name continue? [Y/N]&amp;quot;
	read ok
	case &amp;quot;$ok&amp;quot; in
		&amp;quot;Y&amp;quot; | &amp;quot;y&amp;quot; | &amp;quot;J&amp;quot; | &amp;quot;j&amp;quot; ) #Image maken
		    hdimg=$(fdisk -l | grep NTFS) &amp;amp;&amp;amp; hdimg=${hdimg:0:9}
		    partimage -z0 -b -o -d -V100000 -f2 save $hdimg /mnt/images/$name
		    MainMenu
		;;
		* ) #Terug naar menu
		    MainMenu
		;;
	esac
}

#Expects the imagename as parameter
PutImage(){
	clear
	echo &amp;quot;Are you sure? [Y/N]&amp;quot;
	echo
	read ok
	case &amp;quot;$ok&amp;quot; in
		&amp;quot;Y&amp;quot; | &amp;quot;y&amp;quot; | &amp;quot;J&amp;quot; | &amp;quot;j&amp;quot; )	#IMAGEN
			#Pick the right partition
			hdimg=$(fdisk -l | grep NTFS) &amp;amp;&amp;amp; hdimg=${hdimg:0:9}
			#Partimage
			partimage restore $hdimg $1 -b -f2
		;;
	* ) #Back to MainMenu
	    MainMenu
	;;
	esac
}

SetStandardImage(){
	clear
	echo &amp;quot;Set defualt Image&amp;quot;
	echo
	echo &amp;quot;Are you sure, you want to set $1 as the defualt image? [Y/N]&amp;quot;
	read ok
	case &amp;quot;$ok&amp;quot; in
		&amp;quot;Y&amp;quot; | &amp;quot;y&amp;quot; | &amp;quot;J&amp;quot; | &amp;quot;j&amp;quot; ) #Set default
			#Rename old image (date +%Y%m%d-%H%M%S)
			mv /mnt/images/defualt.000 /mnt/images/olddefault_$(date +%Y%m%d-%H%M%S).000
			mv $1 /mnt/images/default.000
			MainMenu
		;;
		* ) #Back to MainMenu
		    MainMenu
	esac
}

MainMenu
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can exit the script by pressing CTRL+X. Now we need to make the script executable, this can be done by: chmod +x /mnt/script/rescue.sh You can test the script by typing “/mnt/script/rescue.sh”.&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image15_hu286829eec76385b3f03b1ebdc53bdb13_5355_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image15_hu286829eec76385b3f03b1ebdc53bdb13_5355_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;277&#34; height=&#34;199&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;p&gt;The password in the script is “the password”, the disk which gets imaged is the disk which shows in the output of “fdisk –l”, “ntfs”. This probably gives error if you have more then one NTFS partition. The last step is to automatically start the menu, when the user boots into “rescue” mode. For this open the rc.local in nano or vi and add “/mnt/script/rescue.sh”, just before “exit 0”. nano /etc/rc.local&lt;/p&gt;





  
  











&lt;figure &gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image16_hu65ea1b847104d46b76921b06aa6a801f_18324_2000x2000_fit_lanczos_3.png&#34; &gt;


  &lt;img data-src=&#34;https://blog.breekeenbeen.nl/post/create-your-own-rescue-partition-with-easy-restore-option-at-no-costs/image16_hu65ea1b847104d46b76921b06aa6a801f_18324_2000x2000_fit_lanczos_3.png&#34; class=&#34;lazyload&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;133&#34;&gt;
&lt;/a&gt;



&lt;/figure&gt;

&lt;h2 id=&#34;final-note&#34;&gt;Final note&lt;/h2&gt;
&lt;p&gt;This is just a simple start, to create the bare minimum, since it is all “open” it is easy to extend, modify,etc. This is just a blog post, which might gets you started. For example, if you are in a business environment, think about booting from PXE and image over the network. We use this for our “thin” clients, which run on Windows XP Embedded. I always find it nice to hear improvements, different thoughts, etc.&lt;/p&gt;
&lt;h3 id=&#34;update-2011-04-20&#34;&gt;UPDATE 2011-04-20&lt;/h3&gt;
&lt;p&gt;Made some minor changes, like adding chmod+x and changes /mnt to $MNT.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Import Dreambox Channel Lists Into Mediaportal Tv Server</title>
      <link>https://blog.breekeenbeen.nl/post/import-dreambox-channel-lists-into-mediaportal-tv-server/</link>
      <pubDate>Fri, 24 Dec 2010 20:08:14 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/import-dreambox-channel-lists-into-mediaportal-tv-server/</guid>
      <description>&lt;p&gt;This blog is short and especially for people who have a MediaPortal TV-Server running with DVB-S(2). When you have a satellite dish with multiple LNB’s pointing at different satellites you probably end up with a lot of channels.&lt;/p&gt;
&lt;p&gt;MediaPortal can handle this perfectly, but the All Channel groups is getting slow and it takes a lot of time to group your channels in handy categories.&lt;/p&gt;
&lt;p&gt;A college of me pointed me to some list which is created for the Dreambox, which can be imported in a Dreambox and create nice channel groups. (He told me that you even don’t have to scan for channels). The 
&lt;a href=&#34;http://www.pli-images.org/modules/wiki/index.php?wakka=HenksatSettings&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;link&lt;/a&gt; he gave pointed to the Hensat list, which he used.&lt;/p&gt;
&lt;p&gt;Besides that scanning for channels can take a lot of time it is not a real problem for me, because it is just one click and it does the job.&lt;/p&gt;
&lt;p&gt;Creating the channel groups is a whole different story, create groups for your provider isn’t that hard, but create groups by genre, like “Music”, “Movie”, etc. takes a lot of time, cause there are a lot of FTA channels out there and it would be a nice to also add them to the right groups.&lt;/p&gt;
&lt;p&gt;So I decided to take a look at the “Henksat” list and try to create an import tool for MediaPortal for it. Since I succeeded by doing this, I got some friends also asking for it. First I was a bit skeptic, because it is created in a quick and dirty way, like no exception handling at all.&lt;/p&gt;
&lt;p&gt;So before you download and use this tool a few things you should know; - The import folder must end with a “”. - You can select channels with the right mouse button. - deselect/select the checkbox is with the left mouse button. - Always make a back-up of your working configuration - Please remind that this is just a very basic test-version created for myself. - Last but not least, I’m not responsible for any damage caused by this program!&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://blog.breekeenbeen.nl/files/MPTVAdmin.7z&#34; target=&#34;_blank&#34;&gt;Download MPTVAdmin&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>XNA 3D Pong</title>
      <link>https://blog.breekeenbeen.nl/post/xna-3d-pong/</link>
      <pubDate>Sun, 07 Mar 2010 20:09:56 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/xna-3d-pong/</guid>
      <description>&lt;p&gt;At school we got 2 XNA lessons, just to fill up our last weeks, since I hope to graduate this year. 2 lessons isn’t much, especially when you realize that that’s about 3 hours total. The last assignment of the XNA lessons was to create a simple 3D game with XNA. First I thought this got to be really, really easy, especially cause we build a 3d engine in OpenGL a year earlier. Unfortunately, it was a bit harder then I first thought. Displaying 3D objects in XNA is really easy, but creating a game with it, is a bit harder. There are just tons of tiny little things you just have to know, like a parent bone? I had never heard of it, but it is a bit essential when you create your own objects and want to use them. After all, with a lot of help from my friend called “The almighty Internet”, it seems that it is possible to create a very basic, simple 3D game in one day. Luckily for me, we have to work in pairs, so my classmate may fill in all the details :-). For those who are curious, &lt;a href=&#34;https://blog.breekeenbeen.nl/files/pong3D.rar&#34; target=&#34;_blank&#34;&gt;here&lt;/a&gt; is the source code, but remember, I’m a complete n00b at XNA.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Ipplan Export to Import for Poller</title>
      <link>https://blog.breekeenbeen.nl/post/ipplan-export-to-import-for-poller/</link>
      <pubDate>Wed, 16 Dec 2009 19:55:04 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/ipplan-export-to-import-for-poller/</guid>
      <description>&lt;p&gt;Like many others, I also hate administrative tasks. One of these tasks that comes back again and again is IP documentation. To make my life easier and probably that of others :-), I decided to go testing with IP management software. After some googling I found IPPlan, this tool which looks very promising, can do everything I need. It manages my IP addresses and gives me a quick overview of the status, it also gives me the possibility to &amp;ldquo;poll&amp;rdquo; addresses and automatically find used ones. This feature is great, except for one little thing, you have to create a new file with all the subnets you like to poll. If you are a greedy bastard like me, you like to have all subnets polled. We have over 500 subnets and after adding them to IPPlan I wasn&amp;rsquo;t very pleased with the idea of adding them manually to the list. Luckily for me, it is very easy to make a export from IPPlan with all the subnets, unfortunately this export is not well formatted for the polling list. The exported list will look like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;10.10.4.0             Client-Vlan4       255.255.255.0 10.10.5.0             Client-Vlan5       255.255.255.0 10.10.6.0             Client-Vlan6       255.255.255.0&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The import list should look like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;10.10.4.0/24 10.10.5.0/24 10.10.6.0/24&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What I did is created a very small and simple vbscript, which will make this transition for me. You can start the vbscript as follow.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cscript ipplantopoller.vbs exportfromipplan.txt importtopoller.txt&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As you maybe have already guessed the exportfromipplan.txt is the exported list and the importtopoller.txt is created by the script. You can download the script below and if you have any comments or questions please let me know, &lt;a href=&#34;https://blog.breekeenbeen.nl/files/ipplantopoller.vbs&#34; target=&#34;_blank&#34;&gt; IPPlanToPoller.vbs &lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Real 8bit Color Map Like the Msx2</title>
      <link>https://blog.breekeenbeen.nl/post/real-8bit-color-map-like-the-msx2/</link>
      <pubDate>Tue, 06 Oct 2009 21:40:21 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/real-8bit-color-map-like-the-msx2/</guid>
      <description>&lt;p&gt;For  a few weeks now we&amp;rsquo;re busy at school with VHDL and FPGA&amp;rsquo;s. This is some really awesome stuff and we just build our own VGA signal with an framebuffer. The only downside of this is, that wat we had coded from the examples was only 3bit RGB, so one bit for Red, one bit for Green and one bit for Blue. Since the VGA connector on our board (Nexsys 2) is able to show 8bit RGB. I created a 3bit to 8bit RGB converter, but as you may guess this won&amp;rsquo;t give you extra colors, but only a stronger signal.&lt;/p&gt;
&lt;p&gt;Instead of setting one of the three red signals to one, the converter puts them all to one. So to make things better, I created a new framebuffer that can display real 8bit RGB values. So three values for Red, three for green and two for blue. Now to build this was pretty easy, but the hard part was to find a nice real 8bit colormap, so I can see the values for each color. I was unable to find a good one, most 8bit turns out to be a 24bit RGB (8bit for each color) or to be an indexed scheme.&lt;/p&gt;
&lt;p&gt;So I build a small C# program that creates a 8bit color map. Below you find the result and even the source, but don&amp;rsquo;t shoot me on the code :-)&lt;/p&gt;
&lt;p&gt;Sourcecode ColorMapper - Sorry, lost during migration.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Mymovies Import Plugin for Gcstar</title>
      <link>https://blog.breekeenbeen.nl/post/mymovies-import-plugin-for-gcstar/</link>
      <pubDate>Fri, 11 Jul 2008 19:18:50 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/mymovies-import-plugin-for-gcstar/</guid>
      <description>&lt;p&gt;I’m running Linux for about one year now and I definitely felt in love with it. The only thing that was missing was my DVD-collection which I managed with MyMovies, a great tool, but it has no real alternative for Linux. So after searching for a while I found GCstar, it is a bit more basic then MyMovies, but it works good and it is very fast compared to MyMovies.&lt;/p&gt;
&lt;p&gt;The only problem was, I have quiet a big collection about 1300 DVD’s and I was not planning to add them manually to GCstar. This problem was not as easy solved as I wish it would be, cause there was no MyMovies import plugin. So I had no other option than write my own import plugin, quiet a big step when you don’t have any knowledge about Perl, but I managed it with a bit sneak and peak and a bit help from the author of GCstar with some array reference troubles.&lt;/p&gt;
&lt;p&gt;So 
&lt;a href=&#34;http://forums.gcstar.org/attachment.php?item=251&#34; title=&#34;MyMovies Import Plugin&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;here&lt;/a&gt; it is.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Always Wanted an Incomplete Mailserver</title>
      <link>https://blog.breekeenbeen.nl/post/always-wanted-an-incomplete-mailserver/</link>
      <pubDate>Tue, 01 Jul 2008 20:09:18 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/always-wanted-an-incomplete-mailserver/</guid>
      <description>&lt;p&gt;Always wanted an incomplete mailserver? This is your chance, in the last few weeks we had to create an mailserver for a schoolproject in Java with SMTP and POP3 support. I think we did a pretty good job on this, cause third party applications have no problems sending or retrieving e-mail from our server. It is tested with Evolution, Outlook and Outlook express. Only Outlook Express seems to have some problems with the TOP command in POP3. But who uses OE anyway :).&lt;/p&gt;
&lt;p&gt;Maybe you think what else does a mailserver need and why it is incomplete. A mailserver sends also mails with communicating through other mailservers, relaying. This is implemented, but not the way it should be. It is implemented with the use of a hosttable, it is not searching for DNS MX records.&lt;/p&gt;
&lt;p&gt;Further, only the minimum implementation is done and a lot&amp;rsquo;s of code needs cleaning up or improvement. So maybe you wonder why I post this, it is quiet simple. The code gives you a good idea how network protocols works (especially SMTP and POP) also the state pattern is used for the different states of SMTP, POP3 and relaying.&lt;/p&gt;
&lt;p&gt;So download it if you are curious or wonder how things work, but don&amp;rsquo;t shoot me for some messy code, some incomplete or even not implemented functions. I don&amp;rsquo;t have time to work on this project even I really liked working on it. If you have questions about how it works or why somethings are done the way they are just ask. A little sidenote (or maybe a way to say sorry), most of the code commentary is in Dutch, methods and variables are mostly named in English. A small movie, which shows relaying (in Dutch), was to lazy to figure out how to put up a nice flash player for it, so here is the OGG file.&lt;/p&gt;












  


&lt;video controls &gt;
  &lt;source src=&#34;mailrelay.ogg&#34; type=&#34;video/ogg&#34;&gt;
&lt;/video&gt;
&lt;p&gt;The code can be downloaden here: &lt;a href=&#34;https://blog.breekeenbeen.nl/files/java_mailserver.zip&#34; target=&#34;_blank&#34;&gt;Mailserver in Java&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Some Examples of Design Patterns</title>
      <link>https://blog.breekeenbeen.nl/post/some-examples-of-design-patterns/</link>
      <pubDate>Fri, 06 Jun 2008 21:14:11 +0200</pubDate>
      <guid>https://blog.breekeenbeen.nl/post/some-examples-of-design-patterns/</guid>
      <description>&lt;p&gt;Do you know that great feeling, when you learn something and it felt just into the right spot? This was happening to me, when I learned the existence of design patterns.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t program for a living, but it has always been a great hobby of mine. So when I found out, actually it was told to me what design patterns are and what they do. I was astunished, why didn&amp;rsquo;t I know this stuff? It is great to see some practical solution for things you ran into so many times, while coding.&lt;/p&gt;
&lt;p&gt;So design patterns are still new for me, but for school we had to work some of those patterns out in real code and since I&amp;rsquo;m very, very kind :-) and know what a suprise design patterns can be if you get the clue of them. I putted them on the web.&lt;/p&gt;
&lt;p&gt;So here they are four patterns I turned into real Java code. The downloads include the Java code, an image of a class diagram and the Umbrello file, which I used to create the class diagram. These are just examples, if you really wanted to know how the pattern work I would suggest you buy the &amp;ldquo;Gang Of Four&amp;rdquo; book or search the Internet, there is plenty of information about those patterns.&lt;/p&gt;















&lt;figure id=&#34;figure-observer-pattern&#34;&gt;


  &lt;a data-fancybox=&#34;&#34; href=&#34;ObserverPattern.png&#34; data-caption=&#34;Observer Pattern&#34;&gt;


  &lt;img src=&#34;ObserverPattern.png&#34; alt=&#34;&#34;  &gt;
&lt;/a&gt;


  
  
  &lt;figcaption&gt;
    Observer Pattern
  &lt;/figcaption&gt;


&lt;/figure&gt;

&lt;p&gt;Sorry for you non Dutch readers, some names and comments are in Dutch, but most of the code will speak for themselves.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.breekeenbeen.nl/files/AbstractFactoryPatternJava.zip&#34; target=&#34;_blank&#34;&gt;Abstract Factory Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.breekeenbeen.nl/files/BridgePatternJava.zip&#34; target=&#34;_blank&#34;&gt;BridgePattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.breekeenbeen.nl/files/CommandPatternJava.zip&#34; target=&#34;_blank&#34;&gt;Command Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.breekeenbeen.nl/files/ObserverPatternJava.zip&#34; target=&#34;_blank&#34;&gt;Observer Pattern&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
  </channel>
</rss>
