Monday, September 30, 2013

Here is what "closing down the government" will bring

Here is what "closing down the government" will bring:

http://www.bbc.co.uk/news/world-us-canada-24330034

    • State department will be able to operate for limited time
        ° Ho hum

    • Department of defense would continue military operations
        ° Yah, duh

    • Department of education would still distribute $22bn (£13.6bn) to public schools, but staffing would be severely hit
        ° $22 BILLION!! Holy cow! Good grief! this is but part of the problem...

    • Department of energy - 12,700 staff would be sent home, 1,113 remain to oversee nuclear arsenal
        ° For which there is absolutely no use. Oh darn.

    • Department of health and human services to send home more than half of staff
        ° And what have they done for you recently except concoct Obamacare?

    • The Federal Reserve, dept of homeland security, and justice dept would see little or no disruption
       ° Duh. Follow the money, the jackboots, and the lawyers. They won't touch that one.

    • US Postal Services would continue as normal
       ° FWIW, delivering nothing but junk mail. Hello USPS, wake up. Mail is dead. Anyone with a brain does it electronically. Sorry Ben, 1737 was a good year, but it is now 2013.

    • Smithsonian institutions, museums, zoos and many national parks would be closed
      ° Oh darn. Hello, it is September and everyone is now back in school or at work, or looking full time for work. Everyone in the upper 51%, that is.

====================================

So how does this really affect your life?

Not at all.

====================================

I am truly sorry for the people being unpaid. Sort of like me, without a formal job for a year, despite trying desperately.

But it is a matter of choices. That's what savings are for, and if you choose to work for an unreliable employer then you are responsible for the outcome... A choice: risk, reward... Mea culpa, mea culpa, mea maxima culpa.

What part of this do we not understand, details of which I have already published numerous times:

• We have a huge debt, but are continuing to spend at some half again the current income.

• We have increased that debt by half again since Obama took office.

• We have almost half of the population NOT WORKING.

• We are taxing people almost half their income and giving it to the people that are NOT working or to totally unnecessary "services", see above.

• We have half the world hating us for wading in with jackboots, drones, and bombs (Africa, Middle East, Far East, etc...)

• We have two thirds of the country hating the incumbent Government (check the numbers on Republican vs. Democrat governors, demography of the House of Representatives, etc. etc. etc. Google is your friend...)

• We have the NSA spying on each one of us, and the DHS giving jackboots and combat SUVs to local police departments


So why can't we wake up and acknowledge that there is a HUGE problem?

Tell me what part of this is not true.

You can't.


But today I lost a respected correspondent over my "rant".

For not being nice.


No, it's not pretty and no, I'm not being nice.

The time for being nice is over.


Thanks to another for these quotes:

"Whenever evil wins, it is only by default: by the moral failure of those who evade the fact that there can be no compromise on basic principles". Ayn Rand. .

“Every normal man must be tempted, at times, to spit on his hands, hoist the flag, and begin slitting throats”. H. L. Mencken


This is one of those times. If you do not acknowledge a problem then you are part of it.

In which case I'll see you on the train to Dachau.

Sunday, September 29, 2013

Connect Android Nexus 4 Android 4.3 to openSUSE 12.3

So totally pleased about today's accomplishment of connecting the Android to Linux openSUSE 12.3. 

Easy when you know how.

The BLUF is gmtp and adb but there are several other steps.

The first problem was that the Android (LGE Nexus 4) was not being recognized as a Media Transfer Protocol (MTP) device.

You have to activate Developer Settings in the 'droid to fix this. 

Here is how:

  1. Go to the settings menu, and scroll down to "About phone." Tap it.
  2. Scroll down to the bottom again, where you see "Build number."
  3. Tap it seven (7) times. After the third tap, you'll see a playful dialog that says you're four taps away from being a developer. (If only it were that simple, eh?) Keep on tapping, and *poof*, you've got the developer settings back.


Intuitive, eh?

Anyhow, the next step is to change the mode. 

Go to the now visible {}Developer Options and make sure that
DEBUUGING
USB debugging
is checked. Now 
• Go up to the main Settings page
• Click Storage
• Click the three dot settings icon in the upper right hand corner
• Click on USB computer connection and choose Media device (MTP) instead of Camera (PTP).

Now, on the computer, install both gmtp and adb. Both are available under the respositories under openSUSE, but if you can't find them then google.

gmtp succeeds in waking up the system to the presence of an MTP device. Just plug in the 'droid. A window will pop up. Select "Open in File Manager" and you'll have an instance of konqueror open to

     mtp: Nexux 4

You can then manually drag and drop files back and forth if you open a second window in konqueror.

You need Android Debugging Bridge (adb) if you want to use BASH scripts to transfer files. adb is included in the openSUSE package android-tools.

This may help:


It just works. 

For example, issue the following terminal or script command after plugging in the 'droid to transfer a file to  the 'droid:


      adb push /data/finance/transactions/transactions.xls /sdcard/data/finance/

Or use the following to copy a batch of files from the 'droid:

      adb pull /sdcard/DCIM/Camera /data/action/latest/


The source in this case is not intuitive: initially I used .../Camera/* and it choked. But dropping the wildcard resulted in copying all files in .../Camera to the computer.

So YMMV, you may have to farkle with this.
Note that the first argument in the push statement or the second one in the pull statement is the fullpath_and_filename on the computer. The other argument substitutes

      /sdcard

for the 'droid value seen in konqueror above of

      mtp:/Nexus 4/internal storage

So whatever 'droid path you wish to target that you see in konqueror is translated. 

For example:

      mtp:/Nexus 4/internal storage/data

in konqueror needs to be translated to

      /sdcard/data

in a script.

The following script automates synchronizing selected files back and forth after doing all the foregoing:

#! /bin/bash
# Check for Android plugged in
  echo "Connect the Android."
  echo "Continue? (y|n):"
  read user
# If Android connected
  if [ "$user" == "y" ]; then
# Transfer to Android
  echo "Transferring transactions.xls to Nexus."
  adb push /data/finance/transactions/transactions.xls /sdcard/data/finance/
  echo "Transferring itinerary.xls to Nexus."
  adb push /data/info/itinerary/itinerary.xls /sdcard/data/info/
  echo "Copying latest photos to /data/action/latest"
# Transfer from Android
  adb pull /sdcard/DCIM/Camera /data/action/latest/
# Finish
  fi

Sweet. 

Easy when you know how.

Monday, September 23, 2013

hostapd setup

Summary

We have successfully created an Access Point (AP) after ten days of working at it. 

Easy when you know how, but not easy if you don't. 

The various all you have to do is sites over-simplify things enormously. They ass-u-me knowledge that just may not be there, even for a geek:

Keynotes:

• You need a grounding in firewalls, networks, domain name servers, dynamic host configuration protocol daemons (dhcpd), the Host Access Point Daemon (hostapd), and their configuration files. These are not trivial.

• In particular, you need to understand:

      + Internal, external, demilitarized firewall zones

      + the interaction (under operSUSE) between NetworkManager, yast2 network, and yast2 firewall.

• You need to have two separate interface devices: one, an "external" zone device to access the internet, another, an "internal" zone device, to provide the AP.

• You need to read the instructions in the various configuration (.conf) files carefully. For example, in dhcpd.conf there is a benign little entry:

      # Don't forget to set the DHCPD_INTERFACE in the

      # /etc/sysconfig/dhcpd file.


Guess what, it won't work if you don't do this.

• You need to use the correct copy of the particular .conf file. Sometimes there are multiple versions floating around on your system. If it is a script, enter something like:

      echo "This is the one!"


to make sure that you are running the correct version.

• You need to understand the various WiFi protocols. In particular, use only WPA-PSK, identified by setting

     auth_algs=1


(not =2) in hostapd.conf.

• You need to understand that all NICs are not equal. You must select one that is AP-capable:

     iw list

gives the capabilities of the card. The list must include AP.

• Additionally, some NICs have Linux drivers, some (notably the NetGear 300 series) do not. If they do not then you have to use ndiswrapper, which introduces yet another set of unknowns and learning curves. 

I have been delighted with the ΣDIMAX, which has a NIC in the base of a USB antenna.

• it is very much a step-by-step process. Get one step working before continuing to the next. For example, setting up simple test AP before getting fancy with firewalls and DHCP:


• Watch ip address carefully. Most NICs are saved by their MAC addresses as wlan0, wlan1, ..., wlann

But then for some reason, wlan4 started being recognized as wlan1. We haven't figured that one out yet, but the bottom line is that then yo have to go back to hostapd.conf and /etc/sysconfig/dhcpd and change the NIC name.

• As a result, watch the interaction of the network setup tool and the firewall tool. They are linked under openSUSE. Once wlan4 changed to wlan1 the change was recognized by yast2 network but not by yast2 firewall. So we had to go into yast2 network, deactivate NetworkManager, delete wlan4, recognize and configure wlan1, reactivate NetworkManager, then go back into yast2 firewall to finish the firewall configuration,

• Watch dmesg for firewall drops. With 10.1.0.0/24 declared external and 192.168.7.0/24 declared internal we ass-u-me-d that 192.168.7.31 would be accepted as internal. But it wasn't, resulting in dmesg showing a series of drops of 192.168.7.31 as a Martian source. When we explicitly declared 192.168.7.31/24 as an internal source under Custom Rules the drops ceased and the AP worked.

Bridging and masquerading are other topics that need to be understood. Ours works best with Bridging off and Masquerading on.

=====

There are zillions of sites that address one or more of these, but none I've found that address them all.

So here goes:

1. Use your distribution software manager (yast2 under openSUSE) to download and install:

      hostapd

      dhcpd

2. Configure them both.

     a. the creator of hostapd is at


      I used:


     primarily to configure hostapd.conf. Their activation script (see below) seems to be more professional than some others.


      was also helpful.

     b. dhcpd.conf setup was aided by


3. Write a script to automate the process.

Easy when you know how.

Sunday, May 12, 2013

Preparing to clean the septic system

Today was a day of rest, but tomorrow...

We need to clean the electrodes in accordance with the manufacturer's instructions:

     Using a plastic bucket combine one pint (.5 liter) of muriatic acid with two gallons
     (7.6 liters) of fresh water....

Something in the back of my head said, "it's not that simple." Thanks to McCallie for my chemistry lessons.

So quite a while later after googling about, I hope this makes it better for others: 

     http://everything2.com/title/Do+like+you+oughta%252C+add+acid+to+water

We were told:
Here lies Gillian, still and placid;
Who added water to the acid.
Clever Jane did as she oughter;
Added acid to the water.
And the reason for doing this is not simply to do with splashing, per se: If you add water to acid, the first drops of water will react completely and exothermically with the acid, very likely boiling it. If, on the other hand you add the acid to the water, the acid reacts completely with the water, and dissipates. 

Results to be reported tomorrow...

Saturday, May 11, 2013

Boat Audio Nirvana: FM Transmitter

The boat's audio system is the Denon Stereo Cassette Receiver DCR-530RD.

It comprises an FM/AM radio, tape cassette drive, and offboard CD changer.

As a 1997 device it is from the dark ages. All my music now resides on the laptop or Internet feeds, such as Spotify.

So I needed a way to get audio from the laptop to the stereo system.

Easy solution:

For £20 a little Belkin TuneCast II FM Transmitter plugs in to the headset jack of the laptop and streams whatever audio to the FM stereo receiver.

About as good as it gets.

Some tweaking:

• The device) runs on AAA batteries, so we need to keep a supply. It comes with a cigarette lighter plug and can run on a 12V supply, but we don't have one of those handy near the laptop.

UPDATE
• Initially the signal was poor. There is a lot of discussion of this on various  forums. Basically, you need an antenna. The power cord serves as one option, but is a non-starter here, since we don't have a 12V power socket near the laptop. An audio extension cord for the audio cable works somewhat, but that is a lot of wire wandering about. So what to do?

• Well, rummaging around in the electrics bin I found a two-foot stretch of bare braiding. Stuffed the end into the 12VDC power receptable, and presto, a nice clean signal. But that is sort of a hack.

So went googling. There are several good YouTube presentations:

     ° Tracker
     ° Crash

But both refer to an older version with a "black box" that controls the signal strength. My unit is Model #F8V3080eaBLKP. The videos show how to open the unit correctly, but when it came to finding the black box it is now completely gone!

There are just some residual pinholes where it used to be.

But all is not lost: In its place there is a pad of some six test points in a rectangular grid:



I energized the unit as shown in the first video and started touching things with a stretch of 20 gauge wire. On touching the second pad in the first row the signal jumped up. I checked out the rest, but this seems to be the best.

So with some very delicate soldering, tacked a stretch of 20 gauge to that pad:
Then put the unit back together, and all is well.
• Next, adjust power, frequency levels. This may be witchcraft, but the engineer in me feels better to be operating in the middle of the operating ranges for volume and frequency.

So I set the frequency at 92.5 MHz, the PulseAudio Volume Control (PAVC) for Spotify at 90%, and the Denon volume level at 20.

Sounds great. YMMV.

• Next: Antenna length.

This takes me back to my amateur radio days. Under well established principles:



we have the wavelength of an electromagnetic ("radio") wave in meters as


where λ is the wavelength in meters, f is the frequency in Hertz, and ν is the speed in meters per second, typically taken as the speed of light:


      299,792,458 metres per second

which is very, very close to 300 million meters per second.


The convenient fact here is that if the frequency is in Megahertz (millions of cycles per second) and the speed of light is in millions of meters per second we can get rid of the millions and seconds, so it becomes simply

      wavelength (in meters) = 300 / Frequency in MHz


which for a nominal frequency of 90 MHz (90*10^6 Hz) gives a wavelength of about 3.33 meters.



This is consistent with the standard band data:

      HF 14 MHz      20m

      HF 28 MHz      10m

      VHF 150MHz     2m



So anyhow, setting out a metre or so of ordinary 20 gauge wire gives us a half dipole antenna.



That works much better than the braid. :-)

------

There is some farkling about required:

• Experiment with different frequencies. I started out mid range at 92.5 MHz, but for the length that I had cut the reception was noisy. Moving down to 80.1 MHz solved that.

• Experiment with various volume levels. A level of 20 worked for me.

• Experiment with antenna placement. Laying it out flat on the table worked for me.

==========================

So here is what you do:

1. Buy the transmitter somewhere.

2. Open up the case and solder one meter of wire to the second pad in the first row.

3. Close up the case.

4. Turn on the unit, to say 88.1 MHz.

5. Turn on and tune the FM receiver to the frequency you have chosen.


6. Enjoy. 

Saturday, March 2, 2013

PJTV Scam

I think Bill Whittle is genius, as are many of his colleagues.

But their marketing department sucks.

I signed up for their subscription because I admire his and his colleagues work, and they promise(d, perhaps after this posting) an Android app.

After signing up and revealing my VISA underwear I couldn't find the app.

Their reply and mine thereto:

===============================================
Ticket History Note:
Hi Andy,

Thank you for contacting PJTV Support, apologies for the confusion. Unfortunately we don't currently have an app available. However, you should be able to watch using your phones browser. As streaming can be network intensive, we recommend watching only while on Wi-Fi or 4G connection.

Again, apologies for the confusion and thank you for your continued support!




Thank you for taking the time to contact PJTV. We would like to inform you that your customer ticket has been closed. Should you require further assistance, please reply to this message.

Regards,
PJTV Support Team

===============================================

BS.

THERE IS NO EFFING "CONFUSION"!

YOU LIED!

That is a LIE and FALSE ADVERTISING.

FIX IT.

Talk to Bill. I'm sure he will understand even if you cannot.

I'll take down my post if you take down yours AND cancel my subscription charge.

Falling Skies and Gold Watches

Numerous sources point out in one way or another that most things emerging from the Beltway (sequester, gun control) or not (a budget, any budget for the past four years) is little more than kubuki theater.

"The sky is falling! The sky is falling! Squawk! Squawk!"

I cannot believe that people would not demand an end to this nonsense if they understood the numbers in a personal way.

So, to understand the argument over government spending try this:

Google the numbers and chop off eight zeros.

Then one can understand why responsible people will not cooperate with the spendthrifts.

This government's FY 2013 budget numbers are equivalent to an individual having the following:

+ You have $170,000 in unsecured credit card debt, run up by trips to Afghanistan and giving it away to your friends.

+ You are still spending $38,000 a year going on trips and giving it away to friends.

+ But you are only making $29,000 a year, not by actually doing any useful work, like fixing the roads, but by taking it from people who do do useful work and who really are not your friends,

Look dude: you simply cannot, ever, pay off your debt if you make less than you spend...

Obama claims he can. And bemoans the sequester.

Well, on the same terms, this year's cuts of the sequester are equivalent to paying $850.

Yes, a single payment of $850 against a debt of $160,000. Half a penny on the dollar.

A drop in the bucket.

Oooh. I wish I could live my life that way...

And where is it coming from?

Obama shouts:

Aircraft carriers!

Babies!

Octogenarians!

I can tell you, as a former budgeteer, that inside the Beltway that is referred to as a Gold Watch.

It is a time-worn budgeting tactic used by immature and inexperienced (and incompetent, dishonest, immoral, and irresponsible) budgeteers.

It goes like this:

"If I charge the cut against their favorite thing, their gold watch, their mother's wedding ring, their unborn child, their firstborn son, then surely they will surrender."

The answer from anyone who has any experience whatsoever with this sort of nonsense, of course, is:

"You idiot.

"Knock yourself out. Go ahead. Make my day.

"And THEN see who gets the blame."

=====

Following the eight-zeroes analysis above, look at the following chart FROM THE CONGRESSIONAL BUDGET OFFICE

 
of the spending projections both with and without the sequester.

It won't make a bit of difference.

It's all hyperbolic feelgood political correctness, designed by amateurs to make a crisis out of nothing but token incompetence, magnified by their indolence and viciousness.

People of the Lie.

So fire them all.

 We need term limits (three terms max) and a flat tax.