2018/06/09 04:47:25 Connecting to KK7FVG (ardop)... 2018/06/09 04:47:25 Accept ardop failed: TNC closed 2018/06/09 04:47:25 Unable to establish connection to remote: TNC closed 2018/06/09 04:47:25 Listener ardop failed: ARDOP TNC initialization failed: dial tcp [::1]:8515: connect: connection refused 2018/06/09 04:47:25 Will try to re-establish listener in the background... 2018/06/09 04:47:27 ARDOP TNC (ARDOP TNC_1.0.4.1b-BPQ) initialized 2018/06/09 04:47:27 Listener ardop re-established
pi@raspberrypi:/usr/share/pat/ardopc $ sudo systemctl status ardop@pi -l
● ardop@pi.service - ardopc - ARDOP softmodem for pi
Loaded: loaded (/lib/systemd/system/ardop@.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-06-09 04:47:26 UTC; 14min ago
Main PID: 15979 (sh)
CGroup: /system.slice/system-ardop.slice/ardop@pi.service
├─15979 /bin/sh -c cd /tmp && /usr/local/bin/ardopc
└─15980 /usr/local/bin/ardopc
Jun 09 04:47:25 raspberrypi systemd[1]: ardop@pi.service: Main process exited, code=exited, status=134/n/a
Jun 09 04:47:25 raspberrypi systemd[1]: ardop@pi.service: Unit entered failed state.
Jun 09 04:47:25 raspberrypi systemd[1]: ardop@pi.service: Failed with result 'exit-code'.
Jun 09 04:47:26 raspberrypi systemd[1]: ardop@pi.service: Service hold-off time over, scheduling restart.
Jun 09 04:47:26 raspberrypi systemd[1]: Stopped ardopc - ARDOP softmodem for pi.
Jun 09 04:47:26 raspberrypi systemd[1]: Started ardopc - ARDOP softmodem for pi.To the best of my recollection, here are the steps I used to set up Pat, Dire Wolf, Linux ax25 virtual KISS TNC, and PiARDOPc on my Raspberry Pi Zero W:
(these steps are mildly plagiarized - a menagerie of excerpts from other guides that I compiled into a step-by-step that worked for me up to this point)
Install and set up your Pi ------------------------------------ Connect your pi to a monitor and mouse or keyboard (raspberry pi zero w users may have to switch between mouse and keyboard for the first few steps) Set up your wifi and install Raspbian. Boot your Pi to Raspbian Desktop. Enable VNC and other services on Raspbian Desktop: Click the Raspberry icon (top-left) > Preferences > Raspberry Pi Configuration > Interfaces > Enable VNC, SSH, Serial (Video demo: https://www.youtube.com/watch?v=odSwRgTNYmg ) Open a terminal window: $ sudo apt-get update $ sudo apt-get upgrade In Rasbian Desktop, go to your home folder and then select "View > Show Hidden (CTRL-H)" Set up Fldigi, WSJT-x, Xastir - accessable via Raspbian Desktop VNC (more advanced modes require RaspberryPi 2B+ or better) -------------------------------------------------------------- Follow these instructions: http://oh8stn.org/blog/2018/05/24/wsjt-x-fldigi-on-raspberry-pi/ Xastir is an open-source project to create a free X11 graphical APRS(tm) client. APRS(tm) use amateur radio and Internet services to convey GPS mapping, weather, and positional data in a graphical application. It has been developed by and for amateur radio enthusiasts to provide real-time data in an easy to use package. $ sudo apt-get install xastir Set up Pat webserver (ARDOP, AX.25, optional WINMOR??) -------------------------------------------------------------- Demo: https://www.youtube.com/watch?v=yzu0_JhQ88E [ references: http://la4tta.blogspot.com/2018/04/winlink-on-raspberry-pi-zero-w.html ] Install Pat Download and install Pat for RasPi (the file pat_x.x.x_linux_armhf.deb , where x.x.x is the latest version number): http://getpat.io/ $ sudo dpkg -i pat_x.x.x_linux_arch.deb [references: https://github.com/la5nta/pat/wiki/Install-FAQ ] Set up a Winlink account (if you don't already have one) On Windows (or equivalent) download and install Winlink Express. Run Winlink Express. Enter your callsign, maidenhead square location, a password, and your email, then click the "Update" button. Connect to their server via telnet to make your first internet contact with the Winlink servers. Configure Pat (callsign and rig control) $ echo 'export EDITOR=nano' >> ~/.profile $ source ~/.profile $ pat configure Look for the attributes mycall, locator and secure_login_password and set them appropriately. Example: { "mycall": "LA5NTA", "locator": "JP20qe", "secure_login_password": "MYPASSWORD", } For using the web gui from another device on the network, like your phone it is important to remove localhost from the http addr line. It should look like this. "http_addr": ":8080", If you need/want rig control (for PTT and QSY over CAT) you will have to define which rig (listed in hamlib_rigs) the application should use. Example: "winmor": { "addr": "localhost:8500", "inbound_bandwidth": 1600, "rig": "ft897", "ptt_ctrl": true }, Where the "ft897" rig's config looks like this (for use with rigctld): "hamlib_rigs": { "ft897": {"address": "localhost:4532", "network": "tcp"} }, [references: https://github.com/la5nta/pat/wiki/The-command-line-interface ] Set up Pat's Rig control: Follow the instructions here: https://github.com/la5nta/pat/wiki/Rig-control (don't re-install hamlib) (FYI, the Xeigu x5105 acts like an Icom 7000) $ rigctl -l ... 360 Icom IC-7000 0.7.2 Beta [references: https://github.com/la5nta/pat/wiki/Rig-control - don't re-install hamlib] Install PiARDOPc (ARDOP protocol for the Winlink network. ARDOP may replace WINMOR in the future.) Download piardopc (from http://www.cantab.net/users/john.wiseman/Documents/ARDOPC.html ) Put piardopc into "/usr/local/bin/" In the terminal, navigate to "/usr/local/bin/", rename piardopc to ardopc, then make it executable $ cd /usr/local/bin $ sudo rename piardopc ardopc $ sudo chmod 755 ardopc Navigate back to your home folder $ cd ~ Connect a USB sound card. Run this command, then write down the numbers of "card #:" and "device #:" for your USB sound card. $ arecord -l **** List of CAPTURE Hardware Devices **** card 1: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 Open (or create) the file .asoundrc in your home folder, by typing $ nano .asoundrc This file should contain the following lines (just copy and paste the lines below) Replace the numbers in "plughw:1,0" with your card # and device # (from arecord). pcm.ARDOP { type rate slave { pcm "plughw:1,0" rate 48000 } } CTRL+o saves the file and CTRL+x exits nano. Install Pat's PiARDOPc's "systemd" script $ sudo /usr/share/pat/ardopc/install-systemd-ardop-unit.bash Check to see if ardop is enabled as a system service (CTRL+C to exit). If not, enable it. $ systemctl list-unit-files $ sudo systemctl enable ardop@pi Try starting ardopc, then check its status. $ sudo systemctl start ardop@pi $ sudo systemctl status ardop@pi -l (You can also manually start ardopc by running the command: $ /usr/local/bin/./ardopc ) Test a transmission in Pat via its web interface. 2018/06/08 20:12:21 ARDOP TNC (ARDOP TNC_1.0.4.1b-BPQ) initialized 2018/06/08 20:12:21 Connecting to KK6FVG (ardop)... 2018/06/08 20:12:59 Unable to establish connection to remote: Connect timeout [references http://la4tta.blogspot.com/2018/04/setting-up-ardop-on-raspberry-pi.html ] Install Direwolf (AX.25 protocol for the Winlink network) Direwolf is a packet soundcard modem ax25 is the connection between the Pat Winlink client and Direwolf A USB soundcard and Cat control between the Raspberry Pi and a Radio $ git clone http://github.com/wb2osz/direwolf $ cd direwolf $ git checkout 1.5-beta2 $ make $ sudo make install-conf $ cd .. $ cp ~/direwolf/direwolf.conf ~/direwolf.conf $ sudo apt-get install libasound2-dev $ sudo apt-get install libudev-dev Go to your home directory and try to run “direwolf.” $ cd ~ $ direwolf You should see something like this, because we have not yet configured it for using an audio device. Dire Wolf version … Audio device for both receive and transmit: default Could not open audio device default for input No such file or directory Pointless to continue without audio device. List audio outputs and inputs connected to your Pi $ aplay - l **** List of PLAYBACK Hardware Devices **** card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA] Subdevices: 7/7 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0 $ arecord -l **** List of CAPTURE Hardware Devices **** card 1: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio] Subdevices: 0/1 Subdevice #0: subdevice #0 $ sudo nano direwolf.conf Add a line under the commented code so it looks like this (yes, "ADEVICE plughw:1,0" is listed twice here, one commented example and one un-commented to run as code): (plughw: numbers set to your audio device. If you wanted to use [USB Audio CODEC] from the arecord list above, you'd use 1,0) # Linux ALSA is complicated. See User Guide for discussion. # To use something other than the default, generally use plughw # and a card number reported by "arecord -l" command. Example: # ADEVICE plughw:1,0 ADEVICE plughw:1,0 Save the file with CTRL+X, y, Enter I'm not sure what this step is for, but it was recommended - I think something to do with CAT control? $ sudo usermod -a -G dialout $USER Direwolf can be used with Linux AX25 virtual KISS TNC instead of a physical TNC, so let's install Linux ax25 network suport: $ sudo apt-get install libax25 ax25-apps ax25-tools To enable an ax25port for Pat, edit "/etc/ax25/axports" to include this last line and no line breaks: $ sudo nano /etc/ax25/axports # /etc/ax25/axports # # The format of this file is: # # name callsign speed paclen window description # #1 OH2BNS-1 1200 255 2 144.675 MHz (1200 bps) #2 OH2BNS-9 38400 255 7 TNOS/Linux (38400 bps) wl2k KI7POL 0 255 7 Winlink Where KI7POL is your own ham radio license callsign. Do not insert any blank lines in /etc/ax25/axports, otherwise kissattach may fail with a parse error. [ references: https://github.com/la5nta/pat/wiki/AX25-Linux ] Let's run Direwolf with -p to see where it's set up our Linux ax25 virtual KISS TNC port. Fun fact: Your virtual KISS TNC is connected to "/tmp/kisstnc", which is also forwarded to "/dev/pts/#" (where # is whatever number is available at the time) $ direwolf -p Dire Wolf version 1.5 (Jun 5 2018) Beta Test 2 Includes optional support for: hamlib Reading config file direwolf.conf Audio device for both receive and transmit: plughw:1,0 (channel 0) Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, E+, 44100 sample rate / 3. Note: PTT not configured for channel 0. (Ignore this if using VOX.) Ready to accept KISS TCP client application 0 on port 8001 ... Ready to accept AGW client application 0 on port 8000 ... Virtual KISS TNC is available on /dev/pts/2 Created symlink /tmp/kisstnc -> /dev/pts/2 Keep direwolf running. Open a new terminal window to set up Linux ax25's config file $ sudo nano /etc/default/ax25 Change "DEV=" to your ax25 virtual KISS TNC port ("/tmp/kisstnc"). "AXPORT=" should be "wl2k" (to match the value in "/etc/ax25/axports") # Configuration for AX.25 systemd unit file from Pat. # The axport from /etc/ax25/axports to bring up. AXPORT=wl2k # The AX.25 baudrate the TNC is configured for. # Make sure this matches the HBAUD setting of your TNC. HBAUD=1200 # The TNC serial path. DEV=/tmp/kisstnc # Script for initializing the TNC. # # This optional parameter is convenient when dealing with TNCs that require # additional initialization, e.g. entering KISS mode. Modify to fit your own needs. # #TNC_INIT_CMD="/usr/local/bin/my_tnc_init_script --serial-tty $DEV --hbaud $HBAUD" # # Example (for Kenwood TH-D7x and TM-D7x0): # Download, modify, compile and install http://www.trinityos.com/HAM/CentosDigitalModes/usr/src$ #TNC_INIT_CMD="/usr/local/bin/tmd710_tncsetup -B 1 -S $DEV -b $HBAUD" Save the file with CTRL+X, y, Enter [references: https://github.com/wb2osz/direwolf/blob/master/doc/User-Guide.pdf , Direwolf User Guide: Section 5.6] Install Pat's ax25 "systemd" script and enable the AX.25 interface on startup $ sudo /usr/share/pat/ax25/install-systemd-ax25-unit.bash $ sudo cp /usr/share/pat/ax25/ax25.service /etc/systemd/system/ax25.service $ sudo systemctl enable ax25 Now see if the Linux ax25 interface will run (Direwolf must be running in the backround whenever ax25 is run - also make sure Direwolf is still outputting to the same "/dev/pts/#" value you set in "/etc/ax25/axports") $ sudo systemctl start ax25 Check status/error log with the following command: $ sudo systemctl status ax25 -l Shut down the Linux ax25 interface and Direwolf's kiss with these commands $ sudo systemctl stop ax25 $ sudo killall kissattach [references: https://github.com/la5nta/pat/wiki/AX25-Linux ] [references: https://github.com/wb2osz/direwolf/blob/master/doc/User-Guide.pdf ] [references: https://www.kevinhooke.com/2015/09/12/direwolf-soundcard-packet-on-linux-with-ax25-and-linpac/ ] [references: https://github.com/wb2osz/direwolf/releases ] [references: https://github.com/wb2osz/direwolf/blob/dev/doc/README.md ] UNTESTED: Pat can't control PTT for Direwolf since there is no way for Pat to know when Direwolf needs the radio to key up. You must set up Direwolf to key up the radio directly [references: https://groups.google.com/forum/#!topic/pat-users/7rnqVhx2zR4 ] Optional support for hamlib instead of Pat?? ---------------------------------------------- Skip this step if you don’t want to use “hamlib.” “hamlib” can be included to provide support for additional types of PTT control. It will need to be built from source because a Raspbian package doesn’t seem to be available at this time. Here is my “cheat sheet” version boiled down from http://hamlib.sourceforge.net/manuals/1.2.15/_rdmedevel.html $ sudo apt-get install automake libtool texinfo $ cd ~ $ git clone git://git.code.sf.net/p/hamlib/code hamlib $ cd hamlib autogen.sh is not on the default master branch so select a specific version. $ git checkout 1.2.15.3 $ sh autogen.sh $ make $ make check $ sudo make install $ cd ~ You should now have many new files including: /usr/local/include/hamlib/rig.h /usr/local/lib/libhamlib.so When building direwolf, the compiler and linker know enough to search /usr/local/include/… and /usr/local/lib/… but when it comes time to run direwolf, you might see a message like this: direwolf: error while loading shared libraries: libhamlib.so.2: cannot open shared object file: No such file or directory Edit your ~/.bashrc file and add this after the initial comment lines, and before the part that tests for running interactively. export LD_LIBRARY_PATH=/usr/local/lib Type this so it will take effect now, instead of waiting for next login: $ source ~/.bashrc The direwolf/Makefile.linux file detects whether the include/hamlib/rig.h header file is present and automatically enables hamlib support. If, for some reason, you have hamlib installed but you don’t want direwolf to use it, look for a section, similar to the following, and remove it. Enable hamlib support if header file is present. enable_hamlib := $(wildcard /usr/include/hamlib/rig.h /usr/local/include/hamlib/rig.h) ifneq ($(enable_hamlib),) CFLAGS += -DUSE_HAMLIB LDFLAGS += -lhamlib endif [relevant manual: https://github.com/wb2osz/direwolf/blob/dev/doc/Raspberry-Pi-APRS.pdf ] OPTIONAL EXPERIMENTAL / DOESN'T RUN WELL / CAN'T GET THIS TO RECEIVE COMMANDS FROM PAT YET ON PI ZERO W: Install ExaGear. Inside ExaGear, install Wine + Winetricks + Internet Explorer 6 + .NET 2.0 + Winmor TNC (WINMOR for Winlink communication)?? <-- Not sure if this works on Pi Zero W Install an x86 emulator (ExaGear is five times faster than Qemu, but ExaGear costs about $30 for a license - demo for 3 days) $ sudo apt-get install exagear-desktop [ references: ExaGear vs Qemu https://www.youtube.com/watch?v=0yZ5UiQyeFA ] [ references: https://docs.eltechs.com/install-and-configure-exagear-desktop/how-to-install-exagear-desktop-trial ] [ references: How to install ExaGear trial https://www.youtube.com/watch?v=INrFbDgo2mY ] Run ExaGear to enter its guest system $ exagear You are now inside ExaGear's guest system - you're "inside the x86 world" in the terminal, ...which is also very slow to install things in. You can check to see if you're in ExaGear ("i686") or regular Raspbian (armv7L) by typing $ arch Update linux packages inside the ExaGear guest system. $ sudo apt-get update I recommend skipping "sudo apt-get upgrade" since it's not really needed and TAKES ABOUT THREE HOURS(!) But I did do this step not knowing how long it would take. Install Wine inside ExaGear (this will run for at least two hours) $ sudo apt-get install wine ... Configuration file '/etc/pulse/client.conf' ==> File on system created by you or by a script. ==> File also in package provided by package maintainer. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** client.conf (Y/I/N/O/D/Z) [default=N] ? Keep the original /etc/pulse/client.conf file (press N then enter) ... saned.service load error (Invalid argument) <--scanner issue, ignore for now Once the installation process is finished make sure that you have the Eltechs build of Wine installed: $ wine -version wine-2.0-eltechs [ references: https://ubuntuforums.org/showthread.php?t=972445 ] !$ exit !$ sudo reboot !$ exagear Now you can run .exe files with Wine and get x86 Windows programs installed and running on your Raspberry Pi. [references: https://hackaday.io/project/21023-run-wine-on-raspberry-pi/details ] Install the latest winetricks (Make sure you don't have it installed) $ sudo apt-get remove winetricks $ wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks $ chmod +x winetricks $ sudo mv -v winetricks /usr/local/bin Fake the installation of internet explorer 6. There's probably a more elligant way to do this step by just installing reg keys, but this is how I did it ? $ winetricks fakeie6 <-- TRY THIS FIRST (might also be able to add fake registry keys: https://wiki.winehq.org/Useful_Registry_Keys ) [references: https://askubuntu.com/questions/17821/how-to-install-or-mock-internet-explorer ] ? $ winetricks ie6 <-- TRY THIS SECOND ? $ sudo apt-get install cabextract <-- not sure if this step is needed ? $ sudo apt-get install zenity <-- SLOWEST WAY, TRY THIRD ? (Choose install application, next, cancel, install a windows app or component, next, ???, Internet Explorer 6) Ensure wine is set up with a win32 environment (The RM command will delete your previously installed wine applications): $ rm -rf ~/.wine; WINEARCH=win32 wineboot DON'T INSTALL the Wine Mono Installer when prompted. DON'T INSTALL Gecko? [references: http://www.earthmode.org/9-27-2017%20Installing%20Raspbian-exagear%20v2.3.htm ] fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20 fixme:ntdll:NtLockFile I/O completion on lock not implemented yet err:mscoree:LoadLibraryShim error reading registry key for installroot err:mscoree:LoadLibraryShim error reading registry key for installroot err:mscoree:LoadLibraryShim error reading registry key for installroot err:mscoree:LoadLibraryShim error reading registry key for installroot fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20 fixme:ntdll:NtLockFile I/O completion on lock not implemented yet err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution. fixme:iphlpapi:NotifyIpInterfaceChange (family 0, callback 0x6a0cb608, context 0x9386c0, init_notify 0, handle 0x116e794): stub wine: configuration in '/home/pi/.wine' has been updated. Hit CTRL+C and ENTER $ ^C Install .NET 2.0 (if you get an error, you may need to update winetricks. However, different versions of winetricks break some apps...) $ winetricks dotnet20 Keep clicking "Retry" whenever that comes up. [ refences: https://askubuntu.com/questions/17821/how-to-install-or-mock-internet-explorer?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa ] Download a winmor installation from: ftp://autoupdate.winlink.org/WINMOR%20TNC/ Extract the winmor installation into ~/.wine/drive_c/winmor Start WINMOR TNC $ wine ~/.wine/drive_c/winmor/WINMOR\ TNC.exe Configuration of audio devices must be done under WINMOR's "Help > Basic Setup" dialog tab. The default configuration of winmor only listens for traffic on localhost. If you plan on running Pat and WINMOR on different machines you'll need to ensure that winmor is set up to listen on the correct network interface. A simple solution can be to set it to listen on all interfaces by setting the "TCP Address" to 0.0.0.0 (under WINMOR's "Basic Setup" dialog). The WINMOR TNC uses port 8500 and 8501 by default. Enter your callsign, gridsqure, and soundcard output (avoid pulseaudio; ALSA works fine) For changes to WINMOR's configuration to take effect, you'll need to restart the application (Help > Close) [references: https://github.com/la5nta/pat/wiki/WINMOR-TNC ] Exit the terminal window.
Optional: Configure Pat to listen for certain protocols? --------------------------------------------------------- $ pat configure Now change "listen": [] to "listen": [ "ax25", "telnet", "ardop" ], Run everything? (Direwolf and ARDOPc seem to fight with eachother) --------------------------------------------------------------------- Start Pat From another terminal window run ... $ pat interactive --http This starts Pat in interactive mode and the http server. Interactive mode lets you start and stop listeners and some other neat stuff. Test from your web browser. Start Direwolf (AX.25) Open a terminal and start Direwolf before ax25. Always run with the -p flag. $ direwolf -p Then open another terminal and start Linux AX.25 virtual KISS TNC $ sudo systemctl start ax25 You can check Linux ax25 status/error logs with the following command: $ sudo systemctl status ax25 -l Optional: You can bring down the Linux ax25 interface with $ sudo systemctl stop ax25 Optional: You can shut down Direwolf's kissattach $ sudo killall kissattach Start PiARDOPc (ARDOP) !Open a separate terminal (or ssh). !(note: If running both Winmor and Ardop, Winmor must be run from within its ExaGear environmet before ardop is started. Otherwise Winmor won't start.) !(note: direwolf doesn't run when ARDOP is running if they are sharing the same sound card for input audio) $ sudo systemctl start ardop@pi $ sudo systemctl status ardop@pi -l Start WINMOR TNC (WINMOR) $ wine ~/.wine/drive_c/winmor/WINMOR\ TNC.exe Open a web browser on a device connected to the same network as your pi. Go to [the ip adress of the Pi]:8080 Run some commands to test things. If you get errors in the black command-line window at the bottom of the webpage, go back to your Pi and check the terminal window that you started Pat in for more detail on logged errors.