Friday, August 7, 2015

Getting Started With Mesh Networking

Hello Ham friend de KD6VZQ

If you don't understand what a Mesh Network is, I provided a 3 minute blog ( HERE ) for your reading pleasure. After you have caught up to speed, you can move forward with Mesh Networking for Ham Radio Operators.

During this blog I'll be providing some important information that might make your head spin. If your head starts to spin, just know that some of this information is just FYI and need to know. If your head still spinning after that, I would guess to say that you are trying too hard. Read the information in chunks and take a break. In the end you'll see just how easy to reprogram a router, and make it a mesh router. From there its just a matter of deciding what it is you want to do with your Mesh network.

You're in luck! As a Ham Radio Operator you have a license to operate within the commercial wifi bands. This is possible because our FCC License overlaps the same set of frequencies that commercial wifi routing systems use. See chart below for Part 97. Part 97 falls under Amateur Radio Rules & Regulations. Our Ham license allows us higher power and higher gain antennas.


You'll notice that we have 13 cm and 5 cm frequencies ranges. From personal experience I can tell you that 13 cm or 2.4 GHz frequency range is a good place to start because equipment is cheap. Allowing you to practice and to understand at a lower cost. However 2.4 GHz has more devices all over your metropolitan area. And, as a result, you will hear more noise on this band.

Now that you understand which frequencies you are allow to use. The next logical question is what hardware can I use? Below is a sample list of routing hardware the you can get on the shelf. Whether it be your local electronics store, good will, or a friend saying that they don't use it anymore.

Manufacturer
 Model
Revision



Linksys
WAP54G
v1.0
Linksys
WAP54G
v1.1
Linksys
WAP54G
v2.0
Linksys
WAP54G
v3.0
Linksys
WAP54G
v3.1
Linksys
WRE54G
1
Linksys
WRH54G
?
Linksys
WRT150N
1.0/1.1
Linksys
WRT160N
1.0/1.1
Linksys
WRT160N
3
Linksys
WRT160NL
1
Linksys
WRT300N
v1.0
Linksys
WRT300N
v1.1
Linksys
WRT310N
v1.0
Linksys
WRT310N
v2.0
Linksys
WRT320N
v1.0
Linksys
WRT350N
v1.0
Linksys
WRT400N
1
Linksys
WRT54G
v1.0
Linksys
WRT54G
v1.1
Linksys
WRT54G
v2.0
Linksys
WRT54G
v2.2
Linksys
WRT54G
v3.0
Linksys
WRT54G
v3.1
Linksys
WRT54G
v4.0























Although the hardware above are some of the more common routers, there are plenty enough to choose from. You can get a more complete list at DD-WRT Router Database

Most Ham Radio Operators will be using firmware (see Firmware explanation below) from Broadband Hamnet. Broadband Hamnet Supported Routers

If you don't know your router number and version number. The graphic below uses a Linksys router as an example. Other routers will have a similar identification system.



If your are looking around for a router to use, I would like to take this opportunity to suggest getting a router that allows for you to detach the antennas from the router. This will allow for you to add a better and upgraded antenna system. Adding a better antenna system increases strength of signal and usable distance.

Now for the next piece of this puzzle.. Firmware. . .

For those of you who do not understand what Firmware is. It is basically software that is being run from within hardware. In tune with this Mesh Network subject. It is the software within the the router that allows for it to works as a router. And the routers firmware is independent of your computer interface. It does not need your computer to load and run to make the router work.

Linksys routers were not originally able to be used as mesh networks routing systems until after Linksys started using a Linux based software (firmware) to run their routers. After Linksys started doing this. other companies soon followed. Linksys did this mainly to allow themselves flexibility to update the firmware on the router. This also allowed for hobbyists to create their own version of firmware and load it to the router. Changing how the router works. Making it into a mesh router. In general Wireless Mesh Networks were a Military application that eventually bled over to civilian applications. MIT is a good example of this with their One Laptop Per Child (OLPC) project.

After finding your the hardware you would like. you need to make sure that it works. by simply plugging it in and logging into the router. If you are unfamiliar on how to do this. Simple go to the manufactures website and download a pdf version of the owners manual. If you have a used router, and don't know the password to login. You may need to do a factory reset to set the factory defaults on the router. This erases all info on the router.

After seeing if the router works. You'll need to find the proper firmware to download from BroadBand Hamnet or from DD-WRT depending on your router and application for use. Almost all Ham Radio Operators will use the Broadband Hamnet firmware.

Now you have a copy for the firmware you would like to use. you'll need to upload it to the router. I'll use Linksys again for this example.

NOTE: Before doing the following steps be absolutely sure you have the correct firmware.


As you might notice in this example; you would first go to Administration tab, then to Firmware Upgrade at the top. Taking you to this menu. Once you have your file to create a mesh network, you would browse for it on your computer and then click upgrade. 

After router is upgraded it will reboot and you're all set on getting started to setup your Mesh Network. I'm not going to create an instruction for this. but I am leaving a couple of links from YouTube so that you can see that instruction on how to configure your system.



Thanks much for reading all this wonderful information. Please feel free to share it with friends.

KD6VZQ


Wednesday, August 5, 2015

What is a Mesh Network?

Whats all this talk about a Mesh Network?

Imagine you have two internet lines coming into your business. Each internet line would come into your business and be hooked straight to a routing system. From the routing system the internet connection is propagated to various devices in the business.


Internet lines do on occasion fail. If one of the lines were to fail, then half of your business complex would not have an internet connection. Workers in half your complex would be non productive towards business matters.

This is how to keep your workers productive watching their entertaining youtube videos while at work. How? Imagine if you could have a set of routing systems communicating with each other. The routing systems would provide redundancy to each other. Therefore allowing for internet connection to remain active across your entire business.


However in the event that both your internet connections were to go down at the same time. Then redundancy would have failed. Bringing up productivity to more work related matters. Your internal network would still be able to allow communication between machines. There just would not me any internet for research and entertainment.

So there you have it. That is a Mesh network. Just don't tell your boss about it, or you'll have to do work.

Friday, July 31, 2015

Installing Ubuntu on Raspberry Pi 2

During this blog I'll be attempting to explain very basically what is a Raspberry Pi 2 and how to install Ubuntu on the Raspberry Pi (RPI).

What is Raspberry Pi?

The most basic understanding I can give is that a RPI is a small low powered computer that can fit in the palm of our hand. It can do many of the same things a PC or Laptop can do. Just a little slow rate of speed. You'll need to be patient with it.

The purpose of RPI was to encourage and educate people with computer science.

I don't expect for everyone reading this to be a specifications person. Understanding or seeing the specifications of RPI harware, can give you an idea of performance. So here is the break down of specs I can find on the RPI 2.

Broadcom2836 chip is a System on Chip. It mean that it has all necessary electronics on a signal microchip for running a computer. It also has an ARM processor. It is one of a family of CPUs based on the RISC (reduced instruction set computer) architecture developed by Advanced RISC Machines (ARM). Basically a chip that requires less instructions to do similar to same things a regular computer does. putting that knowledge aside how about power and speed?

Power Supply 5V 2.5A

Bare-board draw 330mA <- this is with nothing drawing energy from the RPI board. Things like a video screen connected via the GPIO connectors will use more energy through the RPI.

Max USB Draw 1.2A <- The maximum amount of energy you are allowed to use from the USB ports on the PI. It will very on usage of ports.

The ARM Processor runs at 900MHz and can run as fast as 1 GHz. Just imagine your personal computer running at 1GHz and you will understand this.

its good to know things like this. It might help knowing this information with other projects you might want to use the RPI with.

Now on to putting Ubuntu 14.04 LTS on the Raspberry PI.

RPI come with a SD memory chip. The SD chip has an image of an Operating System call NOOBS. Its made for Noobs who are new to RPI. Put this SD memory chip aside. We're not going to use this one.

I would suggest purchasing another memory SD card. in case of the RPI 2 it would be a Micro SD. Get one that is at least 32GB to give yourself plenty of head room for the Operating System.

With that new Micro SD we're going to place an image of Ubuntu on it.

An  image copy is like a picture, or mirror image. It is an exact bit by bit copy. The result of an image copy is quite different from what you get when you do a file by file data backup or file by file drive copy. Unlike a simple data backup or copy, an image backup also copies any partitions and system information. In essence it is a clone of an original copy.

You can get a copy of the image file here:
https://wiki.ubuntu.com/ARM/RaspberryPi

You are welcome to follow the directions at the website. But for most people, I think you might find it more helpful following this blog.

Uncompress the .zip file and you will find a .bmap and .img file.

I'm going to assume your are running a Windows machine and now that you have downloaded a copy of the Ubuntu Trusty image file. you are still going to need to copy that img file to your Micro SD card.

You can get a helpful and free program here. http://sourceforge.net/projects/win32diskimager/
Install W32 Diskimager and copy the .img file to the Micro SD card.

Yay! you just complete that part that is not usually explained too well. I hoped that it helped. We're only about half done. Now that the image is on the Micro SD card. Plug the Mico SD into the RPI.

After inserting the Micro SD card and booting the RPI. You should see a text prompt asking for a password. The default username and password is ubuntu typed in all lower case.

Now we start building the Ubuntu system on the Micro SD card. You will need to resize the partition on the SD card. you can do so by typing in the following command.

sudo fdisk /dev/mmcblk0

type p to see current partition table.

type d then number 2 to deleted the second partition.

type n for new partition. type p for primary partition. type 2 for partition 2.

hit the enter key to select default for first sector, and enter for default for last sector.

type w to create the partition. type sudo reboot to reboot the RPI.

After reboot and login type sudo resize2fs /dev/mmcblk0p2

type df -h to verify available space on the SD card. Number may not be exact but should be close to 28G available.

Next we need to update the package manager by typing sudo apt-get update

Now we need additional software to setup a swap file. sudo apt-get install dphys-swapfile
 then enter to continue.

restart again sudo reboot

Now we got to install the GUI interface packages
sudo apt-get install xubuntu-desktop openssh-server xserver-xorg-video-fbturbo libraspberrypi-bin libraspberrypi-dev libraspberrypi-bin-nonfree

the above command is on one single command line. it may or may not wrap on your screen.

this will download and install a lot of packages. This took my RPI about an hour to complete. go watch a movie, get yourself something to eat or drink. Be sure to look at the screen once in a while to hit enter key for default response.

That was a long wait.. now type sudo apt-get install mg to install a text editor.

type sudo mg /etc/X11/xorg.conf  <- besure the X in X11 is caps.. :)

this launches a generic text edit screen. there will be a invisible cursor at top.
you will need too add the following text to file. simply start typing.

Section "Device"
 Identifier "Raspberry Pi FBDEV"
 Driver "fbturbo"
 Option "fbdev" "/dev/fb0"
 Option "SwapbuffersWait" "true"
EndSection

hit Control-X on keyboard the s to save the file. C to close the file.

type sudo reboot to reboot machine.

** IMPORTANT** If you do not see yellow screen here. go back and check the file you just edited. sudo mg /etc/X11/xorg.conf

you should see the gui interface and password is still the default password. ( ubuntu )

Congratulations! You have just installed a working copy of Ubuntu 14.04 LTS on a Raspberry PI 2.

Your system may want to complete some more updates. I would say run the system over night. After that you can continue on to other projects you were planning with your Linux Pi machine.

Most of you who visit the blog will know I'm a ham radio operator. I'm using my pi to run a program for Ham Radio contacts.



I'm still working on this project. This Raspberry Pi was a big part of it. It will allow for me to run digital communications, and keep a log, while out in the field. Not only was this a little bit of a challenge for me. It will also be much lighter and more efficient than using a laptop out in the field.

As I reach certain phases in my field project, I'll blog about them at KD6VZQ.com

Tuesday, July 28, 2015

My Ham Noob-ness

Hello Noobs!

 I was a noob once myself. Excited to get my ham license and have a radio to play with. I actually got my first radio before I got my license. I used the new radio as a bit of encouragement to pass my Technician test.

 This was back in the early 1990's shortly after they dropped the CW requirement to pass the test. I don't do well with things like CW, they take me more time to learn than most people. But there are a lot of other things I catch on pretty quick.

  We didn't have cheap radios like Wouxon or Boafang back in the day. Handy Talkies were a bit more pricey back then too. My first radio was a Yaesu FT-530. It was pretty tricked out and had a lot of functions. It gave me the opportunity to do hands on learning on the very things I just passed my Technicians test on. I was limited to 2M and 70cm with the radio, but that was plenty.

  I got started with 2M. I didn't know much about how to setup repeater setting in the radio. I managed to reach a local ham on an output of a repeater. He suggested a few things I look for on my radio. Allowing for me to use the repeater system properly. I finally got to learn hands on that a repeater receives on one frequency (input) and transmits on another (output). Determining where repeaters are within the 2M frequency range. It can be a plus (+) or minus (-) offset. 2M has a 6KHz offset. So you would transmit either up or down 6KHz from the output of the repeater.

  There are a lot of repeaters around my area. Sometimes they are on the same frequencies. Which can cause conflict between the repeaters and the people using them. Conflicts are control by using a sub-carrier in the radio signal to bring up the repeater. This is called PL-Tone. A repeater will not respond to you or another source of transmission without the proper PL Tone settings in your radio.

  With that knowledge. Most radios you start by selecting the output of the repeater, then setting an offset, then setting a PL-Tone. Only thing left it to try and see if your radio gets a response from a repeater. You can move forward with other stuff from there. Get yourself radio active on the repeater systems. Talk with local hams. You'd be surprise just how much help you get and how much you can learn by talking with other Hams. Some of them have even just got their license.

  As you saw, I had mentioned Wouxon and Boafeng above. I feel that this has started a trend of un-informed hams when it comes to repeater use. Here is why. These radios are CHEAP and a lot new hams are buying them. They are also difficult to program by hand, and are much easier to program with a computer. The hands on approach is being bypassed via lacking programmable ability of both. I see many new buying the Wouxons and Boafengs, having their techie friends program the radios for their local area. From year 2010 - 2015 most of the million new hams have done this. Not really learning much about Ham frequencies or repeaters. They are simply just un-informed and need more hands on.

Year Ending
Month
Extra Advanced General Tech Novice Total
2015 Jun 138,199 49,399 171,605 359,032 11,448 729,683
2014 Dec 136,405 51,069 169,524 357,236 12,041 726,275
2013 Dec 133,391 54,293 167,257 349,163 13,097 717,201
2012 Dec 130,736 56,314 163,370 345,369 13,786 709,575
2011 Dec 126,431 57,875 160,554 342,583 14,613 702,056
2010 Dec 122,951 59,387 155,781 342,191 15,731 696,041


  I might be batting flies here. I would like to suggest that my experienced ham friends help the noobs by not programming Wouxon type radios. Instead suggest to get a radio, though a bit more pricey, that allows for easy hands on programming of local repeater systems. Programming a radio without a computer interface.

  If they are not wanting to pay full price for a nicer radio. Suggest looking at Ham Radio Classifieds on the net. Hams in general take good care of their equipment. Also may people who think they are going to be active with have radio often buy the more pricey ones. Then they decide ham radio is not for them and sell their radios in the classifieds. I have found many great radios on craigslist.com and qrz.com classifieds for much cheaper than bought new. Almost all of them in like-new condition.