Raspberry Pi-Build with the AmRRON Setup Scripts V2.6 Updated to include the Pi4B, Raspberry Pi OS, and the new and improved "Easy Button" TriMode setup Method. Note this document is provided in plain text format to facilitate clean cut and paste of commands from this text into the terminal whindow where and as desired To copy, highlight the desired text, and hit Ctrl-C To paste into the terminal window, position the cursor where you want to insert and hit ctl-shift-v --------------------------------------------------------------------- Install Raspberry Pi 64-bit Bullseye Note regarding SD cards: A 32GB class 10 UHSD card will work fine. Only about 8GB will be used, allowing for ample free space for the rotation memory cell writes, prolonging life of the SD card. Insert a formatted SD card, start system, select Raspberry Pi 64-bit Bullseye, and install. Reboot Update the operating system and distribution. The dist-upgrade setup is important for the Pi 4B as it will also update the Pi4B's onboard boot flash. These steps should be executed periodically, say monthly.. In a terminal type each of the following commands in sequence sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade sudo apt-get autoremove sudo apt-get clean --------------------------------------------------------------------- --------------------------------------------------------------------- Set up Pi Options From the Pi Menu/Preferences/Raspberry Pi Configuration/ System tab: change the Hostname and WRITE it DOWN! or better yet put it in you keepass vault Interfaces tab: enable VNC, SSH, Serial Port, and Serial Console as necessary for your planned use. You can always come back and change these later Setup the Pi task bar Right click on the task bar and select "Add/ Remove Panel Items" Select the "pi-hat battery indicator" if it appears and click "Remove". Click the "Add" button Select "Minimize all Windows" click "Add" then click "Up" several times to move is position to the left. Repeat the above procedure to add the "CPU temperature" indicator and add 2 spacers. Repeat for Resource monitors", Desktop Number / Workspace Name", Etc. When done click "Close" Change the clock to display 24hr and show seconds by Right click on the Clock and select "Digital Clock Settings" and typing %T (or %T Z to display the "Z" after the time) in the "Clock Format" box. then "OK" To display Zulu time, change the location in Preferences Add Additional Workspaces You can add several additional workspaces and use a separate workspace each for FLDigi, JS8call, ARDOP/gARIM, Etc. This will help with screen real estate and also reduced the CPU usage as the GPU is not utilized for non visible workspaces. Four or five Workspaces are good. In a terminal type: obconf In left of the GUI window that pops up, select "Desktops" Then in the "Number of Desktops" click the "+" to change the number to what you desire Then in the box below titled "Desktop names" change the name of each desktop to something like: Ws1 Ws2 .. Ws5 Then on the lower right click "Close" --------------------------------------------------------------------- ======================================================== Install the AmRRON-Setup-Scripts These excellent and extensive scripts developed by Tango Bravo-14 will install a plethora of useful programs and utilities as well as all the build tools and prerequisites for building the FLDigi suite, JS8CALL, ARDOP/ARIM and more. You will need git to clone this repository on your system. Install git. Open a terminal: sudo apt install git Now clone the repository to your local system. Open a terminal: git clone https://gitlab.com/amrron/setup-scripts.git Move into the new directory: cd setup-scripts To get updates to the scripts, ensure you are in the setup-scripts directory and in terminal run: git pull Running the scripts To run a script simply in terminal type: ./filename Alternatively, a bash 'debug' mode can be used to see what the script is doing by running with: bash -x filename If the script is not already executable, then run: chmod +x filename If you run into errors, please attempt again and run with bash -x to see the output. If you can provide the final section of that that shows the error along with your system information it will assist in troubleshooting. Read more about it in this thread: http://amrron.proboards.com/thread/2101/raspberry-linux-amrron-updater-script --------------------------------------------------------------------- Install applications and utilities via the AmRRON Setup Script You can select just the essential communications programs that you desire or everything offered. At a minimum it is suggested to select all the options under radio. It is also suggested to use the default directory locations unless you are running the script on an existing installation with a customized directory structure. In a terminal: cd setup-scripts git pull bash -x ./AmRRON-Setup-Script.sh Next select "Update" This is a good practice to do every time you run the script, to keep the Operating system up to date. From here check the boxes of the Categories of applications and utilities you want to install, or update. Select ALL radio and security apps. Be sure that "ICONS" is selected. You can start simple and a bit quicker with just the base apps in the Radio category. You can always rerun the setup script to add or update installed apps Proceed to the installation and be patient as it can take between 2 - 3 hours or longer depending upon your Internet speed to download and install your selected applications and utilities. Subsequent updates or add ons will take considerably less time. It is suggested to check the terminal window occasionally to see if it is waiting for your password or other input, or if an error has occurred and attention is needed. When the installer script has concluded then select reboot. Occasionally the hosting servers are busy or unreachable, and if any of the installations fail to install, you can rerun the setup script and select that app and try to install again. ======================================================== Configure TriMode via the AmRRON TriMode Setup script TriMode; FLDigi, JS8Call and ARDOP/gARIM simultaneously sharing the same radio. --------------------------------------------------------------------- [SKIP TO NEXT SECTION] CAT The CAT method is based on FLRig as the sole CAT interface to the radio. This method is revised considerably from the prior method and eliminates the "illegal" use of tty port sharing under Linux. Now FLRig is the only application talking to the Rig, and all subordinate applications talk to FLRig via XML:RPC. FLDigi talks to FLRig. ARDOP uses uses socat and rigctld to communicate with FLRig. JS8CALL uses the "FLRig FLRig" CAT mode to talk with FLRig. FLRig also has an added benefit, that if works very well with custom Macros in FLDigi to control and set rig functions such as mode and filter width, power, etc. Ensure the radio is attached to the Pi via USB cable, powered on, and CAT control port on the Radio is configured and enabled. Suggest the baud rate and port parameters be set to 19200 N 8 1 If your rig is not capable of this then set the parameters accordingly and take note of them. Else the following will not work correctly. Set up the applications as follows: FLRig - Config / Setup / Transceiver / Xcvr tab Rig: - from the drop down box, select your rig model Ser Port - Click the "Ser Port button to refresh the list, then from the drop down box select the port your rig is connected on: - it may appear as /dev/ttyUSB0 or /dev/ttyUSB1 - on my IC7300 it appears as: /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_IC-7300_02003283-if00-port0 Baud: - from the drop down box, select baud rate you set on your rig Check "1" for one stop bit Check "Ptt via CAT", all other selection in that box uncheck Check "USB Audio" if your rig has an internal soundcard on the same USB cable if ICOM for CI-V click the Default button (IC-7300 = 0x94) Click "Init" then "Close" FLDigi - Configure / Rig Control / flrig check "Enable flrig xcvr control with fldigi as client" uncheck "Flrig PTT keys modem" JS8CALL - Settings /Radio /Rig Options Rig: select "FLRig FLRig" set Poll interval to 2s Rig Options tab select CAT Click "Test CAT", then click "Test PTT" piardopc/gARIM automagically setup by the script TriMode Startup order. Startup order is very important! Start up in thee following order: FLRig, Pi-Menu/ Internet/ Flrig "TNC-Status" applet, desktop shortcut, check the following and click Toggle: PAVUCONTROL RIGCTLD Wait for the "TNC-Status" applet to return and verify that the above each have a PID number assigned, Then check the following and click Toggle: ARDOPC ARDOP_GUI FLDIGI, Pi-Menu/ Internet/ Fldigi JS8CALL, Pi-Menu/ Sound& Video/ js8call gARIM, Pi-Menu/ Other/ gARIM --------------------------------------------------------------------- Run the TriMode Setup Script In a terminal: cd setup-scripts git pull bash -x ./AmRRON-TriMode-Setup.sh First screen read, then click "OK" At the next window that states: "Would you like to use the default TriMode setup? This setup will use FLRIG to control your radio and allow for Tri/Quad Mode easily for most popular setups." If you are planning to use CAT control, then Click "Yes" At the next window, Select your (pi)ardop file by clicking on the little folder icon in the top left box, then in popup window, double clicking on the the (pi)ardopc file. At the next window Read and click "OK" At the next screen Read and click "OK" At the final screen, you may elect to copy and paste the contents: " TriMode has been configured. Procedure: 1. Launch FLRIG, configure transceiver for your setup. 2. Launch the ardop-status app. 3. Enable RIGTLD and PAVUCONTROL, select Toggle. They should now have PID's listed. 4. You can now enable ARDOPC and ARDOP_GUI. *NOTE* If you wish to use PAT you must first detach the TNC from ARIM before loading PAT. " into a text file and save it for future reference. Click "OK" and you are finished with the AmRRON-TriMode-Setup ==================================================== Sound device settings and PulseAudio configuration To identify the Signalink or the Rig's sound card device, See note 6 at bottom of document. Since FLDigi needs the highest RX and TX levels to and from your sound card we will set them first and this will be the base reference for JS8CALL and ARDOP. FLDIGI Start FLDigi (and FLRig, as appropriate) FLDigi Configure/ Sound Card Select PulseAudio Server String: leave this field empty RPi Menu / Sound & Video / PulseAudio Volume Control Configuration tab - select your device and set to "Analog Stereo Duplex" Input Devices - set your sound device to 100% Output Devices - set your sound device to 100% Recording - look for fldigi icon capture- select your soundcard device and set to 100% Playback - look for fldigi icon playback- select your soundcard device and set to 100% Setup Rig TX and RX base levels Setup your rig ready to transmit at your desired RF power level into a dummy load. (as The Timtron would say Hey Dummy - use a dummy load!) Note: As a rule, when running digital or any continuous carrier mode (RTTY, FM, Etc), although there are some exceptions, you should set the TX power to no greater than 50% of the Rig's full rated power. Best to refer to the rig's manual to be sure. Overdriving the rig can distort the transmission, cause interference, overheat the the rig or worse burn out your final$. In FLDigi click the "Tune" button on the upper right of the menu bar. This will cause FLDigi to transmit a continuous carrier. Set your Signalink TX level to 50% and adjust your Rig's Mod level for the desired level of ALC and verify the desired RF power output. If your ALC it too high or the RF level can not be properly set then adjust the level of your sound device in the PulseAudio Volume control "Output Devices" Tab. Set the rig to a quiet (S-1 to S-3) section of the band and adjust the RX level until the little diamond (located on the lower right status bar left of the AFC button on FLDigi) just turns green. If it turns yellow your RX level is too high. Set your Signalink RX level and /or your Rig's RX level (if equipped) for the desired level. If your RX level can not be properly set then adjust the level of your sound device in the PulseAudio Volume control "Input Devices" Tab. --------------------------------------------------------------------- JS8CALL Start JS8Call Menu View/ Show Waterfall Controls/ uncheck "Flatten" This will give you a better and more accurate sense of your receive signal levels. "Flatten" is an AGC function that only works on the waterfall display and will make the waterfall appear to be good even when the signal levels are too high or too low. It has been noted that too much RX level will cause JS8CALL decode to fail. Menu File/ Settings (F2) Audio tab Soundcard Input: alsa_input.usb-(name of your soundcard CODEC).analog-Stereo Soundcard Output: alsa_output.usb-(name of your soundcard CODEC).analog-Stereo PulseAudio Volume Control Recording Tab - look for the Microphone icon: QTPulseAudio icon - select your soundcard device and set to approximately 30% (adjust for ~35 -- 40 dB in JS8Call CAT window lower left) Playback Tab - look for JS8 thunderbolt icon: QTPulseAudio icon - Note this will only appear while JS8Call is transmitting, Click the JS8CALL "Tune" button in the upper right. Select your soundcard device and set to approx 85% adjust for desired power and ALC levels. Or you can set this to 100% in Pulse Audio Volume control and adjust the JS8CALL TX level using the TX level attenuator in the lower Right. Many report better results when the TX power in JS8Call is 25 watts or less. --------------------------------------------------------------------- ARDOP/(g)ARIM Start ARDOP, (g)ARIM and ARDOP_GUI via the TNC Status App PulseAudio Volume Control Recording - look for Microphone icon ALSA plug-in [ardopc] - Select your soundcard device and set to 100% Playback - look for the spkr icon ALSA plug-in [ardopc] - Note this will only appear while ARDOP is transmitting. Put ARDOP into transmit mode, in ARDOP_GUI / Send / Send Two Tone Test, then in PulseAudio Volume Control, select your soundcard device and set to 100%, or if necessary adjust for proper RF power and ALC levels The above steps should only need to be performed once. Upon restarting the system you will have to reset the RX volume level for JS8Call each time, as unfortunately pavucontrol does not remember application specific receive volume settings. Caution: Be sure to leave Pulseaudio Volume Control running. You can collapse it to the task bar, but be sure to keep it running or you will experience strange behavior with JS8CALL and ARDOP. =========================================== TriMode Startup procedure Once FLRig, FLDigi, JS8CALL and Ardop/(g)ARIM are configured with your personal information and you desire to run all three programs or any combination of them, it is advisable to start and run in this order: 0. GPS Monitor (if no Internet) Note 1 1. PulseAudio Volume Control (pavucontrol) Note 3 2. FLRig Note 2 3. FLDigi 4. JS8CALL 5. ARDOPC Note 4 6. ARDOP_GUI 7. (g)ARIM =========================================== Notes Note 1. The "GPS Monitor" desktop shortcut is provided in the preconfigured Pi-Build images. If you build the image yourself you will need to start the GPS function manually: open a terminal window and type: gpsmon -n In the gpsmon terminal window keep an eye on the "TOFF" parameter. Once the GPS device acquires a 3-D fix the GPS device will start blinking its LED once per second. Once the GPS has a 3-D fix, it may take up to 45 seconds for the chrony daemon to adjust the Pi's software clock. Once the TOFF parameter indicates less than 0.0xxxx the the Pi's time is synced with GPS. The Raspberry Pi does not have a realtime clock built in. The design assumes the user will get time updated via the internet. If you do not have a GPS device and if Internet is not available, it is advisable to at least set the time and date via your watch to prevent file and log time date stamp confusion an possible OS corruption. The Pi appears to write out the time to a file at shutdown and will use that time when restarting, but the time will be late by the amount of time the pi was powered off. Further, JS8CALL requires accurate time. If you choose to set the time and date manually you can improve the time accuracy using the manual time sync feature in JS8CALL. You can lean how here: https://www.youtube.com/watch?v=Uik6S_J8ZoE -------------------------------------------------------------------- Note 2. FLRig is the preferred CAT method to control the radio, as it covers the most extensive set of rigs and has the most comprehensive control features of all the cat programs. JS8CALL includes integrated CAT control for direct use with FLRig. FLDigi macros integrate best with FLRig providing some useful control feature via Macros. No rig control program is perfect and while we find the rigs like the IC-7300 really shine with FLRig. Your mileage may vary. -------------------------------------------------------------------- Note 3. PulseAudio is the key to sharing the single sound device between the three programs. Due to some quirk in the Raspian OS, it is necessary to have the PulseAudio Volume Control running before starting JS8CALL or ARDOP, and it must remain running throughout. -------------------------------------------------------------------- Note 4. It is advisable to use the TNC Status app to start the following: PAVUCONTROL (PulseAudio Volume Control) RIGCTLD (not used with Signalink/VOX) ARDOPC ARDOP_GUI but for diagnostic purposes rigcltd, socat and piardopc can be started in separate windows in the proper sequence to observe the results. turn on the rig, start FLRig and pavucontrol then start each command in a separate window, in the order presented: rigctld -vvvvv -m 4 socat pty,link=/tmp/rigctl,waitslave,b38400 tcp:localhost:4532,retry /home/pi/Radio/ARDOP/piardopc 8515 pulse pulse --cat /tmp/rigctl:38400 --keystring 5420310A --unkeystring 5420300A rigctld if successful will return the last line: Closed rig model 4, 'FLRig - will reopen for clients' and sit quietly waiting for commands from piardoc via socat socat if successful, the cursor will drop tho the next line and appear unresponsive, this is OK as it is standing by. If it spewed some text and the returned the .. ~ $ command prompt, then there may be an issue Piardopc should return similar to this: PTTOnString 5420310A len 4 PTTOffString 5420300A len 4 ARDOPC Version 1.0.4.1j-BPQ LinBPQ Port /tmp/rigctl fd 4 CAT Control on port /tmp/rigctl ARDOP PTT TIOCMGET: Invalid argument ARDOP PTT TIOCMSET: Invalid argument PTT using CAT Port ARDOPC listening on port 8515 Capture Devices Card 1, ID `CODEC', name `USB Audio CODEC' Device hw:1,0 ID `USB Audio', name `USB Audio', 1 subdevices (0 available) Error -16 opening input device Playback Devices Card 1, ID `CODEC', name `USB Audio CODEC' Device hw:1,0 ID `USB Audio', name `USB Audio', 1 subdevices (0 available) Error -16 opening output device Opening Playback Device pulse Rate 12000 Opening Capture Device pulse Rate 12000 ARDOPC listening on port 8515 Input peaks = -8169, 8171 Input peaks = -8040, 8991 Input peaks = -9432, 8279 The four errors listed: ARDOP PTT TIOCMGET: Invalid argument ARDOP PTT TIOCMSET: Invalid argument Error -16 opening input device Error -16 opening output device are not actually errors as piardopc scans the system looking for resources and reports on them. The following indicate piardopc is functioning: Opening Playback Device pulse Rate 12000 Opening Capture Device pulse Rate 12000 ARDOPC listening on port 8515 Input peaks = -8169, 8171 Input peaks = -8040, 8991 -------------------------------------------------------------------- Note 5. PAT for Winlink or P2P Email Do NOT run PAT and ARIM at the same time, as they both use ARDOP and each in its own unique way and will conflict. If you are currently running ardop/arim, and you want to switch to PAT, first in ARIM disconnect from the TNC, (it is not necessary to terminate (g)arim) then via the TNC Status app, toggle off ARDOP, then toggle ARDOP back on and PAT on. When done with PAT, toggle PAT and ARDOP off, then toggle ARDOP back on and in (g)ARIM, reconnect to the TNC. -------------------------------------------------------------------- Note 6. Identifying the desired sound device. a. From within PulseAudio Volume Control, go to the Input Devices and/or Output Devices tabs and there it will list the hardware it finds. The Signalink should show up as a PCM290x device or similar. The BCM283x is the Pi's built in sound device. This is an output only device and may have several listings, as it provides for the onboard headphone output and the HDMI. You do not want this. If you have no use for the on board sound device, you can get rid of the clutter the onboard sound device causes by shutting it down in the Pi boot config. This has already been done in theh pi-Build image. In a terminal window: sudo nano /boot/config.txt scroll down to the bottom of the file and find the line that looks like: dtparam=audio=on and insert a # at the beginning of that line to comment it out, so it looks like: #dtparam=audio=on save the file and reboot.  Now when you run PulseAudio Volume Control only the Signalink device will appear. Should you want to reenable the built in sound output device, follow the above procedure and remove the # You can also list the sound devices by typing in a terminal window: aplay -l or arecord -l -------------------------------------------------------------------- Note 7. When closing any terminal windows, don't just click the "x" in the upper right, terminate the application with control-c or type exit !! -------------------------------------------------------------------- Note 8. dmesg is a useful tool. in a terminal type: dmesg a long list of kernel messages will be listed. The latest events will be at the end of the list. Plug in the Rig or Signalink and type dmesg again and the information about what the system did upon that device being plugged in will appear at the end of the list. This is very useful to determine the device name and how the kernel enumerated it. You can search dmesg by filtering with grep: dmesg | grep whatyouwanttofind (where whatyouwanttofind is the string you want to look for) try: dmesg | grep tty or dmesg | grep USB -------------------------------------------------------------------- Note 9. Setting an offset in chrony.config, to make the Pi's time more accurate relative to GPS time. In JS8CALL, you may notice that your time delta is consistently off relative to other operators. Some of the inexpensive GPS dongles have excessive latency causing a delay in the time reported over the USB vs the real GPS time. This can be compensated by setting an offset in chrony.config. Offset can be used to compensate for a constant error. The specified offset (in seconds) is applied to all samples produced by the reference clock. The default is 0.0 In a terminal: sudo nano /etc/chrony/chrony.conf locate and edit the line: refclock SHM 0 offset 0.0 delay 0.2 refid NMEA edit the offset 0.0 to reflect the offset desired. if JS8call is indicating a 750 ms offset, change offset to 0.75 The offset can also be made negative my preceeding the number with a - sign: offset -0.75 save file: ctl-x y enter restart chrony to read in the change: sudo service chronyd restart To test the GPS status: gpsmon -n TOFF (Time Offset) as displayed in the gpsmon -n indicates the time difference between your time source such as NMEA (GPS) and the Pi's internal clock register. If you set the offset to anything other then 0.0, then TOFF will always reflect this difference. Check JS8CALL to be validate the change. If it got worse then go back and change the sign or the amount until you are consistently within 100ms ======================================================== How TriMode came about During TREX-18 i was camped in a remote location on the south shore of Lake Superior in the Upper Peninsula of Michigan, and for a week operating completely off-grid. This was an excellent location, being very quiet and a great RF vantage point where i could communicate well with the East and the West coasts and as a result wound up handling a lot of relay traffic. At times there was bursts of simultaneous traffic with several AmRRON ops on close but diverse frequencies and using different modes, as well as occasional traffic on ARDOP/ARIM. I could see activity on the waterfall, but by the time i could switch, the traffic was missed. Well this got the wheels turning - How could one monitor all these modes using one rig? Many said it can be done with windows, but like the devil i cast Gates out of my life years ago and was determined to make this work on Linux. Linux is a very powerful and secure operating system and far more flexible than windows, only it takes time to learn how to use it. Oh sorry didn't mean to get into a Glock vs 1911 debate. Anyway here we are. Disclaimer: TriMode is not 100% bulletproof as the three applications are not totally aware of each other. It has been observed on very rare occasion when ARDOP is in an ARQ session and JS8CALL or FLDigi heartbeat or auto reply, that ARDOP segfaults and terminates. So it would be wise before engaging in a ARDOP/ARIM ARQ session to disable in JS8Call, Heartbeat and AUTO and in FLDigi FSQ, disable Sounder and turn off FSQ-ON. Check the link for updates: Tango Bravo-14 Build Scripts link: http://amrron.proboards.com/post/13973 Any Feedback / updates / corrections regarding this document, please contact Tango Kilo-05. 73