Linux-Fu: Running Commands

One of the things that makes Linux and Unix-like systems both powerful and frustrating is that there are many ways to accomplish any particular goal. Take something simple like running a bunch of commands in sequence as an example. The obvious way is to write a shell script which offers a tremendous amount of flexibility. But what if you just want some set of commands to run? It sounds simple, but there are a lot of ways to issue a sequence of commands ranging from just typing them in, to scheduling them, to monitoring them the way a mainframe computer might monitor batch jobs.

Let’s jump in and take a look at a few ways you can execute sequences from bash (and many other Linux shells). This is cover the cron and at commands along with a batch processing system called task spooler. Like most things in Linux, this isn’t even close to a complete list, but it should give you some ideas on ways to control sequences of execution.

Continue reading “Linux-Fu: Running Commands”

DEF CON Badgelife: The Puffy That Runs Linux

DEF CON is canceled again this year, and this time that statement is at least partially true. There will be no special official badges this year. There is no challenge or mystery embedded in the official DC badge. This is the year that unofficial badges from villages and random attendees finally supersedes the official offering. This is badgelife, and for the next few weeks, we’re going to be taking a look at some of the unofficial badges of DEF CON.

The idea for [dorkengine]’s Puffy badge began last year with the so-called Bender badges from AND!XOR.  Chalk this up to a story that ends with, ‘but you had to have been there’, but the Bender badges were wildly popular, sold like hotcakes, and were an astonishing success of independent badge craft at DC. [dorkengine] decided to get in on the action and build his own badge for DC 25.

The design of the Puffy badges is based on a highly stylized rendering of the OpenBSD logo and mascot. Why a pufferfish with Kardashian lips? [dorkengine] has a bunch of boxes in a closet running OpenBSD, and that’s a good enough reason for us.

An electronic badge must do something, and the feature list [dorkengine] came up with included some sort of wireless connectivity, hackability, a serial console, blinkenlights, and some sort of *nix-ish OS. OpenBSD didn’t make the cut, but [dorkengine] eventually stumbled upon the VoCore2, a tiny System on Module that runs Linux, has WiFi and a few GPIOs, and is barely an inch on a side.

After getting a good deal on a large order of VoCores, [dorkengine] started on the PCB. The circuit was simple enough with just a VoCore attached to a USB port, power adapter, and a few LEDs. The Puffy rendering translated beautifully into soldermask and silkscreen, and after a prototype from ITEAD Studio, [dorkengine] had 40 PCBs that worked perfectly.

So, what is [dorkengine] going to do with a box full of Puffy badges? He’ll be selling them for $40 around the con. That’s surprisingly inexpensive for a large PCB soldered to a $17 SoC. If you want to get your grubby mitts on one, you could email him or ping him on Twitter. Of course, if you want to make your own, [dorkengine] has the KiCad files and software available, but at this point, you’re looking at a very fast turnaround for a board house.

Tetris On A Soldering Iron

Our commenteers have all said good things about the open-source TS100 soldering iron pencil: things like “it solders well”. But we’ve all got soldering irons that solder well. What possible extra value does having open-source firmware on a soldering iron bring? [Joric] answered that question for us — it can play Tetris. (Video embedded below.)

While that’s cool and all, it wasn’t until we were reading through the README over at GitHub that the funniest part of this hack hit us. Every time you lose a game, the iron tip temperature increases by 10 degrees. Tetris for masochists? The makings of some horrible bar bets? We’re just glad that it’s open-source, because we’re not that good and it would get too hot to handle fast.

We haven’t tried out a TS100 yet, but this hack is almost pushing us to impulse purchase. There are alternative versions of the firmware if you just don’t like the font, for instance. And now, Tetris. Will this become the hot new gaming platform that you’ve been waiting for? Let us know in the comments.

Continue reading “Tetris On A Soldering Iron”

GPS Tracker Gets SMS Upgrade

In May of 2000, then-President Bill Clinton signed a directive that would improve the accuracy of GPS for anyone. Before this switch was flipped, this ability was only available to the military. What followed was an onslaught of GPS devices most noticeable in everyday navigation systems. The large amount of new devices on the market also drove the price down to the point where almost anyone can build their own GPS tracking device from scratch.

The GPS tracker that [Vadim] created makes use not just of GPS, but of the GSM network as well. He uses a Neoway M590 GSM module for access to the cellular network and a NEO-6 GPS module. The cell network is used to send SMS messages that detail the location of the unit itself. Everything is controlled with an ATmega328P, and a lithium-ion battery and some capacitors round out the fully integrated build.

[Vadim] goes into great detail about how all of the modules operate, and has step-by-step instructions on their use that go beyond what one would typically find in a mundane datasheet. The pairing of the GSM and GPS modules seems to go match up well together, much like we have seen GPS and APRS pair for a similar purpose: tracking weather balloons.

Blinking A Light With Ping

The Flashing Light Prize is on right now, and that means all our favorite geeks and YouTubers are aspiring to what could be done with a 555. The rules are simple: turn a light bulb on and off somehow. [Sprite_tm] is answering the call, and he’s blinking lightbulbs at the speed of light.

[Sprite]’s method of blinking a light is simple: Use an ESP32 development board to turn on a relay. At the same time, send a packet out to the Internet and through four servers spread across the globe. When the packet goes through servers in Shanghai, the Netherlands, to Hong Kong, to Germany, and finally Japan — and back again — the light bulb turns off. It’s a physical demonstration of the speed of light and the quality of undersea optical fibers.

This route is quite long, and a reasonable estimate for the one-way, great circle path from Shanghai to the Netherlands to Hong Kong to Berlin and finally to somewhere near Osaka is about 36,000 km. A round trip for this light bulb packet is 72,000 km, or about 0.2 light-seconds. There are delays, of course, from fiber and cables not going directly over the Himalayas, delays in routers, and the difference between the speed of light in a vacuum and the speed of light in glass fiber. Still, light is quick, and the light blinks at about 1Hz.

You can check out [Sprite]’s entry video for the Flashing Light Prize below.

Continue reading “Blinking A Light With Ping”

Wearable Breadboard

We all know what a short circuit is, but [Clement Zheng] and [Manasvi Lalwani] want to introduce you to the shirt circuit. Their goal is to help children, teachers and parents explore and learn electronics. The vehicle is a shirt with a breadboard-like pattern of conductors attaching snaps. Circuit elements reside in stiff felt boxes with matching snaps. You can see it all in action in the video below.

We imagine you could cut the felt pieces out by hand with the included patterns. However, they used a laser cutter to produce the “breadboard” and the component containers. Conductive thread is a must, of course, as are some other craft supplies like glue and regular thread.

Continue reading “Wearable Breadboard”

ESP To Wireshark

Everyone’s favorite packet sniffing tool, Wireshark, has been around for almost two decades now. It’s one of the most popular network analysis tools available, partially due to it being free and open source. Its popularity guaranteed that it would eventually be paired with the ESP32/8266, the rising star of the wireless hardware world, and [spacehuhn] has finally brought these two tools together to sniff WiFi packets.

The library that [spacehuhn] created uses the ESP chip to save Pcap files (the default Wireshark filetype) onto an SD card or send the data over a serial connection. The program runs once every 30 seconds, creating a new Pcap file each time. There are many example scripts for the various hardware you might be using, and since this is written for the ESP platform it’s also Arduino compatible. [spacehuhn] has written this as a proof-of-concept, so there are some rough edges still, but this looks very promising as a network analysis tool.

[spacehuhn] is no stranger to wireless networks, either. His YouTube channel is full of interesting videos of him exploring various exploits and testing other pieces of hardware. He’s also been featured here before for using an ESP8266 as a WiFi jammer.

Continue reading “ESP To Wireshark”