Labels

Monday, December 21, 2015

Learning BGP - Thinking of adding a number of RPi BGP routers to the network

I have been toying with a way of cross-pollinating the packets on my home network.  Right now I am at a quandary on how to allow computers on my Media VLAN to talk to the printer on the Pers VLAN.  It is an interesting problem and one that strangely enough has something to do with two projects that I am working on at work.  I want to explore how to route information from one network to another given that the subnet on each end of the gateway have the same ip addresses, but yet must remain different.  I think the key to this something approaching the BGP protocol perhaps with some gateway translation in the middle.  More later.

Thursday, December 10, 2015

CC #7 - Finally settled on a partial solution

I modified the FIOS TV setup - I now have reduced the Extreme package down to the Custom TV package.  In addition, I have dumped the FIOS DVR and STB rental for a TiVo Bolt and 2 TiVo Minis.  The Bolt serves as the DVR in my setup and the two Minis are able to stream the shows and set the tuners (4 on the Bolt vs. 2 on the FIOS DVR) to stream TV.  The entire setup is running on Ethernet (the Media VLAN) through my house.  This is actually predicted to run about $70 per month less than my current Verizon bill.  I also went from 25/25 to 50/50 on the internet.

Update: I have had a chance to get a couple of bills since I posted this.  The difference between what I was paying and what I am paying now amounts to about $80 since my bill was over $200 per month.  So I am reasonably happy now with the new setup - and the wife seems to be happy as well.  I'm not missing paying the Sports Fee every month.

Saturday, November 14, 2015

SynthBoost Project #4 - Flow Through Experiment

As I try and look through what I will be doing, it might be nice to get a general flow through experiment up and going. What I envision is to have all of the vintage gear hooked into the 4x4 midi interface, then through the powered usb hub, through the RPi, and then in turn hook it to the iPad. The RPi would provide a number of virtual midi connections to the iPad. Each of the vintage gear would be tethered through the RPi and the virtual connections. This would form the baseline and could be used to measure overall lag through the setup.

Friday, September 18, 2015

SynthBoost Project #3 - Working Multiple Use Cases

I have been working on getting a work router ready for use with an RPi. The idea is to have two wifi adapters and make use of the Ethernet port. One of the wifi adapters (work subnet) connects to my work network and the second (home1 subnet) provides a wifi access point. The Ethernet port is used to provide a different subnet (home2 subnet) separate from the home1 subnet but still connecting through the work subnet. The home1 subnet provides a web server providing various setup functions. The home2 subnet is used to provide a wireless capability to a laptop. I have the work and home1 subnet so set up and am almost able to use the Ethernet port with the home2 subnet.  I am currently having issues with being able to separate out the two homex subnets.  I currently use hostapd and isc-dhcp-server for dhcp ip address resolution.

I am going to make use of the web server through a 7" tablet for the midi functions. The tablet will be used to provide a touch capability to select and control different capabilities.

More Later.

Tuesday, September 15, 2015

Project #9 - Change Over the Media Components from Verizon to TiVo to Reduce Costs

The charge that I am getting from Verizon has been ever increasing.  No matter what I try Verizon keeps nickle and dimeing me to get more and more money.  I am tired and I now want to convert everything over in a move to someday go completely "Cut the Cable."

Monday, September 14, 2015

SynthBoost Project #2 - A Midi Router - Translator - Patcher

It occurred to me that I might be approaching the SynthBoost project the wrong way.  I have been exploring the possibility of augmenting my DW-8000 synthesizer with a Raspberry Pi to do various new things.  But what I think I really want is something in the middle that performs a whole bunch of functions.  If I use the RPi as a midi router, then I might have a better shot at success.  I have thoughts about setting up my equipment as shown in the following diagram:


In order to do this I would need the Raspberry Pi to act as a midi-router.  First of all I wanted to see if plugging in the 4x4 midi switch and the iRig would show up separately.  In order to see if the new iRig Pads would work on the RPi, I ran a python program after plugging the USB cable into one of the ports.

pygame.init()
pygame.midi.init()

for id in range(pygame.midi.get_count()):
print pygame.midi.get_device_info(id)

This gave me the following sequence:

('ALSA', 'Midi Through Port-0', 0, 1, 0)
('ALSA', 'Midi Through Port-0', 1, 0, 0)
('ALSA', 'iRig PADS MIDI 1', 0, 1, 0)
('ALSA', 'iRig PADS MIDI 1', 1, 0, 0)

This tells me that it is possible to interface to the iRig Pads device from my Raspberry Pi.  This shows that the ALSA is capable of accessing the midi interfaces.  When I plugged in the 4x4 midi switch and the 1x1 midi adapter, the items also showed up after running this same python program.  Now I am in a better position to figure out a solution.  I have been looking a a number of software solutions, most notably mididings.  Mididings is python based and uses the ALSA and JACK to its advantage.  I have not setup mididings on the RPi yet, but I hope to do that this week.

More information later.

Wednesday, August 26, 2015

SynthBoost Project #1 - Idea for Augmenting a Vintage Synthesizer

So I have this Korg DW8000 synthesizer in my room downstairs that is gathering some dust.  I was thinking that I might want to augment its functionality with a Raspberry Pi.  This would allow me to get back into music, and midi, and related programming efforts.  Right now the biggest need is for a Midi Patch Editor.  I have sorta one on my iPad, but to do the same thing on an RPi2 would be neat.

So what would such an augmenting tool do? It depends on what I have access to within the synthesizer itself. If I can interface to the inside, I would have better capabilities, maybe even adding things that the DW8000 synthesizer cannot do in its present form. Let's list the possibilities:

1. A Midi Patch editor that has a user interface that will allow custom changes to the voices
2. SysEx capabilities, including loading patches during live performance; grabbing individual voices from multiple patches to form a different patch
3. A midi recorder/player
4. A midi translator (assumes internal connections); translation of key signature up/down, voice/channel mix, etc.
-- Midi event processor
-- Midi patchbay/merger/router/filter
5. Keyboard shift, multiple voices across keyboard sections (assumes internal connections)
6. Midi foot controller "brain"

More thoughts later.

Setting Up a WiFi bridge for work

I have an interesting issue with a laptop at work.  The wireless has been disabled so that I have to use an Ethernet connection (don't ask).  The nature of the laptop prevents me from being able to connect to my work network and I have to tie into the work guest network which is wireless based.  Right now, what I have is a D-Link DIR-505L which connects to the work guest network and acts as a wireless router with one of my home SSIDs, NAT, and it's own subnet.  I have a wireless bridge, an 802.11g device, which connects to the D-Link and provides an Ethernet connection to the laptop in question.  I would like to not have to tie up 2 of my own devices to get things done.

What I want to do is setup a WiFi bridge on an RPi, using an 802.11n USB adapter, to connect to the work guest network and plug into the Ethernet port for data.  This is just the opposite of what most setups show you.  I could also probably setup an additional VM on my work laptop to provide the same service, but I would rather setup the RPi2 to do this as a matter of course.

My biggest bugaboo will be the capture page on the Guest network.  There doesn't seem to be any easy way to use CURL to setup access to the page.

Monday, August 24, 2015

CC #6 - Disappointed with SlingTV

I was in hopes that SlingTV would work out as a start towards cord cutting. I have been spending over $2400 per year on Verizon FIOS (TV - no movie channels, one STB, one DVR; land line; internet 25/25) and need to find a cheaper alternative.

The wife was very displeased with the results on SlingTV. First, there was the buffering on a couple of her favorite channels (I don't have the same buffering from Netflix on the same Roku 3) which was very disconcerting. Next, the lower volume levels on other channels like Food Network and TCM. The volume levels on ESPN and Disney were loud - but I don't watch ESPN or Disney, that is not what I wanted SlingTV for. Lastly, the user interface was abysmal and not that responsive even on a Roku 3. I was hoping the experience would have been better so I have cancelled the trial run, and will wait until Dish gets the bugs out.

 There was a thread on Reddit about this topic.

Friday, August 21, 2015

Have a new toy - RPI-Console

I have a new toy in my arsenal, this is the RPI-Console from land-boards that I received when making a contribution to Kickstarter.  I was looking for a device to use at work (or home) to update software on a Raspberry Pi without having to have a connection to a monitor or keyboard/mouse.  Then the RPI-Console showed up on Kickstarter and met most of my needs.  I can now use my laptop keyboard/screen to interface with the console on the RPi, including powering the RPi from the USB port on my laptop.  This the smaller version and I have a 40 pin version which I also received as part of the Kickstarter promotion.


As you can see from the next picture, I have been using this at the office to work on an RPi2 during lunch.  I just take the cover off of the RPi2 case and plug the RPI-Console into it, plug the USB cable and fire up a copy of Putty on my laptop; instant console!  I have been able to run raspi-config from the console to get the microSD card setup, and further setup things so that I can update the RPi2 software through a wireless bridge (not shown in the picture).


I have been impressed with the quality of the board and with the "open kimono" approach that Land-Boards have with their products.  They even have a wiki page which details the testing that they put each board through; a quality job throughout!  I like the fact that the design has a couple of LEDs to indicate serial traffic, receive and transmit, and the fact that you can choose to power from the USB cable or not by a jumper.  The extended pins are a nice touch and allow you to get at the GPIO as needed.

For me this is an ideal interface and reduces the amount of things that I bring into work to be able to do a lunchtime activity. Should the power requirements be more than the USB cable can handle, you can always set the jumper to bring power via the microUSB interface.

Update: I was also successfully able to put a PiTFT onto the RPi2, run a ribbon cable from the additional connector, and plug the RPI-Console into it.  It was also able to power the whole thing including two Netgear wifi adapters.  I think that I am going to be very happy with this purchase.

Friday, July 31, 2015

CC#5 - Going to try out some ideas over the weekend for Cord Cutting

So yesterday I signed up for SlingTv in an effort to look at things that I might use to do a little Cord Cutting.  In case you are mystified as to why I am doing this, consider that I will be retiring in as little as 2 years and I need to cut costs to my home budget.  I am currently spending over $2400 per year for FIOS.  That has got to change.  Fortunately, SlingTv has a 7 day trial offer on the table that really looks attractive.  The downside is that it is a single unit streamer and there is no cloud dvr capability.

I am not sure what I will be able to do with this since one of my "must haves" is to be able to record the Food Network.  I am aware that I can sort of get archived recordings but my wife likes to record the stream on our FIOS DVR and watch it later when we are not occupied with work or errands.  This is the nature of recording the shows, not that we are going to sell or trade the shows with someone, but that we are not around when the shows are on that we want to watch.  The networks end up penalizing customers who simply want to watch their shows in a different time slot when they prevent recording for personal use.  There is nothing illegal at all about recording for personal use, but the networks are using things like the DMCA to force everyone to use their business model. Well, I have to cut the cost or I drop everything - period.

So, this weekend the experiments are to:
(1) try out SlingTv to see what it has to offer and see how the streaming holds up on my internet connection.
(2) finish setting up Mythbuntu on a VM to connect to my OTA setup running through the HDHomeRun Connect system.  Need to figure out the connection to my upstairs tv though.
(3) potentially try out WMC using the OTA setup through my Ceton Echos.

More Later ...

Tuesday, July 28, 2015

Weather Station Project #22 - Added a PoE Switch to the network to support some RPi projects

I went out over the weekend and purchased a 8 port Gigabit switch with 4 PoE ethernet ports on it.  My goal is to use this switch possibly in the attic in the future where I can run ethernet wires through out and use the power from the PoE switch to both power and connect the outputs to my home network.  I am already using it to power the Gertduino/Raspberry Pi Solar Radiation/UV sensor so that I will not have to use the injector; clutter catcher that it is.  When I do get to the point of connecting the Solar Radiation/UV sensor up, I am planning on setting up a pan/tilt camera mounted next to it for weather pictures.

Thursday, July 23, 2015

GTD #1 - Rethinking My Use of Tech for Getting Things Done

This post will seem to be a little off target for what I have posted here before since this is not electronic or networking in nature.  However, since this is my blog I can set my own rules.  I have used the Getting Things Done approach for a number of years, mostly using manual/paper/analog type things to keep track of the mess that is my life.  I have since graduated to an on and off use of ToodleDo and Pocket Informant plus notebooks.  This morning I pulled up Pocket Informant on my iPad only to discover that I had 37 items that were overdue - time to rethink the problem!!  I also discovered a simple "Getting Things Done in 500 Words or Less" post this morning that was outstanding.

I am going to keep using the notebooks that I have always used.  The reason for keeping notes in a notebook is that it slows me down enough to really think about the problem - and as a plus it keeps my handwriting up.  For a while there my chicken scratching was almost unreadable.  This was a far cry from my days as a young engineer in which I had my drafting class lettering fresh in my mind.  That was 40 years ago, this is now and with all of the distractions around me I am having problems keeping concentrating on a single subject for very long.  So this will be my series of discussions on what I am doing to alleviate the issue.

Tuesday, July 21, 2015

CC#4 - Media VLAN has Changed to Support Cord Cutting

My Media vlan now looks like this:



The blocked out areas refer to equipment that is FIOS TV specific.  I am currently trying to figure out a scheme to get around having to use FIOS TV but still give me the things that I am used to using.  I still have the Windows Media Center, although it now only gets to the HDHomeRun Connect for OTA channels.  The Mac Mini will still be used as a Plex server in the arrangement.  I am going to use the WMC as the primary with the Plex server as the secondary use of media.  Note that I have a Roku3 in the mix now as I have removed the Apple TV that was upstairs due to Apple's insistence that they control everything.  Actually the Netflix control from the Roku3 box is much better.

So, the next actions to take include:

  • Get the HDHomeRun Connect running through WMC7
  • Install Ceton's WMC interface software
  • Ensure that the WMC7 works with the Echos
  • Get one or all of the iPads in the house to control the Ceton Echos in the house

That should give me a start.

Monday, July 20, 2015

CC#3 - Set up an HDHomeRun Connect on the Network

So, over the weekend I managed to setup an HDHomeRun Connect with a 50W OTA antenna.  I was able to scan the stations and display some of the OTA channels from the WMC7 box that I have in my network.  I was using the HDHomeRun Installer/Setup scripts to do this.  So far I have not ventured to attach the Connect to my WMC7 box because I already have a running HDHomeRun Prime setup that works.  I am a bit afraid to change it out in case I cannot get the Prime setup again.

I shouldn't be this cautious given all of the things that I have done with my network thus far.  I have gotten some sage advice from the Cord Cutters group on Reddit which I am about to try out.  I have a program which can selectively limit the channels on the WMC7 box.

Thursday, July 16, 2015

CC#2 - Cord Cutting TV Items I Can't Do Without

I have been analyzing the minimal TV channels on Verizon FIOS TV that I have to have prior to cord cutting.  This is pretty easy since my wife is the one who watches TV the most.  As long as I get her the channels she wants to watch, along with the services that she wants, I am in the game.  However, women are fickle; especially my wife.  For example, even though I have a Windows Media Center setup she will not use it because of the way in which the channels are accessed (i.e., she doesn't like the interface or the remote that I have).

First of all, I don't mind spending money on technical items if in the long run it saves me money.  As I said in a previous post, I spend above $2400 per year on Verizon FIOS and I have to cut that amount in half.  I have a lot of the technical items that I have gathered in the last few years that should give me the ability to do just that.

But, back to the minimal channel thing.  These are the channels that I need (preferably with an HD offering).

Absolute must haves:
  • ABC over the air
  • TCM
  • Food Network (she tapes this one)
Nice to haves:
  • Other over the air channels like Fox, CBS, NBC
  • Hallmark channel
  • SyFy channel
Hmmm.  So what do I do with this information?  Fortunately, I am intelligent enough to put together some of my own solutions to resolve the issues with television signals and ethernet cables and devices that use them.  I have a working Windows Media Center (Windows 7) in the house; complete with connection to a HDHomeRun Prime with a Verizon FIOS cablecard.  In addition, I have a couple of Ceton Echo WMC extenders.  If I can get what I want to come up on the WMC, I will be able to control the same from anywhere in the house as well as afford myself the DVR capabilities that WMC provides.  I did pay out money for this equipment, but if I save $1200 per year I will recoup the cost rather quickly.

Some streaming solutions come to mind as well.  I can stream via Hulu, Hulu Plus, Netflix, Amazon Prime, or SlingTV.  I could put up a server for Plex, MythTV, XBMC, etc.  I have the hardware and the connections throughout the house to accomplish this.  So what do I do?  First up, how do I get to tape the Food Network stream?  Or, do I really need to.  Maybe the first question should be how to get the Food Network stream itself.  I know that I don't have the Food Network over the air.  There are pre-taped Food Network shows on each of the services above.  At last count the costs were:

  • Hulu: $7.99 per month
  • Hulu Plus: $7.99 per month
  • Netflix: $10.99 per month (I have streaming and 3 DVDs plan)
  • Amazon Prime: $90 per year (use it a lot for no cost shipping)
  • SlingTV: $25 per month (given the shows that I want to watch)

To be continued ...

CC#1 - Setting up for Cord Cutting

In just a very short number of years I will be retiring.  I already have my mortgage paid off and I have dropped what I owe to a minimum in preparation for that event.  If you still have a mortgage when you get ready to retire, by definition you will not be able to retire unless you are making oodles of money.  I am not that way.  One of the things that I need to do is start cutting household expenses to a minimum.  I am also planning to run for a couple of years on "retirement income" levels to see how I fare.

One of the larger household expenditures that I have is my cable bill.  I have Verizon FIOS and I am spending over $2400 per year on that service.  I have FIOS TV with one DVR and one STB, no premium movie channels, a telephone land line, and internet (25 up/25 down).  I want to cut that expenditure in half.  The issue is that I have been a Verizon customer for a good number of years but find myself ineligible to participate in ANY offer that Verizon FIOS has.  Every single one of their offers to save money makes the blanket statement that only new customers are eligible.  That means that I will have to quit Verizon and go somewhere else if I am to lower my monthly costs to the level that I need.  My goal is to halve the cost for my cable bill; which means that the service cannot cost more than $100 per month.

So my choices are: (1) to go elsewhere for a period of time until the other service raises their rates and then come back to Verizon and get their offers, or (2) do a Cord Cutting measure and reduce my dependence on Verizon FIOS to internet only.  I can get internet from other sources, but I would prefer to stick with Verizon FIOS internet.

First on the chopping block is the landline.  I already pay AT&T a lot of money for keeping up three iPhones.  I don't foresee that changing for a while although I could back off and go to flip phones which would reduce the bill to a minimum (my granddaughter would not be happy though).  If I have internet service, I would be able to convert over to VOIP (which is what I get from Verizon anyway).  I have an Obi110 in my bag of goodies which I can use to get the landline moved to something reasonable.

Next on the chopping block is the Verizon FIOS internet service.  The service by itself is expensive.  In my area, 25/25 by itself is $45 per month and 50/50 is $55 per month, which is half of the $100 per month in my budget.  I am not sure at this point if I can get those prices if I drop my Verizon FIOS TV and Land Line since I am an existing customer.  I have heard rumors that they will only drop the cost to $75 per month if you drop the rest of the services in an effort to keep you on the whole till.  I will need to explore this

Next on the chopping block is the Verizon FIOS TV.

To be continued ...

Tuesday, July 14, 2015

An Issue Has Arisen - VLAN Crossover

Methinks that the default setup for Mac OS X Mavericks opens the same ports for every VLAN that has been defined.  I thought that I was going crazy here because I thought that the default was no crossover connections between VLANs within my network.  I have been very careful to make sure that the router and switch setups do not cross over.  However, it would seem that Mavericks puts the same ports on each vlan that is defined in the Setup.  I don't want this, I want a separate set of ports to be open for each vlan from the Mac Mini.  The reason for this is that I want to do some SDN type things using Fusion on the Mac Mini, now I am not so sure that I will be able to do it.  I don't really understand PF as I am more of a Linux guy.  I will update as I find the answer.

Friday, July 10, 2015

Weather Station Project #21 - Updated the RPi Hardware

Interesting; as it turns out it's very easy to go from the old B model to the RPi 2 without difficulty. I wanted to update my software and the version of the raspberry pi. I did an update, followed by an upgrade, followed by a dist–upgrade and was then able to take that SD card and grab an image of it. I then placed the image onto a micro-SD card which would fit on the RPi 2. It booted right up and has been outputting weather data ever since.

Thursday, June 11, 2015

Weather Station Project #20 - Found a Neat Resource for the Weather Display

About 2 months ago, a post was made to GitHub at https://github.com/kmkingsbury/raspberrypi-weather-station from Kevin Kingsbury.  This is a RPi based weather station, but has a twist in that there is an avid use of the Weather Underground API for his display.  I plan on tapping into that code for use with my RPi based Weather Display.  As you know, I plan on extracting all of my information for the Display from outside sources, particularly Weather Underground.  By using some of this code my life will be made simple.

BTW, Kevin has done a fine job with the backgrounds and displays for Austin, TX.  The last time I was in Austin was for a conference in 1996 where I gave a paper on Requirements creep and Software Design Patterns.  Memories.

Friday, May 29, 2015

Thinking of Setting Up an OpenVPN Server with 1-Port Capability for External Connections

I was thinking back to the 1-Port router idea and now I am thinking of adding an OpenVPN to the mix.  I could have an encryption key on both sides of the connection to give my setup a little extra protection.  So that would mean: (1) have an RPi running an OpenVPN server (allowing connection from the outside); (2) have a second RPi running an OpenVPN client/OpenWRT; and (3) let a connection go through the second RPi to my WorkNet Guest wireless to my home network.

I could have most of the ideas that I have come up with resident in this setup.  In addition, I would still like to have a selection switch that would give me some different options, like TOR, w/wo OpenVPN, etc.  The bubble chart would look like:


Weather Station Project #19 - Thinking of Switching to a USB over IP Solution for the Console

I have been having some issues with weewx over the last couple of days.  It has been almost a year (July 2014) since I installed the Vantage Vue Weather Station and weewx on a Raspberry Pi.  Everything has been going real well except for the last couple of days.  It is looking like maybe the SD card is starting to give way because the RPi has been crashing? or weewx has been crashing?  I don't know at this stage.  I need to meter the RPi to get a crash dump if weewx stops working.  I have the RPi setup to start weewx when it reboots, therefore it is more likely that weewx has stopped and the RPi remains running.  I would only know that if the crash dump says so.

In the process of thinking about setting up something here, it occurred to me to split out the USB interface on the console to a different RPi.  If I run a virtualhere USB server on an RPi, for $39, I can access the console USB from multiple clients on my network.  In particular, I can access the USB information from my MacMini, and from additional RPis in the house.  So slipping an additional RPi into the mix gives:


This does not limit my ability to use RPi2 for other USB tasks either.  Since it would be physically located in the living room (and I might be able to run both the client and the server on the same RPi) it would be convenient to have other USB devices connected as well.

Update: This might not be as smooth as I would like.  I currently have the RPi5 separated in its own VLAN in order to throttle the output (so Verizon will be happy).  Gotta think that one over.

Thursday, May 21, 2015

Weather Station Project #18 - Obtained a Weather Underground API Key

I have been in the process of coming up with a way of (1) calibrating the upcoming Solar Radiation and UV sensors for my Weather Station; and (2) determining how I can display the Weather Underground information for my Weather Station on a convenient interactive home display.  So the first thing that needed to be done was to obtain an API key to Weather Underground.  They have made this extremely easy to do, especially for a developer.

I will first use the key to build a data extraction tool to gather solar radiation and UV readings from stations near me so that I can come up with an equation for my sensors that will put me in the ballpark of the more costly ones.  This will allow me to modify the weewx routines on my RPi to accept the new sensor information and then send it on to Weather Underground.

I will then use the key to put together a touchscreen style display controlled via a RPi that will display the current and forecast weather for my Weather Station.  I intend to do this as discussed in weather-station-project-9-building a weather and general info display.  The key is necessary to pull the Weather Underground information.  Of course, it could be used to display the information from any Weather Underground station, but let me build it first.

The general sequencing will be as follows for the RPi Weather Display:


Thursday, May 14, 2015

Weather Station Project #17 - Waiting for some parts to Start on the Solar Radiation/UV Sensor

I just purchased a TP-Link TL-POE150S PoE Injector and a TL-POE10R PoE Splitter over the weekend.  What intrigued me was that the TL-POE150S came with a 48 volt power supply to inject power through the Ethernet cable. The TL-POE10R had a selection switch to convert down to 12, 9, or 5 volts prior to splitting the output via a 5.5mm x 2.1mm connector (cable included).  I also picked up a clear sandwich box to put the equipment into.

I ordered a power splitter, power adapter plugs, and power to micro USB adapters from Amazon.

The parts list looks like this so far:
  1. Raspberry Pi B+
  2. Gertduino
  3. Arduino Proto Board
  4. Raspberry Pi No-IR camera
  5. TP-Link TL-POE150S PoE Injector w/power supply
  6. TP-Link TL-POE10R PoE Splitter w/power connector cable
  7. Power splitter cable (1 female to 4 males - 5.5mm x 2.1mm)
  8. Power adapter plug (1 female 5.5mm x 2.1mm to ISO block)
  9. Power plug 5.5mm x 2.1mm to micro USB cable
  10. Ethernet socket adapter (for mounting on wall of sandwich box)
  11. Clear sandwich box (see-through for RPi camera)
  12. RTV to pot up the holes so that water can't get in
  13. Mounting platform and hardware to mount sandwich box on outside
For the moment, I am going to forgo the Pollen Sensor and concentrate on the other two sensors.  I will update this list and add a picture as the stuff comes together this weekend.

Update: I have the power splitter cables in, still waiting on the power plug to micro USB cable to come in.  They were supposed to be delivered on Monday and it is Thursday already.  I can't complain because the adapters were only about a buck apiece.  Somehow they are tied up in Indianapolis, IN under a "Processing Exception", whatever that means.  I may end up ordering the cables from a different source.  Ok, put in another order in case this one doesn't come through.  These cables are apparently tough to find.

I added the picture below to show the new setup with the two sensors on top, on an Arduino breadboard, Gertduino, on top of a Raspberry Pi B+.  There is also a No-IR RPi camera peeking out from between the Gertduino and the RPi.


I am also wondering if I should make the unit multi-tasking.  If so, I could setup my own web service API so that the unit would respond with values from the sensors, pictures from the camera, and potentially other information gleaned from Weather Underground for my weather station.  That way I could minimize the kiosk nature of my RPi Weather Display and use unit as the main source for the display.  That also simplifies the interface with my weewx software connected to the Davis Console.

Friday, April 17, 2015

Weather Station Project #16 - Equations for the Solar Radiation Sensor

I happened upon some Solar radiation unit conversion equations from the USDA at http://www.nrcs.usda.gov/wps/portal/nrcs/detailfull/national/home/?cid=stelprdb1043619. I am very grateful that someone decided that it was in the best interests of the country to provide this information.  Anyway, now I have some basis to get values from the TSL2561 luminosity sensor.  Other conversion factors are at http://www.egc.com/useful_info_lighting.php.  According to the lbl.gov site at http://bccp.lbl.gov/Academy/workshop08/08%20PDFs/Inv_Square_Law.pdf, when converting Lux to Watts/m^2:

Converting Lux to W/m2
• There is no simple conversion….it depends on
the wavelength or color of the light.
• However, for the SUN, there is an approximate
conversion of 0.0079 W/m2 per Lux.
• Example: We read 75,000 Lux on our light
sensor. We can convert that reading to W/m2.
75,000 x 0.0079 = 590 W/m2


But now I have a check on the USDA information.  The primary value which is output from the TSL2561 is in Lux.  The Merriam-Webster definition of Lux is "a unit of illumination equal to the direct illumination on a surface that is everywhere one meter from a uniform point source of one candle intensity or equal to one lumen per square meter."

So from the above equations I take the output of the TSL2561 sensor in Lux and convert to W/m2 by multiplying by 0.0079.

Friday, February 20, 2015

Weather Station Project #15 - Calibration Procedures for the DIY Solar Radiation Sensor

First of all, I am an engineer, not a statistician. I am trying to come up with a way of calibrating a DIY solar radiation sensor on the cheap. The original question that I asked can be referenced at the My Weather Station subreddit.

First some background: I am building a solar radiation sensor (measures watts/meter2) from a TSL2561 luminosity sensor. The sensor will be placed under a pane of glass, coated with white translucent paint for light dispersion. The output of the sensor will be a number, representative of lux received at my house. I have 5 personal weather stations within a 15 mile radius who have expensive solar radiation sensors from which I can obtain data readings via Weather Underground. Given that cloud cover will alter the readings in each case, I am assuming that a statistical analysis is warranted. The data is also at the same time somewhat spatially distributed. I need to get the value from my DIY sensor into the ballpark of the other sensors.

My approach so far:
  1. Gather the data from the 5 sites each day for an extended period of time. 
  2. Use a Chi-square test to check if the data samples are likely from within the same distribution set (note that solar radiation results tend to follow an almost bell-shaped curve over the course of a day). 
  3. Use a sample T-test to establish a mean and standard deviation representative of the set which varies throughout the day. 
  4. Use the mean applied against the value determined by my DIY sensor to formulate an equation (assume a linear fit for right now). 
  5. Check the altered output of my DIY sensor against values from the other 5 sites in a Chi-square test to determine if I am likely from the same distribution. 
  6. Run some sort of correlation against the data set to further solidify the equation that I have found.
Question: is this approach viable? Are there any glaring issues with what I am trying to do? Is there anything else that might solidify the accuracy of the calibration?

To Be Continued ...

Monday, February 16, 2015

Weather Station Project #14 - Calibration Ideas for Solar Radiation Sensor

I have been mulling over the Solar Radiation Sensor and the UV Sensor and how those would be calibrated.  I have succeeded in getting the two main sensors connected to the Arduino.  The connections for the TSL2561 (for Radiation Sensor) is done according to instructions found at Adafruit - TSL2561 Luminosity Sensor. The connections for the SI1145 (for UV Sensor) is done according to the instructions found at Adafruit-si1145-breakout-board-uv-ir-visible-sensor.  I might be able to make do with the one SI1145 sensor, but the visible sensor is not calibrated.

Unfortunately, I will need to have each of these sensors under some sort of a window material.  The UV sensor will need to go under some type of window.  From the Cancer Research UK website, "UVA mostly causes skin ageing and research has now shown that it is also likely to cause skin cancer. UVB causes redness and sunburn and is a major risk factor for all types of skin cancer.  Most glass used for windows blocks UVB but not UVA. This means that although glass might reduce the risk of sunburn, it does not prevent long term damage from UVA."  In addition, I know that polycarbonate plastic will block most UV.  I am not sure of the window material that I should use for this.  It seems appropriate to use ordinary glass since that passes half of the UV radiation.  The luminosity sensor should be okay if placed under ordinary glass. I will of course need to hard mount the sensors on top of the Arduino - possibly substituting a Gertduino on top of a Raspberry Pi to transmit the information.

When I say calibrated, I mean outputting values that are statistically in-the-ballpark of sensors costing many times more.  What I will need to do is to correlate the output of these sensors over a period of time against local area sensors costing many times more.  The idea is that whatever values come out of the sensors can be modified to be statistically within the ballpark of the highly calibrated devices.  I would assume that I would need to form some equations so that the output of my sensors match that of others within the area.  The thing about my sensors is that they will follow the same curves as other sensors, taking out for cloud cover, etc.  and should be able to be mathematically stretched to match.  This will form the basis for my calibration and over a period of time should prove out to be accurate.

Wednesday, February 11, 2015

Still Having Issues with Netgear G54/N150 Micro Adapters

I hate to say it but I might have to move on with this development.  I have not been able to get a functioning 8188cus driver to run in the RPi despite trying just about every known driver setup program that is out there.  I don't know what is happening here.  It seems like the newest versions of the Raspbian OS are not able to take the 8188cus driver and allow it to run.  I keep having the rtl8192cu come up in its place and that one does not allow the iw utilities to run with it.

Out of all of the 802.11n based adapters, the Netgear G54/N150 Micro was the one that worked out of the box without any changes.  But it seems that the rtl8192cu driver does not allow the adapter to perform all of it's intended functions.

Friday, January 30, 2015

Loaded OpenWRT onto an SD card for test in Reverse Router Mode

I just followed the instructions here to get an SD card image for OpenWRT.  I am going to configure it much the same as what I have done with the dual wifi adapter setups.  Then I plan to finagle some way of pushing a DMZ to the ethernet port.  More later.

Configuration Files for Specialized Router for Work

I thought that I would record the configuration files that I used for the Specialized Router here, so that I would have something to reference in the future.  The setup here assumes that I have a common SSID that I connect to both at home and at work.  At home, I have a separate SSID that I have set up on my primary router and on the WAP that I have downstairs.  The channel number is not the same in both places, but the RPi software looks for the SSID and does the connection.  At work, I use a DIR-505L router which is set to wifi hotspot mode with the same SSID but is connected to the guest wifi SSID at work.  Assuming that hostapd and isc-dhcp-server are installed, the configuration files are as follows:

(1) /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="CairParavelClone"
        psk="p19dsndgyxhrh$AM"
        proto=WPA
    key_mgmt=WPA-PSK
        pairwise=TKIP
    auth_alg=OPEN
}


(2) /etc/default/isc-dhcp-server

# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
DHCPD_CONF=/etc/dhcp/dhcpd_test.conf

# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
DHCPD_PID=/var/run/dhcpd_test.pid

# Additional options to start dhcpd with.
#    Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#    Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="wlan1"


(3) /etc/network/interfaces

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp

allow-hotplug wlan1
#auto wlan1
iface wlan1 inet static
   address 192.168.42.1
   netmask 255.255.255.0
   network 192.168.42.0

up iptables-restore < /etc/iptables.ipv4.nat


(4) /etc/hostapd/hostapd.conf

interface=wlan1
ssid=Pi_AP
hw_mode=g
channel=9
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=Raspberry
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP


(5) /etc/dhcp/dhcpd_test.conf

ddns-update-style none;

default-lease-time 600;
max-lease-time 7200;

authoritative;

subnet 192.168.42.0 netmask 255.255.255.0 {
range 192.168.42.100 192.168.42.120;
option broadcast-address 192.168.42.255;
option routers 192.168.42.1;
default-lease-time 600;
max-lease-time 7200;
option domain-name "local";
option domain-name-servers 8.8.8.8, 8.8.4.4;
}


(6) /etc/iptables.ipv4.nat

# Generated by iptables-save v1.4.14 on Sat Jan 24 16:37:01 2015
*nat
:PREROUTING ACCEPT [217:54744]
:INPUT ACCEPT [4:751]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o wlan0 -j MASQUERADE
COMMIT
# Completed on Sat Jan 24 16:37:01 2015
# Generated by iptables-save v1.4.14 on Sat Jan 24 16:37:01 2015
*filter
:INPUT ACCEPT [256:19656]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [136:13904]
-A FORWARD -i wlan0 -o wlan1 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i wlan1 -o wlan0 -j ACCEPT
COMMIT
# Completed on Sat Jan 24 16:37:01 2015


That is about it for right now.  Updates to follow when I get the Netgear G54/N150 nano adapters to be more stable.

Wednesday, January 21, 2015

Setting Up a Specialized Wireless Hotspot/Bridge Combo for Work

Givens: So, where I work at has a number of separate networks.  There is a corporate network which has a number of security setups which need to be kept pristine.  There is also a guest network which uses a capture port wireless access.  I have a copy of Kali Linux on my work laptop which runs in a VM.  I want to keep this VM separate from the corporate network but still be able to use it in my job, which involves doing some checks against lab equipment.  I also like to bring my RPis into the office to work on during lunch.

Project:  What I want to do is use a Raspberry Pi to be the intermediary with two internal network connections at work with the following characteristics:

  1. EXT - provide connection to the guest wireless through a wifi adapter on the RPi; have it automatically log into the guest wireless capture page and obtain an IP; this should provide a semi-permanent connection for both internal networks.
  2. NET1 - provide a bridge to the Kali Linux VM through a USB to Ethernet adapter connected to the Ethernet port on the RPi and then to a USB port on the work laptop; have it provide the EXT IP directly to the Kali Linux VM.
  3. NET2 - provide a NAT firewall (opt. packet inspection) between the EXT and another wifi adapter which provides a DHCP server/Wireless Access Port with an SSID which is common to the home network.  I might split this up into 3 separate SSIDs.
  4. TUN1 - provide an opt. ssh tunnel through the EXT from NET2 to the home network for vpn connection giving an external WAP connection to my home network.
I already have the makings of this project by having a wifi hotspot configuration.  This configuration uses a D-Link DIR-505L router connected to the guest network.  It however, occurred to me that maybe I should do this with one single RPi and just keep the RPi at work.  I could power this up via a USB cable plugged into my laptop dock (A to micro USB cable).

I think I might dub this one Reverse Router, because I can think of a couple of other things that I might do with it under the area of penetration testing.

Update (2015-01-25): I had problems getting the DHCP server to work correctly and consistently with the TP-Link adapters that I was using, they kept dropping out.  I finally got a sufficiently consistent connection once I switched over to the Netgear adapters. I may end up having to buy additional adapters for other tests.

Update (2015-01-27):  I changed the channel addresses so that the two Netgear wifi adapters would not be tromping on each other; for stability reasons.  I found a website that tells me how to set up multiple SSIDs on the same interface using hostapd (Multiple_SSIDs_with_hostapd). Also finally got the basic wireless access point to work with a wireless connection to my DIR-505L router.  So now I have a wireless coming in to a NAT firewall to a WAP with DHCP going out.  Right now I am copying the microSD to put onto a different microSD so that I can implement multiple SSIDs.  What I want to do there is to have three SSIDs: one accessing the house (house SSID and cert), one for guest access, and one for secure test access (TBD).  Each of these SSIDs will be set up to appear if certain files have been touched.  I have not fully determined if the Netgear G54/N150 can handle multiple SSIDs or not.  I know that hostapd can.

Update (2015-01-28):  Well I discovered that there are some issues with changing the mac address of a wifi adapter on the fly.  I did the first part of the setup from the Multiple SSIDs with hostapd article and borked the connection.  What I will probably find when I look into it is that the wifi mac address was stored somewhere and it's keeping the dhcp server from running on the WAP.

Update (2015-01-29): Nope, the Netgear G54/N150 is not capable of changing the wifi MAC address; at least from my experiments that is the case.  I wish that were not true, maybe I will try the previous wifi adapters (based on the rtl8188cu chipset).

Update (2015-01-30):  After reading a couple of things online, maybe what I have here is a driver problem for the Netgear G54/N150 nano adapters.  What seems to give it away is the problems that I have when I try to use the "iw list" command, which always comes back with an error.  In addition, the setup does not appear stable between reboots; sometimes the dhcp server comes up and sometimes it doesn't.

Friday, January 9, 2015

Weather Station Project #13 - Thinking of a Different Way to Send Snow Related Weather Data

I am sitting in the Detroit airport waiting for my flight and it occurred to me that I might be able to complement my weather station with some additional data. What I would do is get the additional data, such as snow accumulations and do a surface extrapolation to find approximately what it should be near me. Then, I could use some laser scanning techniques to extract a free fall snow drift. I would need to shelter the area where I would determine the size from wind (so that it doesn't drift from other places, giving a false reading). By using a laser scanning technique, I could measure the height of the snow pile and thus the amount of snowfall. Before I send the information out in my normal weather stream, I could use the extrapolated point to determine if my findings are within the "ballpark" of a correct amount. This would give me some confidence in my findings. Again, this could be transmitted via a wifi link to my network to be combined with other weather information.

I should think about how I am going to interject the other three sensors with this type of thing.

Maybe I should think about opening up a blog on the Weather Underground to talk about DIY and Hobbyist Built Weather Stations.