This document is a loose collection of application- and device notes.

Integration of a Kenwood TH-D75 handheld transceiver

By Marc Balmer HB9SSB

Information in this application note will likely also apply for other Kenwood TH-D series transceivers, e.g. the Kenwood TH-D74.

Interfaces

The Kenwood TH-D75 offers Bluetooth and USB connectivity. You can use only either of them or both simultaneously.

You must, however, exercise some care as to which information you send over which interface.

Bluetooth

Over Bluetooth the TH-D75 offers a serial port which can be used as a CAT interface and/or to output GPS and/or APRS data as well as a headset profile and a generic audio output:

UUID: Serial Port               (00001101-0000-1000-8000-00805f9b34fb)
UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
UUID: Generic Audio             (00001203-0000-1000-8000-00805f9b34fb)

To use the Bluetooth serial port for CAT control set the Bluetooth and interface settings as follows to make sure only CAT commands are sent over the serial port:

Menu Nr.

Description

Setting

930

Bluetooth

On

981

PC Output (GPS)

USB

982

PC Output (APRS)

USB

983

KISS

USB

If you want to use a TH-D75 as a GPS (NMEA) device only, you can of course set menu 981 to Bluetooth and receive the NMEA sentences over the bluetooth serial port.

Configure the TH-D75 in the /etc/trxd.yaml config file as follows:

transceivers:
  th-d75:
    device: aa:bb:cc:dd:ee:ff
    channel: 2
    trx: kenwood-th-d75

Replace aa:bb:cc:dd:ee:ff with the actual bluetooth address of your device.

USB

The TH-D75 provides a serial port as /dev/ttyACM* device. If you installed trx-control from packages, a udev rule file /usr/lib/udev/rules.d/70-th-d75.rules will have been installed that provides a symlink /dev/th-d75 to the appropriate ttyACM device.

When using the USB interface, configure the TH-D75 in the /etc/trxd.yaml config file as follows:

transceivers:
  th-d75:
    device: /dev/th-d75
    trx: kenwood-th-d75

When you attach the TH-D75 over USB, make sure to set menu entries 981, 982 and 983 to Bluetooth to avoid getting that data over the USB serial port.

Further development

It is planned for trxd(8) to receive GPS NMEA sentences and possibly APRS data over the same channel that is used for CAT control. For the time being, however, the CAT channel must be kept clear of NMEA sentences.

Sharing a GPS device between trx-control and other applications

By Christian Häusler HB9HOX

This application note explains how to configure trx-control to get GPS information from gpsd instead directly from a GPS device.

Context

Usually, GPS devices present themselves as a serial device to the computer. One characteristic properties of serial devices are that they can only be access by one application at a time. This becomes an issue for devices like a GPS. Usually we want to make the position available to multiple applications at the same time (for example chronyd to update our system time, a map for navigation, our logging software to have the correct grid square in for our QSOs).

To solve this dilemma, the software gpsd has been created. As of October 2024, trx-control can not use gpsd as position source. With a bit of clever Linux configurations, we can work around this. As a bonus, we also get hot plug support.

Idea

  • gpsd connects to the GPS device as it is intended to do

  • a virtual serial device is created

  • the NMEA data get streamed from gpsd into that virtual serial device

  • trx-control is configured to read NMEA data from that virtual serial device

Solution

  • gpspipe allows streaming the NMEA data from gpsd

  • socat is a powerful tool to transfer data between a plethora of sources and targets.

  • a Systemd unit ensures the virtual serial device is present before trxd starts

[Unit] Description=Virtual nmea serial device for trx-control
Requires=gpsd.service
After=gpsd.service
Before=trxd.service

[Service]
ExecStart=/bin/sh -c 'gpspipe --nmea | socat stdin pty,link=/dev/trxd-nmea,mode=666'

[Install]
RequiredBy=trxd.service

Instructions

  1. Place the above Systemd unit at /etc/systemd/system/trxd-nmea

  2. Reload Systemd: sudo systemctl daemon-reload

  3. Enable the Systemd unit: sudo systemctl enable trxd-nmea

  4. Configure /dev/trxd-nmea as NMEA device in the nmea: section of your trxd configuration file

  5. Restart trxd: sudo systemctl restart trxd

Explanation

  • gpspipe --nmea reads position data from pgsd and writes NMEA sentences to standard out.

  • socat stdin pty creates a PTY device and writes anything from STDIN to that PTY. This creates a device named /dev/pts/<N> where <N> is a random number.

  • To prevent us from changing the configuration of trxd every time, link=/dev/trxd-nmea creates a stable link to that device.

  • mode=666 makes the device readable by all users.

  • Requires=gpsd.service and After=gpsd.service ensures gpsd gets started and is up and running before this unit can start.

  • RequiredBy=trxd.service and Before=trxd.service ensures this unit gets started before and is running before trxd gets started.

Contribute to the Application Notes

Required Format

If you want to contribute an application or device note, please send it in the following format for inclusion:

  • Use AsciiDoctor (.adoc) format

  • Wrap lines at 72 characters