Everything You Need To Know About USB And Serial Interfaces - Kkn

Transcription

Everything You Need to KnowAbout USB and SerialInterfacesPresented by N6TVn6tv@arrl.net

Presentation Overview Legacy PC Serial PortsUSB Ports and DevicesUSB-to-Serial AdaptersUsing the Windows Device ManagerManaging Serial Port NumbersUsing Serial Ports for CW / FSK / PTT KeyingSharing Serial PortsUSB Sound CardsQ&A2

Legacy PC Serial Ports Originally a 25-pin male D-SUB connector(DB-25M), used with dial-up modemsSmaller 9-pin male serial connector becamestandard (DE-9M) for serial, DB-25F forprinters3

Life was Simple One or two male DE-9 connectors on PCAccessed as COM1: or COM2:One DE-9 “CAT” or “RS232” connector on radio Female: ElecraftIC-7700 & IC-7800 Male:YaesuKenwood4

Computers “Improved” “Real” serial and parallel ports disappear,replaced by USB portsNotebook computers: PCMCIA, PC Card,ExpressCard slots for serial adapters disappearRadios (until recently) still had 9-pin serial portsPeripherals are still using 9-pin serial ports RemoteRig boxes, Rotator controllers, SteppIRantenna controllers, some band decoders, etc.Common Solution: USB-to-Serial adapters5

USB 2.0 and 3.0 Ports Standard connector on most PCs and MACsPC:Radio:6

USB-to-Serial Adapters 1.2.3.4.5.Reliability and Compatibility Varies GreatlyEdgeport – Excellent, stable, supportsMMTTY directlyEltima – Included with microHAM interfacesFTDI – very good, stable, requires EXTFSKfor MMTTY. Used internally by Elecraft K3.Silicon Labs (built in to Icom, Kenwood,Yaesu)Prolific – AVOID! Uninstall drivers, recycle.7 7

Digi International Edgeport/4 One USB 2.0 Type B connectorFour independent DE-9M serial portsWindows automatically finds and installs drivers8

Digi International Edgeport/8 One USB 2.0 Type B connectorEight independent DE-9M serial portsWindows automatically finds and installs drivers9

StarTech.com ICUSB2324I4-Port FTDI One USB 2.0 Type B connectorFour independent FTDI DE-9M serial portsSeparate 5V Power Supply10

StarTech.com ICUSB2328I8-Port FTDI One USB 2.0 Type B connectorEight independent FTDI DE-9M serial portsSeparate 5V Power Supply11

microHAM uses Eltima driversmicroHAM MK2R One USB Type B connectorCustom Eltima serial port device driversCustom cables for transceiver portsVirtual serial ports created by microHAM “Router”12

Recommended FTDI USB-to-Serial AdaptersFTDI CHIPI-X10 - 16GearMo 2-port - 30GearMo 4-port - 4013

Prolific USB-to-Serial Adapters Widely available, cheap (but many counterfeits)Prolific Device Driver does not play well with othersPlease DO NOT USE them, everUninstall any Prolific device drivers with Device ManagerDevices often look like this:(no waterfall)14

Connecting USB-to-Serial AdaptersConnect FTDI, Elecraft, or Edgeportdevice to PC Windows (usually) locates and installsappropriate device driver(s) COM ports assigned sequentially Use Windows Device Manager to(noCOMwaterfall)view assignedPort number 15

Connecting USB Radios / Devices Important: Install the manufacturer’sdevice driver first, then connect the device Icom, Kenwood, Yaesu, microHAMUsually not required for Elecraft (FTDI)If you forget and connect radio first, useDevice Manager to uninstall “UnknownDevice”, then start over(no waterfall)COM port numbersassigned sequentially16

Using the Windows Device Manager Right click on Windows Start ButtonClick Device Manager-orWindows Key R (Run): devmgmt.mscImportant Tip (before Windows 10):Always set the System Environment Variabledevmgr show nonpresent devices to 1(no waterfall)17

Setting System Environment Variable Type “Environment” in Windows Searchbox or Windows Settings Search box Click “Edit the System EnvironmentVariables”(no waterfall)18

Step 1 – Under Advanced tabclick Environment Variables (no waterfall)19

Step 2 – Under System variables, click New (no waterfall)20

Step 3 – Add the new environment variableName: devmgr show nonpresent devicesValue: 1Click OK, then start Windows Device Manager21

Step 4 – in Device Manager (every launch):Select View Show hidden devices(no waterfall)22

Expand Ports sectionRight click gray (offline) devices, Properties(no waterfall)23

Click Driver TabCheck that Driver Provider is not Prolific (no waterfall)If you see Prolific,click Uninstall Device24

Uninstall the Prolific DeviceAND Delete the Driver Software(no waterfall)25

If Driver is FTDI, go to Port Settings tabClick Advanced button(no waterfall)26

FTDI Default Options – not good(no waterfall)27

Change the FTDI Options To This(no waterfall)28

Under USB Serial Bus Controllers:Right-Click each, Select Properties(no waterfall)29

Look for Power Management TabDo not allow computer to turn off(no waterfall)30

Another USB Dev. Management Tool:NirSoft’s USBDeview Stands for USB Device Viewhttps://www.nirsoft.net/utils/usb devices view.htmlScroll Way Down to the “Feedback” section to finddownload link:31

USBDeview Screen Shot(no waterfall)32

Managing COM Port Numbers Over time, ever increasing unique COM port numbersare assigned by Windows, difficult to keep trackSome software doesn’t support COM13: or higherSuggestion: renumber serial ports “left to right” to matchyour station layout, starting with transceiversFirst, use Windows Device Manager to uninstall all serialdevices that you no longer useRight click on remaining COM ports, Properties, PortSettings tab. Click Advanced buttonRenumber ports sequentially, COM3:, COM4:, COM5:,etc., “left to right”33

Renumbering Serial Ports34

What does “In Use” Mean? It means this COM port number was assigned to somedevice, maybe years agoIt usually does not mean that you can’t use it duringreassignment, especially if it is “grayed out” (hidden)Uninstalling disconnected devices first will helpUsually safe to ignore this warning and click YES:35

What program is currently using myserial port? Use Windows Process ls/downloads/process-explorerOn Windows 10, run procexp64.exe as AdministratorClick Search button (binoculars icon)Enter one of the following partial search strings\Device\VCP - FTDI virtual serial ports\Device\Edg - Edgeport virtual serial ports\Device\Ser - Hardware serial ports\Device\Sil - Icom/Kenwood/Yaesu Silicon Labs ports\Device\VSer – Eltima / vspMgr virtual serial ports36

Search Example 1Win-Test (wt.exe) has opened the FTDI Serial Port37

Search Example 2OmniRig (e.g. WSJT-X, Log4OM) has opened the FTDISerial Port38

Not sure what to search for? Open a program known to use a particular serial portIn Process Explorer, drag the “Find Windows Process”icon on top of the program windowProcess Explorer will jump to the process correspondingto that program window39

Select View, Lower Pane View,Handles, then sort by Name40

Computer CW, PTT, and FSK RTTY KeyingUsing Serial Port pins (DTR CW, RTS PTT) A simple hardware keying circuit, used fordecades:41

Elecraft K3 / K3S keying via serial port First transceiver to include computer keying circuit inside the radioDoes not use RTS and DTR pins for RS232 “Handshaking”, freeingthem for other purposesIn K3, set CONFIG:PTT-KEY to RTS-DTR (vs. OFF-OFF)Works the same over a standard serial cable(CONFIG:RS232 38400)-or- the K3S USB connection(CONFIG:RS232 USB)To prevent unwanted transmissions when PC reboots, change FTDIPort Settings: Uncheck “Serial Enumerator” Check “Disable Modem Ctrl At Startup”42

ICOM Copies Elecraft, Adds FSK Keying CW, PTT, and FSK keying OK over USB virtual serial portSupported by IC-7300, IC-7610, IC-7850, IC-7851IC-7300 generates just one virtual serial portIC-7610, IC-7850, IC-7851 generate two virtual serial ports:To keep it simple use DTR pin for keying, RTS pin for PTTUse port “B” for MMTTY exclusivelyMnemonic: CW : DTR : FSK PTT : RTS : Send43

ICOM: Determining COM Port A and B Use Windows Device Manger, right click on first COM port,Properties, Details tab, Device Instance Path, check lastletter44

ICOM IC-7300 USB cable provides one virtual serial portIn IC-7300 SET Connectors menu:Set USB Keying (CW) to DTR-orSet USB Keying (RTTY) to DTRSet USB Send to RTSLogging Software, rig control Port (USB), set DTR CW,RTS PTTIn MMTTY, use EXTFSK or EXTFSK64 to select COM port.Cannot use logger at same time; rig has just one serial port.But you can use the REMOTE (CI-V) connector with CT-17 orequivalent for rig control.45

ICOM IC-7610 USB cable provides two virtual serial portsIn IC-7610 SET Connectors USB Send/Keying:Set USB Keying (CW) to USB1(A) DTRSet USB Keying (RTTY) to USB1(B) DTRSet USB Send to USB1(A) RTS or USB1(B) RTSIn Logging Software, rig control COM Port (A):DTR CW, RTS PTTIn MMTTY, use EXTFSK or ESTFSK64 to select secondCOM Port (B):FSK DTR, PTT RTSCannot set both ports to use hardware PTT, so use “SoftwarePTT” on Rig Control Port (A) if necessary.46

ICOM IC-7850, IC-7851 USB cable provides two virtual serial portsIn IC-785x SET Others menu:Set USB Keying (CW) to USB1 DTRSet USB Keying (RTTY) to USB2 DTRSet USB Send to USB1 RTS (CW) or USB2 RTS (RTTY)In Logging Software, rig control COM Port (USB1)set DTR CW, RTS PTTIn MMTTY, use EXTFSK or ESTFSK64 to select secondCOM port (USB2)FSK DTR, PTT RTSCannot use both ports for hardware PTT, so use “SoftwarePTT” on Rig Control Port (USB1) if necessary.47

Yaesu FT-991 USB cable provides two Silicon Labs virtual serial ports: In Yaesu Menu, set030 232C TOT: 1000 msec (default is only 10 msec)033 CAT RTS: Disable (Turns off RS232 handshaking)060 PC Keying: DTR071 DATA PTT SELECT: RTS098 RTTY SHIFT PORT: DTR110 SSB PTT SELECT: RTSIn Logging Software, rig control is via the “Enhanced” COM Port,CW / PTT via “Standard” COM Port: DTR CW, RTS PTTIn MMTTY, use EXTFSK or ESTFSK64 with the “Standard” COMport: FSK DTR, PTT RTS 48

Yaesu FTdx101D or FTdx101MP USB cable provides two Silicon Labs virtual serial ports: In Yaesu Menu, set OPERATION SETTING / GENERAL:232C TIME OUT TIMER: 1000 msec (default is only 10 msec)CAT RTS: OFF (Turns off RS232 handshaking)RADIO SETTING / MODE SSB, RTTY, and PSK/DATA:RPTT SELECT: RTSRADIO SETTING / MODE CW:PC KEYING: DTRIn Logging Software, rig control is via the “Enhanced” COM Port,CW / PTT via “Standard” COM Port: DTR CW, RTS PTTIn MMTTY, use EXTFSK or ESTFSK64 with the “Standard” COM port:FSK DTR, PTT RTS49

Kenwood TS-890 USB cable provides two Silicon Labs virtual serial ports: Right click, Properties, Details tab, Location Path:USB1 is “Standard” Serial Port, USB2 is “Enhanced”In Logging Software, rig control is via the “Standard” COM PortCW / PTT / FSK keying may be assigned to DTR or RTS of eitherportMenu 17 Virtual Standard COM Port RTS: PTTMenu 18 Virtual Standard COM Port DTR: CW KeyingMenu 19 Virtual Enhanced COM Port RTS: PTTMenu 20 Virtual Enhanced COM Port DTR: RTTY Keying 50

N1MM Contest Software Open Configurer, view Hardware TabCheck CW/Other box next to Rig’s Serial PortClick Set button51

N1MM Contest Software CW Timing over USB is usually OK!Set DTR (pin 4) CW, RTS (pin 7) PTT52

Win-Test Contest Software Set DTR (pin 4) CW, RTS (pin 7) PTT53

MMTTY Setup Menu, TX Tab Set Port to EXTFSK64, then click Radio Command54

MMTTY Setup Menu, Radio command button Set Port to NONE, Group to Clear55

MMTTY Setup Menu, Misc Tab Set TX Port to COM-TxD(FSK), click USB Port56

MMTTY USB Port Menu Set Processing Method to C: Limiting Speed57

EXTFSK Pop-Up Menu Select second COM Port, FSK DTR, PTT RTS58

Serial Port Hardware Sharing In RS232 protocol, only one TXD line (Pin 3) can beconnected between a PC and a RadioNo other device may connect to Pin 3 if a PC isconnectedPC Polls radio on Pin 3 (TXD), Radio sends response onPin 2 (RXD).AUTO INFO mode provides same output without PCpollingMultiple devices (SteppIR controllers, Band Decoders,Elecraft / ACOM / SPE amplifiers) may monitor the RXDline in parallel by only connecting to Pin 2.59

Shameless Plug The N6TV “Serial Box” (S-BOX and S-BOX-USBw/FTDI) by N6TV implements parallel connections toRXD pin via standardD-SUB cables:https://bit.ly/S-BOX S-BOXs also provide four NPN keying circuits for rigsthat do not provide RTS/DTR CW/FSK/PTT keyingsupport, e.g. Yaesu FTdx5000 FT-1000MP, KenwoodTS-990s TS-590s, ICOM IC-7600 IC-7700 IC-7800 60

Serial Port Software Sharing Software sharing: multiple programs simultaneouslyaccess the radio’s rig control serial portImplemented by VE3NEA’s OmniRig softwareOmniRig may be used by Win-Test, Writelog, HDSDR,WSJT-X, Log4OM, etc. for rig controlNOT supported by N1MM , N3FJP, othersOmniRig owns the serial port, acts as traffic cop, nocollisions or conflicts between applicationsCan I use VSPE instead? vspMgr? Maybe, but collisions/ conflicts may occurCW / PTT / FSK Keying via OmniRig port not supported61

Radios with USB and DE-9 connectors Elecraft K3: USB and Serial Port (“P3/RS232”) do notoperate independently (parallel TXD wiring)Elecraft K4: this limitation should be eliminatedKenwood TS-590S and others: USB and Serial Portoperate independentlyICOM USB and CI-V Ports (3.5mm, not DE-9) mayoperate independently (set USB CI-V Port to Unlinkfrom [REMOTE])Allows two devices to poll radio at same time viaindependent serial ports, one USB, one DE-9 or CI-V.62

USB connection to radio adds a newWindows Sound Card USB Audio CODECCan be use for contest recording, voice keying, RTTY /FT8 decodingMultiple “USB Audio CODEC” devices, which is myradio?Right click on Speaker icon, then Open Sound settings63

Opening Windows Sound Control Panel Easier way:Windows Key R (run):mmsys.cpl64

Windows Sound Control Panel65

In Sound Control Panel, which sound card? Watch USB AUDIO CODEC devicesOne will disappear and reappear whenyou disconnect and reconnect the USBcable from the back of the radioSelect that device, then click PropertiesbuttonLabel both the Recording and Playbacktabs with name of device, click Apply66

Labeling a USB Audio CODEC Device67

Change Icon of USB Audio CODEC Device68

Key Points to Remember (Set devmgr show nonpresent devices to 1)Use the Windows Device Manager to manageand renumber COM portsAlways uninstall Prolific devices and driversAlways change the FTDI Default OptionsTry CW, FSK and PTT keying via serial port pinsUse DTR for CW/FSK, RTS for PTTUnderstand serial port conflicts and sharingLabel your USB Audio CODEC devices69

Questions? http://www.qrz.com/db/n6tv - Links to this and b devices view.html als/downloads/process-explorer - WindowsProcess Explorerhttps://bit.ly/S-BOX - The “Serial Box” by N6TVn6tv@arrl.net70

Logging Software, rig control Port (USB), set DTR CW, RTS PTT In MMTTY, use . EXTFSK. or . EXTFSK64. to select COM port. Cannot use logger at same time; rig has just one serial port. But you can use the REMOTE (CI-V) connector with CT-17 or equivalent for rig control. 45