D Rats Client Testing - wb8tyw/D-Rats GitHub Wiki

D-Rats Client Testing

Linux

Command Line

This is assuming that python2 is installed as the default python.

Simplest test is to simply set the working directory to the checked out clone of the repository.

Then from the shell, run the ./d-rats.py command, optionally specifying an alternate configuration file.

Since it appears that I can not pass command line parameters to the python program being debugged by Visual Studio Code, definitely use an alternate configuration.

./d-rats.py --config ~/.d-rats-ev/d-rats2.config

Then set your callsign and suffix for testing, and connect it up only an internal ratflector if this is the first invocation.

Currently I am also seeing this in the console repeated over and over again. This is with not changing the default DPRS settings. So this indicates a bug to chase down eventually.

10/17/2020 17:57:41 Gps         : Failed to parse DPRS comment: BN  *20 
10/17/2020 17:57:41 Gps         : CHECKSUM(WB8TYW-1): 75 != 32
10/17/2020 17:57:41 Gps         : Checksum : *20 
10/17/2020 17:57:41 Gps         : _checksum: *4B 
10/17/2020 17:57:41 Gps         : astidx   : 4 

NOTE FROM MAURIZIO: If i recall well the DPRS errors occur when you changed your callname and or the DPRS comment but you didnt updated the GPS comment clicking on the dedicated button into the configuration panel. when you click on the button D-Rats recalculate and stores the expected checksum so then that errors doesn't show up. There was a note about this at point 2) https://github.com/maurizioandreotti/D-Rats/wiki/101---First-time-config Maybe the message logged it's not really self explaining for the end user and should be rephrased suggesting the solution

In order to execute it with maximum verbosity to control what is happening:


If you have two serial ports, physical or USB, you can test the communications over the serial line instead of just the internet. Two D-rats programs can be connected over a null-modem cable, so you do not need radios for all testing.

Visual Studio code

Visual studio code requires the python-ipykernel package on Debian based systems to launch D-rats in an Interactive Window. Not sure that is required to run it in debug, but was the first thing I tried.

Annoyingly it seems to be stuck in a loop requesting permission to install it, which I suspect is from Pypi instead of the distro packages, until the package shows up. Eventually it gave up the retries and worked after I installed the module. So I an now use Studio Code on Linux for debugging.

Open the d-rats.py file in the editor and make sure it is the tab with the current focus, and set a break point just after the line 'if name == "main"' to test it out. Then click on the continue button to make sure that it runs.

Microsoft Windows

Install Msys2 by following the instructions at msys2.org following this wiki: https://github.com/wb8tyw/D-Rats/wiki/Development-Packages-Required

Save and Execute this script:

#!/usr/bin/bash

mingw='mingw-w64-x86_64'

pacman -Syu --noconfirm \
    "${mingw}-python" \
    "${mingw}-gtk3" \
    "${mingw}-python3-gobject" \
    "${mingw}-python-six" \
    "${mingw}-aspell" "${mingw}-aspell-en" \
    "${mingw}-python-pywin32" \
    "${mingw}-python-lxml" \
    "${mingw}-python-pyserial"

# Note six is intended to be phased out.

# Development:
#pacman -Syu --noconfirm mingw-w64-x86_64-glade

# other
#pacman -S mingw64/mingw-w64-x86_64-python-pylint

Eventually on Microsoft windows the goal would be to have a shortcut launch D-rats.

For testing though we don't need it.

Dos-box

Powershell command line

Visual Studio Code