tag:blogger.com,1999:blog-56588752995833172562024-03-06T00:05:28.296-08:00Sunrise ProgrammerSweating the details of programmingSunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.comBlogger64125tag:blogger.com,1999:blog-5658875299583317256.post-20996936981494655212023-12-28T14:33:00.000-08:002023-12-28T14:33:30.304-08:00Overview: Installers for .NET Core<h1 style="text-align: left;"> Installer types for .NET Core applications</h1><div>I've got a new application, and I want a nice installer for it. Visual Studio has a metric ton of different installer projects, variously called "publisher" and "setup" and "install" and "deploy" -- so many, many different adjectives.</div><div><br /></div><div><b>TL/DR: Make a setup project</b></div><div><br /></div><div>My goal is an installer that is a single file, probably .EXE but I'll do a .MSI or .MSIX or whatever. Additional points are awarded for easy instructions, instructions that are less than 5 years old, a simple build process, output that can be placed somewhere other than the "bin" directory, and, of course, an installer that actually works.</div><div><br /></div><div>My project, FWIW, is a .NET "Core" (now it's just called ".NET") -- that's the new thing that replaces the "Framework" version of .NET. It's using some of the WinRT APIs, so the output type is "WinExe" and the target framework is "net7.0-windows10.0.22000.0".</div><div><b><br /></b></div><h3 style="text-align: left;"><b>Publish (Folder) from main project (23 MB)</b></h3><div>Creates a folder with your real .EXE plus a .DLL plus some more DLLs plus a .JSON file plus more random files. They are pretty much all needed, and there's no actual "installer"; it's just random files that you can write an installer for.</div><div>Points deducted: not a single file, no installer</div><div><br /></div><h3 style="text-align: left;">Publish (Click Once) from main project (24 MB)</h3><div>Creates a folder with an MSI for installing, plus also a .EXE for installing, plus also a random set of "Application files" which is full of random files that have all been renamed. The output folder must be in the bin folder.</div><div>Points deducted: terrible multi-install experience, wizard is broken, very old docs</div><div><br /></div><div>The multi-install experience happens when you do an install to test the installer, and then install from literally any other place. Instead of upgrading, or removing the old app, or installing side-by-side, the installer just fails with no suggested course of action.</div><div><br /></div><div>The publish "wizard" is broken: you can select stuff to change in the installer. But when you select, for example, the "Sign Manifest" "tab", you don't get brought to that experience; the dialog box is unchanged. Instead you have to click the "next" button to get from one "tab" to the next. </div><div><br /></div><div>The documentation for "What's new" is from 2012. </div><h3 style="text-align: left;">Setup Project from new project (7 MB)</h3><div>Creates an .MSI for installing, plus a pointless SETUP.EXE that only works with the .MSI. This means I had to waste time figuring out which file I really needed. </div><div><br /></div><div>Points deducted for: bizarre and undocumented "editor". To use it, right-click the "Application Folder" and select "Add" and then "Project Output" and give the original project. </div><div><br /></div><div>The created installer is a clunky, old-fashioned installer, so the user has to click "next", then look at stuff they won't want to change, then click next again, click next on the UAC prompt, and then click close. And it gives a little warning to be sure to check with Windows Update for updates to .NET Framework, which this app, AFAICT, doesn't use at all (it's .NET Core). </div><div><br /></div><div>I really want to deduct points for the "Transitive" property, the description of which is "Determines whether the installer will reevaluate the Condition property for the selected item when reinstalling on a target computer". The words condition, property, select, and target computer really just raise new questions. </div>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-2680181334077139912023-09-24T12:58:00.002-07:002023-09-24T21:59:02.256-07:00Project: Govee E-Ink display<h2 style="text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqh5R9Cu3UCRVMsNhRuJzTK3OQ2skXsXBOfNVFXxhYi9UDCSOWsHrVJdaf3ebL0GmGQqsJD62A8e6aJDHq225wCPYcvVY9SypUrzDnIqRRnUxbp0y_41vsZQRZIHWnW6Ed5iX-fsyVrq260xYkEDRMhV0hr_D6ePsY4s6HVQlx1AaUm6v-k-ZSlBQ8zoA/s1067/Govee-EInk-Complete-Small.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1067" data-original-width="800" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqh5R9Cu3UCRVMsNhRuJzTK3OQ2skXsXBOfNVFXxhYi9UDCSOWsHrVJdaf3ebL0GmGQqsJD62A8e6aJDHq225wCPYcvVY9SypUrzDnIqRRnUxbp0y_41vsZQRZIHWnW6Ed5iX-fsyVrq260xYkEDRMhV0hr_D6ePsY4s6HVQlx1AaUm6v-k-ZSlBQ8zoA/s320/Govee-EInk-Complete-Small.jpg" width="240" /></a></div> The Govee H5074 E-Ink display project!</h2><p>All complete! This project uses an Adafruit <a href="https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/circuitpython-pins-and-modules" target="_blank">nrf52840 board</a> running CircuitPython and their <a href="https://learn.adafruit.com/adafruit-2-13-eink-display-breakouts-and-featherwings/circuitpython-usage" target="_blank">2.13 inch e-ink display</a> (the tri-color one) to pull in data via Bluetooth LE from a Govee H5074 temperate and humidity sensor.</p><p>Watch it on <a href="https://www.youtube.com/watch?v=JWhSaU6podg" target="_blank">YouTube</a>. Also, the code is up on <a href="https://github.com/pedasmith/ElectronicsProjects" target="_blank">Github</a>; take a look!</p><p>Some of the challenging / fun parts: on reset, the device will look around for a Bluetooth "<a href="https://apps.microsoft.com/store/detail/simple-bluetooth-current-time-service/9NJQ3TD3K06F?hl=en-us&gl=us" target="_blank">Current Time Service</a>" so that the clock is set automatically (no need to every manually set it!). Reading in Bluetooth advertisements for the Govee H5074 was not as obvious as it should have been (and I've got a blog post about it), and the e-ink display was much more challenging than I though it would be.</p><p><br /></p><p><br /></p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-39879204665447658612023-09-24T12:44:00.002-07:002023-09-24T12:44:32.213-07:00Using E-Ink displays with CircuitPython<h2 style="text-align: left;"> Using E-Ink displays with CircuitPython</h2><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirwY_h76y5ACI7RoiLjFEcZS36A5uV4CGpTV0wsJKWNn5A7G5zQ1nhbG3PDbAVmPQnDGs1b_vjECDvWRoa-EHVGTnD6cDP5QMKQNucYnVs0oHYs3Of4yx1J4llQO-nfRcAYikl2unD7HUfJ6w22jAI5i5NPyUrnYaaTNPuxP6EKA-zBu5YUvpt7U4lZPw/s800/Govee-EInk-Display-Image-Strip-Small.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="363" data-original-width="800" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirwY_h76y5ACI7RoiLjFEcZS36A5uV4CGpTV0wsJKWNn5A7G5zQ1nhbG3PDbAVmPQnDGs1b_vjECDvWRoa-EHVGTnD6cDP5QMKQNucYnVs0oHYs3Of4yx1J4llQO-nfRcAYikl2unD7HUfJ6w22jAI5i5NPyUrnYaaTNPuxP6EKA-zBu5YUvpt7U4lZPw/w462-h192/Govee-EInk-Display-Image-Strip-Small.jpg" width="462" /></a></div><br /><p>Adafruit has some very nifty e-ink displays. It's something I've always wanted to try out: I've got an e-book reader that uses e-ink, and of course I've seen retail proce tags that use them. What I found is that although the demo code worked great, there were some major gotcha moments when using them in a project.</p><p>Firstly, the update process for the display is both very slow and very obvious. The display will go into a reverse-video mode and clear to white and to black several times before settling in and showing the new display contents. I've got a YouTube video that shows the refresh cycle.</p><p>Secondly, the display can only be updated every 3 minutes. This is locked by the code: if you try to refresh the screen more often, the CircuitPython library will just throw an exception.</p><p>Lastly, the sample code, as written, doesn't actually let you refresh the display. This may seem weird: the library code (displayio) certainly includes the concept of a display refresh, and when used with OLED displays you can do a refresh. But as it turns out, there's some kind of bug in the CircuitPython library (as of 2023-09-24), and when I do a refresh, my labels simply turn into black rectangles.</p><p>All my project code is <span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">up on </span><a href="https://github.com/pedasmith/ElectronicsProjects/tree/main/2023-Adafruit-Python-InkGoveeListener" style="background-color: white; color: #249fa3; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px; text-decoration-line: none;" target="_blank">Github</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">.</span> Take a look at the <a href="https://github.com/pedasmith/ElectronicsProjects/blob/main/2023-Adafruit-Python-InkGoveeListener/code/code.py">code.py</a> file for the complete code; also look at the <a href="https://github.com/pedasmith/ElectronicsProjects/blob/main/2023-Adafruit-Python-InkGoveeListener/code/GoveeDisplay.py">GoveeDisplay.py</a> file; that's the file that makes all of the text labels for the device and handles text updates (e.g., it knows how to take the GoveeData object and update the right labels using either degrees Fahrenheit or Celcius).</p><p>The ideal way to make a display is to </p><p></p><ul style="text-align: left;"><li>Set up the display</li><li>Create all the text labels, background images, and layout groups</li><li>Call display.show() (and maybe display.refresh()) to update the display</li></ul><p></p><p>After that, we can update the label.text fields, and the display will refresh (or, for e-ink displays, we have to call the display.refresh() method to force a refresh). This is simple and clean: updating the display is done just with the labels.</p><p>But for the e-ink display, you have to do something else. You can reuse the text labels and whatnot, but you have to rebuild the display all over again. In code.py, this is done in the while True: loop at about line 229. Looking at the code, on every refresh (which happens every 5 minutes), I have to redo pretty much everything display related: release the old display, make a new display_bus, make a new display, call display.show() (with the existing groups, etc.), and then finally I can do a refresh() and have the display update.</p><p><br /></p><div style="background-color: white; color: #3b3b3b; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div> displayio.release_displays()</div><div> display_bus <span style="color: black;">=</span> displayio.FourWire(</div><div> spi, <span style="color: #001080;">command</span><span style="color: black;">=</span>epd_dc, <span style="color: #001080;">chip_select</span><span style="color: black;">=</span>epd_cs, <span style="color: #001080;">reset</span><span style="color: black;">=</span>epd_reset, <span style="color: #001080;">baudrate</span><span style="color: black;">=</span><span style="color: #098658;">1000000</span></div><div> )</div><div> time.sleep(<span style="color: #098658;">1</span>)</div><br /><div> <span style="color: green;"># For issues with display not updating top/bottom rows correctly set colstart to 8</span></div><div> display <span style="color: black;">=</span> adafruit_ssd1680.SSD1680(</div><div> display_bus,</div><div> <span style="color: #001080;">colstart</span><span style="color: black;">=</span><span style="color: #098658;">8</span>,</div><div> <span style="color: #001080;">width</span><span style="color: black;">=</span>DISPLAY_WIDTH,</div><div> <span style="color: #001080;">height</span><span style="color: black;">=</span>DISPLAY_HEIGHT,</div><div> <span style="color: #001080;">busy_pin</span><span style="color: black;">=</span>epd_busy,</div><div> <span style="color: #001080;">highlight_color</span><span style="color: black;">=</span><span style="color: blue;">0x</span><span style="color: #098658;">FF0000</span>,</div><div> <span style="color: #001080;">rotation</span><span style="color: black;">=</span><span style="color: #098658;">270</span>,</div><div> )</div><div> <span style="color: green;"># We can use the existing group with the new display.</span></div><div> display.show(mainDisplayGroup)</div><br /><div> <span style="color: green;">#</span></div><div> <span style="color: green;"># Wait for a time that's evenly divisible by 5. That means that sometimes</span></div><div> <span style="color: green;"># the scan results will be a little late.</span></div><div> <span style="color: green;">#</span></div><div> wait <span style="color: black;">=</span> TimeToWaitForEvenClock(clock.datetime)</div><div> <span style="color: #af00db;">if</span> wait <span style="color: black;"><</span> <span style="color: #098658;">4</span> <span style="color: black;">*</span> <span style="color: #098658;">60</span>: <span style="color: green;"># If it's e.g., 3:44:59</span></div><div> time.sleep(wait)</div><br /><div> voltage <span style="color: black;">=</span> get_battery_voltage()</div><div> gd.ShowGovee(userprefs, scanResult, clock.datetime, voltage)</div><div> display.refresh()</div></div><p><br /></p><h3 style="text-align: left;">One more thing -- it's not super reliable</h3><p>Regretfully, my experience with the e-ink display is that it's also not super reliable. Every now and then, I'd refresh my code, and then the display just wouldn't update. Or maybe it didn't initialize, or it wasn't connected somehow. There's no exception thrown, or useful trace, or debug message.</p><p>In at least one case, I was trying to use a different physical microcontroller board of the same type (an NRF52840). And for whatever reason, the display just didn't want to work that the other micro, but it wouldn't say why. Is there a hardware fault? Did I mess up some connection? I have no idea, and no useful path forward.</p><p>In the end, I just used the original microcontroller, and eventually everything worked, mostly. And when it doesn't, pressing "reset" will eventually make everything work again.</p><h2 style="text-align: left;">Links to devices:</h2><div style="background-color: white; color: #3b3b3b; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div style="line-height: 19px;"><div style="text-align: left;"><span style="color: #a31515;"><a href="https://www.adafruit.com/product/4814" target="_blank">Adafruit 2.13" Tri-Color eInk Display FeatherWing</a></span></div></div></div><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-47725489615632224812023-09-24T10:07:00.001-07:002023-09-24T10:07:17.322-07:00Reading Bluetooth LE (BLE) sensor data advertisements in CircuitPython<h2 style="text-align: left;"> Bluetooth Sensors -- reading the Govee H5074 advertisement data</h2><p></p><div class="separator" style="clear: both; text-align: center;"><br /></div><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjknUQg91ZoNkZQwmr_rs9v0bvjjw8drS3HccP807DphwwzWB4KRCjLj_YVdHJRsq7YgcvZPJLuYaiKnGdL_bw9oWKOpozWPgvfZzxk1ilZ18vP3t0YlfqxtIbGwv0vkzpTZ6iAWv3TPJYVSLdzbgv1-jJrDXdcPFEl5k_Efi3Mqhw5KnVZ3eW7FD1u38M/s800/Govee-EInk-Display-Image-Strip-Small.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="363" data-original-width="800" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjknUQg91ZoNkZQwmr_rs9v0bvjjw8drS3HccP807DphwwzWB4KRCjLj_YVdHJRsq7YgcvZPJLuYaiKnGdL_bw9oWKOpozWPgvfZzxk1ilZ18vP3t0YlfqxtIbGwv0vkzpTZ6iAWv3TPJYVSLdzbgv1-jJrDXdcPFEl5k_Efi3Mqhw5KnVZ3eW7FD1u38M/w400-h181/Govee-EInk-Display-Image-Strip-Small.jpg" width="400" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div>Reading Bluetooth LE (BLE) sensor data from CircuitPython isn't always obvious. In this example, I show how I pull data from the Govee H5074 Bluetooth sensor. The sensor is a small, battery-powered sensor that reads the temperate and humidity and transmits it inside of Bluetooth advertisements.<div><br /></div><div>The code is all up on <a href="https://github.com/pedasmith/ElectronicsProjects/tree/main/2023-Adafruit-Python-InkGoveeListener" target="_blank">Github</a>. You'll want to look in the <b>code</b> directory at the <b>GoveeScanner.py</b> file. There's also a <b>Govee5074.py</b> file which can parse an advertisement once it's been seen, and a <b>GoveeDisplay.py</b> file that can display the data to an E-Ink display.</div><div><br /></div><div>Go <a href="https://github.com/pedasmith/ElectronicsProjects/blob/main/2023-Adafruit-Python-InkGoveeListener/code/GoveeScanner.py" target="_blank">look at the file</a> now!</div><div><br /></div><div>The key to the code is a pair of methods: the <b>Scan()</b> method and the <b>ScanOnce()</b> method. ScanOnce will start a scan ble.start_scan(timeout=...) . In practice, I use very short timeouts (.1 second) but then do a bunch of them in a loop in the Scan method. The start_scan returns a generator, which is like a list but the contents will flow in over time. The contents will be both advertisements and advertisement scan responses. A scan response is like additional data in the advertisement, but it only comes in when it's requested. The request will be automatic; we don't have to do anything to request a scan_response.</div><div><br /></div><div>The Govee sensor data is send in the scan_response, in what's called the "Manufacturer Data" section.</div><div><br /></div><div>The critical thing to know is that the two values -- the advertisements and scan_responses -- aren't linked together by CircuitPython. We have to do that ourselves, and we do it by saving the advertisements in a dictionary that's indexed by the Bluetooth address.</div><div> </div><div><br /></div><div>The advertisements will have the name of the device. We're looking just for Govee H5074. In the code at about line 88 we look for the <b>complete_name</b> :</div><div><br /></div><div><div style="background-color: white; color: #3b3b3b; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div> name <span style="color: black;">=</span> advert.complete_name</div><div> <span style="color: #af00db;">if</span> (name <span style="color: blue;">is</span> <span style="color: blue;">not</span> <span style="color: blue;">None</span>) <span style="color: blue;">and</span> (<span style="color: #a31515;">"Govee_H5074"</span> <span style="color: blue;">in</span> name):</div><div> <span style="color: green;"># print("TRACE: 30: Found main govee advert", advert.address, name)</span></div><div> goveeAdverts[advert.address] <span style="color: black;">=</span> advert</div></div></div><div><br /></div><div><br /></div><div>If the device is one we want, then we save away the advert in the goveeeAdverts dictionary, indexed by the Bluetooth address. This is critical because when we see an advertisement scan_response, we actually don't get the name but we do get the address.</div><div><br /></div><div>The other part of the ScanOnce method is reading the scan responses. We filter first based on whether it's a response we want (we'll get lots of responses from lots of devices, but we only care about the Govee H5074 devices here).</div><div><br /></div><div><div style="background-color: white; color: #3b3b3b; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div> <span style="color: #af00db;">if</span> advert.scan_response:</div><div> <span style="color: green;"># Check to make sure that this response address is in the list</span></div><div> <span style="color: green;"># of adverts that have the right name ("Govee_H5074...")</span></div><div> <span style="color: green;"># You can't tell from just the response advert; you need the</span></div><div> <span style="color: green;"># original advert, too.</span></div><div> <span style="color: #af00db;">if</span> advert.address <span style="color: blue;">not</span> <span style="color: blue;">in</span> goveeAdverts:</div><div> <span style="color: green;"># very frequent -- set is only govee adverts, but the</span></div><div> <span style="color: green;"># scan_response can be for anything</span></div><div> <span style="color: green;"># print("TRACE: 15: not in set", advert.address)</span></div><div> <span style="color: #af00db;">continue</span></div></div></div><div><br /></div><div>Once we know it's a scan_response we want, we pull out the manufacturer data and parse it. If it parses OK, then we prepare to return it.</div><div><br /></div><div><div style="background-color: white; color: #3b3b3b; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><div style="line-height: 19px;"><div> MANUFACTURER_SECTION <span style="color: black;">=</span> <span style="color: blue;">0x</span><span style="color: #098658;">FF</span> <span style="color: green;"># Per Bluetooth SIG</span></div><div> <span style="color: #af00db;">if</span> (MANUFACTURER_SECTION <span style="color: blue;">in</span> advert.data_dict):</div><div> annunciator.Found()</div><div> buffer <span style="color: black;">=</span> advert.data_dict[MANUFACTURER_SECTION]</div><br /><div> g5074 <span style="color: black;">=</span> Govee5074(buffer)</div><div> <span style="color: #af00db;">if</span> (g5074.IsOk):</div><div> annunciator.Read()</div><div> <span style="color: #af00db;">if</span> retval <span style="color: blue;">is</span> <span style="color: blue;">None</span>: <span style="color: green;"># only print the first one</span></div><div> <span style="color: #795e26;">print</span>(<span style="color: #a31515;">"TRACE: 28: GOT DATA"</span>, g5074)</div><div> retval <span style="color: black;">=</span> g5074</div></div></div></div></div><div><br /></div><div><br /></div><div>The <b>annunciator</b> is the code that lets the user know what's going on. "Read" is an indication that we've read the data OK.</div><div><br /></div><div><br /></div><div><b>TL/DR</b>: when reading Bluetooth advertisements, be sure to check the scan_responses too, because that's where the data might be.</div>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-17323714705409704832023-06-30T15:03:00.003-07:002023-09-24T09:40:40.134-07:00Clocks that set themselves!<h1 style="text-align: left;">The Adafruit Clue-Clock</h1><p><br /></p><p>I'm always frustrated when I have to reset a bunch of clocks after a power outage. Did you know that setting the time on an IOT device can be easy when you add support for the Bluetooth <a href="https://www.bluetooth.com/specifications/specs/current-time-service-1-1/" target="_blank">Current Time Service</a>? (On the SIG site you will want the first doc, "Current Time Service 1.1"). In this blog post I show some of the code I wrote for the <a href="https://www.adafruit.com/product/4500" target="_blank">Adafruit Clue</a> using CircuitPython and the adafruit_ble library. I've even got a <a href="https://www.youtube.com/watch?v=_OHZJ7dY5v0" target="_blank">Youtube video!</a> to show the device and step through the code. </p><p>There's also a handy Windows app that is the server side of the time setting; it will broadcast out the current time. Download "<a href="https://apps.microsoft.com/store/detail/simple-bluetooth-current-time-service/9NJQ3TD3K06F" target="_blank">Simple Bluetooth Time Service</a>" on the Windows store; that's how I set the time. The complete source code for it is on <a href="https://github.com/pedasmith/BluetoothDeviceController/tree/main/SmallProjects/BluetoothCurrentTimeServer" target="_blank">Github</a>. <b>Update:</b> see also my [Govee Ink Display](<a href="https://github.com/pedasmith/ElectronicsProjects/tree/main/2023-Adafruit-Python-InkGoveeListener">ElectronicsProjects/2023-Adafruit-Python-InkGoveeListener at main ยท pedasmith/ElectronicsProjects (github.com</a>) project; it has a newer and easier-to-use version of the clock code.</p><p>In the video I step through three interesting features of the clock.</p><h2 style="text-align: left;">Feature 1: Display stuff to the screen</h2><p>We'll want to print text to the screen; this is done with the <span style="font-family: courier;">clue.simple_text_display()</span> object. The clock uses the <i>simple_text_display</i>, so we can display several lines of text, but nothing fancier. </p><p><br /></p><p>A key point (that took me far to long to figure out!) is that after you update one or more a lines of text, you must call the <i>.show()</i> method -- otherwise, nothing gets displayed!</p><p><br /></p><p><i>Sample Code</i></p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;">from adafruit_clue import clue</span></p><div style="text-align: left;"><span style="font-family: courier;">colors = ((0xff, 0xff, 0xff),)</span></div><div style="text-align: left;"><span style="font-family: courier;">display = clue.simple_text_display(title="Clock", </span></div><div style="text-align: left;"><span style="font-family: courier;"> title_scale=2, text_scale=4,</span></div><div style="text-align: left;"><span style="font-family: courier;"> title_color=(0xa0, 0xa0, 0xa0),</span></div><div style="text-align: left;"><span style="font-family: courier;"> colors=colors</span></div><div style="text-align: left;"><span style="font-family: courier;"> )</span></div><div style="text-align: left;"><span style="font-family: courier;">str = "{:02d}:{:02d}:{:02d}".format(currHour, currMinute, currSecond)</span></div><div style="text-align: left;"><span style="font-family: courier;">clue_display[0].text = str</span></div><div style="text-align: left;"><span style="font-family: courier;">clue_display.show()</span></div></blockquote><p><br /></p><p>The <a href="https://docs.circuitpython.org/projects/clue/en/latest/api.html#adafruit_clue.Clue.simple_text_display" target="_blank">simple_text_display</a> is documented on the circuitpython site.</p><p>The text_scale value of 4 fits a time display with a format of HH:MM:SS (8 characters long) with room for two more characters (eg, enough room for an AM/PM indicator, if desired)</p><p>The title_scale is relative to the text_scale.</p><p>The colors set the colors of each line. I set it so tht the time and date are white, and the day (and the bluetooth scan results) are blue.</p><h2 style="text-align: left;">Feature 2: Use the Real Time Clock</h2><p>The chip used to track time accurately is the "real time clock" -- without it, the code would slowly drift. Fun fact: the first IBM PC did not include a battery-backed real-time clock chip. Every time you turned on the computer, you had to enter the date and time.</p><p>The real-time clock uses <a href="https://docs.python.org/3/library/time.html#time.struct_time" target="_blank">struct_time</a> for many operations; it's just a tuple where you can grab values by index. the current hour, for example, is index 3.</p><p>The real-time clock needs power to work; if it loses power, it will stop stracking an accurate date and time (it says "real time clock", but it does dates, too). How we set it is the topic of the next section.</p><p>The CircuitPython rtc module is a delight to use: there's just a simple way to set the initial value and a simple way to pull out the current time.</p><h2 style="text-align: left;">Feature 3: Connect to Bluetooth Current Time Service</h2><p>Now we get the hard stuff: reading data from an external Bluetooth "Current Time Service" source. The idea is that a nearby PC will broadcast out a "current time" (there's a standard for this); the clock will pick it up and use it to set its time.</p><p>To make it work, you should have already added the <b>adafruit_ble </b>to your lib directory. It's not on the list of libraries in the Adafruit Clue documentation.</p><p>The bulk of the Bluetooth code is in BtCurrentTimeServiceClient.py. There's two critical classes in that file: the <i>BtCurrentTimeServiceClient</i> class which matches the Bluetooth Special Interest Group (SIG) standard and which is compatible with the Adafruit CircuitPython Bluetooth setup, plus a helpful wrapper class <i>BtCurrentTimeServiceClientRunner</i> class which listens for Bluetooth advertisements and connects to the time service.</p><p>You will want to look at the code while reading this description :-)</p><h3 style="text-align: left;"> BtCurrentTimeServiceClient</h3><p>The BtCurrentTimeServiceClient class is less than 20 lines of code. The Adafruit CircuitPython Bluetooth system isn't too hard to use, but there isn't a very good tutorial on it. Hopefully this explanation will help!</p><p>The BtCurrentTimeServiceClient class exists for only one reason: it's the "glue" between the Bluetooth system and your code. When you get an advertisement for a Bluetooth device you want to connect to, you'll provide this class (the <i>class</i> and not an <i>object</i>) and will get back an object that's mostly this class (it will have been updated)</p><p>The object you get back will only be valid until the connection is broken. In the code, the connection is broken almost as soon as the data is read.</p><p><br /></p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><div><span style="font-family: courier;">class BtCurrentTimeServiceClient(Service):<br /></span><span style="font-family: courier;"> uuid = StandardUUID(0x1805)<br /></span><span style="font-family: courier;"> data = StructCharacteristic(<br /></span><span style="font-family: courier;"> uuid=StandardUUID(0x2A2B),<br /></span><span style="font-family: courier;"> # Don't need to provide these; they should be discovered<br /></span><span style="font-family: courier;"> # by the Bluetooth system.<br /></span><span style="font-family: courier;"> # properties=Characteristic.READ | Characteristic.NOTIFY,<br /></span><span style="font-family: courier;"> struct_format="<HBBBBBBBB"<br /></span><span style="font-family: courier;"> )</span><span style="font-family: courier;"><br /></span><span style="font-family: courier;"> def GetTimeString(self):<br /></span><span style="font-family: courier;"> (y, m, d, hh, mm, ss, j1, j2, j3) = self.data<br /></span><span style="font-family: courier;"> retval = "{0}-{1}-{2} {3}:{4}:{5}".format(y, m, d, hh, mm, ss)<br /></span><span style="font-family: courier;"> return retval</span></div></blockquote><p style="text-align: left;"><br /></p><p>The <i>data</i> value is set to be a <i>StructCharacteristic</i>. But when you examine the data later on (like after it's been updated by the remote side!), it will instead be a tuple of the data, parsed by the struct_format string. You just have to know from other sources what the data values actually mean.</p><p><br /></p><h3 style="text-align: left;">BtCurrentTimeServiceClientRunner</h3><p>The BtCurrentTimeServiceClientRunner is the class you'll actually call to get the Bluetooth current time data. Just call Scan, passing in a bluetooth "<i>ble</i> object; it's the Bluetooth from the clue device (```ble = adafruit_ble.BLERadio()```). There aren't any other methods in the class that should be called.</p><p>The runner <i>Scan</i> method will scan for Bluetooth advertisements for a set amount of time (15 seconds in this case); the scans can complete in less time, so I loop around as needed. The inner loop of Scan calls <i>ScanOnce</i> to do a single advertisement scan, returning a connected Bluetooth device. Once this method has a connected Bluetooth device, we hook up the service connection with the <i>ConnectToCurrentTimeService</i> method (yeah, I'm using the word "connected" here in kind of two different ways). Once we have a service connection, we can pull out the time data directly.</p><p>The <i>ScanOnce </i>returns a connected connection to the remote device (or None, of course). It does a single advertisement scan, up to a maximum amount of time, looking for an advertisement that says it supports the current time service. When one of those is found, we connect to that device. In my case, the device will just be my laptop when it's running the <i>Simple Bluetooth Current Time Service</i> app. </p><p>The <i>ConnectToCurrentTimeService</i> creates a 'live' (connected) service object given a connection to a device. </p><p>To convert a connection to a bluetooth device into a useable per-service object, you need to provide a class with a <b>uuid</b> that matches the service you need to use, plus a <b>data</b> object which needs to be one of the <b>Characteristic</b> types (for example, <b>StructCharacteristic</b>). When you "get" an object from the connection, the smart connection "array" will create a brand-new object for you, of the class you specify, that's hooked to (connected to) the live Bluetooth object. As part of this, the "data" value in the class, which had been, e.g., a StructCharacteristic, will now just be a tuple of data. Reading that tuple will get you the latest data.</p><p>To recap: the <b>Scan</b> method will scan advertisements for an appropriate BT device, will connect to it, will make a service connection, read the characteristic data, put that data into a tuple, and return the tuple. In case of errors, it will just return None.</p><p>Once the tuple of date is read, we just set up the real-time clock at about line 74 of the code.py file. Once this happens, the clock will be updated!</p><p>You can make this work for your device, too -- just pop in the BtCurrentTimeServiceClient.py, and call the Scan() method with a BT radio. Just don't forget to include the adafruit_ble library on your device!</p><p><br /></p><p>Good luck!</p><p><br /></p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-86884488064963142942023-04-23T14:47:00.007-07:002023-04-23T14:47:57.159-07:00Hints on injecting input into Windows (use 'ScanCode' for Unicode!)<h1 style="text-align: left;"> Use ScanCode to inject Unicode characters!</h1><div>Got a Unicode string and need to inject it using the <a href="https://learn.microsoft.com/en-us/uwp/api/windows.ui.input.preview.injection.inputinjector?view=winrt-22621" target="_blank">InputInjector</a> class? Wondering how to inject it since the <a href="https://learn.microsoft.com/en-us/uwp/api/windows.ui.input.preview.injection.injectedinputkeyboardinfo?view=winrt-22621" target="_blank">InjectedInputKeyboardInfo </a>class has a ScanCode and a Virtual Key but no Unicode char? It turns out to be easy!</div><div><br /></div><div>In the InjectedInputKeyboardInfo class, set the KeyOptions to <a href="https://learn.microsoft.com/en-us/uwp/api/windows.ui.input.preview.injection.injectedinputkeyoptions?view=winrt-22621" target="_blank">Unicode</a> and then fill in the <b>ScanCode</b> with the unicode char. Since you've got a string, you'll make a list of InjectedInputKeyboardInfo items and then send them all with the InjectKeyboardInput method.</div><div><br /></div><div>I know this works because my new keyboard will happily inject Unicode strings like this: ๐๐ฉโ๐ฉโ๐งโ๐ง!</div><div><h3 style="text-align: left;"><span style="font-family: inherit; font-style: inherit; font-weight: inherit;">Handy Links</span></h3><div><span style="font-family: inherit; font-style: inherit; font-weight: inherit;">MSDN learn.microsoft.com </span><a href="https://learn.microsoft.com/en-us/uwp/api/windows.ui.input.preview.injection.injectedinputkeyboardinfo.scancode?view=winrt-22621" style="font-family: inherit; font-style: inherit; font-weight: inherit;" target="_blank">ScanCode</a></div><div>Old [UWP]InjectedInputKeyboardInfo with Unicode forum questions that says they have an answer (but don't say what it is): <a href="https://social.msdn.microsoft.com/forums/en-US/bb175ee2-fdf8-40b5-91fa-649eee23f017/uwpinjectedinputkeyboardinfo-with-unicode?forum=wpdevelop" target="_blank">here</a>. </div><div><br /></div><div><br /></div><h1 style="background-color: white; border: none; clear: both; color: #3a3e43; font-family: "Segoe UI", Arial, Helvetica, sans-serif; font-size: 1.75em; font-weight: normal; line-height: 36.6949px; list-style-type: none; margin: -10px 0px 0px; outline: 0px; padding: 0px;"><br /></h1></div>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-80515200169266959192023-04-14T15:32:00.001-07:002023-04-14T15:32:43.705-07:00Hints on using CircuitPython's adafruit_ble Bluetooth<h2 style="text-align: left;"> Hints on using CircuitPython's adafruit_ble Bluetooth</h2><p>Some APIs and libraries for Bluetooth are a joy to use: they fit right into our basic concepts of how the protocol work, and match the kinds of tasks we want to do.</p><p>And then there's the adafruit_ble library. </p><p>I've been working on a little project using the very nifty AdaFruit Feature nRF52840, and there's a lot to like about it. They got a ton of the details just *french kiss*, starting with the font on the main device (the <b>840</b> is in extra-large letters so you can quickly tell one from the other) and running to their library of compatible "feather" devices and integration into CircuitPython.</p><p>But the ble library? They have clearly spent a ton of time and effort on it (which I thank them for). But everything in it is just that little bit backwards from everything I know about Bluetooth.</p><h3 style="text-align: left;">Example: why doesn't this code work?</h3><div>Here's a simple example: I've found a device and I know that it has supports the Current Time Service that I want to read. I know it does that because I check to make sure that the service's GUID (0x1805) is part of the device advertisement. This is done with the CircuitPython statement: </div><div><br /></div><div><span style="font-family: courier; font-size: medium;"><span> <span> </span> </span>if BtCurrentTimeServiceClient.uuid in connection</span></div><div><br /></div><div>which means I should be able to get that service, right? So this code should work?</div><div><br /></div><div><span style="font-family: courier; font-size: medium;"><span> </span>service = connection[BtCurrentTimeServiceClient.uuid]</span></div><div><br /></div><div>Because that's what a collection is for: you can check to make sure a key is in the collection, and then pull the value out of the collection. But that's not how CircuitPython works. You can check the services via a guid, but to get a value, you can only do that by providing the type of the object you want out (and it had better derive from <b>Service</b>)</div><h3 style="text-align: left;">Why this is horrific, and how much time I wasted</h3><div>Given code that doesn't work, the next step is to figure out how to fix it. Potential fixes I tried included:</div><div><ul style="text-align: left;"><li>using a different kind of UUID (UUID versus StandardUUID)</li><li>getting the UUID from a different place (afafruit_ble versus bleio)</li><li>testing to make sure that the 'in' wasn't just always returning true by trying a fake UUID</li><li>connecting at different times</li><li>stopping the scan before getting data</li><li>doing a time.sleep(5) before connecting or getting data</li><li>connecting to the address versus the advertisement</li><li>getting the service twice</li><li>pairing</li><li>iterate through the services (this was <i>really</i> weird)</li><li>disconnecting when I was done</li><li>putting it in a try/except block to investigate the exception</li></ul></div><div><br /></div><div>That's a lot of investigation just to learn that what's going on is "magic": the CircuitPython library, instead of just boringly reporting on a connected devices's services and characteristics, demands that you carefully create a complete-enough CircuitPython replica of the device you're connecting to.</div><div><br /></div><h3 style="text-align: left;">Doc shortcomings examples</h3><div>Little snippets of code would have been super handy. All of the documentation assumes that I'm already a Python expert and will instantly understand the Pythonesque ways to getting information</div><div><br /></div><div>For example, there's a handy "StructCharacteristic" that will put chunk of data out of a Bluetooth characteristic. This is handy when you need to read something like the Current Time Service where the time data is split into 9 different fields, mostly unsigned byte, but one is a 2-byte unsigned short.</div><div><br /></div><div>But how does one actually read the data? It's not mentioned in the docs or in the source code. Turns out this will read the data:</div><div><br /></div><div><div><span style="font-family: courier;"> char = service.data</span></div><div><span style="font-family: courier;"> print(" value=", char)</span></div><div><span style="font-family: courier;"> print(" year=", char[0])</span></div><div><span style="font-family: courier;"> print(" mon=", char[1])</span></div><div><span style="font-family: courier;"> print(" day=", char[2])</span></div></div><div><br /></div><div>This works because the data is the characteristic, and seemingly when you get it you get the unpacked version of the raw data.</div><div><br /></div><h3 style="text-align: left;">What should they have done?</h3><div>Take a look at the Windows Bluetooth (UWP) API. Once you have a device, you can list all the services, and for each service, list all of the characteristics.</div><div><br /></div><div>Or, if you know more about the device you're connecting to (often the case), you can get just the services and characteristics you're interested in, which is almost certainly going to be faster (no point in poking the Bluetooth device for a bunch of service and characteristic data that you don't care about).</div><div><br /></div><h3 style="text-align: left;">Handy Links</h3><div>Link to Adafruit <a href="https://www.adafruit.com/product/4062">Feather nRF52840</a> Express</div><div>Link to <a href="https://docs.circuitpython.org/projects/ble/en/latest/">Introduction โ Adafruit BLE Library 1.0 documentation (circuitpython.org)</a></div><div>Link to the <a href="https://github.com/adafruit/Adafruit_CircuitPython_BLE/blob/main/adafruit_ble/characteristics/__init__.py">Characteristic</a> class on GitHub which includes Struct</div><div>Link to <a href="https://docs.python.org/3/library/struct.html">struct โ Interpret bytes as packed binary data โ Python 3.11.3 documentation</a></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-13088443388005872992023-03-31T20:28:00.004-07:002023-03-31T20:28:56.947-07:00WTF is โExact time 256โ : diving into Bluetooth SIG documents<p> </p><h1 style="text-align: left;">WTF is โExact time 256โ<span style="mso-tab-count: 1;"> </span></h1><p class="MsoTitle"><o:p></o:p></p>
<p class="MsoNormal">The Bluetooth Special Interest Group (SIG) has a metric ton of Bluetooth LE device specs in a
massively confusing pile. In this walkthrough Iโll show how I figured out the
details of a fairly simple LE protocol. In particular, Iโll be creating
something that needs to match the โCurrent Time Serviceโ, services # 0x1805.</p><p class="MsoNormal">TL/DR: the good document is the โ<a href="https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=555004">Gatt Specification Supplement</a>โ.</p><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal">On the <a href="https://www.bluetooth.com/">Bluetooth.com</a>
site, you want โSpecificationsโ and under specification youโll need a tab open
for both the โAssigned numbersโ and the โSpecificationsโ directory.<o:p></o:p></p>
<p class="MsoNormal">In โAssigned numbersโ, thereโs two important documents. The
first is โ<a href="https://btprodspecificationrefs.blob.core.windows.net/assigned-numbers/Assigned%20Number%20Types/Assigned_Numbers.pdf">Assigned
Numbers Document</a>โ. Itโs a giant list of all of the GATT services by name
and all of the characteristics. The second is โ<a href="https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=555004">Gatt
Specification Supplement</a>โ. <o:p></o:p></p>
<p class="MsoNormal">In the โSpecificationsโ directory, find the listing for the
"Current Time Serviceโ and click the <a href="https://www.bluetooth.com/specifications/specs/current-time-service-1-1/">link</a>
to get the service page. It's got a bunch of the lest useful programming documents ever. The only document thatโs interesting for most
developers is the Current Time Service 1.1 PDF file. Click the <a href="https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=292957">link</a>
to read the long, complicated document.<o:p></o:p></p>
<p class="MsoNormal">Page 9 starts to be interesting: the Current Time Service
supports three characteristics: the โCurrent Timeโ (page 10), โLocal Timeโ, and
โreference Timeโ. On page 10 itโs mentioned that weโll be reading the <b>Exact
Time 256</b> field. This is the first bit of useful (and critical) information
in the spec.<o:p></o:p></p>
<p class="MsoNormal">BTW, when they say โUnknownโ, itโs not clear to me which
โUnknownโ value they mean. But in the Assigned Numbers document there are 8 time that
โUnknownโ is mentioned; all of the numeric values (6 of them) are zero. The
others are weird strings for something having to do with telegrams. Or not,
itโs a Bluetooth SIG spec, so nothing is clear.<o:p></o:p></p>
<p class="MsoNormal">At this point you might wonder what the actual bytes are.
The Bluetooth SIG doesnโt care that youโre wondering. You might even try typing
โExact Time 256โ into the main page search box on the main page, but you wonโt get any hits.
However, you can find it in the Assigned numbers where it has number <b>0x2A0C </b>in
the โCharacteristics by nameโ and โCharacteristics by UUIDโ section.<o:p></o:p></p>
<p class="MsoNormal">Note that in the โSpecificationsโ it lists โCurrent Timeโ as
the characteristic; thatโs characteristic <b>0x2A2B</b>.<o:p></o:p></p>
<p class="MsoNormal">And then finally, take a look at the <b>GATT Specification Supplement</b>,
page 78, section 3.62, โCurrent Timeโ. It lists the bytes: thereโs an <b>Exact
Time 256</b> and then a U8 โAdjust Reasonโ which says why the time changed. Even better, there's a decent overview of the Exact Time 256 fields!<o:p></o:p></p><p class="MsoNormal">And here the path through the forest of all Bluetooth knowledge ends. If only there was some way to know that the "supplement" is in fact the useful document, and not the pile of other docs.</p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-59762738582925632402023-03-15T10:08:00.004-07:002023-03-15T10:08:24.247-07:00It takes a lot of people to ship a complex product<p> I'm a Program Manager (PM) for one of Those Big Companies. I don't actually program except as a hobby, and I don't manage. Where I add value is making sure that what we're building is what our customers need.</p><h2 style="text-align: left;">"I could build a replacement with just ___ people"</h2><p>No, you couldn't, if it's a complex project. I was recently reminded of the true history of the automobile: a long, hard slog by an enormous number of people to get each element of a car to actually work. In particular, take a look at <a href="https://gutenberg.org/cache/epub/70194/pg70194-images.html" target="_blank">Motor-Car Principles</a> on Project Gutenberg. Among the many, many things that had to be painfully figured out</p><p><br /></p><p><b>How to stop a car.</b> The book lists a whole series of brake types (none of them disk brakes like in modern cars) </p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEibPnwqyESpga-7On3biTOSyWDwyLjWn79y19QgyyqkVZr9XBhdDgkkJ501ZXKoFDAUnKwcevmaVsZn1-XvcRykbk7t2fECMBPLUADzae-COgA6O50yWpvfk-eoJXdH0Pz1tBdKbZ2Q4Yxo_puv1jYnS1XEgOD_fWPjiJVen4rdtW7xeVv9Cn2d-lK0" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="689" data-original-width="1398" height="158" src="https://blogger.googleusercontent.com/img/a/AVvXsEibPnwqyESpga-7On3biTOSyWDwyLjWn79y19QgyyqkVZr9XBhdDgkkJ501ZXKoFDAUnKwcevmaVsZn1-XvcRykbk7t2fECMBPLUADzae-COgA6O50yWpvfk-eoJXdH0Pz1tBdKbZ2Q4Yxo_puv1jYnS1XEgOD_fWPjiJVen4rdtW7xeVv9Cn2d-lK0" width="320" /></a></div><br /><br /><p></p><p><b>How an axle works</b>. Car axles are not wagon axels, and you can't use one instead of the other.</p><p><b>Building a transmission.</b> This is something steam engines, for example, simply don't have. A steam engine on a train is directly connected to the wheels with no intervening transmission.</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj4hpzd3Jp3ASjte0s3ojkuuyAND7_EcIq0JrhhmqpNI1pw9CB79IaCsm5UzpXsYZ7Bf0p54LVOc8hoP3Aw7Hjh_HKBfksT06wrHq_Hg_YYREsA1XxUVVZgaiTpIoUUOujeGpGW96xfKJ9dvgd4jBgQHTVrHAtVmJiREKFv0AWg2yAbL5SPYrQZ9h_J" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="453" data-original-width="1031" height="141" src="https://blogger.googleusercontent.com/img/a/AVvXsEj4hpzd3Jp3ASjte0s3ojkuuyAND7_EcIq0JrhhmqpNI1pw9CB79IaCsm5UzpXsYZ7Bf0p54LVOc8hoP3Aw7Hjh_HKBfksT06wrHq_Hg_YYREsA1XxUVVZgaiTpIoUUOujeGpGW96xfKJ9dvgd4jBgQHTVrHAtVmJiREKFv0AWg2yAbL5SPYrQZ9h_J" width="320" /></a></div><br /><br /><p></p><p><b>Making a piston.</b> Steam engines, in contrast to car engines, are forgiving: as long as the timing is roughly correct, the steam engine will work. A gas engine has much higher tolerances.</p><p>The book goes on with a long, long list of technologies that are unique to cars.</p><p>Moral of the story: some projects are pretty simple and can be done with a small team (or even just one person). But once you get to new technology, it's a quagmire that requires an extraordinary amount of work just to know what needs to be done, and from there to co-ordinate the work so that all the parts show up on time.</p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-11996563652759757962023-03-02T12:54:00.004-08:002023-03-02T12:54:36.559-08:00Fixing "The type or namespace 'Windows' could not be found" error CS0246<h1 style="text-align: left;">"The type or namespace 'Windows' could not be found" solution!</h1><p>Every time I install a new version of Visual Studio, I run into just a metric hand-full of errors from previously working projects. The projects haven't changed, but suddenly Visual Studio is seemingly incapable of finding the "Windows" namespace.</p><p>My Solution: run the <b>Visual Studio Installer".</b> Pick your <b>installed version</b> and click <b>Modify</b>. The modification you probably want is to under <b>Universal Windows Platform development</b> in the <b>Optional </b>section. Look at the list of available Windows SDK and just install them all (assuming you have enough disk space).</p><p>There's no harm (AFAICT) in getting them all, and it will save you heartache and frustration down the line.</p><p>This entire process is just a cluster. What's more common than building apps for Windows using the compiler tools from Microsoft that are specifically designed to build Windows apps? Well, the only thing more common then developing windows apps is seeing yet another place where Visual Studio once again makes development more painful.</p><p>For me, the #1 reason I get the error is that I don't have enough of the Windows SDKs installed. By default, the Visual Studio installer only installs the "most recent" SDK. You might think that's enough, but it's not.</p><p>Each project will have a reference path that looks like this:</p><div style="text-align: left;"><span style="font-family: courier;"><blockquote> <Reference Include="Windows.Foundation.UniversalApiContract"><br /> <HintPath>..\..\..\..\..\..\Program Files (x86)\Windows Kits\10\References\10.0.22010.0\Windows.Foundation.UniversalApiContract\14.0.0.0\Windows.Foundation.UniversalApiContract.winmd</HintPath><br /> </Reference></blockquote></span></div><p>Note how the HintPath specifies exactly one particular SDK. If you have a more recent version, it doesn't count even though the contracts are specifically designed to be upwards compatible.</p><p>What's worse, Visual Studio loves to kind of silently update your project files, so you'll silently be updated, potentially breaking the project on a different computer.</p><p></p><blockquote>Error<span style="white-space: pre;"> </span>CS0246<span style="white-space: pre;"> </span>The type or namespace name 'Windows' could not be found (are you missing a using directive or an assembly reference?)</blockquote><p></p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-26037620204849146672023-02-05T19:47:00.005-08:002023-02-05T19:47:52.574-08:00Wi-Fi Performance samples<h1 style="text-align: left;"> Wi-Fi Performance, broadly</h1><p>Number 2 in a series on Wi-Fi performance. This time, Wi-Fi (and networking in general) is compared in difference places is compared. Sneak preview: Bluetooth PAN is the slowest :-)</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEge_42B3-wC-k7CfQHwHQPIEXUyO5ON8iJG8fYsnr4xpudCs-NZw526HuglJXtUgh2DchJ5Dp2Z4K_NUMwfBhRv9ionhCaJ453WDO3XfZpunfhfeoiiJsI-6j25aXZf8XvyrOEZeohLdL2tx5KKmjGIZEisgLIGwJuVCngcTsrDecgyQlVDHHDucXi2" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="279" data-original-width="578" height="308" src="https://blogger.googleusercontent.com/img/a/AVvXsEge_42B3-wC-k7CfQHwHQPIEXUyO5ON8iJG8fYsnr4xpudCs-NZw526HuglJXtUgh2DchJ5Dp2Z4K_NUMwfBhRv9ionhCaJ453WDO3XfZpunfhfeoiiJsI-6j25aXZf8XvyrOEZeohLdL2tx5KKmjGIZEisgLIGwJuVCngcTsrDecgyQlVDHHDucXi2=w640-h308" width="640" /></a></div><br />I ran a simple speed test and gathered latency information (round-trip UDP times) in a variety of places and network. No surprise, Ethernet is the fastest and Bluetooth is the slowest. Airport Wi-Fi had generally high throughput (it's higher throughput than my house Wi-Fi network, although note that I have fiber with a low bandwidth cap) but with medium latency.<p></p><h2 style="text-align: left;">PAN? Bluetooth Personal Area Network? What's that?</h2><div>Bluetooth PAN (Personal Area Network) is a technology that lets you share an internet connection from one laptop to another using Bluetooth instead of Wi-Fi. I'm not quite sure why people would do this, but it's still supported in Windows. It's got a non-winning combination of low speed and high latency. </div><p>To actually share a network connection using PAN:</p><p>1. On the "host" laptop, open the Mobile Hotspot settings, and share your Wi-Fi (or Ethernet) connection with Bluetooth. </p><p>2. On the "using" laptop, you need to get to the PAN settings page. AFAICT, there's only one way to do this: </p><p></p><ul style="text-align: left;"><li>right-click on the Bluetooth icon and click "Join a Personal Area Network"</li><li>in the resulting Vista-era "Devices and Printers", select the "host" computer whose network you want to join. You might need to first <b>pair</b> with the "host" computer.</li><li>click <b>connect using</b> and select <b>direct connection</b>.</li></ul><div><br /></div><div><br /></div><p></p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-49747916481221446862023-02-05T13:29:00.003-08:002023-02-05T13:29:33.188-08:00Wi-Fi: Is it faster on AC? Is it slower on Battery?<h1 style="text-align: left;"> Wi-Fi Performance: AC versus DC</h1><div>One of a series of comparisons to learn what makes a difference in Wi-Fi performance.</div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgEqTCsafIN1kRzxOBuvIp4LW22AzuMXgu1Yd3FjGBeYf-ENYfm1UoNnRCYUg7rzI7i4WsuVkloqYfkI3PUecCQtSJtqivwnAa5g7E0o_j98TVE2w0WNc6pXYI8-AnMIXi90NVGvxVa_orFuk0N4QtqAKvoLGNjq1_run27tvUrRTat_CuP1xepRZft" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="870" data-original-width="1911" height="292" src="https://blogger.googleusercontent.com/img/a/AVvXsEgEqTCsafIN1kRzxOBuvIp4LW22AzuMXgu1Yd3FjGBeYf-ENYfm1UoNnRCYUg7rzI7i4WsuVkloqYfkI3PUecCQtSJtqivwnAa5g7E0o_j98TVE2w0WNc6pXYI8-AnMIXi90NVGvxVa_orFuk0N4QtqAKvoLGNjq1_run27tvUrRTat_CuP1xepRZft=w640-h292" width="640" /></a></div><br />TL/DR: they aren't difference, at least on my setup.</div><div><div class="separator" style="clear: both; text-align: center;"><br /></div>In the screenshot, I've done several latency, download, and upload tests against one specific server.</div><div><br /></div><div>Test methodology: With the laptop plugged in, run all the speed tests twice with "AC" as the note. Then remove the docking station (the part that is plugged in) and run the same tests against the same server and mark them "DC".</div><div><br /></div><div><b>Data Analysis:</b> </div><div><ul style="text-align: left;"><li><b>Download</b> mean throughput increased from 16.2 Mbps to 18.4 Mbps going from DC to AC. This isn't a large difference.</li><li><b>Upload</b> mean throughput decreased from 31.3 Mbps to 31.28 Mbps going from DC to AC. This is almost certainly not a real difference.</li><li><b>Mean Latency</b> decreased from 12 msec to 10.3 msec. My stats program tells me this is probably a real difference. The DC had a little bit less jitter, but not by a real amount.</li></ul><div><b>Conclusion</b>: Wi-Fi is about the same speed on DC as it is on AC.</div></div>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-63097788005705422872023-01-10T16:51:00.004-08:002023-01-10T16:51:51.768-08:00Adding Pivot Item causes massive crash in UWP XAML<h1 style="text-align: left;"> Surprise exception when adding PivotItem</h1><p>Quick background: my <a href="https://apps.microsoft.com/store/detail/simple-wifi-analyzer/9NNH2DFGZNQB" target="_blank">Simple Wi-Fi Analyzer</a> program is getting a hidden feature which is unlocked by manipulating the UX in a secret way. I won't say what the secret is, but you can always look for "Unlock" in the source code :-)</p><p>The Analyzer app uses the nice Pivot control: I define a bunch of tabs for different features, and the user picks the tool they want to use. The new feature is a hidden tab, and my unlock code simply unhides it.</p><p>Except it doesn't. You can't actually hide a PivotItem in a Pivot control; it's not supported. Instead you have to create the PivotItem in code and then add it to the pivot.Items collection, it is shows right up!</p><p>Except you actually get this Vista-era dialog:</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEgdTBUH2VOKCHBoZxmv42oqhV-oQnZVW31iNqQFLfgfzglVcGSlvesmnS5ev2If7qtBy1Pe3gs2uKFLI2GaNEZRHJjrYjKd_R96JrK7QatvFmaGZ0W6jQUiGy7Mou9FjdaDO2f9QhmC708VnP_itnCXttLvF4SSBM3XsenivAkKxkxm1GOgBW-dagRk" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="598" data-original-width="627" height="240" src="https://blogger.googleusercontent.com/img/a/AVvXsEgdTBUH2VOKCHBoZxmv42oqhV-oQnZVW31iNqQFLfgfzglVcGSlvesmnS5ev2If7qtBy1Pe3gs2uKFLI2GaNEZRHJjrYjKd_R96JrK7QatvFmaGZ0W6jQUiGy7Mou9FjdaDO2f9QhmC708VnP_itnCXttLvF4SSBM3XsenivAkKxkxm1GOgBW-dagRk" width="252" /></a></div><br />The problem (not even on Stack Overflow) is simple: you can't update a pivot.Items collection while you're in a PivotSelectionChanged callback! The solution is to <p></p><p>Instead add in code like this:</p><p> var task2 = this.Dispatcher.RunIdleAsync((arg) => {<br /> MethodThatAddsPivotItem();<br /> });</p><p><br /></p><p>You don't have to wait for the task; it will just run when it's appropriate.</p><p><br /></p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-46398465344378231942023-01-07T15:28:00.005-08:002023-04-01T20:16:15.120-07:00The BEST way to calculate Standard Deviation<p> The BEST way to calculating Standard Deviation </p><p>The "classic" formulas aren't always the "easiest to program" formulas. Let's look at the classical formula to calculate a sample standard deviation:</p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><p style="text-align: left;"><span style="font-family: georgia;">ฯ = โ (ฮฃ(xแตข-xฬ )ยฒ)/(n-1)</span></p></blockquote></blockquote><p>where <span style="font-family: courier;">ฯ</span> is the standard deviation, <span style="font-family: georgia;">xฬ </span> is the mean and n is the sample count. But note that we have to walk through the numbers twice: once to calculate the mean, and then again for the rest of the calculations. And yet, old fashioned scientific calculators with just a handful of registers (memory locations) could do this calculation by just entering in a column of numbers. What gives?</p><p>The answer is that although conceptually you are summing the square of the difference between each sample and the mean, you can actually do the calculation differently as long as you can keep track of <b>n</b>, the <b>sum</b> of x, and the <b>sum of x</b><span style="font-family: georgia;"><b>ยฒ</b></span>. The resulting calculation is:</p><p style="text-align: left;"><span style="font-family: georgia;">ฯ = โ(</span><span style="font-family: georgia;">ฮฃ(</span><span style="font-family: georgia;">xแตข</span><span style="font-family: georgia;">ยฒ) - ((</span><span style="font-family: georgia;">ฮฃ</span><span style="font-family: georgia;">xแตข)</span><span style="font-family: georgia;">ยฒ / n))/(n-1)</span></p><p style="text-align: left;"><span style="font-family: georgia;">or, slightly more computery: for each new x:</span></p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p style="text-align: left;"><span style="font-family: georgia;">1. n++</span></p><p style="text-align: left;"><span style="font-family: georgia;">2. sumX += x;</span></p><p style="text-align: left;"><span style="font-family: georgia;">3. sumXSquared += x*x;</span></p><p style="text-align: left;"><span style="font-family: georgia;">4. varianceEstimate = (sumXSquared - ((sumX*sumX) / n) / (n-1)</span></p><p style="text-align: left;"><span style="font-family: georgia;">5. stdDevEstimate = SQRT(varianceEstimate)</span></p></blockquote><p style="text-align: left;"><span style="font-family: georgia;"><br /></span></p><p style="text-align: left;"><span style="font-family: georgia;">And you get a running estimate for the standard deviation. You also get the variance, but that's not often really needed.</span></p><p style="text-align: left;"><span style="font-family: georgia;">Statisticians call these the "estimates" because the statistical theory is that there's a magic, universal reality for the actual population variance and standard deviation for which these samples provide an estimate. They aren't wrong :-)</span></p><p style="text-align: left;"><span style="font-family: georgia;"><br /></span></p><p><span style="font-family: georgia;"><br /></span></p><p><span style="font-family: georgia;"><br /></span></p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-64869866841304213412023-01-05T20:41:00.000-08:002023-01-05T20:41:26.812-08:00Handling the TITLE optionThe information (i) element isn't any part of the Gopher RFC (most of Gopher is part of <a href="https://tools.ietf.org/html/rfc1436" target="_blank">RFC 1436</a>, and the Gopher URL is documented in <a href="https://tools.ietf.org/html/rfc4266" target="_blank">RFC 4266</a>), and therefore neither is the common practice of putting displaying an information element differently when a TITLE is put into the directory entry selector.<br />
<br />
Thanks to a GopherSpace crawl, I know that out of about 2100 menus crawled, there were 305 information elements with a TITLE on them -- that's actually a pretty impressive percentage, and presumably it's driven by automated Gopher menu file creation. I'm wondering, though: as the programmer for a Gopher client, how many different Gopher client will render the TITLE elements specially? For that matter, how many Gopher pages put something into column 5, where the "+" in Gopher+ puts the Gopher+ indicator?<br />
<br />
(I know that the first version of my own doesn't because I didn't know about the TITLE concept).<br />
<br />
Let's start by analyzing pages that have too many columns (e.g., more than 5 columns, which corresponds to having more than 4 embedded tabs). There are five such directory entries in my GopherSpace crawl. Three are from a single page which, when I looked at is, is really an HTML page that's being served up as if it was Gopher. Of the remaining two entries, one has a user string consisting of three tabs instead of real data, and the other (from a different menu) has three tabs too many at the end of the line but and doesn't have any actual data in the columns.<br />
<br />
We can also analyze the number of columns in directory entries<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0tRMvXCUA08oasXMxAKYA45np5cmFxccRVHXs0b8TDFGU9zrunTCehgfQLAwgbuOQhwJFGCEBl2P9rsPDWPrwmfpWnr0nTmdAQ1z9c2IJWwyJStpdqRD83DWPMJj02E5Fb22b_Yx5020/s1600/Blog-NColumns.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="592" data-original-width="977" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0tRMvXCUA08oasXMxAKYA45np5cmFxccRVHXs0b8TDFGU9zrunTCehgfQLAwgbuOQhwJFGCEBl2P9rsPDWPrwmfpWnr0nTmdAQ1z9c2IJWwyJStpdqRD83DWPMJj02E5Fb22b_Yx5020/s400/Blog-NColumns.PNG" width="400" /></a></div>
Almost all of the Gopher directory entries are the standard four columns. You can hardly tell the actual numbers, but 1907 entries were a single column, 9 were 2 columns, 895 were three, and 6590 were 5. There were 151840 entries with 4 columns.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com2tag:blogger.com,1999:blog-5658875299583317256.post-64710672786987928322023-01-05T20:40:00.001-08:002023-01-05T20:40:02.676-08:00History: writing fancy code on a plain compiler (Irix version)<h1 style="text-align: left;"> Writing fancy code on a plain compiler</h1><p class="MsoNormal"><span style="mso-fareast-font-family: "Times New Roman";">This is a story of porting C++ code using all the latest features to a machine whose compiler was (ahem) definitely not supportive of advanced features :-/</span></p><p class="MsoNormal"><span style="mso-fareast-font-family: "Times New Roman";">Back
in about 1997 and 1998 I was a software consultant and got hired by an old
coworker at Avid to help them port their shiny new high-performance
file-copying software to the Irix. IIRC, they had written it in โportableโ C++
which I discovered was anything but </span><span style="font-family: "Segoe UI Emoji",sans-serif; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-char-type: symbol-ext; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-symbol-font-family: "Segoe UI Emoji";">โน</span><span style="mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></p><h3 style="text-align: left;"><span style="font-family: "Segoe UI Emoji",sans-serif; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-char-type: symbol-ext; mso-fareast-font-family: "Times New Roman"; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin; mso-symbol-font-family: "Segoe UI Emoji";">Writing code with no strings attached</span></h3>
<p class="MsoNormal"><span style="mso-fareast-font-family: "Times New Roman";"><o:p> </o:p></span>Amongst
the other delights of 1997 era SGI workstations: SGI was a leader in creating
the C++ STL. But the SGI people really, really didnโt like the proposed STL
string types, so they just โฆ didnโt. One of the many, many steps on my journey
to porting this code was to create enough of a string class to compile.</p>
<p class="MsoNormal"><span style="mso-fareast-font-family: "Times New Roman";"><o:p> </o:p></span>Other
issues were that vector<> wasnโt compatible either, so I had some lovely
#ifdefโs in the code.</p><h3 style="text-align: left;">What's in a namespace? Nothing. </h3>
<p class="MsoNormal"><span style="mso-fareast-font-family: "Times New Roman";"><o:p> </o:p></span>The
compiler also didnโt handle namespaces; they were read in an ignored. For most
code this was a minor inconvenience, but the people writing this โportableโ C++
code were a different breed. They had many, many classes with the same name and
similar but different functionality. My solution was to create enough of a C++ โparserโ
to re-write the code. Turns out that if you ignore enough of the rules, you can
make a C++ parser with just Lex <span style="font-family: "Segoe UI Emoji", sans-serif;">๐</span></p><h3 style="text-align: left;"><span style="font-family: "Segoe UI Emoji", sans-serif;">Exceptionally fine threading</span></h3>
<p class="MsoNormal"><span style="mso-fareast-font-family: "Times New Roman";"><o:p> </o:p></span>But
the absolute worst part was that the โportableโ C++ code used both multiple
threads (typical for networking code) and exceptions (still a new thing). The
SGI compiler (which was the only compiler โ I did a thorough look to find
anybody else with a compiler) could handle threads, and could handle
exceptions, but created incorrect binaries when dealing with both. And it didnโt
matter if you threw any exceptions; the generated code was wrong regardless.</p>
<p class="MsoNormal"><span style="mso-fareast-font-family: "Times New Roman";"><o:p> </o:p></span>My
simple solution was to note that every single exception was uniformly caught
exactly one level higher, and that none of their code ever returned a value. So
I just made the exception-throwing methods return a value, instead. Simple, quick
to implement and IMHO made the code a little nicer looking. This solution was
rejected.</p>
<p class="MsoNormal"><span style="mso-fareast-font-family: "Times New Roman";"><o:p> </o:p></span>The alternative solution was to use processes instead of threads. A โthread spawnโ became a โprocess
spawnโ. And not just a process spawn: a process spawn all of the processes sharing
their C++ memory so the data structures should be shared (and mutually updated,
meaning using cross-process mutexes).</p>
<p class="MsoNormal"><o:p> </o:p>This was an unglodly heavyweight project. But the pay was
very nice.</p><h3 style="text-align: left;">TL/DR</h3><p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p>Moral of the story: never outrun your compiler?</p><p class="MsoNormal"><o:p></o:p></p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-25938172769951369412023-01-02T17:34:00.004-08:002023-01-02T17:34:56.583-08:00Your Bluetooth is bad, January 2023 edition<h1 style="text-align: left;"> Your Bluetooth protocol is bad, January 2023</h1><p>I've finally gotten over a big hump in my Bluetooth Device Controller program -- I've been poking around with adding and fiddling with devices, and that means that the code has been getting much more "experimental". That's not a good thing for an app that I ship, and which has over 35 thousand downloads! I've been working hard to convert the experimental code into an app that people can use without too much frustration.</p><p>With that, it's on to the next installment of this series on crappy Bluetooth protocols, focused on the Govee line of air sensors. The version 1.10 app supports the Govee 5074; the next version (presumably 1.11) will support the 5075 and 5106. All of them suffer from the same three flaws, and the 5106 has a unique and fun new flaw.</p><p><b>Don't shut off communications too early</b>. All of the Govee devices like to shut down their Bluetooth connections really fast -- after about 4 seconds, they shut down the connection even if you've been talking on it. Other devices will wait until the connection has no traffic before shutting down.</p><p><b>Just transmit your freaking data.</b> If you provide data, just provide it: make a characteristic, and make it readable and notifiable. </p><p><b>Don't fold multiple values into decimal values. </b>This is harder to explain. The Govee Air Sensor, as an example, sends out temperature, humidity, and air quality data in a single advertisement. But instead of just filling in 3 two-byte integer values, they instead take the temperature and multiple by 1_000_000. Then then take the humidity and multiple by 1_000. Then they add the air quality. This is all written as a single 4-byte integer.</p><p>To decode this monstrosity, you have to read in the 4-byte unsigned integer (in big-endian mode, even though Bluetooth is mostly little-endian). Then do a weird combination of MOD and integer divide operations to split out the three numbers.</p><p><b>Use the right Manufacturer code</b>. The Govee devices mostly use a made-up <b>EC88</b> manufacturer code; this is an unassigned value that nobody should be using. But the 5106 Air Quality monitor, for no apparent reason, uses the Nokia Phone code (they are manufacturer #1).</p><h2 style="text-align: left;">FYI: Common Timeout connection parameters</h2><div>Each Bluetooth LE device can provide a set of connection parameters. These are decoded (now) by the Bluetooth Device Controller; they are part of the "Connection Parameters" (<b>2A04</b>) characteristic of the "Common Configuration" service (<b>1800</b>). The timeout is the last two bytes in little-endian format. For example, if the last two bytes are "90 01" in hex, that's 0190(hex) which is 400 (decimal). The value is in 10s of milliseconds, so the 400 (decimal) means 4 seconds for a timeout.</div><div><br /></div><div>Looking at my device library, common settings here are:</div><div><br /></div><div><ul style="text-align: left;"><li><b>100 ms</b> used by the SensorBug</li><li><b>175 ms</b> used by the Sphero</li><li><b>4 sec</b> used by the microbit, the govee, the kano coding wand, the viatom, the vion, and skoobot, smartibot and espruino</li><li><b>5 sec</b> used by the gems activity tracker</li><li><b>6 sec</b> used by the Mipow and the sense peanut</li><li><b>10 sec</b> used by the inkbird, lionel, the pyle, the powerup, the various sensor tags, and the dotti</li></ul></div><p><br /></p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-50002363503749893612022-09-06T22:37:00.006-07:002023-01-30T15:45:37.448-08:00Clipboard data for Excel<p> I recently wrote a new app for Windows, the <strong><a href="https://www.microsoft.com/store/apps/9NNH2DFGZNQB">Simple Wi-Fi Analyzer</a>.</strong> It will scan for nearby Wi-Fi hotspots and present you will lots of information about each one. But that's not what this post is about. This post is about how to put text on the clipboard that Excel can read.</p><p>You might think that CSV is the answer. It's not; Excel will treat it badly. An Excel expert will know to do a Paste Special and then laboriously tell Excel all about the delimiters, but that's terrible solution.</p><p>The <b>right solution is to use HTML.</b> You can put text onto the clipboard as text, but encoded as HTML. In my new app, the HTML on the clipboard looks like this:</p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><p><span style="font-family: courier;"><html></span></p><p><span style="font-family: courier;"><body></span></p><p><span style="font-family: courier;"><table><tr><td>WiFiSsid</td><td>Bssid</td><td>BeaconInterval</td><td>Frequency</td><td>IsWiFiDirect</td><td>NetworkKind</td><td>Rssi</td><td>PhyKind</td><td>SignalBars</td><td>Uptime</td><td>AuthenticationType</td><td>EncryptionType</td></tr></span></p><p><span style="font-family: courier;"><tr><td>APName</td><td>1g:x2:9a:86:02</td><td>0.1024</td><td>5.745</td><td>False</td><td>Infrastructure</td><td>-72</td><td>Vht</td><td>4</td><td>21.13:42:21.4404040</td><td>RsnaPsk</td><td>Ccmp</td></tr></span></p><p><span style="font-family: courier;"></table></span></p><p><span style="font-family: courier;"></body></span></p><p><span style="font-family: courier;"></html></span></p></blockquote><p>And shazam! it pastes perfectly! Except that Excel seems to think that setting the column width is beneath its dignity, but whatever.</p><p><br /></p><p>BTW: the <body> isn't needed. And you'll need to encode the strings with <a href="https://learn.microsoft.com/en-us/dotnet/api/system.net.webutility.htmlencode?view=net-7.0">System.Net.Webutility.HtmlEncode?view=net-7.0</a>. That method will escape all of the HTML characters (like "<") into their HTML-safe version (&LT;)</p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-3236507795948746582022-03-20T12:03:00.000-07:002022-03-20T12:03:11.169-07:00Review: God and Golem, Inc (Norbert Weiner) -- 1964, MIT<p><b>TL/DR</b>: I'm glad to have read the book but can't recommend it. The interesting ideas are now widely accepted (computers can learn, and we can't rely on computers to make decisions).</p><h1 style="text-align: left;">Best Quotes</h1><p>"A goal-seeking mechanism will not necessarily seek <i>our </i>goals" (page 63)</p><p>"This is only one of the many places where human impotence has hitherto shielded us from the full destructive impact of human folly" (page 64)</p><p>"A digital computer can accomplish in a day a body of work that would have the full efforts of a team of [human] computers for a year, ..." (page 71). A modern 2022 computer can do the work of 40,000 people for a year in about a second (a Core I5 can do 34969 million FLOPS).</p><h1 style="text-align: left;">"Written for the intellectually alert public"</h1><div>The book cover flaps are, unusually, one long continuous text that summarizes the text. The final paragraph: "... written for the intellectually alert public, does not require of the reader that [they] have a highly technical background." I suspect that this is the editor code for "all the glamor of a calculus textbook, but without the equations."</div><div><br /></div><div>I originally picked up this book second hand as part of my overall interest in everything in the history of my computing profession. This is the first time I've managed to get all the way through while also grasping what the heck Norbert is trying to say. It helped that I put in lots of annotations and had access to the internet.</div><div><br /></div><h1 style="text-align: left;">Theme: Computers will be like humans</h1><div>If you accept that the Star Trek character "Data" is a "sentient being", then you already agree with Weiner. The entire book is trying to get us people to understand that eventually computers will have all of the parameters of sentient life.</div><div><br /></div><div>The book was written in the early 60's (the publication date of 1964 is misleading; the book is a rewritten amalgam of earlier lectures), which is before "Star Trek" and sentient robots for the general public, but it's written long after Isaac Asimov's Robot series (including the books with Daneel Olivaw).</div><div><br /></div><div>Weiner's basic thesis is that "computers" need to be considered in three ways: can a computer learn, can a computer reproduce, and what functions should be handled by humans and which by computer?</div><div><br /></div><h2 style="text-align: left;">Can computers learn (spoiler: yes)</h2><div>The "can computers learn" is now well understood: yes, they can. Weiner has a highly intelligence-is-everything point of view: in his opinion, as soon as a game is theoretically understood, it ceases to be of any interest at all to anyone. The obvious counter-example -- that people still play tic-tac-toc -- is entirely unconsidered.</div><div><br /></div><div>This section, BTW, is what propelled me to write notes in the book. Weiner will bring up a person's name on one page, mess about for 15 pages, and then bring back that name assuming that you remember it.</div><h2 style="text-align: left;">Can computers make a new computer? (spoiler: eventually, yes)</h2><div>The section on whether computers can duplicate themselves can only be understood by people who understand the complex dead-end mechanism used in WW2 artillery fire control systems. This is something Weiner excelled at, and he has great enthusiasm for it. But a better example is the numerically controlled machine tools that were already available -- a computer can guide the tools needed to build more computers.</div><div><br /></div><div>The section is also somewhat weird. Biologists love to use "can reproduce themselves" as part of the important distinction between living and non-living. But from a legal or religious perspective, it's bunk: people don't have more or fewer rights because of their ability to reproduce.</div><div><br /></div><h2 style="text-align: left;">What's the right place of computers? (helper, not decider)</h2><div>Weiner correctly foreshadows the problems of having computers be the ultimate decider of critical actions, while also missing most of the problems that we're bedeviled with currently.</div><div><br /></div><div>He's got a lot to say about nuclear war (fifty years later, we thankfully have never had another nuclear war, although arguably several wars have been highly influenced by the nuclear capabilities of the sides). He's rightfully skeptical of automated launch systems -- the reality of most alerts is that they are false alarms.</div><div><br /></div><h2 style="text-align: left;">So, he says that computers will be like humans? (answer: no)</h2><div>On the one hand, he's got a lot to say about how computers can theoretically learn, mutate, and reproduce. But he doesn't carry this to the logical conclusion: that computers will eventually be sentient (which he doesn't bring up at all). Instead, he argues that we humans must block any attempt to have computer make decisions that affect us humans. He's firmly in the camp that computers are good helpers for the human intellect but are ill-suited to being in control.</div><div><br /></div><div>And right now, I'd say he's right. We see computers making "unbiased" decisions on health care that turn out to be racist (*), or "unbiased" justice decisions that put one set of people into jail. And we see clearly during these days of the Ukraine war that computerized messaging can be a tool to amplify one position or another.</div><div><br /></div><h2 style="text-align: left;">If it's not physics, it's crap</h2><div>Holy cow, there's an entire chapter devoting to bashing the mathematical formulations of anything that isn't physics. He's got a lot to say about how (for example) mathematical economics can't possibly ever be useful because getting good data is hard. What he misses is that we can deal with the data being wonky. During the pandemic times, we all saw the strange way that death rates would fluctuate, only to be explained that this state or that state was behind in their processing, and would periodically catch up by providing one giant batch of data. Similarly, the reason that some states (like Florida) have a low death rate is that all visitor deaths are reported by the home state.</div><div><br /></div><div>One problem some academics have is that they can see how their own field is impacted by whatever the new thing is, but they can't imagine how this will impact other fields. Famously, after WW2, the British government commissioned an academic to decide if these new "computers" would be useful. The academic could easily see how their own particular field would benefit (x-ray crystallography), but couldn't imagine that computers would be useful in any other field.</div><div><br /></div><h2 style="text-align: left;">Wait -- what's all this religious stuff?</h2><div>Weiner love to talk religion. He's not very good about being particularly coherent. FYI: the sin of simony isn't related to Black Masses.</div><div><br /></div><h2 style="text-align: left;">Where's the golem?</h2><div>The golem is the Golem of Warsaw. It's mentioned in passing on page 49. Considering that it's the overarching theme, you'd think it would be mentioned a bit more. It's also mentioned on page 95, the conclusion, where it's mentioned once in an attempt to explain why the book is called God and Golem, Inc.</div><div><br /></div><h2 style="text-align: left;">What's with the ", Inc"?</h2><div>The title is best parsed as "(God) and (Golem, Inc)". For years I've been assuming it was best read as "(God and Golem), Inc". He's comparing the for-profit creators of computing machinery ("Golem, Inc") with God. </div><div><br /></div><div><br /></div><div><br /></div><div>(*) I can hear the "well, actually" crowd now. "Well, actually, the computers are racists, they merely use racist data to implement racist policies that have disproportionate impact on different races in a way that dehumanizes people and creates additional stumbling blocks, but the computers themselves aren't racist". Well, actually, that attitude is bogus.</div><div><br /></div>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-90604436822365658752021-11-09T12:49:00.003-08:002021-11-09T12:49:48.724-08:00IBM 610 Auto-point: weird 1950's computer<p></p><h1 style="clear: both; text-align: center;">IBM 610 Auto-Point computer (annotated)</h1><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM-_Q_XeJkFVchBgUWf4Y5wU_rSHL_BOPVfCyKYbM6GfBFAcnPGNx67sHwHpEn_30Nvrd54pHhLmNRZQ6g67p3aXUxifIQPJyijHq4qZ7dyhxiakA9qUiHLZLdSUBGCdDTW0327yrAEkM/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="467" data-original-width="995" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM-_Q_XeJkFVchBgUWf4Y5wU_rSHL_BOPVfCyKYbM6GfBFAcnPGNx67sHwHpEn_30Nvrd54pHhLmNRZQ6g67p3aXUxifIQPJyijHq4qZ7dyhxiakA9qUiHLZLdSUBGCdDTW0327yrAEkM/w400-h188/image.png" width="400" /></a></div><br />Have you ever gone into your pantry, closed your eyes, randomly picked out the first dozen ingredients, and challenged yourself to make a dinner from whatever you grabbed? Well, it sure seems like that's how IBM designed the 610 computer.<div><br /><div>The always-awesome <a href="http://bitsavers.org/pdf/ibm/610/" target="_blank">bitsavers site</a> has a couple of manuals for the IBM 610 auto-point (an old name for floating-point) computer, including a snazzy <a href="http://bitsavers.org/pdf/ibm/610/53-7827_610_Brochure_Aug57.pdf" target="_blank">brochure</a> and an operations guide. The breathless prose ("arithmetic and logical problems can be solved on the spot") hints of a world of promise, but a peek under the covers shows that this is, in fact, a bit of a monstrosity.<div><br /></div><h2 style="text-align: left;">The keyboards</h2><div>There are two keyboards, which seems like a lot. The one further on the left is called the "typewriter" and is a repurposed electric typewriter (which IBM also made, so they had them in stock). The typewriter is used to print out the results. As a special feature, you could type on the typewriter, and it would type onto the paper. There's no way to type on the typewriter and get it into the computer.</div><div><br /></div><div>The specialized keyboard on the right is the "console". IBM loved their consoles. It's where you enter in your data, and it's also where you create your programs. The console is not to be confused with the control panel, which is another thing entirely.</div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNB61Dt6aB4dXxre6jygct42zeIZvXJ_hLT9aJJiG5OLfL7b7z7uadxcuNg53DZj85efx6tLvckuh3JwwIIpfwRobhXZtJoqJdI5SBYTaYryjq9Ncinkflxs6q-UidBq5SGZiz_0_k1g4/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="576" data-original-width="1211" height="190" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNB61Dt6aB4dXxre6jygct42zeIZvXJ_hLT9aJJiG5OLfL7b7z7uadxcuNg53DZj85efx6tLvckuh3JwwIIpfwRobhXZtJoqJdI5SBYTaYryjq9Ncinkflxs6q-UidBq5SGZiz_0_k1g4/w400-h190/image.png" width="400" /></a></div><br /><br /></div><div>The console has <b>43</b> keys. There are <b>11</b> number keys (0 to 9 and decimal point), plus <b>7</b> common math operations (+ - * / square-root convert [change sign] and a combined divide/multiply). There are <b>2</b> blank keys, because why not. The rest of the keys are for controlling the machine, and entering in commands.</div><div><br /></div><h2 style="text-align: left;">Programming the machine</h2><div>You might be thinking, "what languages does this machine handle". The answer is: take a look at the keyboard. Whatever you can type there, the machine can do. Each possible machine opcode is a single keystroke. That might be nice if this was, say, a Sinclair ZX80 running BASIC. Instead, these are rather bizarre opcodes. Let's divide them up into groups.</div><div><br /></div><div>I should point out that you can <b>also</b> program the computer via a program punch tape, which just duplicates the keyboard but weirdly, <b>and</b> you can program the computer via the control panel. And they can be mixed together, and the person at the keyboard can always override whatever commands you set up.</div><div><br /></div><div><b>Input (control) selection keys (4)</b>: KB DTR PTR CP. Says which input device the computer should use for control: keyboard, data tape reader, program tape reader, and control panel. </div><div><br /></div><div><b>Output keys</b>: TYP CR TAB DTP RO. The first three turn on the typewriter, either at the current position, after a carriage-return, or after a tab. DTP turns on the data tape punch. RO will write the current register out to the selected output -- so to write a number to the typewriter at the current position, you have to do a TYP RO. But this won't work, because RO doesn't really do the auto-point conversion; first you have to do a SL15. The RO will undo the previous SL15, giving a truly weird side-effect.</div><div><br /></div><div><b>Register edit keys</b>: CLR CLR-RH COPY SL15 SR15 SL SR. The normal kinds of things like CLR to clear a register, CLR-RH to just clear the right-hand half of the register. SL15 and SR15 are just bizarre, but you have to use them to get output.</div><div><br /></div><div><b>Control keys</b>: REL INT RSM ENT</div><div>REL will drop out of the current operation, and reset the selected register. Interrupt will interrupt the current operation, but if you press it and a particular light goes on, you have to press RSM (resume) until the light goes off. ENT will "prepare the machine to enter data into a register"</div><div><br /></div><div><b>Other keys</b>: SEQ A DEL</div><div>The A key is used to select the A register. Otherwise, you'd have to select it by number, which is is register 2. DEL will help fix any data entry mistakes. SEQ is special, and deserves a section all to itself.</div><div><br /></div><h2 style="text-align: left;">Lights, more light, other more lights.</h2><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFAnFdmebNaRAoWo79RjJe2AUT5Mmsoav6x9KgnAl3K9XNqNJq-ij6Nkr3fM9g7lmWyp964W3o_0vapA-NsyLs1DDGK-BBczR0-iT_h_HUW1C2Vw7Y3NpO6M6gLeigPseL6sGEzEoFhXc/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="267" data-original-width="1093" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFAnFdmebNaRAoWo79RjJe2AUT5Mmsoav6x9KgnAl3K9XNqNJq-ij6Nkr3fM9g7lmWyp964W3o_0vapA-NsyLs1DDGK-BBczR0-iT_h_HUW1C2Vw7Y3NpO6M6gLeigPseL6sGEzEoFhXc/w640-h156/image.png" width="640" /></a></div><br />The keyboard includes a set of lights that help you figure out what the computer is doing, and a set of "check" lights. </div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6aTEl7cvhi0-ao72VxFvXthu3dX5yOuRA-Q0AhzQPIJzy3V0BsKBtpxA4WA0usM9cPBHSU5gjpb7JyWhUyYLn5eGALnMHnwA0jZ41pJZYRpPT4vrsm6na3bABcqg-QmuAIjb7KHXU-Po/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="464" data-original-width="567" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6aTEl7cvhi0-ao72VxFvXthu3dX5yOuRA-Q0AhzQPIJzy3V0BsKBtpxA4WA0usM9cPBHSU5gjpb7JyWhUyYLn5eGALnMHnwA0jZ41pJZYRpPT4vrsm6na3bABcqg-QmuAIjb7KHXU-Po/" width="293" /></a></div><br /><br /></div><div>But wait, there's more. The keyboard also includes a tiny, 2-inch (5 cm) cathode-ray tube (like an LCD screen, but uses more electricity). That screen lets you view the contents of the current register as tiny dots. </div><div><br /></div><div>Here's the pattern for "I'm entering the number 22.37".</div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6VD2NN2HuVU1ZirsyhBIDNa9nSaUCuGT9LTpduiqBISXkpYoQs-JrxbgpJAiCvhHwN-p2kCtfSRGDLcYzHVK1Vef66J63yA2KyJPIgw27iahlv1C0uady0O4WDzLRXKcMKn6iZDsuVDw/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="541" data-original-width="810" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6VD2NN2HuVU1ZirsyhBIDNa9nSaUCuGT9LTpduiqBISXkpYoQs-JrxbgpJAiCvhHwN-p2kCtfSRGDLcYzHVK1Vef66J63yA2KyJPIgw27iahlv1C0uady0O4WDzLRXKcMKn6iZDsuVDw/" width="320" /></a></div><br />The actual little numbers 0..9 aren't displayed; you just have to kind of squint and carefully measure where the little dots are. It's not (seemingly) calibrated, and each column can only display one dot. No, you can't display DOOM on this.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghbnWrLj15ivcXds4RaPGDK3B72s834OyVL4_3XU9LZjaDLXUULG0SewQeChg2Es8SbZefXU0CnBWaLjWA7ls-9B125o-JKu6dC4SGRHmJ0cODHQWqsTkqT-eQaZGcCFIhWQCB4rNPi5w/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="901" data-original-width="1027" height="350" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghbnWrLj15ivcXds4RaPGDK3B72s834OyVL4_3XU9LZjaDLXUULG0SewQeChg2Es8SbZefXU0CnBWaLjWA7ls-9B125o-JKu6dC4SGRHmJ0cODHQWqsTkqT-eQaZGcCFIhWQCB4rNPi5w/w400-h350/image.png" width="400" /></a></div><br />The main body of the computer also has lights, this time to tell you what the current program step and current registers are, plus whether the machine is off, on, or really on.</div><h2 style="text-align: left;">SEQ (Sequence)</h2><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpGe-9AhgiC_WoNniBKLVUgwqPrL-rTWw23K_wffyzcBEL6TdZSSLa0nUpe4NBJwhQ3lo7WLTByflOMQiooGpoHMGUUPfYCrahDJWigr0N3SZehui4RUFje1EK22RaWZWeOvi0v5c8hrM/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="496" data-original-width="823" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpGe-9AhgiC_WoNniBKLVUgwqPrL-rTWw23K_wffyzcBEL6TdZSSLa0nUpe4NBJwhQ3lo7WLTByflOMQiooGpoHMGUUPfYCrahDJWigr0N3SZehui4RUFje1EK22RaWZWeOvi0v5c8hrM/" width="320" /></a></div><br /><br /></div><div>Never have I ever read that description and understood it. But I'll try. A "hub" can't be described until "control panel" is described. A control panel is a set of bulk-removable wiring that can customize many kinds of very old IBM machines. Control panels predate computers, which is why they are a so very deeply different. </div><div><br /></div><div>If you have, say, a device that reads in punch cards and then prints the results, you might have a control panels with 80 wires, once from each card column that gets read going to one print position. Often they will be "straight", so that column 10 on a card will print into column 10 on the printer. But you can get fancy: you can print only some of the data, or duplicate some columns. And you can "suppress leading zeros" for some set of data, so that if the card is punched as "00020" you can print just the "20", which is often much easier to read. And it gets so, so, so much more complex.</div><div><br /></div><div>A "hub" can now be described: it emits a pulse, so that you can have sequences of events. Yeah, sorry, not super clear. What can I say: IBM has hundreds of pages about hubs. </div><div><br /></div><div>The "machine functions" that the control panel opens up include things like "loops". That's right, writing a program with loops is impossible with just the keyboard; you have to wire it yourself.<br /><p></p><p> You might also want to program with fancy "<b>if</b>" statements. Those are available when you use the paper tape. The paper tape uses an 8-channel (8-bit) code. The top two bits say what "class" any particular instruction is in -- classes 0, 1, 2 and 3. You can specify which classes of instructions you want to run at any time. Yes, this means you a main body, a "if-else" statement, and a remaining "if" statement, and that's it. But good news: you can interleave the different statements together. </p><p>But wait -- which class gets used? Answer, of course, as with everything about this machine, is that it depends, There's four switches on the manual keyboard, one for each class, and they can be set to "always", "never" and "depends on the programming panel". </p><h2 style="text-align: left;">That auto-point isn't really floating point</h2><p>IBM was really happy with their "auto-point" concept. If you've never used the previous technology -- which would be a "slide rule" -- those devices don't include the magnitude of the number at all. That is, you multiply "1.23" x "6.78" in the exact same way that you multiply "123" x "678" -- you just have to remember where the decimal point is.</p><p>With the "auto-point" concept, you get a bunch of registers, each of which can hold some numbers like "1.23" or "6,780". As you enter each number in, when you get to the decimal place, the number will automatically adjust in the machine so that the integer "left side" of the decimal point uses half of your register, and the fractional remainder goes into the right side of the register. </p><p>On the one hand, this is convenient: you don't have to remember where the decimal point goes in your result of 83394. On the other hand, very large and very small numbers are absolutely impossible, and your precision will vary all over the place.</p><h2 style="text-align: left;">In summary: </h2><div>Every single part of the IBM 610 is harder to understand, and weirder, and pointless duplicated, with extra complications thrown in just to try to keep everything kind of working.</div><p><br /></p><p><br /></p></div></div></div>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-87445025455320170902021-10-13T09:33:00.001-07:002021-10-13T09:33:15.899-07:00Learning Typescript, and why I'm not a fan<p>A work project I'm helping out with uses Typescript, I tried to use it for my extension, and now I just use JavaScript. It's all because TypeScript documentation is bad, the module system is silly, their conversion times are slow, and their target user is 100% not me.</p><p>I'm a little bit of a computer language enthusiast, and have been for years. My first intern project was to make a YACC grammar for a Fortran "wirelist" program for Teradyne (hi, Chuck!); I designed and built a technically-oriented terminal-based hypertext system for electric engineering; I created an incredibly simple search language for a game company (technical requirement: must be functional in less than one day, because otherwise we'd have to use my boss's approach, and he was wrong). </p><p>I was enthused by having a reason to jump into Typescript for this project. I 100% love the concept of typescript: it's like JavaScript, but adds in types, so you make fewer mistakes. Who wouldn't like that? I'm not a fan of being all loosey-goosey with naming, and appreciate the little boost that Typescript add. The generated JavaScript code matches well with the original, making debugging easier.</p><p>And then in all went wrong. After a successful start, within a day I stopped working on the Typescript source and instead just edited the JavaScript file. </p><p><b>The compile speeds take me out of the flow.</b> My file is just a few hundred lines long; in JavaScript I can just reload. With TypeScript, you have an awkward pause. The pause is for no technical reason; my files are small, a reasonable program would be able to read it, parse it, and convert it in under a second. (my own current language project is a language converter; my own goal is <1second for a 1K line file)</p><p><b>The module documentation is much to terse.</b> Specifically, if you already know how modules work, and know what you want, then you can understand the module documentation. Otherwise, it fails to provide basic information about what the settings do, and when to use them.</p><p><b>Modules simply emit errors</b>. The goal of Typescript is that it generates working JavaScript. There are two settings for modules: ones that generate non-working JavaScript (the browser sees an import statement and complains that it doesn't know what requires means), and ones that spit out long lists of compiler errors about not finding some package that I'm not asking for (some configuration language).</p><p>If your customers are <i>highly motived people</i> then you can get away with badly documented features that generate errors. I'm not that highly motivated, and have an alternative.</p><p><b>Why do I even need modules?</b> Typescript requires modules for two reasons: </p><p>The <b>-watch</b> command that's needed to make compile times acceptable only work with the -build switch and that in turn only works with modules. It would have been nice if I would have just typed <b>tsc file.ts --watch</b> and be done with it. </p><p>As soon as you have two files, you have to have modules. Otherwise, nothing works.</p><p><b>The language documentation is a barrier to understanding.</b> The documentation for Typescript hardly presents an easy onboarding experience. There's pretty much nothing that I found that presents a high-level work flow, or explains their design choices. <br /></p><p>Mathematicians are the bane of computer documentation. I firmly believe that there's a mathematicians brain that some people have, such that they read in equations and very short, very succinct descriptions, and from that generate an entire field. It's actually an awesome ability, and it makes them write completely useless documentation for the rest of us. (Note: I have a degree in mathematics).</p><p>Typescript is full of the mathematicians approach: provide a tiny number of words, with no worked-out example, and starting from first principles (which no beginner know) instead of from what starting people need to read.</p><p>I wanted typescript to be a powerful new tool in my toolbox for designing programs. Instead, after multiple fruitless hours of trying to make Typescript work within my work-flow, I simply gave up and embraced JavaScript. <b>And it makes me sad</b>. </p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-12812408861242998442021-05-31T10:48:00.002-07:002021-05-31T10:48:50.588-07:00Filtering out distant Bluetooth signals<p> <b>TL/DR</b>: nearby Bluetooth devices have a <a href="https://docs.microsoft.com/en-us/uwp/api/windows.devices.bluetooth.advertisement.bluetoothleadvertisementreceivedeventargs.rawsignalstrengthindbm?view=winrt-20348" target="_blank">RawSignalStrengthInDbm </a>in the 50s and 60s.</p><p>I love playing with Bluetooth devices and writing little apps to control them (including the very special <a href="https://www.youtube.com/watch?v=hTjm-jCI9dI" target="_blank">Gopher of Things</a>). One of the hassles with developing, though, is that we're in a sea of Bluetooth devices. Any "watcher" code you write will be inundated with events from everyone else's device (notably their Apple devices which helpfully send lots of Bluetooth advertisements)</p><p>So how to filter them out? Step 1 is to look at the RawSignalStrengthInDbm in your Bluetooth watcher's <a href="https://docs.microsoft.com/en-us/uwp/api/windows.devices.bluetooth.advertisement.bluetoothleadvertisementreceivedeventargs?view=winrt-20348" target="_blank">BluetoothLEAdvertisementReceivedEventArgs </a>argument. I did a little experiment: all of the devices I was interested in coding for had a signal strength in the 50's and 60's. Everything in the 80's and higher was noise from the rest of the house.</p><p>Note, though, that the strength is in decibels. A strong signal is -50 and a weak signal is 89. To quickly return when the signal strength is too low, do this:</p><div style="text-align: left;"><span style="font-family: courier;"> const int filterLevel = -75;</span></div><div style="text-align: left;"><span style="font-family: courier;"> if (args.RawSignalStrengthInDBm < filterLevel)</span></div><div style="text-align: left;"><span style="font-family: courier;"> {<br /> return;<br /> }</span></div><p><br /></p><p>In my test, this filters out most of the undesired signals.</p><p><br /></p>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-22252272491919613882021-02-24T12:17:00.007-08:002021-02-25T09:39:06.017-08:00 Everything wrong with the FINGER protocol<h1 style="text-align: left;"> Everything wrong with the FINGER protocol </h1><p>For those of you who have never heard of it, Finger is one of the old "litle"ยน TCP services. As a user of a big multi-user machine, you can edit the ".plan" file in your directory; people can then run a command like <b>finger person@example.com</b> and it will retrieve your .plan file along with other information like where and when you last logged in. It was a super useful way to coordinate with teammates back in the days before cell phones had been created. </p><p> The protocol itself is pretty simple: the <b>finger </b>command sends a single line of data with the user name, and the server replies with a bunch of text and then closes the connection. So what could go wrong? In this minor screed, I list both things that should have been known at the time, and also things that we know about protocols today that werenโt known then. </p><p>TL/DR: the spec is wrong, confusing, incorrectly implemented and potentially dangerous. But other than that, it works pretty well :-) </p><h2 style="text-align: left;">The protocol spec is incorrect (/W). </h2><p> Firstly, the finger spec, <a href="https://tools.ietf.org/html/rfc1288" target="_blank">RFC 1288</a>, is wrong. The "BNF" query notation, section 2.3, with query type #1, attempts to allow an optional /W before the user. The /W is the verbose switch (W stands for "whois") and servers can reply with more information when it's provided. (This is accessed by the finger -l person@example.com switch; -l stands for long). But that's not what the BNF actually says. What the BNF says is that the /W switch is required whenever a username is provided. What should be an optional switch into a mandatory one. </p><p>Good news! Every actual finger client implements what the spec tried to say and not what it failed to say. Which is good, because a number of existing (as of February 2021) Finger servers implement the earlier <a href="https://tools.ietf.org/html/rfc742" target="_blank">RFC 742</a>, which doesnโt allow the /W switch. </p><h2 style="text-align: left;">The protocol BNF is clumsy. </h2><p>The protocol โBNFโ in general is more formalistic than useful. Thereโs an old saying that every level of indirection makes code harder to follow; the corresponding saying for BNF is that simple and common definitions like CRLF should be spelled out each time they are used, not hidden behind a layer of naming indirection. The BNF also loves using short name; {C} is the name of the rule that eventually expands to CRLF, and {U} the rule for user names. </p><p>Additionally, the BNF is split into two rules: one for direct user lookup, and one for an indirect network lookup (these are Q1 and Q2 in the BNF). But this makes the Q1 clumsy, as it has to handle both user lookups with no user, and user lookups with a user. A better split would be three query types: a NULL query (with or without a /W), a user query (also with or without a /W) and a network query. </p><h2 style="text-align: left;">On-behalf-of is not good networking </h2><p>We can totes forgive the original spec from adding in the slightly weird โQ2โ format. This format is used when we're asking server โAโ to ask server โBโ for information. Itโs like the user canโt get the information they want directly; they have to go through a gatekeeper server. The other servers are called Remote User Information Program (RUIP). Back in the 1970s when the RFC was created, the internet was often provided to a single computer at a site; the site then used other protocols and network to connect to other computers at the site (hence the internet used to be described as a โnetwork of networksโ which were expected to use non-Internet protocols). </p><p>But in modern times, the Q2 โon behalf ofโ experience isnโt needed. Indeed, none of the servers I found would handle it. </p><h2 style="text-align: left;">Massive security issues </h2><p> Finger servers often return the time and location of user logins. For example, FINGER might say that a particular user is currently logged in at a particular terminal in a particular room. This is handy when dealing with friendly teammates, but is totes wrong when dealing with stalkers and worse. Lots of people really donโt want other people to know where they are. </p><h2 style="text-align: left;">Giant compat issues with modern servers </h2><p>You might be confused by this one โ what could I possibly mean about modern Finger servers? Have there even been any modern Finger servers at all? Why would anyone build a new Finger server given that the Finger protocol is often blocked by firewalls and provides very few features needed by people. </p><p>It turns out that just looking on GitHub shows a bunch of different Finger servers. These servers are mostly derived from the original RFC 742 Finger protocol. Itโs almost the same as the RFC 1288 Finger, but doesnโt allow for the /W switch. Other servers attempt to handle the /W switch, but donโt do it correctly (finger.farm, for example, failed until recently). </p><p><br /></p><h2 style="text-align: left;">One more thing about the /W switch spec: case-insensitive</h2><p>[Later edit]: the RFC set of specs has long declared that just strings in the BNF descriptions should always be assumed to be case-insensitive: "monday" is the same as "Monday" and "MONDAY" and "MoNDAy". The FINGER spec takes the opposite approach: the /W switch, AFAICT, is actually case-sensitive and should always be upper-case.</p><p>As a fun aside: the RFC editors are, in the instance, wrong. While I understand why they decided that BNF should be case-insensitive (it's part of our text-based heritage), it's also the case that the workaround they use (specify case-sensitive strings as hex characters) is demonstrably error-prone. I've personally filed about a half-dozen different bugs against Internet protocols for getting the HEX representation of strings wrong.</p><p>The best solution is to require each BNF description to say if they are case-sensitive or not.</p><h2 style="text-align: left;">Use these learning for your own protocols! </h2><p>Finger is part of the old tradition of text-based services that are almost designed for direct command-line manipulation. As such, itโs now mostly out of favor (when was the last time you read your email by directly talking to a POP server?). That said, there are still lessons from FINGER for today. </p><p></p><ul style="text-align: left;"><li>Simple, direct protocol descriptions are easier to debug than complex ones. </li><li>Be aware of bad actors. Don't let your APIs enable stalkers and thieves. </li><li>Make sure that the easy path for handling your protocol also allows servers an upgrade path. </li></ul><p></p><p><br /></p><p> </p><p><br /></p><p>Noteยน: Finger is one of the litte TCP services noted in RFC 848 along with echo, discard, systat, netstat, quotd chargen, finger and a couple of time-related services. </p><p><br /></p><p> </p><div><br /></div>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-86402746094386466252020-10-11T23:15:00.014-07:002020-12-10T23:30:57.282-08:00<p> </p><div class="post-header" style="background: rgb(255, 255, 255); border: 0px; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: 10px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 2.4em; font-weight: normal; line-height: 1.1em; margin: 30px 30px 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Why do (American) plugs have holes?</h2></div><div class="entry clear" style="background: rgb(255, 255, 255); border: 0px; color: #444444; font-family: Arial, Helvetica, sans-serif; margin: 0px; outline: 0px; padding: 30px 30px 0px; vertical-align: baseline;"><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">American-style electrical plugs are special in that the prongs โalwaysโ have little holes in them:</p><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">The question thatโs never been answered is <em style="background: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">why</em>. There have been <a href="https://electronics.stackexchange.com/questions/11495/nema-5-15p-blade-holes" style="background: transparent; border: 0px; color: #214469; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">attempts </a>at <a href="https://www.straightdope.com/21341752/why-are-there-holes-in-the-prongs-of-electrical-plugs" style="background: transparent; border: 0px; color: #214469; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">answers </a>(and some have some good research). This post is going to evolve over time: my goal is to find as many images of plugs as possible, organized by date.</p><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">The timeline seems to be: <b>1906</b>: Hubbell made an early form of electric plug+socket <b>1913..1915</b>: there are a bunch of different plugs <b>1916:</b>NELA starts to try to standardize <b>1921</b>:each company still makes their original plug and the new <i>standard</i> plug. <b>1922:</b> standardization is complete.</p><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">More updates -- 1913 Lighting Journal has multiple plug types, and the June 1916 Lighting Journal has two interesting articles: one about the attempt to create a single plug standard. </p><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Another update: Hubbell has a modern looking plug in the January 1916 Electrical Age.</p><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Update: the funny-looking Hubbell Attachment Plug is listed in the <a href="https://archive.org/details/ElectricalSpecialitiesCatalogueAndPriceListNo.9August1906/page/n35/mode/2up" target="_blank">1906 Hubbell catalog</a>! (page 36)</p><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><h2 style="background: transparent; border: 0px; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;"><span style="font-size: x-large;">1906 Hubbell Catalog</span></h2><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">The <a href="https://archive.org/details/ElectricalSpecialitiesCatalogueAndPriceListNo.9August1906/page/n35/mode/2up" target="_blank">1906 Hubbell Catalog, page 34</a>, includes the somewhat oddly shaped Hubbell Attachment Plug. The plug is a user-applied thing: they rewire their device to use the plug, and then screw the socket into a standard Edison-type (or T.H type) screw base.</p><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">It's claimed to have been patented August 16, 1892 and also on November 8, 1904.</p><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">They call the top thing the "cap" or "plug cap" and the unit as a whole a "plug" </p><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaWOhyphenhyphenYdp523XomOBksycWeEo3HHRwqSieO8ckDrJZpvxo4IW7sFfoyhWVo2R5pxKokjGzLhoxf-qKISogtlXT1oPmSpdSMOmIWqnr8KACC74ptGX_F1mCDcwUOq0dW1S5oDGVScb9mmc/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="392" data-original-width="739" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaWOhyphenhyphenYdp523XomOBksycWeEo3HHRwqSieO8ckDrJZpvxo4IW7sFfoyhWVo2R5pxKokjGzLhoxf-qKISogtlXT1oPmSpdSMOmIWqnr8KACC74ptGX_F1mCDcwUOq0dW1S5oDGVScb9mmc/" width="320" /></a></div><br />Note that the image does no include any holes in the blades.<br /><p></p><h1 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; text-align: left; vertical-align: baseline;">1913 Electrical Record, February</h1><div>The Hubbell company may have started the trend, but eventually other companies jumped on the bandwagon. The <b>C-H</b> plug from Cutler-Hammer is one such plug.</div><div><br /></div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-HZlRgjlP-2gEUY2LzMISjlsylemsB-Y-F12w3jAuCCUBoC8fXeXh8AR3tf_A9653dXz26y6WGZr4rHUFX143HROwsfwOaNTAxjvyWt7ZlWItHbDFIkWcwYOXnmA9KhOyNgRt1nt6EMk/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1067" data-original-width="1405" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-HZlRgjlP-2gEUY2LzMISjlsylemsB-Y-F12w3jAuCCUBoC8fXeXh8AR3tf_A9653dXz26y6WGZr4rHUFX143HROwsfwOaNTAxjvyWt7ZlWItHbDFIkWcwYOXnmA9KhOyNgRt1nt6EMk/" width="316" /></a></div><br />This Cutler-Hammer ad shows that a variety of interchangeable sockets for their "double lug" plug. Note that the plug has either dimples or holes.</div><div><br /></div><div>The April issue of the Electrical Record has this competing ad from the Hubbell company:</div><div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbS8gNzOY_AjpJAuQEhXqlFX5aAeGh3apdBA2OvR7hTTHMC-MI87K_C_SLC_jev7XVXxwJyu8FYs93gkaQIe5l1QDYUQaSEM8gWH_YfhjI6eLLLe9ZgTSdkufAS4IjYxBUq-pJMg2fAiI/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="924" data-original-width="704" height="445" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbS8gNzOY_AjpJAuQEhXqlFX5aAeGh3apdBA2OvR7hTTHMC-MI87K_C_SLC_jev7XVXxwJyu8FYs93gkaQIe5l1QDYUQaSEM8gWH_YfhjI6eLLLe9ZgTSdkufAS4IjYxBUq-pJMg2fAiI/w339-h445/image.png" width="339" /></a></div><br /><br /></div><div>There are also companies that try to make plugs that fit into the existing E26 and E27 screw-base sockets (that it, that can just be put into a standard light socket without having to screw and unscrew the cord). This ad is from the Trumbull company.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzW9wVe4OEek_oXQWH9C1anWvnocrrQtF2zX3AbjqWXpXZe6p4SKYIA2RH9q1JHTGc7ELfuq4SPHIsK0P3_lMkl6rvTnFzVNs_Qp9kIGvXSd8BZIz_Rfj88ohH0yfIe3aHiA_6K7h81xQ/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="752" data-original-width="426" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzW9wVe4OEek_oXQWH9C1anWvnocrrQtF2zX3AbjqWXpXZe6p4SKYIA2RH9q1JHTGc7ELfuq4SPHIsK0P3_lMkl6rvTnFzVNs_Qp9kIGvXSd8BZIz_Rfj88ohH0yfIe3aHiA_6K7h81xQ/" width="136" /></a></div><br /><br /></div><div>Or look at this from the Electrical Review and Western Electrician, vol 64--No 3, (Jan--June, 1914) page 153. The Trumble plug is kind of wavy in-and-out and there's a better view of the Cutler-Hammer double-lug plug.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgddBkHtRN0xKFzcgSq8S0R5s9z87ryrX7P9twiEdzY5T31YIpG5re3L8NMdrwcAkr05j_m2zaLKTeqkEcpGZh7dAIjKiAp3zhLapAb9tVkW4bAW9bUSwo-Ul6wZ4R8u0zILp-9oim4w8g/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="458" data-original-width="1133" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgddBkHtRN0xKFzcgSq8S0R5s9z87ryrX7P9twiEdzY5T31YIpG5re3L8NMdrwcAkr05j_m2zaLKTeqkEcpGZh7dAIjKiAp3zhLapAb9tVkW4bAW9bUSwo-Ul6wZ4R8u0zILp-9oim4w8g/w508-h204/image.png" width="508" /></a></div><br /><br /></div><div><br /></div><h3 style="text-align: left;">More Hubble! National Electrical Contractor, November 1914!</h3><div><br /></div><div>It's kind of faint, but the diagram here shows that the parallel-blade (more modern style) plug seems to have either a hole or dimple</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU19Ae4mhz0ExEmlXa3uATPj3iZY06aa7f6658vW0rzb430eKMs_fHjY4XRzBNJ-txaX_IZSzLgjdqha63EVcNsI4kfhQOi43se8yKvNDfW7bSbHj-gxa0QdxImOKTXPc0Z30WGyHOGQ0/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="586" data-original-width="470" height="448" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgU19Ae4mhz0ExEmlXa3uATPj3iZY06aa7f6658vW0rzb430eKMs_fHjY4XRzBNJ-txaX_IZSzLgjdqha63EVcNsI4kfhQOi43se8yKvNDfW7bSbHj-gxa0QdxImOKTXPc0Z30WGyHOGQ0/w358-h448/image.png" width="358" /></a></div><br /><br /></div><div>More Hubbell, this time with a nice blow-up image The parallel-blade plug doesn't seen to have any dimples or holes, although the in-line older style ones do. This image is page 31 of the Electrical Contractor.</div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDA7KD8bzHOR_wWQMtInFmuiGJEGDUcrobcLDb2nqS_3negMuESz7DJCaML20FlweoVF7T8jXfnGyR2G8-0LK_5ZwulfuQUVuCiu1fPl_fmPoQlyxiL0BACrLvITcMH1cWYsdEKRnRY_4/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1107" data-original-width="1206" height="457" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDA7KD8bzHOR_wWQMtInFmuiGJEGDUcrobcLDb2nqS_3negMuESz7DJCaML20FlweoVF7T8jXfnGyR2G8-0LK_5ZwulfuQUVuCiu1fPl_fmPoQlyxiL0BACrLvITcMH1cWYsdEKRnRY_4/w496-h457/image.png" width="496" /></a></div><br /> </div><div><br /></div><h3 style="text-align: left;">Electrical Record, May 1916</h3><div>The end result of all of the work? The "standard" plug (from the Electrical Record, May 1916, page 34). Frustratingly, the plugs are seen head-on. Also frustratingly, apparently the company published a 4-page folder with details on exactly how the plug works.</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj11T8oY32kcdTjS3evFmqdLupJ5CzgVEJMNFOGWSqcP9xaGek5NZhyphenhyphen_A_Fa-rh5lZxxZxcwsxYI_y4tEk3Jj4lXYDkntRD04JF3et4_mwvRMH7AFTPLwIfG6GY5UMX_-TrbpnBV3SZL8Q/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="585" data-original-width="483" height="453" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj11T8oY32kcdTjS3evFmqdLupJ5CzgVEJMNFOGWSqcP9xaGek5NZhyphenhyphen_A_Fa-rh5lZxxZxcwsxYI_y4tEk3Jj4lXYDkntRD04JF3et4_mwvRMH7AFTPLwIfG6GY5UMX_-TrbpnBV3SZL8Q/w374-h453/image.png" width="374" /></a></div><br />Ha! There's a better view here:</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhags8e4YLZMhvs9DLa1uA9dZfBRqwBrcjYLuQhWpSvpgY62ZXy2TOaGZcTnyhUlHkfDo7Wp_Tb09vX5V6RJHVQYmBJsXcvZR3v3fKhbbhtwEwTgQrh1ZKjEXSsobp8iCZ3b20DqC7fspk/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1285" data-original-width="900" height="712" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhags8e4YLZMhvs9DLa1uA9dZfBRqwBrcjYLuQhWpSvpgY62ZXy2TOaGZcTnyhUlHkfDo7Wp_Tb09vX5V6RJHVQYmBJsXcvZR3v3fKhbbhtwEwTgQrh1ZKjEXSsobp8iCZ3b20DqC7fspk/w499-h712/image.png" width="499" /></a></div><br />And look here!</div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSd-q5etP34NvoaQmqCg553ZrdOADx43QIMkpjNWdOr_4UZlY08F5jt8QjNrddPezlcYmQGZ-PYm_DAqwFj9W0UJ2mHBfJDOOc7sSNwiWYWdVbUPq6I-g4FDD_Hj2ZqUqhRWyj7P385D4/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="933" data-original-width="465" height="847" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSd-q5etP34NvoaQmqCg553ZrdOADx43QIMkpjNWdOr_4UZlY08F5jt8QjNrddPezlcYmQGZ-PYm_DAqwFj9W0UJ2mHBfJDOOc7sSNwiWYWdVbUPq6I-g4FDD_Hj2ZqUqhRWyj7P385D4/w423-h847/image.png" width="423" /></a></div><br /><br /></div><h2 style="text-align: left;">Interim Report (1920-ish?)</h2><div>This is from the NELA bulletin, volume 8, 1921, page 87.</div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_e1CIn0KFU_RgrAW2TSSfvYxBWvSJePexNqWbgucYiqBy14jjrNFJdZydL7k3TOHx5dPS9xDVpMl-dZhsJpWGGeB7m1YF35dAOEedhmCtL96id7hB9N0ReM6Q_KJJLZTwvwnPfgGU1ec/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="879" data-original-width="1179" height="334" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_e1CIn0KFU_RgrAW2TSSfvYxBWvSJePexNqWbgucYiqBy14jjrNFJdZydL7k3TOHx5dPS9xDVpMl-dZhsJpWGGeB7m1YF35dAOEedhmCtL96id7hB9N0ReM6Q_KJJLZTwvwnPfgGU1ec/w447-h334/image.png" width="447" /></a></div><br /><br /></div><div><br /></div><h1 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; text-align: left; vertical-align: baseline;">1915 Gernsback Electrical Experimenter</h1><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Thereโs nothing quite like the 1910โs era electrical magazine. Among the puff pieces are popular accounts of up-to-date science, alongside ads for cheap pistols, motorcycles, and electrical surplus equipment.</p><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">World War I had already started by 1915, but America hadnโt yet joined. It surprised me how many German articles are included, including this little piece (page 47 of the June edition) on a novelty cigar lighter:</p><figure class="wp-block-image size-large" style="font-size: 1.3em; margin-bottom: 1em;"><a href="https://shipwrecksoftware.files.wordpress.com/2020/10/image.png" style="background: transparent; border: 0px; color: #214469; font-size: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><img alt="" class="wp-image-264" data-attachment-id="264" data-comments-opened="1" data-image-description="" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="image" data-large-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image.png?w=282" data-medium-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image.png?w=282" data-orig-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image.png" data-orig-size="282,293" data-permalink="https://shipwrecksoftware.wordpress.com/image/" sizes="(max-width: 282px) 100vw, 282px" src="https://shipwrecksoftware.files.wordpress.com/2020/10/image.png?w=282" srcset="https://shipwrecksoftware.files.wordpress.com/2020/10/image.png 282w, https://shipwrecksoftware.files.wordpress.com/2020/10/image.png?w=144 144w" style="background: transparent; border: 0px; margin: 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" /></a></figure><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Unfortunately, the shape of plugs is entirely unremarked. The only plug shown in the entire years set is this bad image of what appears to be a battery charging thatโs โpluggedโ into a ceiling lamp (back cover of the July and other months).</p><figure class="wp-block-image size-large" style="font-size: 1.3em; margin-bottom: 1em;"><a href="https://shipwrecksoftware.files.wordpress.com/2020/10/image-1.png" style="background: transparent; border: 0px; color: #214469; font-size: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><img alt="" class="wp-image-266" data-attachment-id="266" data-comments-opened="1" data-image-description="" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="image-1" data-large-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-1.png?w=270" data-medium-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-1.png?w=235" data-orig-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-1.png" data-orig-size="270,345" data-permalink="https://shipwrecksoftware.wordpress.com/image-1/" sizes="(max-width: 270px) 100vw, 270px" src="https://shipwrecksoftware.files.wordpress.com/2020/10/image-1.png?w=270" srcset="https://shipwrecksoftware.files.wordpress.com/2020/10/image-1.png 270w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-1.png?w=117 117w" style="background: transparent; border: 0px; margin: 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" /></a></figure><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">This is a really common setup: almost all picture of things plugged in are plugged into a screw-type light fixture. Hereโs a phonograph that can be โplugged inโ via a screw-plug: (September 1915, page 186)</p><figure class="wp-block-image size-large" style="font-size: 1.3em; margin-bottom: 1em;"><a href="https://shipwrecksoftware.files.wordpress.com/2020/10/image-4.png" style="background: transparent; border: 0px; color: #214469; font-size: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><img alt="" class="wp-image-272" data-attachment-id="272" data-comments-opened="1" data-image-description="" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="image-4" data-large-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-4.png?w=482" data-medium-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-4.png?w=300" data-orig-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-4.png" data-orig-size="482,411" data-permalink="https://shipwrecksoftware.wordpress.com/image-4/" sizes="(max-width: 482px) 100vw, 482px" src="https://shipwrecksoftware.files.wordpress.com/2020/10/image-4.png?w=482" srcset="https://shipwrecksoftware.files.wordpress.com/2020/10/image-4.png 482w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-4.png?w=150 150w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-4.png?w=300 300w" style="background: transparent; border: 0px; margin: 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" /></a></figure><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Often cartoons show the latest devices the most clearly. This one, from the July 1915 issue, page 117, manages to show an enormous amount of detail without a single plug anywhere (everything is wired directly to a panel which includes some frightening and non-OSHA-compliant switches).</p><figure class="wp-block-image size-large" style="font-size: 1.3em; margin-bottom: 1em;"><a href="https://shipwrecksoftware.files.wordpress.com/2020/10/image-2.png" style="background: transparent; border: 0px; color: #214469; font-size: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><img alt="" class="wp-image-268" data-attachment-id="268" data-comments-opened="1" data-image-description="" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="image-2" data-large-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-2.png?w=595" data-medium-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-2.png?w=300" data-orig-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-2.png" data-orig-size="1072,675" data-permalink="https://shipwrecksoftware.wordpress.com/image-2/" sizes="(max-width: 1024px) 100vw, 1024px" src="https://shipwrecksoftware.files.wordpress.com/2020/10/image-2.png?w=1024" srcset="https://shipwrecksoftware.files.wordpress.com/2020/10/image-2.png?w=1024 1024w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-2.png?w=150 150w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-2.png?w=300 300w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-2.png?w=768 768w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-2.png 1072w" style="background: transparent; border: 0px; margin: 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" /></a></figure><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">(The July 1915 issue of Electrical Experimenter included reviews of scientific movies, including โThe Exploits of Elaineโ which I had only read in book form).</p><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">In the terrifying department: a lamp doesnโt need a plug if itโs violently radioactive! (September 1915, page 181)</p><figure class="wp-block-image size-large" style="font-size: 1.3em; margin-bottom: 1em;"><a href="https://shipwrecksoftware.files.wordpress.com/2020/10/image-3.png" style="background: transparent; border: 0px; color: #214469; font-size: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><img alt="" class="wp-image-270" data-attachment-id="270" data-comments-opened="1" data-image-description="" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="image-3" data-large-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-3.png?w=480" data-medium-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-3.png?w=264" data-orig-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-3.png" data-orig-size="480,546" data-permalink="https://shipwrecksoftware.wordpress.com/image-3/" sizes="(max-width: 480px) 100vw, 480px" src="https://shipwrecksoftware.files.wordpress.com/2020/10/image-3.png?w=480" srcset="https://shipwrecksoftware.files.wordpress.com/2020/10/image-3.png 480w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-3.png?w=132 132w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-3.png?w=264 264w" style="background: transparent; border: 0px; margin: 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" /></a></figure><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">A very unsatisfying picture of plugged-in equipment at a dentists office in the November 1915 Electrical Experimenter, page 332. The nurse on the left is controlling an electrical respirator; that respirator is plugged into a wall socket. Not shown, of course, is what the plug looks like.</p><figure class="wp-block-image size-large" style="font-size: 1.3em; margin-bottom: 1em;"><a href="https://shipwrecksoftware.files.wordpress.com/2020/10/image-5.png" style="background: transparent; border: 0px; color: #214469; font-size: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><img alt="" class="wp-image-274" data-attachment-id="274" data-comments-opened="1" data-image-description="" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="image-5" data-large-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-5.png?w=533" data-medium-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-5.png?w=300" data-orig-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-5.png" data-orig-size="533,498" data-permalink="https://shipwrecksoftware.wordpress.com/image-5/" sizes="(max-width: 533px) 100vw, 533px" src="https://shipwrecksoftware.files.wordpress.com/2020/10/image-5.png?w=533" srcset="https://shipwrecksoftware.files.wordpress.com/2020/10/image-5.png 533w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-5.png?w=150 150w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-5.png?w=300 300w" style="background: transparent; border: 0px; margin: 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" /></a></figure><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">In the same issue: Lionel trains advertises this transformer for their toy trains. Note that it has the old-fashioned screw โplugโ</p><figure class="wp-block-image size-large" style="font-size: 1.3em; margin-bottom: 1em;"><a href="https://shipwrecksoftware.files.wordpress.com/2020/10/image-6.png" style="background: transparent; border: 0px; color: #214469; font-size: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><img alt="" class="wp-image-276" data-attachment-id="276" data-comments-opened="1" data-image-description="" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="image-6" data-large-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-6.png?w=350" data-medium-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-6.png?w=140" data-orig-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-6.png" data-orig-size="350,750" data-permalink="https://shipwrecksoftware.wordpress.com/image-6/" sizes="(max-width: 350px) 100vw, 350px" src="https://shipwrecksoftware.files.wordpress.com/2020/10/image-6.png?w=350" srcset="https://shipwrecksoftware.files.wordpress.com/2020/10/image-6.png 350w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-6.png?w=70 70w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-6.png?w=140 140w" style="background: transparent; border: 0px; margin: 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" /></a></figure><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline;">1916 Electrical Age (January)</h2><div>The Hubbell company comes through! Here's a short article from the <a href="https://archive.org/details/electricalage48newy/page/n53/mode/2up">January 1916 Electrical Age</a> magazine, page 62:</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbKi41GYAzAOrTQsJlqINrfUrB0azZu07lgM7GkFnHp-lVQ3H7D53ZBpT7PHMyEXAvcowTstw8CPfHB0zHj0xd0SGogY5VsJpTi8MzK3xilc7geJeSDfQKrD1RHhixvGJCWPk1ixMTk0U/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1022" data-original-width="1275" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbKi41GYAzAOrTQsJlqINrfUrB0azZu07lgM7GkFnHp-lVQ3H7D53ZBpT7PHMyEXAvcowTstw8CPfHB0zHj0xd0SGogY5VsJpTi8MzK3xilc7geJeSDfQKrD1RHhixvGJCWPk1ixMTk0U/" width="299" /></a></div><br /><br /></div><div>Earlier Hubbell plugs were in-line, not parallel, and had a sort of wavy shape. This plug, in contrast, looks like it would work in one of today's sockets!</div><div><br /></div><div>The text: Very often both alternating and direct current is used in the same building, requiring some distinctive means of differentiating between the two for certain types of apparatus. This is very ingeniously done by means of the polarized attachment plug show in the illustration which is being brought out by an enterprising manufacturer.</div><div><br /></div><div>...one knife blade contact has been made smaller than the other in both width and length (different from modern polarized plugs which are different in width only, and often only at the tip) and the slot in the base reduced proportionately. As the opposite blade is the <i>standard size</i> it cannot be inserted in the small slot...</div><div><br /></div><h2 style="text-align: left;">1916 Electrical Age, February</h2><div><br /></div><div>After the surprising modern Hubbell socket in the January issue, here's a notice in the February issue. Note that the blades are the classic Hubbell wavy in-line blades. Unlike past images, there are holes in the blades!</div><div><br /></div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI2ZU2D4zEZK_C8d63f6yKDzbntqSpWjcyMcKXS-sFHpYib8mMNg0FrdvkPNskQ0QS8nF-D-AiT26YeBXmZFFA_i1cr5UaaumqdvRjfLaclaw62ItrOdDRb3aj2BDC0RW86NIPMbUcnhI/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="1103" data-original-width="1097" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI2ZU2D4zEZK_C8d63f6yKDzbntqSpWjcyMcKXS-sFHpYib8mMNg0FrdvkPNskQ0QS8nF-D-AiT26YeBXmZFFA_i1cr5UaaumqdvRjfLaclaw62ItrOdDRb3aj2BDC0RW86NIPMbUcnhI/" width="239" /></a></div><br /><br /></div><div><div class="separator" style="clear: both; text-align: center;"><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpkonnmDGPfrZZQelXHjNECUZkiaPZUe0yQLtyp9AEEeHKxcx1GqUiFKRTZ3rJibNQgJTmBE5hk-071gDWJjtXFkRdyttgCqwaECVwW3hyyGUTMZcDc6A_h1L_q1uDp7Twsvl60NWR-oA/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpkonnmDGPfrZZQelXHjNECUZkiaPZUe0yQLtyp9AEEeHKxcx1GqUiFKRTZ3rJibNQgJTmBE5hk-071gDWJjtXFkRdyttgCqwaECVwW3hyyGUTMZcDc6A_h1L_q1uDp7Twsvl60NWR-oA/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpkonnmDGPfrZZQelXHjNECUZkiaPZUe0yQLtyp9AEEeHKxcx1GqUiFKRTZ3rJibNQgJTmBE5hk-071gDWJjtXFkRdyttgCqwaECVwW3hyyGUTMZcDc6A_h1L_q1uDp7Twsvl60NWR-oA/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpkonnmDGPfrZZQelXHjNECUZkiaPZUe0yQLtyp9AEEeHKxcx1GqUiFKRTZ3rJibNQgJTmBE5hk-071gDWJjtXFkRdyttgCqwaECVwW3hyyGUTMZcDc6A_h1L_q1uDp7Twsvl60NWR-oA/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpkonnmDGPfrZZQelXHjNECUZkiaPZUe0yQLtyp9AEEeHKxcx1GqUiFKRTZ3rJibNQgJTmBE5hk-071gDWJjtXFkRdyttgCqwaECVwW3hyyGUTMZcDc6A_h1L_q1uDp7Twsvl60NWR-oA/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpkonnmDGPfrZZQelXHjNECUZkiaPZUe0yQLtyp9AEEeHKxcx1GqUiFKRTZ3rJibNQgJTmBE5hk-071gDWJjtXFkRdyttgCqwaECVwW3hyyGUTMZcDc6A_h1L_q1uDp7Twsvl60NWR-oA/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpkonnmDGPfrZZQelXHjNECUZkiaPZUe0yQLtyp9AEEeHKxcx1GqUiFKRTZ3rJibNQgJTmBE5hk-071gDWJjtXFkRdyttgCqwaECVwW3hyyGUTMZcDc6A_h1L_q1uDp7Twsvl60NWR-oA/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a></div><br /><br /></div><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline;">1916 Gernsback Electrical Experimenter</h2><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">This is almost a plug, but itโs not. Itโs a picture of a high-intensity lamp from the February 1916 edition, page 553. What looks like a plug is actually the lamp directly wired to an incredibly dangerous knife switch. As a youngโun, I had always assumed that knife switches were used when dealing with lots of current; I was surprised when I started to read the specs and discovered that knife switches are simultaneously dangerous, expensive, and have low current ratings.</p><figure class="wp-block-image size-large" style="font-size: 1.3em; margin-bottom: 1em;"><a href="https://shipwrecksoftware.files.wordpress.com/2020/10/image-7.png" style="background: transparent; border: 0px; color: #214469; font-size: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><img alt="" class="wp-image-278" data-attachment-id="278" data-comments-opened="1" data-image-description="" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="image-7" data-large-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-7.png?w=286" data-medium-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-7.png?w=130" data-orig-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-7.png" data-orig-size="286,659" data-permalink="https://shipwrecksoftware.wordpress.com/image-7/" sizes="(max-width: 286px) 100vw, 286px" src="https://shipwrecksoftware.files.wordpress.com/2020/10/image-7.png?w=286" srcset="https://shipwrecksoftware.files.wordpress.com/2020/10/image-7.png 286w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-7.png?w=65 65w" style="background: transparent; border: 0px; margin: 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" /></a></figure><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">I think this is also not a plug (March 1916, page 620)</p><figure class="wp-block-image size-large" style="font-size: 1.3em; margin-bottom: 1em;"><a href="https://shipwrecksoftware.files.wordpress.com/2020/10/image-8.png" style="background: transparent; border: 0px; color: #214469; font-size: 13px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><img alt="" class="wp-image-280" data-attachment-id="280" data-comments-opened="1" data-image-description="" data-image-meta="{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0"}" data-image-title="image-8" data-large-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-8.png?w=356" data-medium-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-8.png?w=300" data-orig-file="https://shipwrecksoftware.files.wordpress.com/2020/10/image-8.png" data-orig-size="356,336" data-permalink="https://shipwrecksoftware.wordpress.com/image-8/" sizes="(max-width: 356px) 100vw, 356px" src="https://shipwrecksoftware.files.wordpress.com/2020/10/image-8.png?w=356" srcset="https://shipwrecksoftware.files.wordpress.com/2020/10/image-8.png 356w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-8.png?w=150 150w, https://shipwrecksoftware.files.wordpress.com/2020/10/image-8.png?w=300 300w" style="background: transparent; border: 0px; margin: 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" /></a></figure><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline;">1916 Electrical Age</h2><div>The <a href="https://archive.org/details/electricalage49newy/page/n211/mode/2up">November 1916 Electrical Age</a>, page 59 has this picture! Its a heater control. It's described as having a "indicating switch, a concealed receptacle and in parallel with it an Edison receptacle for a pilot lamp ... By means of a standard cap which fits into the receptacle, current can be supplied for the electric iron, washing machine, and other current consuming devices. The standard caps for use with this outfit have two parallel blades for making connection with phosphor bronze spring contacts located well below the surface of the receptacle."</div><div> </div><div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO_UeG-zZRndrOmPpNXH28sMsIxHgdS1RvjgM1UCvA3OakjJkh6043g8BputMziS1MsG_zd-KsmpCZpBwYeMoSiqfWWniGwuqqRzVuG68WArfFZpz9ZoOKQeHishyEq3Cl_hU7qFnt-FE/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="" data-original-height="649" data-original-width="606" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO_UeG-zZRndrOmPpNXH28sMsIxHgdS1RvjgM1UCvA3OakjJkh6043g8BputMziS1MsG_zd-KsmpCZpBwYeMoSiqfWWniGwuqqRzVuG68WArfFZpz9ZoOKQeHishyEq3Cl_hU7qFnt-FE/w373-h400/image.png" width="373" /></a></div><br /><br /></div><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline;"><br /></h2><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline;"><br /></h2><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline;"><br /></h2><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline;"><br /></h2><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline;"><br /></h2><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline;"><br /></h2><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline;"><br /></h2><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline;"><br /></h2><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline;"><br /></h2><div>Looking <i>very</i> closely at the scan, it looks like the maker is Bryant and it's seemingly a type BA 260</div><div><br /></div><h2 style="background: transparent; border: 0px; font-family: "Junction Regular", junction-1, junction-2, Helvetica, Arial, sans-serif; font-size: 1.3em; font-weight: normal; margin: 0px; outline: 0px; padding: 10px 0px; vertical-align: baseline;">1920 Patent 1341468</h2><figure class="wp-block-image" style="font-size: 1.3em; margin-bottom: 1em;"><img alt="1341468" scale="0" src="https://i.stack.imgur.com/Mr74H.gif" style="background: transparent; border: 0px; font-size: 13px; margin: 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: baseline;" /></figure><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">This 1920 patent shows the little holes in the plug.</p><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><h2 style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;">1922 NELA bulletin page volume 9 Jan page 23 of 626</h2><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Hot darn! The 1922 NELA bulletin has this report from the Wiring Commitee. It seems that by 1922 the plugs were fully standardized:</p></div><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><div class="entry clear" style="background: rgb(255, 255, 255); border: 0px; color: #444444; font-family: Arial, Helvetica, sans-serif; margin: 0px; outline: 0px; padding: 30px 30px 0px; vertical-align: baseline;"><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;">The standardization of attachment plugs and recepticals having been <b>completed </b>the Committee has been working on advertising this fact.</p></div></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><div class="entry clear" style="background: rgb(255, 255, 255); border: 0px; color: #444444; font-family: Arial, Helvetica, sans-serif; margin: 0px; outline: 0px; padding: 30px 30px 0px; vertical-align: baseline;"><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;">The Committee is working on standardizing medium size plugs and recepticals for large heater ranges, small motors, etc.</p></div></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><div class="entry clear" style="background: rgb(255, 255, 255); border: 0px; color: #444444; font-family: Arial, Helvetica, sans-serif; margin: 0px; outline: 0px; padding: 30px 30px 0px; vertical-align: baseline;"><p style="background: transparent; border: 0px; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;">Also on the standardization of the appliance plug, where the cord connects to the flat-iron or other device.</p></div></blockquote><div class="entry clear" style="background: rgb(255, 255, 255); border: 0px; color: #444444; margin: 0px; outline: 0px; padding: 30px 30px 0px; vertical-align: baseline;"><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Entry: <a href="https://catalog.hathitrust.org/Record/012360868">Catalog Record: Bulletin | HathiTrust Digital Library</a></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoJ8i4lRlCDJ9GgVKl4lmBQZNsSBlKS2GK5QrDkubNTpsuTWL6fqdwgqa5RrU2PYqHPzRY8wWdijW6iteoGI1Wn7gdue-W9Hn1aKHy4BtQblhjx9xw-XX1TUvt9ZAUKS9-V0WXQY2k-3s/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1070" data-original-width="1515" height="362" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoJ8i4lRlCDJ9GgVKl4lmBQZNsSBlKS2GK5QrDkubNTpsuTWL6fqdwgqa5RrU2PYqHPzRY8wWdijW6iteoGI1Wn7gdue-W9Hn1aKHy4BtQblhjx9xw-XX1TUvt9ZAUKS9-V0WXQY2k-3s/w513-h362/image.png" width="513" /></a></div><br /><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><h1 style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;">The Non-Standard Plugs</h1><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Lots of companies sold plugs that aren't the standard plugs. Here's a short list of companies and their plugs.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><h2 style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;"><span style="font-size: large;">Arrow standard plugs and sockets</span></h2><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">From the National Electrical Contractor, volume 16, February 1917, page 2. </p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">The Arrow company seems to make three kinds of plugs, all with standard prongs:</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieEAAtzYUBwNkE7WxlyXwZH6beFPWyxaz4OQLdMW9NZpe5uz5NBds6XRrteGLaykCD1vqC19NGPYEQxT99uC2TNL0ERbyTOs9KZo5KunFYADnmXUHexkYUcl4iupKG2KwEQSgRwcd-eK4/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="127" data-original-width="295" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieEAAtzYUBwNkE7WxlyXwZH6beFPWyxaz4OQLdMW9NZpe5uz5NBds6XRrteGLaykCD1vqC19NGPYEQxT99uC2TNL0ERbyTOs9KZo5KunFYADnmXUHexkYUcl4iupKG2KwEQSgRwcd-eK4/w457-h197/image.png" width="457" /></a></div><br /><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">They have a line of sockets as well (13 pictured in the ad); all seem to have openings for both standard and Hubbell-type inline plugs.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">From the Electrical Record, October 1917, page 48, we get this nice cutaway view</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEDNPmHbplnUPAJYyrx99NaXIGtEuAdcqqNJj_NMZ_60CJpOCfUe37SblHLOmSjIEzhWqi7jghRwSHccEVYFKdu-h0MhEf-5NuiKf23zTB4WGc8I6cd-F2WaK840u1zaNe4Y-OWW6tEHY/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="742" data-original-width="804" height="372" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEDNPmHbplnUPAJYyrx99NaXIGtEuAdcqqNJj_NMZ_60CJpOCfUe37SblHLOmSjIEzhWqi7jghRwSHccEVYFKdu-h0MhEf-5NuiKf23zTB4WGc8I6cd-F2WaK840u1zaNe4Y-OWW6tEHY/w403-h372/image.png" width="403" /></a></div><br /><br /><p></p><h2 style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;"><span style="font-size: large;">Bryant</span></h2><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">From Electrical Contractor-Dealer Vol 17, no 9, June 1917.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Bryant had a line of compatible plugs. They have both the horrible half-dome type plug and some more ergonomic plugs.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO8D110_SFh9UnS-ZD4WaDP0kesqOQDgHcgEaJ6qMJkZO0BjQwnb31tTyVlpTuOmOVizYFObT2hUfwA_-PCCRLzc5Q5YWyfMdBLhX-N3znVAZsrWoZZkeV-XZvW9xrHYdfyQHxv-IbbtE/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="609" data-original-width="283" height="821" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO8D110_SFh9UnS-ZD4WaDP0kesqOQDgHcgEaJ6qMJkZO0BjQwnb31tTyVlpTuOmOVizYFObT2hUfwA_-PCCRLzc5Q5YWyfMdBLhX-N3znVAZsrWoZZkeV-XZvW9xrHYdfyQHxv-IbbtE/w383-h821/image.png" width="383" /></a></div><br /><br /></div><br /><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><h2 style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;"><span style="font-size: large;">Campbell Attachment Plugs</span><span style="font-size: 13px;"> </span></h2><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Campbell Attachment plugs and receptacles (Steel City Electric) from Electrical Contractor-Dealer, June, 1918 page 137</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Steel City Electric 1207-129 Columbus Ave, Pittsburgh, PA</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijt_T4amHdt09yl4_DCL6Xe3qyOELzCtwb864tIe4G-73uxF6PJwt7XGGsT3mr2vZW4HC2tBAIaMNSjNX3Yiz1Ln0VUq-8Yw4759yrv6z7WEHj7rgvmbCm3nU3g2xUu7Rr_beoozVy1zo/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1008" data-original-width="1330" height="357" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijt_T4amHdt09yl4_DCL6Xe3qyOELzCtwb864tIe4G-73uxF6PJwt7XGGsT3mr2vZW4HC2tBAIaMNSjNX3Yiz1Ln0VUq-8Yw4759yrv6z7WEHj7rgvmbCm3nU3g2xUu7Rr_beoozVy1zo/w471-h357/image.png" width="471" /></a></div><div class="entry clear" style="background: rgb(255, 255, 255); border: 0px; color: #444444; margin: 0px; outline: 0px; padding: 30px 30px 0px; vertical-align: baseline;"><br /></div>A better view of the square plug from volume 25, Electrical Record, February 1919 page 104. The text says, "At left is shown attachment plug for use in factories, mills and shopw where rugged construction is required. At right attachment plug is show inserted into recptacle.</div><div class="entry clear" style="background: rgb(255, 255, 255); border: 0px; color: #444444; margin: 0px; outline: 0px; padding: 30px 30px 0px; vertical-align: baseline;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjacBJOYhxKbJuLcVvFzeZ7VJX0KhQ8LTpXAUbfcUgyr7JJImW1YC4NrPF7BY8SeUZOITXpytbLBRs3qUejM7TF-oH0P597BqwwwS0AVWE-QR0JdYXNDVVxBGWVPTzTC6kXjJ1Kf3F5iCc/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="481" data-original-width="749" height="278" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjacBJOYhxKbJuLcVvFzeZ7VJX0KhQ8LTpXAUbfcUgyr7JJImW1YC4NrPF7BY8SeUZOITXpytbLBRs3qUejM7TF-oH0P597BqwwwS0AVWE-QR0JdYXNDVVxBGWVPTzTC6kXjJ1Kf3F5iCc/w432-h278/image.png" width="432" /></a></div><br /><br /><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><h2 style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;"><span style="font-size: large;">Chelten Electric</span></h2><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">A pox on all badly-lit and unclear illustrations. This is a socket from the Chelton Electric company, Philadelphia; it's a small ad showing a push-button light switch and this socket. But what kind of socket is it? A standard one, or non-standard?</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">From the National Electric Contractor, volume 16, November 1916, page 20.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz1I-zgy2wkFqzAmwIjFsll8dRYAKyP_nQXbvLuXQ8AqcSIsrZT-oRuCrzqhbfsL6VrHFoje8yHkkGH5gA3gxmC8rWbpJEFab-99rxP_XkfdGX-obFEPk9Kelscp53cAGag6ipstxI1vM/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="205" data-original-width="117" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz1I-zgy2wkFqzAmwIjFsll8dRYAKyP_nQXbvLuXQ8AqcSIsrZT-oRuCrzqhbfsL6VrHFoje8yHkkGH5gA3gxmC8rWbpJEFab-99rxP_XkfdGX-obFEPk9Kelscp53cAGag6ipstxI1vM/" width="137" /></a></div><br /><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><h2 style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;"><span style="font-size: large;">Cutler-Hammer Standard No. 7700</span></h2><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">From the Electrical Record, volume 19, May, 1916.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Several electrical manufacturers have agreed on the making of standard plugs and receptacles, the caps and bodies of the various makes of which can be interchanged. This is proving beneficial and convenient both to those in the electrical industry and to the plug. The C-H No. 7700 is the "Standard" type separable plug made the Cutler-Hammer Mfg. Co, of Milwaukee, Wis. This is an all-composition plug, small in size, but having a rating of 660 watts, 250 volts. The accompanying illustration is approximately fully size. The knurled cap does not wear shiny when use, nor show the results of scratches. On the contrary, the makers claim that the appearance of the knurled cap improves with use. The contact blades are firmly riveted to the cap and held in perfect alignment. No screws whatever are used except for those provided for securing the cord terminals. The live parts are concealed.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCByrQJn3cpuCxlHwF6MPheFSivlGBDYauBlzK99DGmHzCUTWOPDZfPnvKgg0jhsuJeesQ4j9Wyi1hOkT964av2IfOBcBbvtfl0VbZM2e9M4i4eXAY785xdi_4_COdutxJClP0CETWrPc/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="389" data-original-width="243" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCByrQJn3cpuCxlHwF6MPheFSivlGBDYauBlzK99DGmHzCUTWOPDZfPnvKgg0jhsuJeesQ4j9Wyi1hOkT964av2IfOBcBbvtfl0VbZM2e9M4i4eXAY785xdi_4_COdutxJClP0CETWrPc/" width="150" /></a></div><br /><br /><p></p><h2 style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;"><span style="font-size: large;">G-E Standard Separable attaching plugs and sockets</span></h2><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">The February 1917 National Electrical Contractor (volume 16, number 4) has several new-to-the-magazine ads. On page 44 is a big G-E (General Electric Company) ad with a set of 3 (or 4) plugs ana 6 sockets. Each socket seems to allow for standard or Hubbell type plugs (but separate, not in a T form). Each plug has a single hole; the other prong does not have a hole.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikzSvfPiIrwMrGNNZZVIiicFe3A1KLEhiUpFMJ8oCu3kJiPL1-XQeV3UXajzWhFx54QVepRXtYlU3NycOfmccaWKdnzePzj2QXP8oePD4g5Ha8KCktamgNPulLhHwJEdirYjvlOepMQyY/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="128" data-original-width="415" height="160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikzSvfPiIrwMrGNNZZVIiicFe3A1KLEhiUpFMJ8oCu3kJiPL1-XQeV3UXajzWhFx54QVepRXtYlU3NycOfmccaWKdnzePzj2QXP8oePD4g5Ha8KCktamgNPulLhHwJEdirYjvlOepMQyY/w518-h160/image.png" width="518" /></a></div><br /><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB1L31lLzuE_xVvQmFp28q1AisRVjylICxSkL7BmaU2ouT4_XpoC1G8_tSM6WvH87gDQkEWgosjmMFxSHc8riF0IO4O99xqpoT0HBA-s6q1wvcODUT0YYY1nsL_zh1uLOFs1rhE_wkS5M/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="244" data-original-width="571" height="137" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhB1L31lLzuE_xVvQmFp28q1AisRVjylICxSkL7BmaU2ouT4_XpoC1G8_tSM6WvH87gDQkEWgosjmMFxSHc8riF0IO4O99xqpoT0HBA-s6q1wvcODUT0YYY1nsL_zh1uLOFs1rhE_wkS5M/" width="320" /></a></div><br /><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJV2oAvUjkPPjNtksILLy6DnWqbMnCUxUSqCXHx0cbAINdH3l5_s_ibsDuj1Wh7B0pTOkeCRfHjw8ahcxFoo3kD2nld2SvqnanSMowS032f-ckki9dckpJbpslJAp0IH5YBbhFHWaUJdg/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="151" data-original-width="552" height="88" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJV2oAvUjkPPjNtksILLy6DnWqbMnCUxUSqCXHx0cbAINdH3l5_s_ibsDuj1Wh7B0pTOkeCRfHjw8ahcxFoo3kD2nld2SvqnanSMowS032f-ckki9dckpJbpslJAp0IH5YBbhFHWaUJdg/" width="320" /></a></div><br /><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><br /></div><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><h2 style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;"><span style="font-size: large;">Hart and Hegeman</span></h2><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">A 100% non-compatible plug, sold with the idea that most of the prongs are non-metallic and are less likely to short-circuit. They even have a picture of using a plug through a carpet (they claim that for most rugs the weave an be pushed aside enough to fit a plug).</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">From From Electrical Contractor-Dealer, Vol 17 number 12, October June, 1918 page 55</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Details are from the National Electrical Contractor, volume 7 number 1, November 1907, page 2</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja3_arCdBMXYCWc4qSjcVLt04QlS-eZ6D58paNtecVMA7WYRwamwI15RAQNx9JPXkuQUa4sEj6aS_I-CaMvN0nzmf5cn9T4JGWQlqH0ZCmwOmNceonGCYTXmJtc-miXuanEHIhGSYnIqE/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="406" data-original-width="343" height="470" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja3_arCdBMXYCWc4qSjcVLt04QlS-eZ6D58paNtecVMA7WYRwamwI15RAQNx9JPXkuQUa4sEj6aS_I-CaMvN0nzmf5cn9T4JGWQlqH0ZCmwOmNceonGCYTXmJtc-miXuanEHIhGSYnIqE/w398-h470/image.png" width="398" /></a></div><br /><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">The "plug through the rug" picture</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXBdou-wu8az6NONCb8Qbnku0SmONbNnl7gpMx-LP2ziUYLU5yyEFnzRZk5mqs6lsNBR5U4nSX8hJA29JPT-bb4hmXucVGAhDVbl550Qmggm1FXm8VwrTnU63CMUWP4Hf3gOagGCNAEQg/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="238" data-original-width="329" height="359" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXBdou-wu8az6NONCb8Qbnku0SmONbNnl7gpMx-LP2ziUYLU5yyEFnzRZk5mqs6lsNBR5U4nSX8hJA29JPT-bb4hmXucVGAhDVbl550Qmggm1FXm8VwrTnU63CMUWP4Hf3gOagGCNAEQg/w498-h359/image.png" width="498" /></a></div><br /><span style="font-family: Arial, Helvetica, sans-serif;"> </span><p style="font-family: Arial, Helvetica, sans-serif;"></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">They also have an ad in the March 1917 issues, page 119, with a better view of the plug.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">"The simple, dignified lines and rich finish of a "Diamond H" Receptacle appeal to the most fastidious task. Nothing cheap-looking here -- nothing conspicuous -- but a sturdy simplicity that suggests sound reliability and real service. And "Diamond H" appearances are never deceitful. There are cheaper receptacles made. We could cheapen "Diamond H" Receptacles if we wished. But-we are possessed of an ideal, viz., to make every "Diamond H" product a standard of quality, not of price.<br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpFW7nt36R4uu0RqhHFL6B3ubz7tnMBWaVdeYKKrmeUH1V-lSe55uOoCTE_6vxE7Q3d4ozeXbe762ZV_Dwz8xzjYRSNZI22LaTITxofdnIjUDLHLYwANgA73sbPTJFPYUkFd6k8-8v2zM/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="499" data-original-width="334" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpFW7nt36R4uu0RqhHFL6B3ubz7tnMBWaVdeYKKrmeUH1V-lSe55uOoCTE_6vxE7Q3d4ozeXbe762ZV_Dwz8xzjYRSNZI22LaTITxofdnIjUDLHLYwANgA73sbPTJFPYUkFd6k8-8v2zM/" width="161" /></a></div><br /><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Then in the November 1907 issue I saw this full explanation and diagram.3</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSc_5rxOGBnTivTM-pev5aq12q858tC1Jqh1UllhtlF3r8XaL4LSpyHxZNTiEkMr9O5tbdu6lfkL9OnjSzB7ZJ1p4lIWCU7-Pw2fU4_uYlvkulxqC34rY__dJWilx57aqEEl1e42iXpo4/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="245" data-original-width="636" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSc_5rxOGBnTivTM-pev5aq12q858tC1Jqh1UllhtlF3r8XaL4LSpyHxZNTiEkMr9O5tbdu6lfkL9OnjSzB7ZJ1p4lIWCU7-Pw2fU4_uYlvkulxqC34rY__dJWilx57aqEEl1e42iXpo4/w516-h198/image.png" width="516" /></a></div><br /><br /><h2 style="text-align: left;">Hubbell Interchangeable Cap and Plug</h2><div>From the Electrical Record, May, 1916 (volume 19), page 34. This is quite the time for new attachment plugs since it's right after the standardization. Hubbell decided that they would continue to make their only kind of plugs -- so these are "interchangeable" only with their own brand.</div></div><div class="entry clear" style="background: rgb(255, 255, 255); border: 0px; color: #444444; margin: 0px; outline: 0px; padding: 30px 30px 0px; vertical-align: baseline;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD7dTk_MLmsj3KxzlzvSQfku2B-BxvAD9ths3ut5dC5PJgZ5KdTNLKbN6NfIikhGAbi2d2amuNKtKhYxPROYLOlxCFRci9wpqbIl559N-OmVzMD8B1qcKu9wEmm5lfeTGBznElk5ZFMsg/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="365" data-original-width="560" height="209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD7dTk_MLmsj3KxzlzvSQfku2B-BxvAD9ths3ut5dC5PJgZ5KdTNLKbN6NfIikhGAbi2d2amuNKtKhYxPROYLOlxCFRci9wpqbIl559N-OmVzMD8B1qcKu9wEmm5lfeTGBznElk5ZFMsg/" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">This image is from an ad o page 154 of the May, 1916 Electrical Record. The Hubbell company is certainly using the word "standard" all over their ad. The 5406 is the Hubbell Standard Plug and the 6915 is the polarized plug (T-shaped)</div><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnoztBYC9qOK_goY2fDBbOXfVzTccs9vGYW9vKAKTIFAElj_DQZ4uElaLLOtAXlLxcicOsrE0oJktL5wL27rt6uE4gWZPw-dnF_8Icu52vypfOSCX3fKxZBgGBgn5nIxr3g0yYz4APCcU/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="301" data-original-width="394" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnoztBYC9qOK_goY2fDBbOXfVzTccs9vGYW9vKAKTIFAElj_DQZ4uElaLLOtAXlLxcicOsrE0oJktL5wL27rt6uE4gWZPw-dnF_8Icu52vypfOSCX3fKxZBgGBgn5nIxr3g0yYz4APCcU/" width="314" /></a></div><br /><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><h2 style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><span style="font-size: large;">Jiffy Attachment plug</span></h2><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Here's a picture of a plug with absolutely nothing showing of what the actual plug looks like! Made by (or at least sold by) the Best Electric Company, Pittsburgh, PA.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">Their claim is "You can wire TWO "Jiffy's" in the time of ONE ordinary plug. "Jiffy" means efficiency--time-saving, money-saving Efficiency. And it is practically indestructible.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">From National Electrical Contractor, vol 16, December 1916, page 133.</p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><br /></div><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6P0BDaogdvN1DRBXOFsVZ5kfsnFb2cRYf9qAMBsY7sKQu6uLBIXaUHMqw4VCPY3bsz8sRi7SfqrrKTOcUlkM56lwOnDuN-erS_C2ia7VvrW5JU4WYaMTjR8k1iNFlPd7SPhTk8yjFjPI/" style="font-size: medium; margin-left: 1em; margin-right: 1em; text-align: center;"><img alt="" data-original-height="325" data-original-width="225" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6P0BDaogdvN1DRBXOFsVZ5kfsnFb2cRYf9qAMBsY7sKQu6uLBIXaUHMqw4VCPY3bsz8sRi7SfqrrKTOcUlkM56lwOnDuN-erS_C2ia7VvrW5JU4WYaMTjR8k1iNFlPd7SPhTk8yjFjPI/" width="166" /></a></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><span style="font-size: medium;">And they have a line of them walking along :-)</span></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuSDdgF8RbGb2hjxJOyv78jhf0c8yb6atOieXqNb0ll6lCGXSEFgTdOxfhl_qThrKdkyNTo6tNRVBIjH5fsXDb0E9r_o46vV_Z4YfIxIg7C9JE-g92kfGvIbPwJAFZWD8gYqqAzSZmCKE/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="131" data-original-width="680" height="86" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuSDdgF8RbGb2hjxJOyv78jhf0c8yb6atOieXqNb0ll6lCGXSEFgTdOxfhl_qThrKdkyNTo6tNRVBIjH5fsXDb0E9r_o46vV_Z4YfIxIg7C9JE-g92kfGvIbPwJAFZWD8gYqqAzSZmCKE/w446-h86/image.png" width="446" /></a></div><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><h2 style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;"><span style="font-size: large;">Lockfast Attachment plug</span></h2><p style="text-align: left;"><span style="font-size: x-small;">Made by the yost Electric Mfg Co, Toledo, Ohio. Note that they hardly have a thread on the plug, so it can be screwed in more quickly.</span></p><p style="text-align: left;"><span style="font-size: x-small;">From the May 1916 Electrical Record, page 155.</span></p><p style="text-align: left;"><span style="font-size: x-small;"></span></p><div class="separator" style="clear: both; text-align: center;"><span style="font-size: x-small;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWLosrSzlzUc5P2VckoM1N7TaYFnwWfrYuvt2XYj6zVhJqXAF3kcy5K7Zu2Fk07-jBELTB3RaUyfCIqdKeSQpJnZ6-50XbZp6nTA8WBHNtk30hh_jI6cAVjVqmTvvhWqNs88lAbjBKSno/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="420" data-original-width="223" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWLosrSzlzUc5P2VckoM1N7TaYFnwWfrYuvt2XYj6zVhJqXAF3kcy5K7Zu2Fk07-jBELTB3RaUyfCIqdKeSQpJnZ6-50XbZp6nTA8WBHNtk30hh_jI6cAVjVqmTvvhWqNs88lAbjBKSno/" width="127" /></a></span></div><span style="font-size: x-small;"><br /><br /></span><p></p><div><span style="font-size: large;"><br /></span></div><h2 style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;"><span style="font-size: large;">MESCO (Manhattan Electrical Supply) plug</span></h2><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">From National Electrical Contractors, 1918, volume 17, number 7, page 138</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">MESCO is the Manhattan Electrical Supply Company (17 Park Place, NY)</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRK0oXJNWk_FmvAr6gnIvpQWbowllN0sGHHeEoaiwL0VzNMTLW14YKMp3ASujYLbi_Id1LbS-F7MNmwgjOXG2OrXX5gAqySb7MemTSFF2h8RWmdKva_Toi4JbaebkH2qg1ydSfikuBVJ4/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="1021" data-original-width="678" height="505" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRK0oXJNWk_FmvAr6gnIvpQWbowllN0sGHHeEoaiwL0VzNMTLW14YKMp3ASujYLbi_Id1LbS-F7MNmwgjOXG2OrXX5gAqySb7MemTSFF2h8RWmdKva_Toi4JbaebkH2qg1ydSfikuBVJ4/w335-h505/image.png" width="335" /></a></div><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">They have a similar ad in the October 1914 (volume 13, number 12), page 123, but with a small paragraph of text describing the plug.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">A Small Separable plug made of black molded material under great pressure. The smoothly finished surface has the appearance of hard rubber. It is extremely tough, will stand hard usage, and is one of the smallest, neatest and most substantial plugs made.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">The terminal contacts in the base of the plug are arranged so that it is impossible to short circuit the plug. The cap terminal contacts are of heavy brass, and when inserted into the plug form a strong rubbing contact. Ample space is provided in the cap to knot the cord securely.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">From the November? 1913 (volume 13, number 1) National Electrical Contractor, page 98, they also sold this odd-looking plug</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhHjD9qUzJ_7PurVn0dqzfYU4QEWYah_h_ag_xPzztFoR2fwSJKzoMZZ9x3cg4h3CYdRvDyvpxvw99Kl4QDnsnOr3MRbrIdiAIAtZ9DKC2hsQSa63n90qDvc_563AGjubgaqU15UNTgRY/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="229" data-original-width="406" height="239" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhHjD9qUzJ_7PurVn0dqzfYU4QEWYah_h_ag_xPzztFoR2fwSJKzoMZZ9x3cg4h3CYdRvDyvpxvw99Kl4QDnsnOr3MRbrIdiAIAtZ9DKC2hsQSa63n90qDvc_563AGjubgaqU15UNTgRY/w425-h239/image.png" width="425" /></a></div><br /><br /></div><br /><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><h2 style="font-family: Arial, Helvetica, sans-serif; text-align: left;">Tregoning Plugs</h2><p style="font-family: Arial, Helvetica, sans-serif;"></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">From the 1913 National Electrical Contractor, page 94, is a small add for a non-standard plug</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXW6Xv47YK2TuLuAq4Bm1voyyhsBe7lQo2-L8V0Viw9i4YgjM4QcHWaiYsCZ8lvkOHUhp5oN6Z9CjeGtBR8vq9Jlhi2tnB4B6_qP7hRYDaR6D7-J_Y8Rej-usMj0u4MIa_zso0PyzUg4Y/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="376" data-original-width="962" height="125" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXW6Xv47YK2TuLuAq4Bm1voyyhsBe7lQo2-L8V0Viw9i4YgjM4QcHWaiYsCZ8lvkOHUhp5oN6Z9CjeGtBR8vq9Jlhi2tnB4B6_qP7hRYDaR6D7-J_Y8Rej-usMj0u4MIa_zso0PyzUg4Y/" width="320" /></a></div><br /><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /><br /></p><h2 style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;"><span style="font-size: large;">Trumbull Electric Mfg Company</span></h2><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">The Trumbell Electric Mfg. Company, Plainville, Conn.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">In the April 1917 (vol 16) National Electrical Contractor, page 173, is a notice that the Trumbull company had a new line of standard sockets (but maybe not plugs?)</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">The Trumbull Electric Manufacturing Company have recently brought upon the market their Side Outlet Current Tap and "Standard" Flush Receptacle, both of which are pictured herewith. </p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">The base and caps are interchangeable with similar products manufactured by Bryant, General Electric, Paiste, Cutler-Hammer, etc. and are included in the so-called "Standard" devices.</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivVL_StYJuejAqbSxXmnekmOkgND6mjGdQP9pFCi2unV1_7qcN1kWtymXSKzvFzjSuw_zvp22oC7vbZnax5UNP7YLjaOAn_1VNufyC7EPUN93h-9N93KdEmTzoSBzdtmvgrrgBtp86ZYI/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="374" data-original-width="481" height="329" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivVL_StYJuejAqbSxXmnekmOkgND6mjGdQP9pFCi2unV1_7qcN1kWtymXSKzvFzjSuw_zvp22oC7vbZnax5UNP7YLjaOAn_1VNufyC7EPUN93h-9N93KdEmTzoSBzdtmvgrrgBtp86ZYI/w423-h329/image.png" width="423" /></a></div><div class="entry clear" style="background: rgb(255, 255, 255); border: 0px; color: #444444; margin: 0px; outline: 0px; padding: 30px 30px 0px; vertical-align: baseline;"><span style="font-family: inherit; font-size: x-small;"><br /></span></div><span style="font-family: inherit; font-size: x-small;"><br /></span><span style="font-size: small;">From</span><span style="font-family: Arial, Helvetica, sans-serif; font-size: small;"> the 1916 Electrical Record, April 1913, page 22</span></div><div class="entry clear" style="background: rgb(255, 255, 255); border: 0px; color: #444444; margin: 0px; outline: 0px; padding: 30px 30px 0px; vertical-align: baseline;"><span style="font-size: x-small;"><span style="font-family: Arial, Helvetica, sans-serif;">"The annexed cut show a new Standard attachment plug that has just been brought ou by the Trumbell Electric Mfg Co, Plainville, Conn. It is made throughout of fireproof material, and is of the straight plug, prong type. As show in the cut, the cap is well proportioned, and the top of the body is rounded to prevent breakage. The cap will interchange with all plugs on the market made in accordance with the standard recommended by the National Electric Light Association. It takes only two complete turns to seat the plug in the socket.</span></span></div><div class="entry clear" style="background: rgb(255, 255, 255); border: 0px; color: #444444; margin: 0px; outline: 0px; padding: 30px 30px 0px; vertical-align: baseline;"><span style="font-size: x-small;"><span style="font-family: Arial, Helvetica, sans-serif;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkaObSSpy5ODwlwSzO-ncXOcTFyFi0IfSyil_DA_vQyhnZVWJANfUdwSID0-JYI2EjFZYS5BvMx5cUw2Bqbbw2WK_KGKNW-Q4VyPANIz5JkCKIB50oYxcumvqQ2U6h_EO4GPvI4ZGxNws/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="334" data-original-width="202" height="331" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkaObSSpy5ODwlwSzO-ncXOcTFyFi0IfSyil_DA_vQyhnZVWJANfUdwSID0-JYI2EjFZYS5BvMx5cUw2Bqbbw2WK_KGKNW-Q4VyPANIz5JkCKIB50oYxcumvqQ2U6h_EO4GPvI4ZGxNws/w200-h331/image.png" width="200" /></a></div><br /></span></span><p style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; margin: 0px; outline: 0px; padding: 30px 30px 0px; text-align: left; vertical-align: baseline;"><span style="font-size: x-small;"><span style="font-family: Arial, Helvetica, sans-serif;">From an ad in the May 1916 Electrical Record, page 208, we learn that the standard attachment plug is catalog 792 for the complete plug and 793 for the "body" only, and that a seven pound pull will separate the cap from the base. </span></span></p><div class="entry clear" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border: 0px; margin: 0px; outline: 0px; padding: 30px 30px 0px; vertical-align: baseline;"><span style="font-size: x-small;"><span style="font-family: Arial, Helvetica, sans-serif;"></span></span></div><p></p><p style="background: transparent; border: 0px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><span style="font-size: x-small;"><span style="font-family: inherit;">From</span><span style="font-family: Arial, Helvetica, sans-serif;"> the 1914 Electrical Record, November 1913</span></span></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXSCGL6F-hGxY-738SP_oExrvMIhAklQpbgyckW8a6d5pXkE-7A-CnTBZrj8U7FdNQta_RjIPpG4a7Iv0LHvQD19vC9IB8Bo1Pij4fz-y8P2Wy9DBryP6PDUmxpo2dSu-0T4F5S_3bz0I/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="369" data-original-width="974" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXSCGL6F-hGxY-738SP_oExrvMIhAklQpbgyckW8a6d5pXkE-7A-CnTBZrj8U7FdNQta_RjIPpG4a7Iv0LHvQD19vC9IB8Bo1Pij4fz-y8P2Wy9DBryP6PDUmxpo2dSu-0T4F5S_3bz0I/w520-h197/image.png" width="520" /></a></div><br /><br /><p></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p><h2 style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; margin: 0px 0px 10px; outline: 0px; padding: 0px; text-align: left; vertical-align: baseline;"><span style="font-size: large;">Unilet from the Appleton company</span></h2><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">I'm not quite sure what's going on with this socket -- there's a T type socket, but is that a set of crescent-shaped slots, too? And what plug is being shown?</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">The company is the Appleton Electric Company, 218-230 North Jeffereson St, Chicago</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">The first is is from the National Electric Contractor, volume 16, November 1916, page 20 </p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;">The next set are from the January 1917 issue, volume 16 number 3, page 19</p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"></p><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMEJ3RPI_eMUJKPvy-zuJPxmHOosYdaWH5NhzCkMzTJHavQzyCYJhDvWtB0doeWABRIYVl3VHlOM0v5XL7KjPP6AtyLEBDK9Qmi66vmFJmf1nZOaN22VVEBTZyJUHcXM5axcFA6LlIg14/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="257" data-original-width="441" height="287" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMEJ3RPI_eMUJKPvy-zuJPxmHOosYdaWH5NhzCkMzTJHavQzyCYJhDvWtB0doeWABRIYVl3VHlOM0v5XL7KjPP6AtyLEBDK9Qmi66vmFJmf1nZOaN22VVEBTZyJUHcXM5axcFA6LlIg14/w493-h287/image.png" width="493" /></a></div><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><br /></div><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><br /></div><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZHIft9WPo7IKgbeuEzbAq9wzG6MnkMY-V2OUUURjyiDGLnpBijBZuKic8Nw66VXMYtEdRndtDjJhLRP-tPkuEQrTsX4cr0Q1BmdT2_sF5gL-hh8XCu3w9k_ROOENhM2b1KXdw_FNaVd0/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="166" data-original-width="292" height="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZHIft9WPo7IKgbeuEzbAq9wzG6MnkMY-V2OUUURjyiDGLnpBijBZuKic8Nw66VXMYtEdRndtDjJhLRP-tPkuEQrTsX4cr0Q1BmdT2_sF5gL-hh8XCu3w9k_ROOENhM2b1KXdw_FNaVd0/w343-h195/image.png" width="343" /></a></div><br /><br /></div><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><br /></div><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWmtPHc_BA9FqXGwvdf8yi32Ic7yWclCzyj-CMV5RtjmzcjrzG4-003hgsJrDjXbOLvPYTAfXZ-zQo-zlykbzxj6KHAQij16cPRJTivtk8qU8-fVagjp0O61Zxzahlw2Rs5yRTYQrhNAM/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="194" data-original-width="237" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWmtPHc_BA9FqXGwvdf8yi32Ic7yWclCzyj-CMV5RtjmzcjrzG4-003hgsJrDjXbOLvPYTAfXZ-zQo-zlykbzxj6KHAQij16cPRJTivtk8qU8-fVagjp0O61Zxzahlw2Rs5yRTYQrhNAM/w366-h300/image.png" width="366" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo2QdvZRntE3O08vVpzpPEP1HLMmF2vHyZGs81eFgqGQuwWw0KP9HTZQXgMaxFJiJXk3m-uS7YUdZZykJ1TyLxVQCLMdH5-yITM0HuWhWLMZgm7jxxeMqKKcOIeUAZ9eS-HN68fFPOY6g/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="251" data-original-width="272" height="255" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjo2QdvZRntE3O08vVpzpPEP1HLMmF2vHyZGs81eFgqGQuwWw0KP9HTZQXgMaxFJiJXk3m-uS7YUdZZykJ1TyLxVQCLMdH5-yITM0HuWhWLMZgm7jxxeMqKKcOIeUAZ9eS-HN68fFPOY6g/w277-h255/image.png" width="277" /></a></div><br /><br /></div><br /><br /></div><div class="separator" style="clear: both; font-family: Arial, Helvetica, sans-serif; text-align: left;">It looks like the 2d item is Hubbell and that crescent thing, the third is just the Hubbell style, and the last is the standard size. Perhaps this is the month they added the more standard styles into their ad?</div><br /><br /><p style="font-family: Arial, Helvetica, sans-serif;"></p><p style="background: transparent; border: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px 0px 10px; outline: 0px; padding: 0px; vertical-align: baseline;"><br /></p></div>Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0tag:blogger.com,1999:blog-5658875299583317256.post-81009066520168718472020-05-24T12:36:00.001-07:002020-05-24T12:36:39.736-07:00Your bluetooth is bad (continued)<h2>
More example of how to make bad Bluetooth devices</h2>
<h3>
What format is my number?</h3>
Bluetooth developers continue to create a bewildering variety of undocumented data formats. Indeed, it's a race between them and the bizarrely incompetent "Distributed Ledger" teams for the worse numerical formats.<br />
<br />
<ul>
<li><a href="https://nordicsemiconductor.github.io/Nordic-Thingy52-FW/documentation/firmware_architecture.html#arch_env" target="_blank">Nordic Thingy</a> -- you can't just describe a value as a "uint_16"! Specifically, you can't do it because I don't know if you mean a big-endian or little-endian value (as it turns out, the Nordic Thingy is little-endian)</li>
<li>Also <a href="https://nordicsemiconductor.github.io/Nordic-Thingy52-FW/documentation/firmware_architecture.html#arch_env" target="_blank">Nordic Thingy</a> -- describing a temperature as a signed value and an unsigned fraction only works if you tell me the denominator of the fraction. Some devices might reasonably make the "fraction" part be out-of-10 to get a degrees in a tenth of a degree (which is just fine for a weather station), or it might be out-of-100 or even out-of-256. </li>
</ul>
<b></b><span style="font-size: large;"></span><b></b><span style="font-size: large;"></span><br />
<div>
<br /></div>
Sunrise Programmerhttp://www.blogger.com/profile/13913977215970825042noreply@blogger.com0