All Posts By

Jason Follas

Jason Follas

Jason Follas is a Sr. Architect for Falafel Software and lives near Toledo, OH. He has been a Microsoft MVP for SQL, Visual C#, and most recently Windows Platform. When not working or speaking, you can find him writing a number of casual games currently in the Windows Store or fishing in the local river.


One-Time Passwords (OTP)

By | .NET, node.js | No Comments

Years ago, I worked for a customer who provided me with a RSA SecurID device to access their VPN. This was a plastic fob that would display a six digit number on a LCD screen. Every 30 seconds, the numbers changed to a different random six digits. To log into their VPN, I had to provide my username and password, plus the current six digit number displayed on the device. So, even if my password was compromised, an attacker still could not get into their VPN without also having that SecurID device. Today, we simply call this Two-Factor Authentication, or 2FA. While plastic fobs…

Read More

Kendo DataSource: Grouping then Sorting

By | Kendo UI, Telerik | No Comments

It seems that Kendo DataSource (and, thus, the Kendo Grid) cannot do both Grouping and Sorting. When sorting is defined without grouping, then everything works fine. But, when records are grouped, then the sorting within each groups does not work at all. Consider this simple example:

The sorting is all over the place! One workaround (there are probably many more) is to perform a sort AFTER the DataSource has already grouped the data. For a data-bound Kendo Grid, this can be done in the DataBound event handler. However, there is a Chicken-and-Egg situation when doing this: performing a .sort()…

Read More
Scout Promise

A Brief Introduction to Promises

By | JavaScript | No Comments

It took me a while to get used to working with Promises in JavaScript. I fundamentally knew how the jQuery Deferred object worked from years ago, so some of the concepts were familiar to me. But, the beauty of the newer Promise implementations is in how it really cleans up your code by breaking it up into blocks that can then be chained and executed asynchronously. Consider the following:

The process is kicked off at the bottom with a call to doSomething() . Notice that doSomething()  calls fetchSomething() , and all that fetchSomething()  does is return the results of someHttpClient.get() . But, in…

Read More

How to Build the NodeMCU Firmware using BoUoW

By | ESP8266, IoT, Linux, Windows | No Comments

This is post 13 of 13 in the series “IoT with the ESP8266” The Windows 10 Anniversary Update includes the Windows Subsystem for Linux, as I had mentioned in a previous post. The Bash shell (succinctly named “Bash on Ubuntu on Windows”, or BoUoW if you’re actually trying to search for information) permits native Linux ELF64 binaries to run on Windows. It’s pretty clever, but a little limited in areas. So, I wondered: since Linux is the preferred first-class build environment for ESP8266 firmware, can I build the NodeMCU firmware using BoUoW? Let’s find out! First, you will need to activate the feature and install BoUoW….

Read More

Add A Small LCD Display To Your Raspberry Pi

By | IoT | No Comments

Recently, I needed to put together a Raspberry Pi-based solution to run a Node.js app. I didn’t need Windows IoT Core or X-Windows – just a Linux TTY would do. But, I also wanted to include a LCD display to eliminate the need for a HDMI monitor.  Was it possible? Selecting and Configuring Display Hardware A quick search of the internet reveals many 3.5 inch screens for the Raspberry Pi. In fact, there are many different screen sizes available, but the 3.5 inch matches the footprint of the Pi itself. These are typically TFT displays with an SPI interface that plug into the Pi’s…

Read More

Solved: Adding an Office 365 Email Account to Outlook 2016

By | Office365 | No Comments

Today, as part of repaving my laptop, I decided to install Office 2016. Everything was going fine until I tried to add my Office 365 email account to Outlook 2016. It seems that Auto Discover is now a requirement for Exchange email accounts – there is no longer a way to manually configure servers. And, for some reason, the Auto Discover process hung while trying to discover the server settings for my email (eventually erroring out) After a frustrating two hours of troubleshooting, I came across this blog post with a solution that worked for me: In my case, I added three DWORD registry…

Read More

Angular.js: Configuration for Two Environments within one Project

By | AngularJS, node.js | No Comments

One of our recent projects is an Angular.js app that uses Node.js/Express as the application server. During development, we create feature branches that are merged into a “develop” branch for integration testing. Then, the we merge the “develop” branch into the “master” branch for production deployment. One issue that we had to solve was how to keep environment-specific config in source control. That is, our Angular app needed to know the URL for its API server, and the API server for development was different than production. The first attempt was to maintain one version of a config file in the “develop” branch, and a different version of that…

Read More

How to Use Multiple Panes in a Bash Console

By | bash, Linux, Windows | No Comments

Windows 10 recently released a Linux subsystem that allows you to run Linux programs on Windows. There is a little bit of magic involved with how they integrated the two operating systems, as Scott Hanselman explains in this introduction/how-to video: You can do some interesting things with Linux, particularly around shell scripts. Recently, I had the need to run multiple commands simultaneously, and I also needed to separate the output of each command from one another. If I were writing a Windows app, then I might dedicate a panel of the UI for each command. Could I do the same in a…

Read More

Solved: Windows 10 Anniversary Update Install Hang

By | Windows | One Comment

Over the weekend, Windows Update alerted me that the Windows 10 Anniversary Update was available to be installed onto my Thinkpad W530 laptop. Since I was anxious to try out the new Bash shell integration, I clicked the button to start the update. Downloading the files took about 30 minutes. Then, I had to schedule a reboot (read: I chose to restart right away). The installation began, and after a few automatic reboots, I found myself staring at a screen showing the installation at 32% complete. But, the progress spinner wasn’t spinning and there was no hard drive activity. Was the installation stuck,…

Read More

Traveling with Wi-Fi IoT Devices

By | Hardware, IoT | No Comments

These days, a lot of Wi-Fi IoT devices are intended for use in your home where there is typically only a single Wi-Fi access point. You set up the device one time, and then as long as the SSID and password never changes, the device will just continue to work. But, taking that same device on the road can prove to be a challenge. Add a hotel or conference center wireless network into the mix, especially one with a Captive Portal, and it can be next to impossible to get the device onto the internet. I have started using a travel router with…

Read More
Adafruit BMP280 sensor:

A Simple IoT Project using NodeMCU

By | IoT | No Comments

This is post 12 of 13 in the series “IoT with the ESP8266” At a recent conference, I showed a simple demo for the ESP8266 using NodeMCU. This demo connected to Wi-Fi, synchronized the time with an internet time server, and then read temperature and air pressure from a sensor every 5 seconds and published the values to a MQTT broker. It was essentially a fully functional IoT solution (minus a lot of the exception handling and compensation that a more polished app would include). For the temperature and barometer, I used a BMP280 sensor available on a small board from Adafruit that…

Read More

How to Set the Current Datetime with NodeMCU

By | IoT | One Comment

This is post 11 of 13 in the series “IoT with the ESP8266” When the ESP8266 starts up, the Realtime Clock (RTC) is not initialized. If your IoT project has the need to provide timestamps in its generated data, then your code will need to fetch the current datetime from a server after the network is available. One way to do this with NodeMCU is to use the sntp (Simple Network Time Protocol) module in conjunction with the rtctime module. The sntp module will fetch the time from a specified time server (could be on your LAN, or from an official source on the internet) and…

Read More

ESP8266 and Wi-Fi Channels

By | ESP8266, IoT | 2 Comments

This is post 10 of 13 in the series “IoT with the ESP8266” The ESP8266 supports operating as a Wi-Fi station (station mode), an access point (softAP mode), and can even do both at the same time (softAP+station mode). However, there is one important detail that must be understood or else it will come back to bite you: the radio in the ESP8266 only supports one hardware channel at a time. What does this mean? Well, 802.11b/g/n operating on 2.4GHz has 14 different channels that can be used (though, in North America, we can only use channels 1-11 due to…

Read More

ESP8266/NodeMCU Deep Sleep

By | ESP8266, IoT | 8 Comments

This is post 9 of 13 in the series “IoT with the ESP8266” Sometimes, an IoT device will perform small chunks of work, and then will otherwise be idle. For instance, a weather station with sensors for temperature, pressure, and humidity (such as the BME280) may only need to take a reading every 15 minutes and broadcast to the cloud – something that requires 10 seconds to accomplish. If the device is powered by a battery, then you want it to enter a deep sleep state in between the work cycles in order to maximize battery life. But, how would you force an ESP8266 to…

Read More

Programming GPIO on the ESP8266 with NodeMCU

By | ESP8266, IoT | 9 Comments

This is post 8 of 13 in the series “IoT with the ESP8266” IoT devices (a.k.a., Things) aren’t very interesting if they cannot interact with the world around them. As Makers, we need to hook up sensors, light up LEDs, and communicate with other devices that are wired up to our Things. To do this, we need IO functionality that can be programmed. GPIO (General Purpose Input/Output) refers to a set of generic pins of a microcontroller that can be used for digital signaling. GPIO pins can be individually set to act as input or output, and values can be either…

Read More

Working with Files in NodeMCU on the ESP8266

By | ESP8266, IoT | 6 Comments

This is post 7 of 13 in the series “IoT with the ESP8266” What is SPIFFS? One of the coolest things about the NodeMCU firmware is that it includes a SPI Flash File System (SPIFFS) module. This means that data and scripts can be written to and read from the flash memory using the concept of files instead programming against raw memory locations. Flash memory allow random access reads and writes. But, by nature, flash memory only allows erasure for entire blocks of memory (i.e., 64 kB) at a time. When erased, a NOR flash memory address will contain all…

Read More

Let’s Do Something with the ESP8266 using NodeMCU

By | ESP8266, IoT | 3 Comments

This is post 6 of 13 in the series “IoT with the ESP8266” Get to a Prompt Up until now, I’ve been putting out a lot of high-level background information about the ESP8266 and different firmware in order to establish a baseline of knowledge about the platform and its history. Now that you [hopefully] have NodeMCU installed onto your own ESP8266 device, let’s do something with it. Connect your device to the USB port, and open a serial terminal program. If you’re looking for a serial terminal for Windows, then you may want to try out RealTerm. It has become my…

Read More

How to Wire the ESP8266-12 for Programming

By | ESP8266, IoT | 5 Comments

This is post 5 of 13 in the series “IoT with the ESP8266” In my last post, I discussed how to acquire the NodeMCU firmware, and then how to flash it using a serial port (or, rather, your USB port). The assumption that I was making was that people already had the ESP8266-12 module in an easy-to-work-with form, like the NodeMCU DevKit or Adafruit Huzzah. But, some of the readers only had the bare module. I was asked what it would take to ready the ESP8266-12 module itself for programming. My response follows: ESP8266-12 Pinouts Here are the pinouts of…

Read More

NodeMCU Firmware for the ESP8266

By | ESP8266, IoT | No Comments

This is post 4 of 13 in the series “IoT with the ESP8266” Introducing NodeMCU The NodeMCU Firmware is an open source project that provides an abstraction layer on top of the Expressif SDK for the ESP8266. While the SDK itself provides low-level access to the peripherals of the ESP8266EX chip, NodeMCU provides a high level API that hides a lot of the implementation details of how the chip works. NodeMCU includes a version of the Lua programming language that is based on eLua. Like many developers, I was personally first introduced to the Lua language by means of a…

Read More

ESP8266 Firmware

By | ESP8266, IoT | 3 Comments

This is post 3 of 13 in the series “IoT with the ESP8266” Firmware is the term given to software that runs from non-volatile memory (NVM) on a piece of hardware. It is the “permanent” program stored in the ROM of any device that contains a processor, like your TV’s remote control, your digital camera, your Wi-Fi router, and even modern light bulbs (the programmable LED ones). It is considered non-volatile because the program survives power-down states without requiring any sort of supplemental battery power. Historically, a device’s firmware is set during manufacturing and never changed. Though, since re-writable flash…

Read More

Introducing the ESP8266-12 Module

By | ESP8266, IoT | No Comments

This is post 2 of 13 in the series “IoT with the ESP8266” Don’t let the $2-3 price fool you: there is a lot of functionality packed into the ESP8266-12 module by Chinese manufacturer AI-Thinker. The ESP8266EX itself is a System on Chip (SoC) produced by another Chinese manufacturer, Espressif. Within this tiny 5mm TSLP package is: a 32-bit 80 MHz microcontroller based on the Tensilica LX106 64 KB of Instruction RAM, 96 KB of data RAM Built-in 2.1 GHz 801.11 b/g/n Wi-Fi interface (TR Switch, Balun, LNA, Power Amplifier, and Matching Network) 17 GPIO pins with internal pull-up/pull-down resistors…

Read More

Why is IoT so Expensive? Hint: It Doesn’t Have to Be!

By | ESP8266, IoT | One Comment

This is post 1 of 13 in the series “IoT with the ESP8266” So often today, I see the Internet of Things (IoT) as being associated with small form-factor general-purpose computers, like the Raspberry Pi 2, the Intel Galileo, and the MinnowBoard MAX. Don’t get me wrong: these are all great platforms for prototyping just about anything, offering fast multi-core processors, a reasonable amount of RAM by today’s standards, a plethora of I/O, and external removable storage (i.e., SD card) all at a reasonable cost if you are buying one or two… but at $35, $45, and $145, these are…

Read More

Web Tiles: Your Data on the Microsoft Band

By | Microsoft Band | One Comment

The folks in Studio B working on the Microsoft Band have just released a preview for a new type of Tile known as a Web Tile. This looks promising as a simple way to surface your data onto the Band. A Web Tile periodically consumes public JSON or RSS/ATOM data from the web, extracts small meaningful bits, and displays it on the Band. It is driven entirely by the Microsoft Health app, so all that you need to do is find or build a public-facing data feed, create a .webtile package, and then share the package with their users. Opening the package file (i.e, as an email attachment, or…

Read More

Hands-free WinRT: Part 3 – Cortana

By | .NET, Mobile, Windows Universal Apps | No Comments

This is post 3 of 3 in the series “Hands-free WinRT” Cortana is many things. She (yes, after using it for a while, you start to refer to Cortana as “she”) is a digital assistant, keeping track of details about you in order to be proactive in delivering information to you before you need it. She is a voice interface to perform tasks that would otherwise require starting one of the built-in apps, such as setting reminders and alarms, or sending a text message while driving. And when she cannot determine an action based on what you say (or type)…

Read More

Hands-free WinRT: Part 2 – The Listening App

By | .NET, Mobile, Windows Universal Apps | 2 Comments

This is post 2 of 3 in the series “Hands-free WinRT” The first part of this series demonstrated how to use Speech Synthesis and “voice fonts” to give your WinRT app a voice. Now we can see what it takes for your app to work in the opposite direction: listening to your voice and producing text as a result. Platform Divergence While the Speech Synthesis API in WinRT is available to both Windows and Windows Phone 8.1, the Speech Recognition API, unfortunately, is not. With Windows Phone, you get a powerful API built right into WinRT that enables speech recognition in your…

Read More