So GoDaddy did another zinger on me, and this one hurts. I have no idea why they changed the hosting server, but they did so without asking me first. Note: The did send an email (just one) telling me about the change. The email was titled: Hosting Account Update.
Hosting account update
Congratulations! You are now able to publish to your updated hosting account.
Please note that it can take up to 24 hours from the time the update was completed for any newly-published content to be visible on your website.
DNS NOTE: Your account has been assigned the new IP address, X.X.X.X …
And yeah, I happened to miss that one email. At no time did I receive a text page, a second email or a confirmation check that I’ve read the email. Instead, my website went down big. And although I use GoDaddy as my domain name registrar, they didn’t do much to ensure that the website stayed up and running. So, no surprise, the website goes down hard. I haven’t been using the site much, but I still rely on it to be operational. I was glancing at my analytics for the site, and was shocked to see, zero hits for the past ten days. Do some research, and figure out what happened. GoDaddy changed the server and IP address. I need to manually update CloudFlare to match. I get the site up and running again in a few minutes.
Now lets be reasonable here. No, I don’t expect GoDaddy to update CloudFlare for me. But, remember this change was NOT made at my request. The change was done without my knowledge. I still don’t understand why they made the change. And because of that, I expect GoDaddy to take some care to ensure that the customer (me) isn’t adversely affected by the change. I would have thought a contact with a request for confirmation, or a contact over dual or even triple communication methods to be more effective. If a customer doesn’t contact GoDaddy to confirm receipt of the email, then its time to pull out the phone and make a call. GoDaddy could clearly see that the old IP address wasn’t registered on their domain name servers under my account, and that no matter what I have to manually change and IP listing on a A record somewhere, somehow.
It turns out that is not the end of the story. Apparently the search engines know when a site is active or not. If a site goes dark and then reopens, your SEO is hosed. You no longer get the referrals from the search engines that you used to have. This is a painful lesson. What’s the best fix? I think its time we bid adieu GoDaddy Hosting. Thanks anyway.
I’ve been playing with an Orange Pi Zero. These are pretty amazing products at a pretty inexpensive price point. Do note, there are some oddities here. I’ve been following a pretty impressive article on the Orange Pi Zero written by Luc Small.
Luc talks about setting up the connection to the wifi network, by updating the interfaces file:
$ nano /etc/network/interfaces
Add the following 4 lines to the end of the file:
iface wlan0 inet dhcp
wpa-ssid ≺Your Access Point Name aka SSID≻ # wpa-ssid myNetwork
wpa-psk ≺Your WPA Password≻ # wpa-psk myPassword
Er, yeah. So what makes this sort of difficult is you can’t add the ability to update the wifi system unless you are able to communicate with the device. It’s like playing the game of Twister, where the comment is “I won’t get off your foot, until you get off my hand. Well I won’t get off your hand until you get off my foot.” Until you are networked to the device, you can’t set up the device so it will work on the network, ugh.
Obviously there are two different ways to set up the wireless connection. With the Orange Pi Zero, you can:
- Create a hard wired ethernet connection thru a DHCP router
- Create a serial connection via FTDI device
I’d like to talk about that a bit. And here’s my dilemma. I wanted to give a public presentation showing an Orange Pi Zero in use, with a SSH connection and a VNC connection. The problem was that public venue had an odd WiFi system. At that particular venue, there was an “Open” network without traditional WPA-PSK password. I had a heck of a time getting the system up and running. I want to share what I’ve learned.
I was able to bring in an old wifi / switch router to the venue. I was successfully able to ethernet connect between my laptop, to the router, to the device. Because it was my router, I could use the browser on the laptop to look at the DHCP routing table, and determine the IP address of the hard wired Orange Pi device. From there, I could use my terminal command line tool to SSH over to the device. I was easily able to login, and set up wifi communications on the Pi. I will say, lugging around a router, two ethernet cables, and a separate power supply is kind of a hassle. I wanted to know if there was an easier way. I ended up trying to use a FTDI serial cable to communicate. I followed the instructions from Luc Small. This worked rather well.
One difference for me: I was using a Mac Laptop, where Luc is using windows. To enable the serial communications, I used the native Mac Terminal program. First you want to identify the available ports.
$ ls /dev/tty.* # to see all available ports.
You can then use the
$ screen command to to establish a simple serial connection. Note: you are going to want to set up the serial connection / terminal / screen BEFORE you power up the Orange Pi.
$ screen ≺port_name≻ ≺baud_rate≻ # to create a connection
In my case the screen command looked like this:
$ screen /dev/tty.usbserial-AE00BS5L 115200
A few more comments. First, the open network setup. Remember the sample format from Luc Small just won’t work at the facility I was visiting. I did find this reference. I was able to get the open network setup to work by modifying the /etc/network/interfaces
iface wlan0 inet dhcp
Do note that although connected successfully, the DNS lookup didn’t work. We added our own DNS lookup links to the image, thank you Google.
Another surprise: There appears to be a much better way to set up a virgin installation to a wifi network. Instead of modifying the contents of /etc/network/interfaces, you can also use the
$ nmtui or
$ nmcli commands. The nmtui command is particularly easy to use. Follow the prompts, select your network, type in a password when prompted to do so. From what I can see, this command installs a separate connection data stored in the directory:
/etc/NetworkManager/system-connections. Each connection gets its own file. The attached image shows three different screens from the
$ nmtui function. Note the simple text based wifi power strength meter.
Yet one more surprise. I did a whole lot of testing with the FTDI serial communications. I tested two different operating system images:
Armbian_5.25_Orangepizero_Ubuntu_xenial_default_3.4.113.img and Armbian_5.25_Orangepizero_Debian_jessie_default_3.4.113.img . There were definitely some differences there. When using Debian Jessie, I had some difficulty with
$ nano and
$ nmtui commands in serial communication mode. The commands fail to display correctly. You can still make things work, barely, as long as you know which keystrokes will work, but the display doesn’t always look quite right. No problem at all when there is a hard wired ethernet connection. Ubuntu Xenial image didn’t have this issue. Not sure what is going on there.
Many thanks to Luc Small for his posting. Stay tuned for more Orange Pi projects on this site…
So I’m working on a project for a new customer. There is one aspect of the project that makes it attractive to store the data on one of the big three cloud systems (Amazon Web Services, Microsoft Azure or Google Cloud). I need a https route to catch Ajax submits from a single webpage. This is a small application, but if the money is right perhaps we can make this work.
I do a bit of research, and I was pleasantly surprised to see that Google offers a pretty decent free tier. Hmmm. Well that looks cool. So I do a bit of coding. I create a decent node.js server application with access to a Mongo DataBase. That works for me.
So the problem is the pricing I’m seeing on the console don’t at all match my inexpensive expectations. I end up doing a whole lot of research, trying to figure out exactly where the charges I’m seeing are really coming from.
So here is the deal. The free tier for Google Cloud App Engine Standard Environment only (Java 7, Python 2.7, PHP 5, Go). It does NOT apply to Google Cloud App Engine Flexible Environment (Node, Java 8, Python 2.7/3.5, PHP 5/7, Ruby, Go, Custom Runtimes). If you use a flex environment, the minimum number of instances is set at two. And if you add those costs up, it comes to $1.26 per instance per day… no matter how many web hits the site sees. For a 30 day month, that comes to $75 as month just to sit at idle. Add an other $6/ month for the mongo db. Cool service yes. Low cost, no.
But I will say… I’m not giving up yet. PHP or Java or Python or Go are still possibilities. Stay tuned.
But in the ever changing world of software, there is something better available. Enter VirtualBox from our friends at Oracle. So what is VirtualBox you ask? Good question. A virtualbox is an implementation of a virtual operating system installed as an application. VirtualBox allows additional operating systems to be installed on it, as a Guest OS, and run in a virtual environment. And like anything else, that may not be obvious until you see it in operation.
So here’s the deal.
- Open up VirtualBox, the Virtual Machine manager from Oracle
- Download Ubuntu Server.
- Spin up a Ubuntu Server O/S. This is pretty straight forward, but you do need to enable Bridge Mode for your network connection: Virtual box, settings, network, Bridged Adapter. This will enable you to use IP addressing to get to the server from a browser on any computer within your local network.
- Spin up a LAMP (Linux, Apache, MySQL, PHP) server.
- Look for your IP Address
- Open up the Apache Server @ given IP address
- Figure out the directory structure for Apache HTML web server content. The address is shown right there in the Apache Ubuntu Startup Page
- Go to that directory, clone the github repository of interest.
- Open up the link in the browser. Success!! See top photo on this blog entry.
git clone https://github.com/MaximeCheramy/simso-web.git
git submodule init
git submodule update
–Check out that image on the right… that’s one virtual machine running Ubuntu Desktop, while another machine runs Debian Pixel
–Create a Ubuntu Desktop. Add a shared drive. This is a great way tool to use if you ever need to use a torrent to download a large file. Transmission, the Linux torrent tool, works great, and doesn’t expose your desktop or laptop operating system to potential problems.
–This is great way to test different flavors of an operating system. Not sure if you want Ubuntu desktop or Lubuntu or Edubuntu or Mate? Try ’em all. Quick, easy, done. Toss out what you don’t need without leaving extra installations on your desktop or laptop. Clean, seamless. Move along.
–Android Emulator. Run the Genymotion android emulator within VirtualBox. I was playing around with the native emulator that comes with Android Studio. The laptop I was using wasn’t the newest, or latest or greatest. The native emulator was slow. Brutually slow. And flaky. And fragile. Total pain in the neck to work with. The Genymotion emulator, wow. That thing spun right up. And I was testing Android apps with React-Native in no time. Note, the free version of Genymotion emulator is for personal use only. But its pretty nice.
–Debian with Pixel. Perhaps you want to understand what Pixel is, and how it works. Pixel is an ultralightweight interface to the Debian O/S, generally used on devices like a Raspberry Pi. Now released for PC or Mac. Give it a try.
–Run GnuCash (Open Source Accounting Software) on a MacBook.
–Try alternative Open Source DataBases… Cubrid or Firebird or MariaDB or…
–Test that voice activation program you’ve always wanted to install on a Raspberry Pi, but don’t have the desk space for all that hardware for your design and coding phase.
So recently I’ve been playing around with Raspberry Pi type Internet of Things (IoT) devices… In my case I’m experimenting with OrangePi Zero and the C.H.I.P. Both of these are way small, way powerful processor headless computers. I’m trying to do fun and interesting things using these as control devices for special input/output. One of the things I’m interested in is ultra low latency… that is, an absolute minimal amount of time between user input and computer output.
I found an interesting article comparing the use of different programming languages to control things on a Raspberry Pi. Basically the guy hooks up an oscilloscope to and I/O pin, and then turns the pin on and off via different programs / shell commands. Its clear from that test, if you want to control things quickly, go to C for the win. So C it is.
I started playing around with code. I started playing around with different hardware.
First go was with the Orange Pi Zero, with Armbian Linux Server Image (Debian Jessie Legacy v 3.4.113 ) First test was to be using simple General Purpose Input/Output (GPIO) to blink some LED’s. It turns out the Orange Pi is a little bit off standard. To get the GPIO to work, we need to use a modified WiringPi library, courtesy of Github and user Zhaolei.
Here’s a photo of the Orange Pi Zero, an add-on shield with extra USB connections, an audio jack, a microphone and an infrared receiver. I also made a couple of LED jumpers for easy blinky I/O testing. In my case I wanted to use the on board microphone and audio jack… they work pretty well.
Let’s talk a little bit about software. With this device, I always planned on a headless installation. Generally my only contact would be thru SSH, either from desktop / laptop (Git Bash Command Line Interpreter) or mobile phone (with either the Termius or WebSSH app.) Coding consists of me writing original in Atom.io, then copying the code and pasting it into .c files via the nano editor. Compilation and shell run commands are run via the SSH tool.
I ALWAYS want a backup copy of the software I’m writing on my laptop/desktop. The only downside is there is no great way to delete a large block of code with nano. Frankly its easier to delete the file and copy/paste new again.
- Setup the remote device. Probably best to see that things are updated, via
$ sudo apt-get updatefollowed by
$ sudo apt-get upgrade.
- Verify Git is installed on the remote device. If not there, add it with
$ sudo apt-get install git-core
- Install the WiringOp (Orange Pi) library, via
$ git clone https://github.com/zhaolei/WiringOP.git -b h3
- Compile that library on the Orange Pi via
$ cd WiringOP
$ chmod +x ./build
$ sudo ./build
- Create a test file at the user directory (~/) via
$ nano GPIO.cCopy, paste the code from Atom.io. Exit nano, save the file.
- Compile the test file…
$ gcc GPIO.c -o GPIO -lwiringPiThe gcc -lwiringPi command links content from the wiringOP library.
- Finally run the compiled file via
$ ./GPIO. If you did this right, you should see some blinking LED’s. Yipee.
So far, so good. Now its about this time, I’m realizing that I will need to be writing some pretty involved programs. And one thing I don’t have is the ability to debug my code interactively in a convenient method. Its about this time in my research that I stumble over this posting, Visual C++ for Linux Development Wow. No, really… Wow. You can use Visual Studio to manage code, keep copy on your laptop/desktop computer, push code to remote device, AND run code in debugger mode. Way cool. The system uses GDB (the GNU DeBugger) to manage the process remotely.
Now at this point, I spent a heck of a long time trying to understand how Visual C++ for Linux development actually worked. I had more than a few problems, and I couldn’t tell if my troubles were based on my custom libraries or my Visual Studio setup. The answer here was to go back to basics, run the thing one step at a time and see that everything worked well. Now my first off-standard was my choice of the Orange Pi Zero. For a Visual Studio proveout, I reverted back to basics, and used a Raspberry Pi Model B. I set up a clean install.
- Clear SD card via SDFormatter tool (Format type = Full, Format size adjustment = On). I used a 16Gb Samsung Evo MicroSD card in holder.
- Download Raspbian Jessie Lite Minimal Image from raspberrypi.org
- Unzip it. Push OS to SD card via Etcher.io
- Update/Upgrade the OS. Add Git (same as above).
- Add the WiringPi library to the remote device per these installation instructions.
$ git clone git://git.drogon.net/wiringPi
$ cd ~/wiringPi
- You can verify the install via
$ gpio readallwhich creates a handy pinout identification map.
At this point its time to start up Microsoft Visual Studio. I’m using Visual Studio Community 2015, version 14.0.25431.01 with Update 3.
- You are going to want to download and install the Visual C++ for Linux Development extension.
- Install a few tools on the remote device
$ sudo apt-get install openssh-server g++ gdb gdbserver
- Add a few LED’s to your Raspberry Pi. I added one LED to wiringPi Pin #0 and another to wPi pin #1.
- For me, this added one LED to actual pin 11, GND to pin 9 and one LED to pin 12, GND to pin 6. Verify that you have the LED’s oriented in the correct direction.
- Create a new Project. Select Templates –> Visual C++ –> Cross Platform –> Linux
- For this quick test, select ‘Blink (Raspberry)’. Accept the defaults, with one exception. Give the file name a .c suffix (and not a .cpp suffix)
- You will have to set up the program as a ARM processor program, with a pull down selection in the top menu bar.
- At some point you will have to add login credentials, via (Top Menu) Tools –> Options –> Cross Platform –> Connection Manager.
- You can observe output via (Top Menu) Debug –> Linux Console.
- When you click “Remote GDB Debugger” Visual Studio performs the compilation and execution processes.
Visual Studio creates the following files on the remote device (in this case, my Raspberry Pi). Project = Blink, code = main.c
And that Blink.out file, it is fully executable via ssh and
$ ./Blink.out . Note that the WiringPi library is located elsewhere on the remote linux device. If you inspect the sample code carefully, you will note two things.
- Right click on the Blink project in the Solution Explorer. Choose Properties –> Linker –> Input. In the block entitled “Library Dependencies” you will note ‘wiringPi’ This is the command line that tells the system to look for that library on the remote device. The files needed are actually located at /usr/local/lib (normally xxx.so files). Note: there is one thing here I wasn’t very happy about. What if you’ve neglected to compile the library files correctly? If you do that, you get an error message “fatal error: wiringPi.h: No such file or directory”. Wait, what? For a missing file on a remote device, that error message seems to be lacking, and probably should be improved. It’s not immediately obvious that the error is for code content on the remote device, instead, you are wondering what you did wrong on the desktop/laptop machine. My recommendation is “fatal error: wiringPi.h: No such file or directory at remote Linux device.” or words to that effect. The folks at Microsoft seem to agree, and as a result of my email to them, they’ve added this to their open issues list.
- The other thing of note on the Blink project is all the notes involving
// LED Pin - wiringPi pin 0 is BCM_GPIO 17.So in the history of Arduino and Raspberry Pi’s there have been a whole lot of implementations of GPIO pin numbering. The whole WiringPi GPIO thing gives you the chance to custom define different pin schema’s. I will admit for most of us the whole thing is confusing. In this example, its very easy to get pin #0 to function. Starting from the code as written, its way difficult to get pin #1 to function. In this case BCM_GPIO pin #17 = WiringPi pin #0 = physical Pin #11, but what pin is used for WiringPi Pin #1? Hint, it you use the mating BCM_GPIO pin (#18) that is a total fail. Why? Because you have to declare each BCM_GPIO pin special via the Property Pages –> Build Events –> Remote Post-Build Event command. Yes it is important to understand that process, but not, Not, NOT for a beginner exercise. I wasted a good portion of time trying to understand the entire numbering scheme. For 99% of us, its just best to understand our hardware, ssh
$ gpio readallto obtain a pin map for your hardware, and then simply use the WiringPi (wPi) pin numbering.
And heck, to make things easier, I’ll include my beginner approved code sample, RaspberryPiBlink.c (suggest you right click, and save document).
And by the way, just so we don’t forget why we’re using Visual Studio with the Raspberry Pi for programming… with the Gnu Debugger installed we can STEP DEBUG our program on the REMOTE device from within Visual Studio on the laptop/desktop easily. You can see a variable’s content. You can see the order of processing for complex calls. This is way cool, and well worth the tiny bit of extra effort it takes to get everything set up smoothly.
The more I know about statistics, the more I despise sports.
I’m a big Dr. Deming fan. You remember Dr. W. Edwards Deming, right? He was a foremost statistician evangelist lecturing to manufacturing folks a few years ago. I was fortunate enough to see him in a lecture in Dearborn once. He did this cool thing with the audience. He asked ten volunteers to step up on the stage. He told them they were new employees in the Red Marble Company. The goal of the Red Marble Company was to… produce red marbles. Dr. Deming had this big bucket full of red and white marbles. He held the bucket up high, and each employee was asked to select ten marbles. The employees reached high into the bucket (sight unseen) and selected ten marbles. When all the employees got ten marbles, Dr. Deming did a tally on the number of red and white marbles selected by each employee. One lucky employee, Susan, produced 7 red marbles. Dr. Deming heaped lots of praise on Susan, gave her extra prizes and even a $$ bonus. Susan was so proud, she was beaming on stage. Then Dr. Deming went back to the tally results. One poor soul, Ernie, only produced 3 red marbles. Poor Ernie. No, really poor Ernie. Dr. Deming verbally abused the guy on stage, made him feel about one inch tall. “How could you do so poorly, look at what Susan has done?” This went on for sometime. You could actually see the guy cringe on stage. Everybody in the audience was quite uncomfortable with Ernie’s beat down.
But the message was CLEAR. The results of each employees marble selection were absolutely random. And it made zero sense to reward Susan and punish Ernie for what was clearly a series of random events. Woe is Management. Look at significant differences between employees, but account for randomization for exactly what it is.
And lets fast forward to game seven of the 2016 World Series. I don’t normally watch sports on TV, but this game seemed special. I’ve lived in both Cleveland and Chicago for at least five years each. I know how important a win like the World Series can be to each of those cities. The game was fun to watch, well played by two very awesome teams. It went ten innings, each of them on the edge of your seat exciting. And at the conclusion of that game, the winner would be declared World Series Champions. As I watched the game, complete with DVR with rewind, and presenters with paint on the screen strike box, I noticed there were many “questionable” calls made, that I’m not sure I agree with. There were numerous pitches that looked like strikes, but called as balls, and vice versa. I know one scoring runner from the Cubs took his base on a 3-2 count that I believed to be a strike that was called as a ball. There may have been one base runner event (out? not out?) that didn’t hold well to instant replay, but wasn’t reversed… I will say the questionable calls went in both directions, one time supporting the Cubs, and another supporting the Indians. Shit happens. If any one of those events had gone the other way, we could have had a different final result. They’d be celebrating in Cleveland instead of in Chicago.
Am I complaining about the umpire staff? No way. Tough job, and I certainly wouldn’t want the job. But when I step back and look at the game as a whole, these events seemed random. Random enough that it reminded me of the Dr. Deming Red Marble Company. Two great baseball teams, both with high hopes and aspirations… but with only one declared the winner. In my view, that win, at least on that game, was largely a coin flip. And that’s why I gotta say… The more I know about statistics, the more I despise sports.
Baseball photo courtesy of AP Photo/Charlie Riedel
So I’m working on my desktop computer (with hard wired mouse) and every once in awhile the computer operating system (Windows 10) will start making notification noises and the mouse freezes up. Drives me batty. But I keep working on. Occasionally the cursor will freeze on the screen, so I place the computer into sleep mode (with a quick push on the power button) and then wake it up after a minute or two. That frees up the cursor.
But the problem doesn’t go away, it just gets worse. And I’ve already bought new mice over this in the past.
So today, I try something different. I take the mouse apart. I use a pair of tweezers and a vacuum cleaner to remove all dust dirt and HAIRS (2 each) from inside the mouse. Put it back together and presto! No more issues. I think one of the hairs got trapped in the top scroll wheel just enough to play havoc with the optical rotary encoder the operates from that wheel. Total easy fix. No more woes.
Hmmm.. So I’m checking my local Craigslist, looking for some wall mount speakers with the search terms “wall speakers”. Lo and behold, in my results I’m getting a whole bunch of ads from a Scuz Bucket selling artificial turf. Huh? So check the ad, and at first glance it’s pretty innocent.. a few lines of text advertising artificial turf. So wait a minute, how did that one pop on my search? So I do a Control-F search, and zing, there are displayed a huge amount of spam search terms hidden away in the ad. It seems the guy hid a bunch of stuff in a
way off to the right margin. There seem to be over a thousand words there.
Clearly a violation of Craiglist’s terms of service. The terms of service clearly prohibit “spam; miscategorized, overposted, cross-posted, or nonlocal content”. So yeah, the guy is an unscrupulous businessman. Would you buy anything from someone who thinks its okay to break the rules? Do you think these guys have an ounce of integrity? Someone you’d trust?
I was playing around with an idea for an application. I was interested in engaging customer input. I came up with this as interesting concept. It’s an online calculator to determine the volume of water in a swimming pool. The user types in an address, then creates a polygon that surrounds the pool. Add an average depth and its an easy determination to obtain the volume of the pool in gallons.
And if you are a pool supply company, this one’s for sale to you, cheap. Contact us from here…
A couple of notes:
- It’s been a long while since I’ve looked at Google Mapping applications. I was pleasantly surprised to see the costs for these services VERY reasonable. Google has clearly adjusted pricing downward in the past few years. Kudos to them!
- I set this up for US only. Obviously that can be enhanced.
- The other surprise is the Google GeoLocator API key is available for server use only. You’d have to write a REST API server to perform the lookup correctly. I’m currently running a client API key, authorized for this domain only. This works temporarily but it’s really a hack.
I’m working on repairing a laptop for a friend. She has very minimal needs, but reliability is one of them. I’m asking her to try Ubuntu Linux for a while. She’s totally open to the suggestion.
Here’s my question: How would you (simply) explain the difference between Windows Operating System and a Linux O/S to a total non technical person?
The only thing I could come up with was this:
Windows is like a Barbie Doll. She plays with Ken. They do cool stuff. You can dress her up, move her, do lots of different things. When you lose one of Barbies shoes, you really can’t buy just one more. If a dress rips, oh, well. There are a whole lot of accessories you can buy for Barbie. She’s way cute. She is fun to play with.
Linux is like a Gumby Doll. You can pose him, do different stuff. He plays with Pokey. They do cool stuff. He doesn’t come with many accessories, so there’s nothing to lose. Gumby costs a lot less than Barbie with all her accessories. He’s also VERY reliable. Not much to break, nothing to lose. He is fun to play with.
Anybody have a better way to explain the differences?
Barbie and Gumby image courtesy of Trash-n-Treasures Antiques & Collectables