Sean Conway walks you through the process of troubleshooting communication problems between a PC application and a serial device.
The itch for an article on troubleshooting USBto-serial connections needed to be scratched, after working on a request for assistance from a local model railroad group (see LXF239). This tutorial will provide the knowledge to troubleshoot communication (comms) issues from an app on a PC to a serial device, using a USB-to-serial cable/interface.
In the diagram shown below, there is a PC running an application that requires a serial interface. The PC is connected to the serial device, shown on the far right side of the drawing, using a USB-to-serial cable/ interface. The drawing contains a few additional details that will be introduced as our discussion expands.
Hardware in the PC supported serial comms; at one point during the evolution of the PC, a minimum of two DB9 ports (the 9-pin COM port) was considered standard. The red highlighted text in the diagram are some examples of COM port communication needs. But all things come to an end, and the ubiquitous USB port soon replaced COM ports. To consolidate all the different serial device comms requirements, a USB-toserial cable/adaptor came into play. Unfortunately, this generic serial comms doesn’t always work, and it can be frustrating trying to isolate the root cause of serial communication failure.
After connecting the USB-to-serial cable to the host PC, the first step is to determine if the OS recognises the USB-to-serial adaptor. In Linux, the dmesg command reveals information regarding hardware detection, driver assignments and communication port allocation. It is important to take note of what COM port (COM1, 2, 4 or so on) is used – this will be needed to support our efforts, as well as set up the application.
هذه القصة مأخوذة من طبعة May 2019 من Linux Format.
ابدأ النسخة التجريبية المجانية من Magzter GOLD لمدة 7 أيام للوصول إلى آلاف القصص المتميزة المنسقة وأكثر من 9,000 مجلة وصحيفة.
بالفعل مشترك ? تسجيل الدخول
هذه القصة مأخوذة من طبعة May 2019 من Linux Format.
ابدأ النسخة التجريبية المجانية من Magzter GOLD لمدة 7 أيام للوصول إلى آلاف القصص المتميزة المنسقة وأكثر من 9,000 مجلة وصحيفة.
بالفعل مشترك? تسجيل الدخول
Create your first WebSocket service
Mihalis Tsoukalos explains how to use the Go programming language to work with the WebSocket protocol.
Fantastic Mr Firefox
Nick Peers takes a trip down memory lane to reveal the story behind the rise - and slight fall - of Mozilla's popular web browser.
Set up your terminal and email like it's 1983
Jump in the hot terminal time machine with Mats Tage Axelsson who emails from the command line using the latest technology.
Universal layer text effects with GIMP
Posters use them, films and presentations are hard to imagine without them: text effects. Attract attention with Karsten Günther and GIMP.
Jump to a federated social network
Nick Peers reveals how you can get up and running with this free, decentralised and non-profit alternative to Twitter.
Free our SOFTWARE!
Taking anything for granted is dangerous, so Jonni Bidwell and Mike Saunders revisit how the free software movement got started to help free us from proprietary tyranny!
Master RPI.GPIO
Les Pounder goes back to the early days of the Raspberry Pi - and his career with this classic library! -
Waveshare Zero to Pi3
Transform your Pi Zero into a Pi 3, they promised Les Pounder, but it's more like adding on go-faster stripes.
The Best OPEN SOURCE Software Ever!
In an attempt to trigger controversy, Michael Reed and Neil Mohr unequivocally state these are the greatest free software apps ever. Probably. We’re just trying to be helpful.
Linux-Mandrake 7
Simplicity and a wide range of applications make this a great distribution for all Linux users.