Finding USB Bugs The Hard Way

Sometimes debugging just doesn’t go the way you want it to. When USB problems arise, you can usually use a protocol analyzer to find the issue causing trouble. For [Paul Stoffregen], it was only the first step in a long process to find the culprit.

Procotol Analyzer

The complaint that came up was from a customer whose 2 port USB hub wasn’t working on their Teensy 3.6. The hub had been tested on Linux, Mac, and Windows, so it made sense to test what was different about the Teensy. Furthermore, all other USB hubs worked on the Teensy. As it turns out, these weren’t the most helpful assumptions to make when finding the bug.

Any protocol analyzer can be used, for instance the Beagle480. The way it works is by passing through USB communication, making a copy of the communication coming in and out, and sending it to the PC.

 

Normally, the analyzer has a small buffer memory and must sustain fast data flow. Unfortunately, this can occasionally cause software lockup. From what could be gathered from the verbose printing, USB descriptors were found for the hub. As it turns out, the faulty hub was a Multi-TT type hub, while most others are single TT (transaction translator).

Fixing Software Lockup

Since it was necessary to get the rest of the descriptor data, fixing the software lockup was the next step. Writing in a panic function – a breakpoint of sorts – into the code allowed the USB host’s power to terminate, and stepping through the program revealed that while the 2 port hub was initially being read, some issue arose afterwards.

As it turns out, the issue relied on USB split transactions, used only between USB hosts and hubs. Communication happens by tokens, which begins with a SPLIT-START token.

 

As it turns out, the issue was that the tokens weren’t being sent in the correct order. The other hubs seemed to be handle this nevertheless. By applying a fix to the C++ code of the bad hub, which had previously not been implementing the data structure for accessing register properly, the hub was able to work again.The hub appeared to be rejecting bad token, which was causing the issue in the first place.

All in all, while I’m sure this had to be a head scratching experience, at least it gives us some insight into the low-level design of USB communication.

Turn Your Old-school CRT Into A YouTube Media Player

Ever wish you could enjoy modern conveniences like YouTube in a retro world of CRTs and late 20th century graphics?

[Johannes Spreitzer] happened to find an old VIENNASTAR CRT (cathode-ray tube television) made by the Austrian brand Kapsh at a flea market. The CRT dates back to 1977 and uses just RF input, making it useless as a modern television set since most TV stations nowadays broadcast primarily in digital.

However, HDMI-to-RF transmitters do exist, making it possible to convert HDMI signals to RF or coaxial cable output to replace an antenna signal. What [Spreitzer] did next was to plug in a Chromcast and essentially convert the CRT into an old-school monitor. You can see some of the trippy graphics in the video below – the video samples shown fit the retro aesthetic, but I’m sure there’s video combinations that would seem pretty out of place.

HDMI-to-RF adapters are pretty easy to pick up at a hardware store, and they allow you to project videos onto specific channels on a CRT. Needless to say, they don’t work the other way around, although since there are still televisions that only pick up RF broadcasts, coaxial to HDMI adapters do exist.

Continue reading “Turn Your Old-school CRT Into A YouTube Media Player”

Hackaday Links: October 20, 2019

It’s Nobel season again, with announcements of the prizes in literature, economics, medicine, physics, and chemistry going to worthies the world over. The wording of the Nobel citations are usually a vast oversimplification of decades of research and end up being a scientific word salad. But this year’s chemistry Nobel citation couldn’t be simpler: “For the development of lithium-ion batteries”. John Goodenough, Stanley Whittingham, and Akira Yoshino share the prize for separate work stretching back to the oil embargo of the early 1970s, when Goodenough invented the first lithium cathode. Wittingham made the major discovery in 1980 that adding cobalt improved the lithium cathode immensely, and Yoshino turned both discoveries into the world’s first practical lithium-ion battery in 1985. Normally, Nobel-worthy achievements are somewhat esoteric and cover a broad area of discovery that few ordinary people can relate to, but this is one that most of us literally carry around every day.

What’s going on with Lulzbot? Nothing good, if the reports of mass layoffs and employee lawsuits are to be believed. Aleph Objects, the Colorado company that manufactures the Lulzbot 3D printer, announced that they would be closing down the business and selling off the remaining inventory of products by the end of October. There was a reported mass layoff on October 11, with 90 of its 113 employees getting a pink slip. One of the employees filed a class-action suit in federal court, alleging that Aleph failed to give 60 days notice of terminations, which a company with more than 100 employees is required to do under federal law. As for the reason for the closure, nobody in the company’s leadership is commenting aside from the usual “streamlining operations” talk. Could it be that the flood of cheap 3D printers from China has commoditized the market, making it too hard for any manufacturer to stand out on features? If so, we may see other printer makers go under too.

For all the reported hardships of life aboard the International Space Station – the problems with zero-gravity personal hygiene, the lack of privacy, and an aroma that ranges from machine-shop to sweaty gym sock – the reward must be those few moments when an astronaut gets to go into the cupola at night and watch the Earth slide by. They all snap pictures, of course, but surprisingly few of them are cataloged or cross-referenced to the position of the ISS. So there’s a huge backlog of beautiful but unknown cities around the planet that. Lost at Night aims to change that by enlisting the pattern-matching abilities of volunteers to compare problem images with known images of the night lights of cities around the world. If nothing else, it’s a good way to get a glimpse at what the astronauts get to see.

Which Pi is the best Pi when it comes to machine learning? That depends on a lot of things, and Evan at Edje Electronics has done some good work comparing the Pi 3 and Pi 4 in a machine vision application. The SSD-MobileNet model was compiled to run on TensorFlow, TF Lite, or the Coral USB accelerator, using both a Pi 3 and a Pi 4. Evan drove around with each rig as a dashcam, capturing typical street scenes and measuring the frame rate from each setup. It’s perhaps no surprise that the Pi 4 and Coral setup won the day, but the degree to which it won was unexpected. It blew everything else away with 34.4 fps; the other five setups ranged from 1.37 to 12.9 fps. Interesting results, and good to keep in mind for your next machine vision project.

Have you accounted for shrinkage? No, not that shrinkage – shrinkage in your 3D-printed parts. James Clough ran into shrinkage issues with a part that needed to match up to a PCB he made. It didn’t, and he shared a thorough analysis of the problem and its solution. While we haven’t run into this problem yet, we can see how it happened – pretty much everything, including PLA, shrinks as it cools. He simply scaled up the model slightly before printing, which is a good tip to keep in mind.

And finally, if you’ve ever tried to break a bundle of spaghetti in half before dropping it in boiling water, you likely know the heartbreak of multiple breakage – many of the strands will fracture into three or more pieces, with the shorter bits shooting away like so much kitchen shrapnel. Because the world apparently has no big problems left to solve, a group of scientists has now figured out how to break spaghetti into only two pieces. Oh sure, they mask it in paper with the lofty title “Controlling fracture cascades through twisting and quenching”, but what it boils down to is applying an axial twist to the spaghetti before bending. That reduces the amount of bending needed to break the pasta, which reduces the shock that propagates along the strand and causes multiple breaks. They even built a machine to do just that, but since it only breaks a strand at a time, clearly there’s room for improvement. So get hacking!

Navigating The Dark Side: Controlling Robots With Zero Radio Communication

While autonomous robots have been the subject of some projects in the past, this particular project takes a swing at building a robot that can teach children about controls and robotics.

The idea is to mimic a space mission on the dark side of the moon, where radio contact is nearly impossible. The students learn to program and debug embedded devices and sensors, even before some of them have learned the alphabet!

The material for the challenge allows the microcontroller to be programmed in a simple Arduino program (Blink) as well as lower level languages like C++ or Java. The main hardware consists of an Arduino Uno R3-based rover controlled over WiFi by an ESP8266. The sensor data from the robot is gathered from an ultrasound distance sensor an a camera, as well as a SIM7000E GSM+GPS. Commands are polled from a server, sent via a web page and REST interface.

The rover responds to commands for directions, takes pictures, and scans its distance remotely. Some custom libraries are written for the serial communication and camera to account for spotty communication. The latest challenge expansion is a probe that pays attention to battery life and power consumption, challenging students to account for power usage during the robot’s lifetime.

Since the project’s conception, the rovers have already been used in schools, and we’re excited to see a new approach for younger students to learn controls and programming.

Pneumatic Zombie Will Blow Away Trick-or-Treaters

What are you doing for Halloween this year? Just gonna set the candy bowl out on the porch and call it good? That’s a risky one, ’cause if one group of mischievous preteens cleans you out, you might get TP’d by the next one. Best to keep Halloween a tad on the scary side and keep those ghouls in line. Candy is a privilege, not a right.

Halloween is a big deal in [trimbandit]’s little burg, and he builds a new attraction for the front yard every year. This year, it’s the dawn of the dead — a fresh zombie rising jerkily from the grave to say hello, world. He moves left, he moves right, he writhes and wrestles, wedged between worlds.

His life force comes from a pneumatic system designed for props. The cylinders connect to a controller with built-in relays that makes programming frightfully easy. Then it was just a matter of adding a foam head, skinning it with a scary mask, and fitting him for a suit from Goodwill. Drag yourself and your candy bucket past the break for a fun-size demo video and a couple of bonus goodies.

We bet [trimbandit] is already wondering how to step up his game for next year. He seems to have conquered the ground, so why not take to the skies for fright and delight?

Continue reading “Pneumatic Zombie Will Blow Away Trick-or-Treaters”

Maker Spirit Alive And Well At The Philly Maker Faire

For many of us, it’s difficult to imagine a world without Maker Faire. The flagship events in California and New York have served as a celebration of the creative spirit for a decade, giving hackers and makers a rare chance to show off their creations to a live audience numbering into the hundreds of thousands. It’s hard to overstate the energy and excitement of these events; for anyone who had the opportunity to attend one in person, it’s an experience not soon forgotten.

Unfortunately, a future without Maker Faire seemed a very real possibility just a few months ago. In May we first heard the events were struggling financially, and by June, we were saddened to learn that organizer Maker Media would officially be halting operations. It wasn’t immediately clear what would happen to the flagship Maker Faires, and when Maker Media reluctantly admitted that production of the New York Faire was officially “paused”, it seemed we finally had our answer.

But as the recent Philadelphia Maker Faire proved, the maker movement won’t give up without a fight. While technically an independent “Mini” Faire, it exemplifies everything that made the flagship events so special and attracted an impressive number of visitors. With the New York event left in limbo, the Philadelphia Faire is now arguably the largest event of its type on the East Coast, and has the potential for explosive growth over the next few years. There’s now a viable option for makers of the Northeast who might have thought their days of exhibiting at a proper Maker Faire were over.

We’ll be bringing you detailed coverage of some of the incredible projects that were on display at the Philadelphia Maker Faire over the coming days, but in the meantime, let’s take a quick look at some of the highlights from this very promising event.

Continue reading “Maker Spirit Alive And Well At The Philly Maker Faire”

Making A Robot Cleaner Even Smarter

Some electric cleaners are effective and some hardly even seem to make a difference. The ILIFE V7s may be a robot cleaner, but even with its cleaning modes and anti-collision system, it still requires IR signals to complete any tasks. Tired of having to be physically in the same place as his robot cleaner, [pimuzzo] decided to take matters into his own hands and build a RESTful remote control to send IR signals from afar.

The program uses the ESP8266WebServer and IRremoteESP8266 libraries for handling HTTP requests and sending and receiving infrared signals. The remote also respond to Actions on Google for controlling the robot over a Google Assistant.

The IR signals are a bit funky – as one user highlighted, finding the IR protocol is a nontrivial task that can be accomplished by recording the IR signals from the original remote with a IR receiver and matching the marks, spaces, and carrier frequency with those of known protocol codes. [Oitzu] was able to match the timing to the NEC 32 bit protocol and find the exact codes on an oscilloscope, which simplified the translation of the codes for the remote.

Sometimes when life gives you a robot cleaner, it’s your job to make it smarter.