Alternative to PuTTY on Windows 10

Up to now, anytime you wanted to secure shell into another computer while using Windows operating system the program of choice was PuTTY. The Ubuntu Bash shell for Windows 10 changes the situation. This Bash shell gives you a more Unix/Linux way to secure shell into another computer. Microsoft still labels this shell as beta and warns you of this on their website and during the insallation.

Installation

The installation is simple enough to perform as long as your computer meets the necessary requirements. You can find the requirements and the steps for installation at Microsoft's Installation Guide.

During the install, you will be asked to create a username and password. Do not forget these credentials because they are needed to install software while inside the Bash shell on Windows.

Installing SSH

To install ssh, just use the sudo apt-get install ssh command in the Bash shell on Windows. The password for the user created during the install of the Bash shell will be needed here. This will install the client and the server of secure shell.

For a quick test of logging into a remote computer, a ssh key does not need to be generated. A ssh key can be generated in the same way as if on a Unix/Linux computer.

The secure shell client and server configuration files are the same in the Ubuntu Bash shell on Windows.

Result

Before logging into another computer using secure shell, make sure the ssh server is setup and running on that computer.

For a quick test, I booted up a Raspberry Pi and made sure the ssh server service was running. I also changed the password for the user pi to secure the user.

On the Windows 10 computer running the Bash shell, I performed the following:

$ ssh pi@192.168.1.19

After saying yes to the warning question and entering user pi's password, I was greeted with a command line prompt for the Raspberry Pi.

Ubuntu Bash Shell on Windows 10

Ubuntu Bash shell on Windows 10 makes it easy to use your Unix/Linux experience on Windows without learning new software. Upgrading to Windows 10 might need to be considered if your business is mostly running Windows client computers but system administrators need to manage Linux servers.

Resources

Arch Linux and Adafruit Trinket Part 2

What Port?

I want to thank Sean Beck for bringing to my attention that I did not mention what port to use in the Arduino IDE in my first post. I thought this should be easy enough to remedy, but after looking in the Arduino IDE there was no port assigned. In the status area, device /dev/ttyUSB0 was being used but when I checked my /dev directory that device wasn't there.

So what port is the Trinket on? I went to the Adafruit forums and found the answer which turns out to be no port.

From Adafruit Forums: Forum Index > Supported Products & Projects > USBtinyISP Trinket Help

The Trinket does not emulate a COM port. Use the Trinket flavored version of the IDE and select Trinket as the Board type. The IDE will look for a USBtinyISP instead of a COM port for programming.

This forum answer talks about the Trinket flavored version of the IDE which is now outdated since the newer IDEs can be made to see the Trinkets.

For the Arduino IDE, just make sure the Programmer option in the Tools section is set to USBtinyISP. Also do not forget to press the reset button at the end of the Trinket before uploading the sketch.

Reference

To learn more about the Trinket, visit Adafruit Trinket Tutorial.

Arch Linux and Trinket

This is how I got the Adafruit Trinket to work with my Arch Linux.

Start

I have the latest Arduino IDE installed. You can get the latest IDE from Arduino.cc. As of this writing, it is version 1.6.5. If you have an older version, I recommend upgrading to the latest version. My particular setup is the IDE software is installed into a subdirectory called bin in my home directory.

/home/bac/bin/arduino

If you did not do the same, find out where the IDE is installed. This information will be needed later.

The Trinket used in this article is the Trinket 16Mhz or 5v version. You can obtain the Trinket at the Adafruit Store.

Needs

Download the following files into a temporary folder in your home directory.
* The Adafruit Arduino Boards file.
* The Adafruit Udev Rules.

The boards file identifies Adafruit's Arduino boards to the Arduino IDE. The udev rules file identifies Adafruit's Arduino boards as usb devices and allows a person belonging to the dialout group to work with the boards without being root.

Trinket Setup

This is where you need to know where the Arduino IDE files were installed. Depending on where the IDE was installed, root privaledges may be needed by using sudo.

Follow the copy file instructions in the README in the Adafruits Linux Setup Guide. I renamed the avrdude.conf to original-avrdude.conf before copying over Adafruit's version. I did not use the Easy Install Scripts.

Next, navigate to the where you downloaded the udev rules file, open the file with a text editor and make the following change. Change the GROUP setting to users.

From this:
SUBSYSTEM=="usb",ATTR{idProduct}=="0c9f",ATTRS{idVendor}=="1781",MODE="0660",GROUP="dialout"
To this:
SUBSYSTEM=="usb",ATTR{idProduct}=="0c9f",ATTRS{idVendor}=="1781",MODE="0660",GROUP="users"

After saving the changes and exiting the editor, as sudo, copy the udev rules file into /etc/udev/rules.d/ as 81-adafruit-trinket.rules.

To reload the udev rules, enter the following at a terminal.

$ sudo udevadm trigger

Setup is now complete.

Testing

From Adafruit's website on the Trinket:

Some computers' USB v3 ports don't recognize the Trinket's bootloader. Simply use a USB v2 port or a USB hub in between

Important: Make sure the USB port you are using is a version 2. The Trinket will not be recognized using a USB version 3 port.

Start up the Arduino IDE, in the Tools menu, set the board to Adafruit Trinket 16Mhz and the programmer to USBtinyISP. Type in the following code.

const int led = 1;

void setup() {  
  // put your setup code here, to run once:
  pinMode(led, OUTPUT);
}

void loop() {  
  // put your main code here, to run repeatedly:
  digitalWrite(led, HIGH);
  delay(1000);
  digitalWrite(led, LOW);
  delay(1000);  
}

Plug the Trinket in with a USB cable. A green light will stay on and a red light will pulse. The code must be uploaded while the red light is pulsing, which times out after 10 seconds. If the red light stops, press the button at the end of the Trinket to start the red light pulsing again. While the red light is pulsing, press the upload code button in the Arduino IDE. If everything goes well, you will not see any red messages.

Once the code is uploaded, the red light on the Trinket should start blinking.

End

Here is an image of the Trinket. For this image, I also hooked up an led to pin 1. The quarter is for scale.
Trinket blinking an led

Communicating with Anyone

It all started with seeing a commercial for a hearing aid that has a phone app to control certain settings. It was similar to the Beltone Hearing Aids. This started me thinking about using smartphones to communicate with the deaf.

I have Bing Translator app on my phone which lets me translate a bunch of languages but I wondered if I could translate English to English. More specifically, if I could speak and the translator app would then show what I spoke as text. Yes, the translator app can do this. So if I find myself needing to communicate with a deaf person, I will be able to do so. Now, some people may say that using a note app can acheive the same thing by typing but the translator app can take my spoken word and translate it to any supported language. This will allow me to communicate to a deaf person no matter what language he/she understands.

Still being curisous about communicating with the deaf by using a smartphone, I searched the internet and came upon an app that is being developed by Transcense that allows the deaf to be involved in conversations with multiple people.

What about translating sign language? There doesn't seem to be phone apps just yet but there is research being performed in collabortation with Microsoft to use the Kinect to translate sign language to text. Phone cameras or Google Glass might be able to acheive the same goal of letting deaf people use sign language to communicate to anyone.

More internet searching lead me to Skype Translator which has been making headlines in the last year or so. Skype Translator can translate voice and instant messaging conversations in real time. On the FAQ page, there is a list of supported languages.

For voice:
*English *Spanish *Italian *Chinese

For instant messaging:
*Arabic *English *Hungarian *Maltese *Slovak *Yucatec *Maya *Bosnian (Latin) *Estonian *Indonesian *Norwegian *Slovenian *Bulgarian *Finnish *Italian *Persian *Spanish *Catalan *French *Japanese *Polish *Swedish *Chinese Simplified *Chinese Traditional *German *Klingon *Klingon (plqaD) *Portuguese *Thai *Greek *Queretaro *Otomi *Turkish *Croatian *Haitian Creole *Korean *Romanian *Ukrainian *Czech *Hebrew *Latvian *Russian *Urdu *Danish *Hindi *Lithuanian *Serbian (Cyrillic) *Serbian (Latin) *Vietnamese *Dutch *Hmong Daw *Malay *Welsh

In that last list, Klingon is a supported language. I grew up watching the original Star Trek and now the Universal Translator is coming true.

JavaScript is Fun

JavaScript is one of my favorite programming languages. It allows a person to develop a program relatively quick with a GUI. In most languages when you are learning you start with command line programs then move on to GUI programs. The learning curve for going from command line to GUI can be steep in some languages. With JavaScript, you start out with a GUI which is the web browser and all that is needed is to learn some HTML and CSS then concentrate on the JavaScript. Once you have learned Javascript well, you can then develop command line programs using nodejs or iojs.

Here is a list of books that have helped me learn and understand JavaScript. I placed them in a loose sequence from beginner to advance but there is some overlap between some of the books.

Eloquent JavaScript by Marijn Haverbeke
Amazon

JavaScript: The Good Parts by Douglas Crockford
Amazon

JavaScript Enlightenment by Cody Lindley
Amazon

Secrets of the JavaScript Ninja by John Resig, Bear Bibeault
Amazon

Principles of Object Oriented JavaScript by Nicholas C. Zakas
Amazon

JavaScript Patterns by Stoyan Stefanov
Amazon

Maintainable JavaScript by Nicholas C. Zakas
Amazon

High Performance JavaScript by Nicholas C. Zakas
Amazon

Async JavaScript by Trevor Burnham
Amazon