Sunday, February 24, 2013

Gently nudged into wireless with a sledgehammer.

Traditionally. I have avoided wireless like a ton of falling bricks.  Security requirements for wireless changes so fast that it is almost cost prohibitive to use. But so it goes. You say you will never use wireless, but you gently get attracted to using it like a drug. My first experience at using wireless was going to a retail establishment and taking advantage of their network. Then came the time I was staying at my brother's home while the AC was out, so to get internet I had to use wireless. Now with the Nexus 7 wireless has to be part of the home network.

Let me digress here for a minute. How have we connected computers together in the past.  Originally people  used what is know as serial via modems (the old fashiion kind that hooked to the telephone line) or directly between two systems via serial ports. For more details see: Then there was good old Laplink to transfer data between computers. Then we finally had real computer networking in such ways as token ring, arcnet, a host of others and now ethernet.

As I said in the last article, you can hook together two computes with just a crossover cable.  if you want to connect several computers together you would need a network switch. It plays traffic cop to manage the communication between several systems. Home networks are sort of the new model railroad. Instead of watching little cars go around on a track, we are watching movies from a network and the like. Some of the computer nerds might have more than one network.

In some cases we might want to have more that one network for various reasons. One for the media room and one for the computer room as an example. Of course at some time you will want to connect them together. The easy way would be to run some cable between two points. We have a training room that hosts a thin client network. Except for internet access, it is pretty much standalone. But to connect it to the main network requires cabling.

Did not want to run cabling between the two rooms. Had to have a better plan. There was alreading electrical wiring between the two rooms, Could I use that?  Actually, yes you can. There are adapters available known as EOP (Ethernet over power) that will let you do just that. When I need to update the server, that is what I use to connect the main network which has access to the internet.  So far so good.

Now comes the fun part. What if I wanted to use the network where neither cabling or the EOP would work such as a home down the street. Utoh, there comes that nudging... Yep, it is time to use wireless. You could have a whole bunch of wireless devices just all connect back to what is known as a wap (wireless access point). Most modern routers with wifi can do that. But what if you have computing devices that either do not have up to date wifi security or just do not have wifi?

You could use two wifi routers by bridging them, but then that leads to extra management of the wifi. I really wanted something simpler. You can use what is known as a wireless access client that can connect to the first wireless access point. Virtually no extra maintence once you set it up. You will need the mac access address and the ssid of the network access point you want to connect to. Good, no need to connect to anyone elses network. You have to be careful though some wireless access points claim also they can be clients, but that is not always true. Then you can attach a switch to the access point client to use more than one computing device. Of course the speed of that connection will vary with added devices.

That is my small trip into starting using wifi devices.

Note. You do need to use wfi security in setting up all the devices. Do not just connect them together and expect them to be secure. That is another article to get into the details of wifi security.

Friday, February 22, 2013

Let's get wired!

Almost but not quite.  Had to replace the ethernet cable from the bridge (aka modem) to the network router/switch.  An ethernet cable looks like a telephone cable but twice or so as big, Back to the cable.  If you moved the cable the connection would fail. Not acceptable. Fortunately, had the tools and parts to repair the situation.  Many places use wifi, but there are a lot of business establishments that do not allow wifi for security reasons.  Since most tablets require the internet to be fully useful so that turns the units into bricks per se.

What do you do?  You can now get adapters to connect touchpads to a hard wired old fashion network.  Usually consists of a usb connection sometimes known as an On-The-Go or OTG cable and then attaching the ethernet adapter. Of course you still need that cable to connect to the network. Where do you get the cable? If you are at a business establishment, they probably have a spare. Looks better if you already have a cable with you though.  Most better electronics stores now carry them. You have to be careful. I was at Walmart today and they had one for forty dollars. Eeeks. They had some others for between twelve and twenty dollars. A decent length of cable should be under ten dollars.

You have another alternative though and that is to make your own cable. If you take any amount of IT classes, you will be required to make a cable at least once.  With a lot of companies converting from wired to wireless you can almost get old eight conductor cable for free. You will still need to get some of the RJ-45 plastic ends. Telephone wire uses RJ-11 ends. Generally there are different qualities of cable such as cat5, cat5a, and cat6. For a short cable on a traditional network, the qualities are not that critical yet. If your needing to make a lot of cable, it makes sense to buy cable in bulk.

Most networks are in what is known as the star configuration. There is also the bus, the token ring, and modified networks. We will skip those for now.  That means everything connects into one set of points like the spokes of a wheel.  When a cable is made the configuration of the wires is very important. You have two ways to connect the medium dependent interfaces (MDI for short).  You can have the MDI straight though cable or you can use the MDI-X (MDI-crossover). This use to be very critcal what cable you used.

If you used a cable from a computer to a switch, the MDI cable usually worked just fine. Between routers usually used the crossover cable. Eventually those units had switches to allow the use of non-crossover cables. Today most routers now support auto-mdi so that it is not that critical as your the standard configuration. In most cases you will need just to have switches and standard cables  to connect everything together. Now there is an exception. What if you want to hook two computers directly without a switch. You would then just use a crossover cable. Cool.   So how does the cable go together. Most cables have the eight conductor inner wires color coded in a certain fashion.

Ethernet cabling comes in two versions usually comes in two versions, Tia/eia 568a and Tia/eia 568b.  Tiaa/Eia 568b on both ends what is used for traditional MDI cable. If you want and MDI-X cable you would have one end as Tia/Eia 568a and the other end as Tia/Eia 568b.  There are other  configurations, but these are the most common. Sometimes the configuration is known as wo-o-wg-bl-wb-g-wbr-br and wg-g-wo-bl-wbl-o-wbr-br.   So you have four pairs of twisted wires.  See typical cables as shown below.

Let's make a cable. 

1. You will need an RJ-45 crimping tool. Some of then also support the RJ-11 for telephone lines. You can get them cheap, but it is better in the long run to get a better one.

2. You will also need at least two and better if you have more ends in case you make a mistake. Been there done that.

3. Use the double edge cutters to gently cut the outside casing about and inch or so from the end of the cable without damaging the inner wires. This may take a little practice. If you make a mistake just cut off the bad part with the single blade on the tool.

4.  Sometimes if is better not to get the whole sheating cut through to make sure the inner wires are not cut. Then just tear off the sheathing end, Notice the four twisted pair.

5. Now separate all the wires.

6. Then line up the wires. wo-o-wg-bl-wbl-g-wbr-br,

7. Uneven lengths trim them with the single edge blade.

8. With the clip side facing down gently insert the wires making sure they stay in line. Then press in the cable as far as you can. The outside cable should fit inside.

9. Recheck the cable color selection, if not correct, pull the wires out and reposition them. Then reinsert the cable. Also takes a bit of practice. Put the cable in the crimping tool and PRESS DOWN. Remove the cable from the crimper.

10. Repeat the prior steps for the other end.

11. Now you may want to test your cable. There are two kinds of testers, One tests the cable using both ends. Never use this tester with a wire connected to the network or it most likely will be destroyed, Read the manual how to speccifically use the one you have,

There are also testers designed to connect to a live network. But even then some can give false positives that the connection is good. Again read the manual on how to use it. Units made by Fluke have been the standard.

If all is well, use your cable. That is the real test. If for some reason you made an MDI cable and you need and MDI-X cable, you can get an adapter so that you do not have to redo the cable. Usually carry one with me on jobs.

That's it....

Note: you will eventually need a new end. They do not last forever. But you are ready to take care of that now!

Can not forget the female ends:

Followup to the cable making. You will also probably have to make a female end at one time or another. They are easier to prepare than the regular male ends. The female end will be inserted from inside the wall in a face plate
Hacking again.
The connector is color coded with the standard wo-o-wg-bl-wbl-g-wbr-br. Not always in that order. Note the B and the A markings. Since the B type cable is used most often, the color chart is on the top.A so all you have to is is slide the proper color wire in the correct slot and then punch it down.
Example of a punch down tool being used. notice the extra length of wire.  Pretty simple and easy.  You will end up cutting off the extra wire.
Once you have punched down all eight wires, you will cover the unit with the provided caps.
We just use a cheap punch down tool that you can get probably 5-10 for 3 bucks. Good punch down tools go for thirty dollars or more depending on where you get the tool.

Update: Do not know why I forgot to add this, but you will want to use the cable with your handheld. most handhelds required a special cable to interface with a usb to ethernet adapter. For the Nexus 7 you need an OTG (on the go) cable. They are fairly inexpensive. The cable also allows you to add a powered usb adapter to add a keyboard and a host of other accessories.

Thursday, February 21, 2013

Convert a short movie into a gif.

How to quickly and easily take a short film and turn it into a gif.

Make or use an empty directory for the intermediate pictures.

$ mkdir gifit
$ cd !$

Move the movie to that directory

 Create the pictures:

$ ffmpeg -i PICT0220.AVI -r 1 -f image2 %05d.png

The pictures should all be the same size as they came from a movie.

Now let's make an  animated gif

$ convert -delay 100  *.png  hand.gif

Note: check the documentation for the programs to get more possibilities.

Split apart a gif and reassemble at a slower speed.
convert a.gif %02d.png
convert -delay 6 -loop 0 *.png animation.gif

ffmpeg for other platforms:


Another way to make videos.

# Create a directory and copy the original images there for manipulation:
mkdir temp
cp *.JPG temp/.
# Resize the images:
mogrify -resize 200x200  temp/*.JPG
# Create the morph images
convert temp/*.JPG -delay 10 -morph 5 temp/%05d.jpg
# Stitch them together into a video
ffmpeg -r 50 -qscale 2  -i temp/%05d.jpg output.mp4
Another way to make a video.  Convert a short movie into a gif.

Convert a series of pictures into an animated gif.

Convert a series of pictures into an animated gif is real easy. First you want to collect all the pictures together and order them by name in the order you want them to appear.

Then let’s install some software.

$  sudo apt-get install imagemagick

Now we need to make sure all the pictures are the

same size.

$ mogrify -resize 640x480 *.png

The let's make the gif. You maybe also able to do
this on other platforms, but I have not tried it

$ convert -delay 100 *.png preg.gif

View your new gif.  Great for web pages and

education projects.

Imagemagick for other platforms:

Wednesday, February 20, 2013

Positive review from Tllts fan!

If you are into linux, you need to stop by TLLTS stands for "the linux link tech show".They are a meeting place for the linux beginner and the more advanced. Like to say thank you for the unsolicited review of our site, Details follow:

Postby eddie » Sat Sep 03, 2011 5:27 am
My brother put up a website for our family. We stuck enough old stuff in it to get it going.
User avatar
Posts: 974
Joined: Wed Sep 05, 2007 10:46 pm
Location: here

Postby Amosd » Fri Feb 08, 2013 3:57 am
I have visited your shared website and it is pretty interesting and informational for me. I would like to say you thanks for sharing with us.

Nexus 7 - second thoughts.

The Nexus seven is beginning to grow on me despite limitations I could easily get around with a linux box. Yes you can install linux on the touchpad, but it is still not a complete adaption last I heard. Then too, you lose the Android environment. Seems that more and more applications want you to root your system if you want to take advantage of their software. In someways that could be a deal breaker, Thought about getting a cheap tablet to experiment with that and keep the Nexus seven a bit more private.

First project was to see if I could serve out a gpxe linux install from the Nexus 7.  It would be so neat to be able to start a linux install on a traditional pc from a tablet device. Already do this all the time from a regular server (see the last article). For some reason of the web servers I tried for the android they were not up to the challenge,  Disappointing, but not the end of the world.

There are some plus sides to having the server, You can run html and javascript applications. So you can program your own programs without a development package requiring you to learn system specific set of instructions. Javascript and html and be run from most any modern web server,  Copied a javascript based tetris game from the local web server onto the Nexus 7 and it seemed to work fine.  You will want to have a text editor on your Nexus seven for doing such projects.

Downloaded several editors. Played with them just enough see that a sentence could be saved.  You start to learn the file structure of the Nexus 7 when you save a file. You begin to contemplate how you want to organixe the files, Since noted would probably should not go into the same directory as the web related file you have created.

Think last time I related that remote desktop clients did not seem to work. There was an update today and now they seem to work fine.  I was able to get on my old XP machine fairly easily. Amazing how realistic it seems to access your old desktop with a touchpad. You forget you are not really sitting in front of the machine, Rdp represents an ultimate way to get away from sneaker support. Wish I had the touchpad as a tech not so many years ago.

Using the ssh application more and more.Though I did wish you dould use it in the lanscape view instead of the portrait only mode. Need to look at the setting a little closer at the settings. Amazing how things have changed since the early days of the eight bit computer. Something which we should not take lightly.

Update: One of the main reasons I wanted the remote desktop application  was to access some linux boxes via a gui. So running ubuntu on my Nexus 7 was not needed. With the update that allowed access to the MSWindows boxes also allowed me to  access Linux boxes with xrdp installed. Instead of also using vnc, means less applications to deal with. You can access them all with just one application.Though the unity interface is not my favorite interface, I could see some possibility of use here with any touchpad.

Works with the Raspberry Pi also.

Tuesday, February 19, 2013

Linux (Debian) Mint network install starter.

Linux Mint is kind of taking of the reigns of being one of the most popular linux distros. Like installing any operating system the traditional way, you can run into roadblocks.  For example, you may not be able to burn a linux cd, the machine you want to load linux on has a broken cd/dvd rom, or a host of other reasons. What we are about to do is what is known as pxeboot networking. Another words we will use a web server to get us started with a linux install on a system. Traditionally you actually had to have several servers to do the network install. You had to modify a Dhcp (Ipaddress servers) server,  a Tftp (boot files) server, and among other systems which generally required a lot of setup and the blessing of the system administrator,

I tried this with the python web server, but you have to have all the files in one directory from what I could see.  I just did not want to take the time to do it.

python -m SimpleHTTPServer

I went ahead and used the Apache2 web server. You can get portable versions of the Apache2 web server so that there is not much to install. But before I get ahead of myself, we need a way to boot a computer to access the network. Etherboot led the way in this direction and had now graduated to Ipxe. (more information at  So we need to make a boot disk for the computer we want to install linux on. You have several choices. For our purposes a floppy will be used. You can also use a cd/dvd rom disk and or a very small usb stick. We need to go to to create the boot media for our system. 

We chose the floppy disk. Now even though we can use the floppy disk to access the network, we need to add a short script to let the floppy know about the web server we want to use. In our case, the script was for oesrvr1 using the bim directory. The script is pretty standard so all we had to do was to change one line of the script. (Note in some cases, you need to use the ipaddress).

  echo Performing DHCP on first network interface
  dhcp net0
  set 209:string pxelinux.cfg/default
  set 210:string http://oesrvr1/bim/
  chain ${210:string}pxelinux.0

You will press the customization button to get the text box where to enter the script. If the script is ok, the you want to save it to your existing system.  It is usually saved as a very long name so I use the gui to rename it to test.dsk.

Now we need to get the image written to the floppy and that is pretty easy, 

$ sudo dd if=test.dsk of=/dev/fd0

The client machine is ready to go, so now let us look at the server. You probably want to make a special directory such as bim in your document root. /var/www/ . 

$ sudo mkdir bim
$ cd bim

Now that we have a place to store the files, we need to download them. Remember we will not have to burn a dvd. Here is where the files are, so all you have to do is download them directly to your web server,

$ sudo wget i386/current/images/netboot/netboot.tar.gz

The we need to expand the archive.

$ tar zxvf netboot.tar.gz

Then you need to get the cdrom image file.

$ sudo wget

That is all you need! Make sure your apache2 web server is running though. 

$ sudo service apache2 status

Apache is running (pid 12345)

Now it is time to boot up your client machine with the floppy media!

In just a few seconds you should get the install menu. Now the rest of the install should come from the internet. That is another article. We have our server set up to support several linux distros. i.e. Debian, Mint,  Ubuntu, and others. Using a standard boot media, there is no need to burn new cd's every time a new version of linux comes out.  Have fun!

Even if your computer does not have a floppy drive, you can get a usb floppy drive fairly cheap. Since the data on the floppy is so small, it should not take long to load even with a usb floppy drive.. For mass installs we recommend the cobbler, drbd/clonezilla, or as a last resort the Fog software. I will talk about them later.  Last but not least you can also use this method to install MSWindows systems..

Note: Newer network network cards that support ipxe will let you use the script mentioned in the article, but you have to go into the bios or the equivalent to enter it. 

Friday, February 15, 2013

Quick video security setup via the RPi.

Watching what is going on in your own home or even at your business is becoming more and more of a requirement for peace of mind. Schools even use them to prevent and or document cheating.  Had to set up the web cams in the testing center where I use to work just to do that. You probably do not want to spend a lot of money at first. If you have a Raspberry Pi ($35 us), Memory card ($10 us) to install Debian linux,  and a cheap web cam (under $15 us), you can set up your own system very quickly.  For more information see: and

It is wonderful that the Raspberry Pi (aka RPi) is supported by Debian linux. There already so much software for Debian that the Raspberry Pi can take advantage of. One such piece of software is Motion. Motion is a security cam server software than does not require a gui, That is you can run Motion without a gui installed or activated on the Raspberry Pi.

Let's get your system up to date (might take a while if you have not updated very recently).

$ sudo apt-get update ; sudo apt-get upgrade
$ sudo apt-get dist-upgrade

Now let's install Motion

$ sudo apt-get install motion.

Does the RPi see your camera?  (aka list usb devices attached.)

$ lsusb

Bus 001 Device 004: ID 046d:08a9 Logitech, Inc. Notebook Deluxe

if not, you may need to get a more mainstream camera. usually Logitech sets the standard. I just used a cheap refurbished knockoff. Your output will vary..

Do a little configuration:

$ sudo nano /etc/motion/motion.conf
In here there are a few basic changes that you need to perform:
  • Daemon = OFF to ON
  • webcam_localhost = ON to OFF
You can change other settings but it’s recommend you don’t take more than 2 frames, and you been the default frame pixel size, for stability.

To ensure that the motion service will actually start as a daemon we need to change another configuration setting, so enter the following:

sudo nano /etc/default/motion

Then change the value “start_motion_daemon=no” to “yes”

Let's get started:

Finally you can start the motion service to stream the web cam images

sudo service motion start

Then after about 30 seconds browse to the new web interface, which should be at the below URL (where is your Raspberry PI’s IP address yours may vary)

Hint: if you do not have direct access to your RPi, you can use to find it on the network Frequently I will hook up the RPi to the network without a keyboard, mouse, or monitor and then remote into the unit,


Note: Most any linux box will allow you to set this up. I have it running on an Ubuntu x86 based server. So an old pc might work just fine without getting the Raspberry Pi.


If you want to use an ipcamera it is easy but you have to know about the camera. I ended up going to the zoneminder wiki and found the answer for my camera. Setup is the same, but you have to add two lines to motion.conf.

 netcam_userpass user:password

For us  it was:

 netcam_userpass user:password

Wednesday, February 13, 2013

Touchpad sound hack.

Want to increase the sound volume of your touch pad or the like? This is for units that have the speaker on the bottom of the unit.  Try this neat trick. Take a length of about seven inches of one inch diameter pvc pipe. Your size may vary,   Most hardware stores carry pvc pipe, but you might have to get a long piece just to make a short piece. I had about a two foot long piece already,  Cut a groove in the pipe just wide enough to insert your pad. You probably do not want it too tight. You will also need two elbows. I just used right hand elbows as they were a lot cheaper than the slight angled ones. Press the two elbows on each end. Get your music going on your touch pad and insert it. You should have more than twice the volume without using any kind of electronics with your new megaphone!!