MFJ MFJ-1270Pi User manual

Raspberry Pi TNC
MFJ-1270Pi
INSTRUCTION MANUAL
Based on the original by John Hansen
©2020
MFJ Enterprises, Inc.
300 Industrial Park Rd. Starkville, MS 39759
P: (662) 323-5869
F: (662) 323-6551

DISCLAIMER
The information in this manual is for user purposes only and is not
intended to supersede information contained in customer regulations,
technical manuals or documents, positional handbooks, or other official
publications. The copy of this manual provided to the customer will
not be updated to reflect current data. Customers using this manual
should report errors or omissions, recommendations for improvements,
or other comments to MFJ Enterprises, 300 Industrial Park Road,
Starkville, MS 39759.
Phone: (662) 323-5869
Fax: (662) 323-6551
Business hours: M-F 8:00 AM - 4:30 PM CST.

Contents
1 THE MFJ-1270Pi 1
2 SETUP 1
2.1 INSTALLINGRASPBIAN ................................ 1
2.2 CONFIGURATION PROGRAMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 CONFIGURING THE I2CPROTOCOL......................... 9
2.4 FACTORYRESET..................................... 10
2.5 CONNECTINGTHERADIO............................... 10
2.6 TRANSMIT AUDIO ADJUSTMENT . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3 TECHNICAL ASSISTANCE 11
List of Figures
1 An MFJ-1270Pi stacked on a Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . 1
2 Openingtheterminal.................................... 2
3 TerminalWindow...................................... 3
4 Raspi-config......................................... 4
5 InterfacingOptions..................................... 5
6 SerialLoginDisable .................................... 5
7 SerialPortEnable ..................................... 6
8 ScriptSetup......................................... 7
9pitnc getparams Output .................................. 8
-i-

MFJ-1270Pi Raspberry Pi TNC Instruction & Technical Manual
1 THE MFJ-1270Pi
Thank you for purchasing the MFJ-1270Pi Terminal Node Controller ™. This TNC is designed to
perfectly match the popular Raspberry Pi (Figure 1), allowing expasion of existing systems to
support TNC-based operations. The open-source Raspbian operating system provides a powerful
and flexible base upon which to build any packet station. From portable setups to large, fixed
stations, this board has been everywhere. The MFJ-1270Pi Raspberry Pi TNC ™supports the
packet TNC modes used for APRS iGates and Digipeaters and VHF packet for Winlink. It will
support HF Winlink with the addition of a Pactor or similar modem.
Figure 1: An MFJ-1270Pi stacked on a Raspberry Pi
2 SETUP
2.1 INSTALLING RASPBIAN
To use the MFJ-1270Pi, you will first need a working Raspberry Pi. These can be ordered directly
from the Raspberry Pi Foundation at https://www.raspberrypi.org.
To install the Raspian Operating System on your Raspberry Pi, you will need to obtain a micro
SD card and install the OS image on it. The easiest way is to download the Raspberry Pi Imager
-1-

MFJ-1270Pi Raspberry Pi TNC Instruction & Technical Manual
from https://www.raspberrypi.org/downloads. There are versions for Windows, MacOS, and
Ubuntu Linux.
WARNING
Make absolutely sure you are copying the image file onto your SD card, not onto
your hard drive! The Imager will overwrite everything on whatever drive you specify!
MFJ will take no responsibility for loss of data in this event!
After the imager finishes flashing the SD card, insert it into the slot at the base of the Raspberry
Pi. Connect a mouse, keyboard, and monitor to the appropriate ports on the Raspberry Pi then
power up the Pi. At first boot you will login with username “pi” and password “raspberry.” You
may change these later if you wish.
Figure 2: Opening the terminal
The Raspberry Pi’s serial port is disabled by default. To use it you will need to change the Pi’s
configuration. Open a terminal window. You can open it from the desktop as shown in Figure 2,
or you can open it remotely if you have SSH enabled. Type
sudo raspi-config.
-2-

MFJ-1270Pi Raspberry Pi TNC Instruction & Technical Manual
WARNING
With great power comes great responsibility! Your Pi will quite happily erase itself
if you make mistakes with sudo, undoing hours or days of work. If you are unsure of
a command, don’t run it! Always keep a backup just in case!
Figure 3: Terminal Window
Prefacing a command with sudo tells the OS that you want to run the command immediately
following as root. Root is the system administrator account on a Linux machine and has the
priveleges to do whatever it wants. Some advice regarding sudo and root priveleges in case you are
unfamiliar with Linux: do not run commands with elevated priveleges for no reason. As the
warning box above explains, root and other superusers can do anything they want to the operating
system, up to and including breaking it! Always take a moment to think through commands before
running them, especially as root! Do you really need to run them as root? Can they be effective
with normal user priviledges? Pausing and thinking through things like this can prevent the
frustration of watching everything you spent the past few days building disappear behind a
blinking cursor forever (or at least until you work up the willpower to start again). Some functions
such as raspi-config must be run as root simply due to their nature (they by design make
system-level changes), but never develop the habit of just running commands as root for no reason.
-3-

MFJ-1270Pi Raspberry Pi TNC Instruction & Technical Manual
Once you input the command, the following box will appear.
Figure 4: Raspi-config
Use the cursor keys to scroll down to “#5, Interfacing Options.” Then, on the next screen scroll
down and select “P6 Serial.”
When you do this you’ll get the following
Use the TAB key to highlight NO, then press ENTER. Next you will see
Use TAB to hightlight YES this time and press ENTER. Next, use TAB to highlight FINISH then
press ENTER. The Raspberry Pi will ask to reboot. Tell it yes.
It is a good idea to make sure Raspbian is up to date. If the Pi has internet access, you can do this
from the command line by entering the following:
sudo apt update && sudo apt upgrade
2.2 CONFIGURATION PROGRAMS
The programs pitnc getparams and pitnc setparams are used to display and change parameters
stored in the TNC-Pi board, including the TXDelay and the I2C address. The pitnc getparams
program will also provide you with a convenient way to make sure that your TNC is successfully
talking to the Raspberry Pi.
You will need to download these programs and save them to your Raspberry Pi. Open your
terminal and enter
-4-

MFJ-1270Pi Raspberry Pi TNC Instruction & Technical Manual
Figure 5: Interfacing Options
Figure 6: Serial Login Disable
mkdir /home/pi/pitnc
-5-

MFJ-1270Pi Raspberry Pi TNC Instruction & Technical Manual
Figure 7: Serial Port Enable
to create a directory called pitnc.∗Next type
cd /home/pi/pitnc
to move into the new directory. There are two ways to download the zip file containing the two
programs. The first is to type
wget https://cdn.shopify.com/s/files/1/0289/7782/3843/files/params.zip
into the terminal. The second is to navigate the Pi’s web browser to www.mfjenterprises.com
and download the software from the MFJ-1270Pi product page. Once the file is downloaded and
placed in the /home/pi/pitnc directory, the command
unzip params.zip
will unpack the zip archive into two files. If you now enter ls -l, you will see the original zip file
and the two scripts. Note that both are colored white and are preceded by the characters
“-rw-r--r--”. This is Linux shorthand for who has what permissions. The first dash indicates what
type of object is present. In this case, it is a file, so the space is a hyphen. The next three
characters are the user’s permissions. In this case the user can read (r) and write (w), but not
execute (x), these files. The next three are for the user’s group (they can only read), and the final
three are for all users (again, they can only read). We need to give ourselves execute permissions
for these two scripts, and the command to do that is
∗If you have created a different user, replace “pi” with your new username
-6-

MFJ-1270Pi Raspberry Pi TNC Instruction & Technical Manual
Figure 8: Script Setup
chmod u+x pitnc*.
This instructs the OS to change mode (chmod) by adding execute permissions for the user (u+x)
to all files beginning with pitnc (pitnc*). Typing ls -l again now shows the two scripts in green
with an “x” now included in the permission string. We can now use these scripts to configure the
TNC-Pi. Your terminal should now look like the one in Figure 8.
If you are not already there, switch to the directory that you placed these programs in by using the
cd command just like earlier. The format for this script is
./pitnc getparams b n
where bis the bus name or number (/dev/serial0 for the serial port, 1 for the I2C bus), and nis
the device number (0 if using serial, between hexadecimal values 0x3 and 0x77 for I2C). Run the
following command:
./pitnc getparams /dev/serial0 0.
The ./ at the beginning of the line tells the Pi to look in the current directory. If you don’t
-7-

MFJ-1270Pi Raspberry Pi TNC Instruction & Technical Manual
Figure 9: pitnc getparams Output
prepend this, the Pi will not find the pitnc getparams program. A menu should come up listing
some parameters (Figure 9). If this happens, your Pi and TNC are talking to each other.
If you get a bunch of lines that say
retrying...
there is an issue with your TNC or the Pi’s configuration. Check to make sure that the serial port
(or I2C bus) is enabled. If it is, then reset the MFJ-1270Pi as described in Section 2.4 and try
again. If it still does not work, call MFJ Technical Support.
Assuming all is well, you can now set the TXDelay. This is optional, as generally speaking the
default value will work just fine. If you choose to alter it you can do it with the pitnc setparams
program. Here the script format is
./pitnc setparams b n p v
where band nare the same as pitnc setparams,pis the parameter number from the left-hand
column (i.e. 1 for TXDelay), and vis the value to set. The command to set TXDelay therefore
looks like
./pitnc setparams /dev/serial0 0 1 50.
The transmit delay can be set anywhere from 0 to 255. If you set TXDelay to 0, it will result in
the transmit delay being controlled by potentiometer R6 rather than the value in this menu.
-8-

MFJ-1270Pi Raspberry Pi TNC Instruction & Technical Manual
After you have made a change in the pitnc setparams program, you must reboot the TNC in order
for it to go into effect. You do not have to reboot the entire system to do this. Just enter the
following command:
./pitnc setparams /dev/serial0 0 15 2
2.3 CONFIGURING THE I2C PROTOCOL
WARNING
This section is for advanced users that need to have multiple devices operating off of
the GPIO port. It requires editing of system files via the terminal. If you are unsure
about performing any of these steps, stop and ask for help.
The TNC-Pi can be configured to communicate with the Raspberry Pi using the I2C protocol.
This is not required for basic operation with a single board on the GPIO port; however, if you ever
desire to run multiple TNC-Pis or anything else that uses the GPIO port, you will need to enable
this functionality. The general procedure for doing this is to start with each TNC set so that it
communicates via the serial port (this is the factory setting) and then configure each additional
TNC to have a unique I2C address on it. You would need to set these boards one at a time
because only one serial TNC-Pi can be on the TNC-Pi at a time.
To configure the TNC-Pi for I2C, you will need the two configuration scripts described in
Section 2.2. Before using them, however, it will be necessary to make some additional
configuration changes to the Pi. First, make the following changes to the following files:
1In the /etc/modprobe.d/raspi-blacklist.conf file, comment or remove the line “blacklist
I2C-bcm2708”
2In the /etc/modules file, add the line “i2c-dev”
3Enable the I2C protocol in raspi-config (Section 2.1)
You may recall that the serial mode format for the pitnc getparams†program was
./pitnc getparams /dev/serial0 0
And the format in serial mode for the pitnc setparams program was
./pitnc setparams /dev/serial0 0 p v
Where pis the parameter that you want to change and vis the new value of that parameter. So if
you want to change the I2C address from 0 to 3 you would enter
./pitnc setparams /dev/serial0 0 7 3
†Before running the configuration scripts, ensure that kissattach is not running.
-9-

MFJ-1270Pi Raspberry Pi TNC Instruction & Technical Manual
After you reboot the TNC, it will now be communicating over the I2C interface. To run
pitnc getparams you would need to enter
./pitnc getparams 1 3
Here 1 is the number of the I2C bus and 3 is the I2C address that you have set. To change a value
when the TNC is communicating with I2C, you simply replace the serial bus and device numbers
with the appropriate I2C values.
2.4 FACTORY RESET
If you ever need to reset these parameters to their original factory values, power down, turn the
TXDelay potentiometer all the way to minimum, then power back up. You should see the yellow
LED flash once per second. When you see it flash, you’ll know that the parameters have all been
reset. The power the device back down, move the TXDelay off of minimum, and power the device
back up.
2.5 CONNECTING THE RADIO
You can either wire up a male DE-9 to mate with the one on the TNC-Pi, or, if you’d prefer, you
can use the four holes below R7 labeled Radio to hard-wire a radio connection. (No header is
provided in the kit for this.)
If you use the DE-9 connection, it should be wired as follows:
Pin 1: TX Audio
Pin 3: Push to Talk (PTT)
Pin 5: Receive Audio
Pin 6: Ground
If you are using the holes marked “Radio” the connections should be (Pin 1 is square):
Pin 1: Receive Audio
Pin 2: Ground
Pin 3: TX Audio
Pin 4: Push to Talk (PTT)
2.6 TRANSMIT AUDIO ADJUSTMENT
Potentiometer R7 adjusts the level of the transmit audio output. Most people will find that they
need to set it fairly near the minimum setting. There are two methods to adjust this. The first is
to use two radios, one to monitor the transmitted signal and the other connected to the TNC-Pi.
1. Key the radio connected to the TNC-Pi manually by pushing the PTT button on it.
2. On the other radio you will hear a continuous tone even though no data is being transmitted.
3. Turn R7 all the way down, and the tone will go away.
-10-

MFJ-1270Pi Raspberry Pi TNC Instruction & Technical Manual
4. Then slowly turn it up until the volume doesn’t increase any further in the monitor receiver.
When you reach this point, back it off just a little and you should have it about right.
The second method is to have the TNC-Pi to send tones using the following command:
./pitnc setparams /dev/serial0 0 15 3
This will cause the TNC to send 2200 Hz and 1200 Hz tones for about 5 seconds each.
3 TECHNICAL ASSISTANCE
If you have any problem with this unit first check the appropriate section of this manual. If the
manual does not reference your problem or reading the manual does not solve your problem, you
may call MFJ Technical Service at (662) 323-0549 or the MFJ Factory at (662) 323-5869. You will
be best helped if you have your unit, manual and all information on your station handy so you can
answer any questions the technicians may ask.
You can also send questions by mail to MFJ Enterprises, Inc., 300 Industrial Park Road,
Starkville, MS 39759; by Facsimile (FAX) to (662) 323-6551; or by email to
tec[email protected]. Send a complete description of your problem, an explanation of
exactly how you are using your unit, and a complete description of your station.
-11-

USER NOTES
Table of contents
Other MFJ Controllers manuals
Popular Controllers manuals by other brands

Agilent Technologies
Agilent Technologies PCG-750 installation manual

Promation Engineering
Promation Engineering P1 A P Series Field manual

Tech Controllers
Tech Controllers EU-27i user manual

Allen-Bradley
Allen-Bradley PowerFlex40 user manual

Akytec
Akytec TRM210 user guide

Marlec
Marlec HRDi Installation & operation