<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>networks &#8211; Cunningham Consulting</title>
	<atom:link href="https://www.cunninghamconsulting.net/tag/networks/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.cunninghamconsulting.net</link>
	<description>Hardware and Software Engineering</description>
	<lastBuildDate>Fri, 28 Feb 2020 17:18:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.cunninghamconsulting.net/wp-content/uploads/2018/03/cropped-CunnConsult-3D-logo@512-32x32.png</url>
	<title>networks &#8211; Cunningham Consulting</title>
	<link>https://www.cunninghamconsulting.net</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">143742248</site>	<item>
		<title>Networking Products with Embedded Linux</title>
		<link>https://www.cunninghamconsulting.net/2018/04/09/networking-products-with-embedded-linux/</link>
		
		<dc:creator><![CDATA[Glen Cunningham]]></dc:creator>
		<pubDate>Mon, 09 Apr 2018 17:13:38 +0000</pubDate>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[networks]]></category>
		<guid isPermaLink="false">https://www.cunninghamconsulting.net/?p=1741</guid>

					<description><![CDATA[<p>A client called that I hadn't heard from for several years.  They had a new flagship product line that had some major problems.  Customers were furious, all the original programmers had left, and something needed to be done fast.  So they asked if I could come out for six months or so to straighten things out...</p>
<p>The post <a rel="nofollow" href="https://www.cunninghamconsulting.net/2018/04/09/networking-products-with-embedded-linux/">Networking Products with Embedded Linux</a> appeared first on <a rel="nofollow" href="https://www.cunninghamconsulting.net">Cunningham Consulting</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A client called that I hadn&#8217;t heard from for several years.  They had a new flagship product line that had some major problems.  Customers were furious, all the original programmers had left, and something needed to be done fast.  So they asked if I could come out for six months or so to straighten things out.</p>
<p>The products were expensive laboratory grade instrument modules (costing tens of thousands each) that were designed to be stacked and work together to gather and consolidate data.  But there were problems with the communications between the modules and the host PC.  Customers would spend hours preparing for a test, and a few more hours to run it.  But partway through the test, the system would suddenly hang up, data would be lost, and the test would need to be run over again from scratch.  And there were all kinds of other mysterious and problematic symptoms that were hard to find and even harder to explain.</p>
<p>The individual instruments were extremely reliable, and had been for years.  The problem was with the added inter-module communications, both the hardware and the software.  The instruments were designed to talk to a single host, not a network.  So the company designed add-on boards to allow for a mini-network of instruments using CAN bus communications hardware and a proprietary communications protocol.  The new boards also provided a USB connection for a host PC to monitor and download the test data.</p>
<p>There were many problems, but here are the main ones:</p>
<h5>Poor protocol design</h5>
<p>When communications problems exist, I look for two things — the documentation describing the protocol and some tools to capture and analyze the communications bus traffic to see what is really going on.  They had neither.</p>
<p>A protocol is a specification of the formatting of the data and messages that will travel between devices.  The design of the protocol will usually provide a way to minimize the chance of errors and detect them when they occur, typically through some form of checksum or error correcting code.  And it will anticipate the different errors that might occur and describe how to handle them so normal communications can resume.  A protocol document allows all the scenarios to be thought out ahead of time, and for peer review and corrections to polish the plans to provide a bulletproof scheme.</p>
<p>They didn&#8217;t have a protocol specification document.  And they had never gone through the design process.  Instead, the ad hoc protocol evolved over time with more and more patched on to it as new issues arose, with little to no documentation.  If anyone had ever seen the big picture of what was being created, they would have realized that it was a mess and a minefield of problems waiting to happen.</p>
<p>Since all of the original programmers were gone, we spent months trying to understand what it was supposed to do, while also trying to figure out why it kept failing and how to fix it.</p>
<p>In an ideal situation, you would have a well thought out and documented protocol specification and tools to sniff the communications and capture snapshots of any faults.  Within days you would find the problem and solve it.  Instead, the days or weeks they saved by skipping these steps meant months of time spent on the back end trying to clean up the mess.  Even worse, there was some serious damage to the company&#8217;s reputation and sales.</p>
<h5>Lack of safeguards</h5>
<p>The system included thousands of individual settings for calibration and configuration.  But these settings were unprotected and could be wiped out or changed accidentally in an instant by an errant command, all without any warning or indication that it had happened.</p>
<p>The protocol had no provision to identify what type of data packet was being sent, such as a packet wrapper describing the contents.  The receiver was supposed to know when the sender was changing states from, for example, a command mode to a file transfer.  But if the mode switch was lost or delayed, the receiver could see the file and try to interpret its bytes as commands, potentially wreaking havoc as it went nuts doing all kinds of random things it wasn&#8217;t supposed to do, such as overwriting critical settings.</p>
<h5>Bottlenecks</h5>
<p>There was a big problem with getting the data out of the system.  After a four hour test, it could take an hour or two just to transfer the data file to a PC for analysis.  There were two big bottlenecks:</p>
<p>First, the CAN bus connection between the modules was being run at 125,000 bits per second.  That might sound like a lot, but standard USB speeds are nearly 4000 times faster.  So a file that takes only a second to transfer over USB would take over an hour on the CAN bus!  (Actually, it is even worse than that since the CAN bus has a very high overhead, using 5 to 8 bytes of wrapper around each tiny 8-byte packet.  So the effective data rate is close to half of the bit rate.)</p>
<p>&nbsp;</p>
<figure id="attachment_1762" aria-describedby="caption-attachment-1762" style="width: 751px" class="wp-caption aligncenter"><img fetchpriority="high" decoding="async" class="wp-image-1762 size-full" src="https://www.cunninghamconsulting.net/wp-content/uploads/2018/04/Ecostar-Comm.png" alt="Diagram of communication buses in original system" width="751" height="630" srcset="https://www.cunninghamconsulting.net/wp-content/uploads/2018/04/Ecostar-Comm.png 751w, https://www.cunninghamconsulting.net/wp-content/uploads/2018/04/Ecostar-Comm-150x126.png 150w, https://www.cunninghamconsulting.net/wp-content/uploads/2018/04/Ecostar-Comm-300x252.png 300w" sizes="(max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px" /><figcaption id="caption-attachment-1762" class="wp-caption-text">Original system communication channels:<br />Red = USB (480,000 kbps)<br />Purple = CAN bus (125 kbps)<br />Black = plain asynchronous serial (115 or 230 kbps)</figcaption></figure>
<p>The diagram above shows the communications flow between the different components.  Each module consists of a laboratory instrument and an interface board which includes an MCU and a CAN and USB interface.  The different modules in a stack talk to each other through the CAN bus backbone.  And a host PC could monitor or download the data through a connection to one of the modules&#8217; USB ports.</p>
<p>Since you could never know which module the PC might be plugged into, the programmers decided to make each module keep a copy of every other module&#8217;s data.  This would avoid the bottleneck of using the CAN bus to do large file transfers since every MCU could send it all directly to the USB port. But it didn&#8217;t work, and everyone was scratching their head wondering why the PC transfers were so slow. One other bottleneck had been overlooked.</p>
<p>The product specs could say that they had a USB 2.0 standard port, capable of 480 million bits per second rates.  But do you see the black line that transfers data from the MCU to the USB adapter?  That is a standard serial port line limited to only 230 thousand bits per second, about 2000 times slower than the USB port.  It&#8217;s like trying to supply a firehose with a narrow IV tube.  The flow will never be more than a dribble.</p>
<p>File transfers took so long that customers would instead attach a dedicated PC throughout the test to download the data as it happened.  Or they would take the modules apart to get to the CompactFlash memory cards that were hidden inside.</p>
<h4>Eliminating the communications problems</h4>
<p>One thing that became clear over time was that the problems were even worse than we thought.  It seemed like a bottomless pit of new issues to discover and fix.  New product plans were in motion, so it was time to step back and consider changing the architecture rather than perpetuating such a troublesome design.  My proposal was accepted, so I stayed on for another year to implement the new system.</p>
<h5>fast and powerful at a low cost</h5>
<p>When I first started designing electronics years ago I noticed something interesting.  Some chips that had way more features and capabilities could be far less expensive than some less capable alternatives.  The reason was volume.  If a chip was used in a high volume product like phones or personal computers, then the volumes would drive the price way down and I could take advantage of that even in a low volume product.</p>
<p>The smartphone market has made some incredibly powerful, tiny and highlight integrated chips available at extremely low prices.  System-on-a-chip devices with a powerful CPU, DSP, Video, Audio, Ethernet, USB and more are available in a single chip costing just a few dollars.  Add some memory, connectors and an operating system and you have a powerful computer.  That has led to the creation of powerful single board computers covering just a few square inches, perfect for dropping in an embedded system.</p>
<p>For the next generation of this troubled product, we decided to replace their proprietary hardware and communications with an off-the-shelf single board computer that cost a fraction of their old design, yet had way more capabilities.  The included standard Ethernet was capable of 100 million bits per second, a 400 to 800 fold increase in speed over the CAN bus and throttled USB ports on the old board.  And the PC would connect to the Ethernet bus, not a specific module, so all modules could be reached equally as fast.  The revised communications bus structure is shown below:</p>
<figure id="attachment_1765" aria-describedby="caption-attachment-1765" style="width: 747px" class="wp-caption aligncenter"><img decoding="async" class="wp-image-1765 size-full" src="https://www.cunninghamconsulting.net/wp-content/uploads/2018/04/LDV-Comm.png" alt="" width="747" height="630" srcset="https://www.cunninghamconsulting.net/wp-content/uploads/2018/04/LDV-Comm.png 747w, https://www.cunninghamconsulting.net/wp-content/uploads/2018/04/LDV-Comm-150x127.png 150w, https://www.cunninghamconsulting.net/wp-content/uploads/2018/04/LDV-Comm-300x253.png 300w" sizes="(max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px" /><figcaption id="caption-attachment-1765" class="wp-caption-text">New system: Ethernet for module-module and PC to module communications.</figcaption></figure>
<h5>Linux Operating System</h5>
<p>The boards also ran Linux, the open source (and free) operating system that is already widely used in a lot of complex embedded systems like DVR&#8217;s and cable boxes.  That gave us several big advantages.</p>
<p>We were able to completely replace the troubled proprietary protocol with standard Internet protocols (TCP/IP), all included with Linux.  Since these protocols drive the Internet and local area networks, they are obviously well documented, robust and proven, and there are excellent tools (such as <a href="https://en.wikipedia.org/wiki/Wireshark">Wireshark</a>) to debug any problems during development.</p>
<h5>A more modern User Interface</h5>
<p>Another huge advantage of Linux is that includes a web server.  (This website runs on Linux.)  My client&#8217;s old system was also burdened by a native Windows PC host application that nobody liked and had a number of its own problems.  We created a new user interface with a web application hosted on one of the Linux boards on a private network (not on the Internet).  Since the application now runs in a browser, it is cross-platform and can be used on Windows, Mac, Linux and any other device that has a browser, and it can now be viewed by more than one person at a time.  With the addition of an integrated WiFi hub, the user interface is also available on tablets and smartphones for quick control and monitoring during a test.  In fact, an iPad was included with the new system to highlight this useful feature.</p>
<p>The new product is a big success.  The communication problems are gone, the speeds are fast, and the user interface is a big improvement.  And the new architecture can serve as a platform for adding new modules and creating new products from different combinations for years to come.</p>
<hr />
<h5>Lessons</h5>
<p>This story illustrates the value of a few themes that I promote:</p>
<ul>
<li><strong>Take the time to design and properly vet a system on paper</strong> before you dive into the final implementation.  It will save you time and headaches in the long run.</li>
<li><strong>Use a highly qualified and experienced person to design the system</strong>, or at least to review the plans.</li>
<li><strong>Write performance specifications and test to confirm they are met</strong>.  It was embarrassing that the high-speed USB port was almost uselessly slow and made it to market like that.</li>
<li><strong>If the system is complicated, take the time to gather or create the tools to analyze it and prove that it is working according to spec during development.</strong>  This client should have created a tool like Wireshark for their custom protocol to analyze the data on the bus.  They would have quickly identified many of the problems and fixed them <em>before</em> the product was shipped.</li>
<li><strong>Consider using existing industry standards.</strong>  They are proven, robust and well supported.  There are times when a proprietary scheme is appropriate.  But designing your own encryption algorithm or file transfer protocol is probably a bad idea.</li>
</ul>
<p>The post <a rel="nofollow" href="https://www.cunninghamconsulting.net/2018/04/09/networking-products-with-embedded-linux/">Networking Products with Embedded Linux</a> appeared first on <a rel="nofollow" href="https://www.cunninghamconsulting.net">Cunningham Consulting</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1741</post-id>	</item>
		<item>
		<title>Smart Appliances</title>
		<link>https://www.cunninghamconsulting.net/2018/03/31/smart-appliances/</link>
		
		<dc:creator><![CDATA[Glen Cunningham]]></dc:creator>
		<pubDate>Sat, 31 Mar 2018 23:03:08 +0000</pubDate>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[appliances]]></category>
		<category><![CDATA[communication]]></category>
		<category><![CDATA[networks]]></category>
		<category><![CDATA[Sunbeam]]></category>
		<guid isPermaLink="false">https://www.cunninghamconsulting.net/?p=915</guid>

					<description><![CDATA[<p>In 1999, Sunbeam (Sunbeam, Oster, First Alert, Mr. Coffee, etc.) wanted to create a line of smart appliances that would talk to each other and the Internet.  Sundberg Ferar, their industrial design firm, suggested that Sunbeam give me a call.&#160; Motivation Sunbeam was in trouble due to the disastrous management by &#8220;Chainsaw Al&#8221; Dunlap that left them &#8230; </p>
<p class="link-more"><a href="https://www.cunninghamconsulting.net/2018/03/31/smart-appliances/" class="more-link">Continue reading<span class="screen-reader-text"> "Smart Appliances"</span></a></p>
<p>The post <a rel="nofollow" href="https://www.cunninghamconsulting.net/2018/03/31/smart-appliances/">Smart Appliances</a> appeared first on <a rel="nofollow" href="https://www.cunninghamconsulting.net">Cunningham Consulting</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In 1999, Sunbeam (Sunbeam, Oster, First Alert, Mr. Coffee, etc.) wanted to create a line of smart appliances that would talk to each other and the Internet.  Sundberg Ferar, their industrial design firm, suggested that Sunbeam give me a call.<span id="more-915" class="more-target">&nbsp;</span></p>
<h2>Motivation</h2>
<p>Sunbeam was in trouble due to the disastrous management by <a href="https://en.wikipedia.org/wiki/Albert_J._Dunlap" rel="noopener">&#8220;Chainsaw Al&#8221; Dunlap</a> that left them with two billion in debt.  Jerry Levin had taken over and was looking for ways to save the company.  He explained that while running Revlon, he had the R&amp;D department develop a new lipstick that would last all day, far longer than the competition.  It worked, and their sales margins and profits increased dramatically.  And Revlon rose from third to first in cosmetics market share.  My job was to do something similar for Sunbeam&#8217;s appliance lines to give them a boost.</p>
<p>When you go to an appliance store to buy a coffee maker or curling iron, you will find very similar products from several different brands.  Since their features are often nearly the same, you buy based on price, looks or reputation.  With stiff price competition, all the appliance manufacturers had slim margins.  But if one of the appliances on the shelf had some cool new feature, it would stand out, sell more and could command a higher price.</p>
<p>So Sunbeam&#8217;s idea of making the appliances talk to each other and the Internet had a lot of promise.  Their initial plan of how to pull it off did not.</p>
<h2>A Heavy-Handed Approach</h2>
<p>Sunbeam&#8217;s strategy was to sell a dedicated PC in a box that would serve as the hub for all the appliances, and a gateway to the Internet.  It would connect to the appliances through WiFi.  This was the most obvious and straightforward approach.  But I told them that I thought it would be a commercial failure for many reasons:</p>
<ul>
<li>Such a PC would have cost a couple thousand dollars back then.  Who would spend that much to hook up some $30-50 appliances?</li>
<li>WiFi was uncommon in homes at the time.  So the consumers would have to buy that and figure out how to set it up too.</li>
<li>WiFi hardware was way too expensive.  If Sunbeam wanted their smart appliances to stay within $10 or $20 of the base product, the manufacturing cost of the extra hardware had to be under a few dollars.</li>
<li>WiFi used too much power.  In products like their First Alert smoke alarms, the battery would be dead within minutes.</li>
<li>Their customers were used to products that just plugged into the wall and worked, not that required large manuals and an IT department to set up.</li>
</ul>
<h2>An Improved Architecture</h2>
<p>My proposal was to eliminate the PC altogether and use a very inexpensive hub instead.  And we&#8217;d replace the WiFi communications with a much cheaper and easy to set up networking scheme.</p>
<figure id="attachment_928" aria-describedby="caption-attachment-928" style="width: 231px" class="wp-caption alignleft"><img decoding="async" class="wp-image-928 size-full" src="https://www.cunninghamconsulting.net/wp-content/uploads/2018/03/ThaliaHLTAlarmClock.jpg" alt="Thalia HLT Alarm Clock - smart appliances" width="231" height="250" srcset="https://www.cunninghamconsulting.net/wp-content/uploads/2018/03/ThaliaHLTAlarmClock.jpg 231w, https://www.cunninghamconsulting.net/wp-content/uploads/2018/03/ThaliaHLTAlarmClock-139x150.jpg 139w" sizes="(max-width: 231px) 100vw, 231px" /><figcaption id="caption-attachment-928" class="wp-caption-text">Sunbeam/Thalia HLT Alarm Clock</figcaption></figure>
<p>I argued that an inexpensive alarm clock could take the place of the PC as the hub of the system.  Smartphones hadn&#8217;t been invented yet, so nearly everyone still had an alarm clock next to their bed.  It was a logical place to check on the status of everything and turn things on and off when you went to bed or woke in the morning. As a clock, it was perfect for scheduling when your electric blanket turned off and your coffee maker started in the morning, for example.  And with a cheap dial-up modem, we could download weather and traffic information early in the morning, ready for when you woke up.</p>
<p>High-speed communications are important for streaming videos and sending large files, but are overkill for a few dozen bytes to broadcast when the dryer is done or your coffee maker is out of water.  So we would use inexpensive low data rate powerline and wireless communications rather than WiFi.  If the product plugged into the wall, it would talk through the house wiring.  And if it ran on batteries, then it would use short bursts from an ultra-low power radio to talk.</p>
<figure id="attachment_931" aria-describedby="caption-attachment-931" style="width: 250px" class="wp-caption alignright"><img loading="lazy" decoding="async" class="wp-image-931 size-full" src="https://www.cunninghamconsulting.net/wp-content/uploads/2018/03/ThaliaClockProducts.jpg" alt="HLT Products - smart appliances" width="250" height="171" srcset="https://www.cunninghamconsulting.net/wp-content/uploads/2018/03/ThaliaClockProducts.jpg 250w, https://www.cunninghamconsulting.net/wp-content/uploads/2018/03/ThaliaClockProducts-150x103.jpg 150w" sizes="auto, (max-width: 250px) 100vw, 250px" /><figcaption id="caption-attachment-931" class="wp-caption-text">A few of the Sunbeam HLT Products</figcaption></figure>
<p>This scheme meant that a customer could get a starter kit of networked appliances for $80 or less, such as an alarm clock plus a coffee maker, or alarm clock and a smoke alarm.  They would try it out, see the benefits, and then start buying more smart appliances to add to the system.</p>
<h2>Thalia Products</h2>
<p>Sunbeam liked the idea, so I was contracted to create a suite of eight prototype products including the alarm clock and a touchscreen kitchen organizer within five months.  We assembled a team and pulled it off, and were the hit of the annual Housewares Show in Chicago.  I then joined Sunbeam as Chief Technology Officer of their new tech division, Thalia, and later became VP of Technology for the corporation.</p>
<p><iframe loading="lazy" title="The Next Wave with Leonard Nimoy - Prog 112 Thalia" width="525" height="394" src="https://www.youtube.com/embed/8J-_z92_pGA?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
<p>My role was to develop the technologies (such as the low-cost communications circuits that we called HLT, or Home Linking Technology) and coordinate the incorporation into the products of the different divisions within Sunbeam and to promote and sell it to other companies.  Consumers would benefit if we were also able to communicate with products from other manufacturers.  For example, we wanted our alarm clock to be able to control Lutron light switches, check that your garage door was closed or tell you when your Maytag dryer was done.  That meant that we needed some standards for both the communications hardware and the messages that were passed between the devices.</p>
<h2>AHAM</h2>
<p>The <a href="https://www.aham.org/" rel="noopener">Association of Home Appliance Manufacturers</a> (AHAM) organized discussions about smart appliances and how to connect them.  I chaired the committee that was writing the standard for the communications protocols, and we met every two to four weeks.  Agreeing on the hardware was difficult since a company like Maytag or GE would be content with adding $20-30 to their cost for a high-end large appliance like a washing machine, while we wanted to keep it to a couple of dollars for our small appliances.  But we were making good progress on the messaging protocols.</p>
<p>Someday I may write a blog post about my meeting with Bill Gates.  Microsoft was trying to convince the AHAM members that we all needed to use some form of Microsoft operating system and an adaptation of their Universal Plug and Play (UPnP) architecture.  I was arguing that we didn&#8217;t need all that complexity and to be paying licensing fees to Microsoft just to turn a light on or tell when your dishwasher was finished, and we had proven that it could be done.  So Bill called me out to his office in Redmond to talk…</p>
<h2>Sunbeam&#8217;s Demise</h2>
<p>Unfortunately, that all came to an end for us when Sunbeam&#8217;s financial woes from Al Dunlap&#8217;s management caught up to it.  In 2001, less than a year before we would have started selling the new products, Sunbeam filed for bankruptcy. It was sad that we didn&#8217;t get to finish, but I was very proud of what we were working on and what we accomplished.</p>
<p>Today, this type of work continues with the Internet of Things (IoT), the Cloud and other technologies to connect more and more of the devices and points of information in our lives.  There are still many opportunities and a lot to be done.</p>
<p>The post <a rel="nofollow" href="https://www.cunninghamconsulting.net/2018/03/31/smart-appliances/">Smart Appliances</a> appeared first on <a rel="nofollow" href="https://www.cunninghamconsulting.net">Cunningham Consulting</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">915</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: www.cunninghamconsulting.net @ 2026-05-03 12:46:43 by W3 Total Cache
-->