Tio Is A Serial Terminal For Us

With Linux and the serial port there is good news and there is bad news. The good news is that Linux has great support for serial hardware of all sorts and a host of tools for accessing the serial port. That’s important when you use a lot of serial-like devices like Arduinos with USB ports and the like. The bad news is that most of the terminal software is made to accommodate the days when a computer had real serial terminals and modems with people interacting with them. We bet that’s why [lundmar] developed tio, a serial device I/O tool for people like us.

Honestly, how many times have you needed Zmodem file transfers and recognition of the DCD signal to detect an incoming connection? Sure there are many other programs that will do the job, but tio brings a clean simplicity along with functionality that embedded developers need.

The software will support arbitrary devices, show statistics, and give you control of the RS232 lines. There’s support for delayed characters and lines, useful if you are dealing with a super simple device with no handshaking. There’s also hex support and many ways to log data and statistics. We especially like that it can automatically reconnect which is a great feature.

Of course, you want some terminal features and tio includes those. For example, you can elect to have local echo turned on or map characters so that, for example, a carriage return turns into a carriage return and a line feed. You can use command line options to set up most items including features like redirecting to a network socket. Other commands inside the program — by default, triggered by Control+T — let you do things like send a break, toggle handshaking lines, and more.

You might think the serial port is dead, but it really just transformed into a USB port.  Of course, like everything else these days, you can also get your terminal in the browser.

Getting Serial Data Out Of An Old Spectrophotometer

[Jure Spiler] came into possession of an old spectrophotometer, which measures the absorbance and transmittance of light in a sample. Getting data out of the device was difficult, particularly as the model in question was an educational version missing some functionality. However, perseverance got the old machine talking happily to a PC.

After an earlier experiment with sniffing the signals being sent to the LCD, [Jure] did some more research. It turned out that a special expensive cable could hook up to the device’s parallel port and deliver serial data, for the low price of € 356 Euros. Now knowing a serial output was present, [Jure] was able to find the data stream desired.

Hooking up a logic analyzer to the “parallel port” on the machine revealed that the device would actually send serial data out over certain pins on the port. The trick that made it harder was that it was in Inverted RS232 form. Thus, all it took was a simple TTL inverter hooked up to a USB-TTL adapter to get the device talking to a modern PC.

With that achieved, [Jure] was able to whip up a simple VB6 program to collect data from the spectrometer and put it in a CSV file for further analysis. There’s even a program to graph the data right off the bat, making the scientific instrument easier and quicker to use than ever!

Oftentimes, old scientific hardware like this isn’t especially difficult to hack. It’s usually just hard enough to make busy scientists stump up the cash for the fancy adapters and cable, while being no match for the dedicated hacker!

Hacker Dictionary: RS-485 Will Go The Distance

RS485 is a communication standard that should be part of the advanced hardware hacker’s arsenal; it’s not commonly encountered, but powerful exactly when you need it. It’s a physical layer interface for wired communications that uses a single differential pair for noise immunity, has good long-distance properties, and allows many connections to a single bus. Because of that, you will encounter it in security systems and even cameras, wired sensor networks, DMX512 lighting and all sorts of industrial electronics. For our hobbyist goals, you can absolutely use RS485 to build your home (or room) automation system, or a relatively large robot – without all those worries that wireless brings.

The name might remind you of RS232, and that’s because both RS232 and RS485 are standards that come from EIA (Electronics Industries Alliance). It also might remind you of RS422, if you’ve ever seen this name mentioned online – RS422 and RS485 are closely intertwined, sharing most of the physical layer, and I’ll show how exactly they relate. Continue reading “Hacker Dictionary: RS-485 Will Go The Distance”

Open Source LXI Tools Free Us From Vendor Bloat

LXI, or LAN eXtensions for Instrumentation is a modern control standard for connecting electronics instrumentation which supports ethernet. It replaces the older GPIB standard, giving much better performance and lower cost of implementation. This is a good thing.  [Martin Lund] has created the open source lxi-tools project which enables us to detach ourselves from the often bloated vendor tools usually required for talking LXI to your bench equipment. This is a partial rewrite of an earlier version of the tool, and now sports some rather nice features such as mDNS for instrument discovery, support for screen grabbing, and a LUA-based scripting backend. (API Link)

SCPI or Standard Commands for Programmable Instruments is the text-based language spoken by many instruments, allowing control and querying of an instrument. Just to be clear, SCPI is not at all a new thing, and older instruments that have GPIB or RS232 connectors, still could talk SCPI. lxi-tools is not for those. Some instruments can also be very picky about the formatting of commands, especially if they’re buggy, so the ability to interactively debug commands is very desirable. It is quite possible to make poor use of SCPI commands in your test script and end up with tests that just take far longer to execute that they need to. lxi-tools has a benchmarking tool too, which helps you to dig in and find out where all the time is going and make suitable adjustments.

We’ve not seen much about LXI on Hackaday, but we did cover using PyVISA for dealing with SCPI-over-GPIB in python.  If you have an older instrument  with GPIB and you don’t want to sell a internal organ to pay for a USB adaptor, here’s one you can make yourself.

DIY Wireless Serial Adapter Speaks (True) RS-232

There is a gotcha lurking in wait for hackers who look at a piece of equipment, see a port labeled “Serial / RS-232”, and start to get ideas. The issue is the fact that the older the equipment, the more likely it is to be a bit old-fashioned about how it expects to speak RS-232. Vintage electronics may expect the serial data to be at bipolar voltage levels that are higher than what the typical microcontroller is used to slinging, and that was the situation [g3gg0] faced with some vintage benchtop equipment. Rather than deal with cables and wired adapters, [g3gg0] decided to design a wireless adapter with WiFi and Bluetooth on one end, and true RS-232 on the other.

The adapter features an ESP32 and is attached to a DB-9 plug, so it’s nice and small. It uses the ST3232 chip to communicate at 3 V logic levels on the microcontroller side, supports bipolar logic up to +/-13 V on the vintage hardware side, and a rudimentary web interface allows setting hardware parameters like baud rate. The nice thing about the ST3232 transceiver is that it is not only small, but can work from a 3 V supply with only four 0.1 uF capacitors needed for the internal charge pumps.

As for actually using the adapter, [g3gg0] says that the adapter’s serial port is exposed over TCP on port 23 (Telnet) which is supported by some programs and hardware. Alternately, one can connect an ESP32 to one’s computer over USB, and run firmware that bridges any serial data directly to the adapter on the other end.

Design files including schematic, bill of materials, and PCB design are shared online, and you can see a brief tour of the adapter in the video, embedded below.

Continue reading “DIY Wireless Serial Adapter Speaks (True) RS-232”

Modern Network Adapter For Retro Computers

Universal Serial Bus, or USB, is so ingrained in modern computing that it’s hard to imagine a time without it. That time did exist, though, and it was a wild west of connector types, standards, and interfacing methods. One of the more interesting interfaces of the time was the SIO system found in 8-bit Atari computers which ended up sharing a lot of the features of modern USB, and its adaptability is displayed in this modern project which brings WiFi, Bluetooth, USB, and SD card slots to any old Atari with an SIO port.

The project is called FujiNet and it uses the lightweight protocol of SIO to add a number of modern features to the 8-bit machine. It’s based on an ESP32, and the chip performs the functions of a network adapter by bridging WiFi and Bluetooth to the Atari. It does this by simulating drives that would have potentially been used on the Atari in its time, such as a floppy disk drive, an RS232 interface, or a modem, and translating them to the modern wireless communication protocols. It even has the ability to emulate a printer by taking the output of the print job from the Atari and converting it to PDF within the device itself.

Not only does this bring a lot of functionality to the Atari, which you may be able to use to view sites like retro.hackaday.com, but the FujiNet is housed in a period-appropriate 3D-printed case that matches the look and feel of the original Atari. If you need a more generic solution for your retrocomputing networking adventures that isn’t limited to SIO, we recommend grabbing a Raspberry Pi to handle that.

Thanks to [Gavin] for the tip!

No More Floppy Drives For This Agilent Scope

When [kiwih] picked up an Agilent 54621A scope, he was amused that it had a floppy disk. At one time, it was high-tech to use a disk to transfer scope data to your computer. Today, not so much. However, on the back was a serial port. Surely it was possible to read data from there. It is, and what results is a nice walkthrough of finding the port’s info and interfacing with it using Python.

Normally, you’d use the included BenchLinkXL software to grab data from the port, but that software is so old it would not run under Windows 10 or Wine. Searching didn’t turn up much on the serial port, but it did locate a manual for a similar Agilent scope. That manual wasn’t too helpful since it assumed you were connecting via a LAN or USB. However, it did make reference to an older model that was also similar and that was the key to finding a manual that did explain the serial port protocol.

The command set looks suspiciously like SCPI — Standard Commands for Programmable Instruments — which is a layer on top of the GPIB protocol. Many scopes speak that language, so that’s not surprising. That also means if you are in the mood to communicate with an SCPI scope, you might find the code useful, even if you don’t use a serial port or have this exact Agilent model.

SCPI has a lot of uses. For example, try talking to your scope. The cheap Rigol and similar scopes usually have SCPI and you can control and read them using the same kind of techniques.