Re: Package Installation Scripts (Was: Re: [RaspberryPi-4-HamRadio] Brand New to Raspberry Pi)
On Wed, 24 Jun 2020 12:43:29 -0500, "John Nicholas"
<stnick@IWICHITA.COM> wrote: Larry,You're welcome. Me too. And, Unix/Linux evolves over time, so it's difficult to stay up to date if you're not continually using it. I'll be looking forward to them. Once you've experienced the ~6dB gain of a hexbeam, you're station will be forever changed. You can build one from plans here: http://www.hex-beam.com/ . And, although the minimum height for optimal performance in 24', they work remarkable well at much lower heights. I'm sorry to hear that. I got my General license in 2012, and promptly erected a hexbeam and fan-dipole all by my self. (See: http://kj6yvt.com/hex-beam.htm ) It was difficult (and frightening) at my age. Now eight years older, I'm unwilling to risk the roof, so I am unable to make repairs. Congratulations. I passed both tests at one sitting too.
|
|
Re: GPS install
Bill AA6BD
Wow, David, great article, and with LOTS of other information, too.
-- Bill AA6BD
|
|
Re: Bluetooth...
Chuck M
Had similar problems when running Logitech wireless mouse and kb using fldigi and other apps. Wireless is power hungry and may be the problem. If you get a powered USB hub for the wireless dongle, that can make it work as well. Usually can find USB 2.x powered hubs for a low price on ebay or Amazon. Don't need USB 3 for wireless. Didn't have the problem when running LIbreOffice or other apps. Think it becomes an issue when processor is busy decoding the radio signals. Possibly someone more knowledgeable on RPi can expand this further. 73 Chuck KD9DVB
On Wednesday, June 24, 2020, 6:22:18 PM EDT, Marty Hartwell <mhartwe@...> wrote:
Hi Stephen I use a Logic brand keyboard and mouse set I got at Office Depot for about 15.00 Dollars of so, which uses only one USB Bluetooth interface, so it opens one USB slot. I don't see any lag time as in pauses using the mouse and not pausing during typing but my typing has gotten slower for a while. Guess I need to get back to typing for more practice. Marty kd8bj
On 6/24/20 5:14 PM, stephen shearer
wrote:
I have been using my RPi both headless and with a monitor. When sitting at
the monitor, I have tried Bluetooth for the mouse and
keyboard. Am I doing
something wrong? Not a big deal but it would be nice to reduce USB ports required... 73, steve WB3LGC
I will be using
my RPi for FT8/FT4 80M/40M during FD - 1E DE
|
|
Re: Bluetooth...
Marty Hartwell
Hi Stephen I use a Logic brand keyboard and mouse set I got at Office Depot for about 15.00 Dollars of so, which uses only one USB Bluetooth interface, so it opens one USB slot. I don't see any lag time as in pauses using the mouse and not pausing during typing but my typing has gotten slower for a while. Guess I need to get back to typing for more practice. Marty kd8bj
On 6/24/20 5:14 PM, stephen shearer
wrote:
|
|
Bluetooth...
stephen shearer
I have been using my RPi both headless and with a monitor. When sitting at
the monitor, I have tried Bluetooth for the mouse and
keyboard. Am I doing
something wrong? Not a big deal but it would be nice to reduce USB ports required... 73, steve WB3LGC
I will be using
my RPi for FT8/FT4 80M/40M during FD - 1E DE
|
|
Re: Package Installation Scripts (Was: Re: [RaspberryPi-4-HamRadio] Brand New to Raspberry Pi)
Ray Wells
On 25/6/20 2:32 am, Larry Dighera wrote:
On Mon, 22 Jun 2020 11:12:56 -0500, "John Nicholas"The tool dos2unix is handy for massaging a Windows generated text file into Unix (Linux) format, it strips the CR that can cause a script to fail. sudo apt-get install dos2unix Ray vk2tv
|
|
PAT Question
Ed Bloom, KD9FRQ
What are the steps needed to recognize a Digipeater using the mheard command
then interogate the Digpeater to see what stations it hears then send a message to a station the Digipeater hears but my station cannot? 73s, Ed, KD9FRQ
|
|
Re: Package Installation Scripts (Was: Re: [RaspberryPi-4-HamRadio] Brand New to Raspberry Pi)
Larry,
toggle quoted messageShow quoted text
Thanks for all the info and the scripts. I should handle them easily with some practice. My Unix Command Line Skills have deteriorated over the last 15 years, with minimal usage. I may come back with questions as I get into it. 1st Priority is supervise my SIL install a 6 meter and 10 meter dipole, perhaps one to night and one tomorrow night. I was installing them along with a 20 and 40 meter on the roof. Then I fell down some steps on the 13th and broke some ribs. I got my tech and general tickets on March 14. The HF stuff is set up and awaiting a tuned antenna. I’d like to make a few contacts with Field Day, then work on the Pi stuff. de KE0ZUW John Nicholas Amateur Radio General Class Operator Member ARRL, Wichita ARC, & Air Capitol ARC Grid Square EM17im
|
|
Re: Tnc-x PI
N5XMT
My command was different as I'm using i2c to communicate with the TNC... so still use the /dev/serial0 0
|
|
Re: Tnc-x PI
N5XMT
changes with pitnc_setparams: pi@HamPi8:~/pitnc $ pitnc_getparams 1 30 TNC Software Version 11 01 TXDelay - Zero means use ADC 50 02 Persistance 64 03 Slottime (in 10 mS) 40 04 TXTail 30 05 Full Duplex - Not used 0 06 Our Channel (Hex) 00 07 I2C Address (0 = async) Hex 00 08 Mode Speed 1200 09 RX Level (Config) 128 10 TX Level 255 11 RX Level (Actual) 128 13 Centre Freq 1700
On Wed, Jun 24, 2020 at 9:36 AM Don Poaps <va7dgp@...> wrote:
|
|
Re: Tnc-x PI
I redid the sudo raspi-config > serial Etc. pi@raspberrypi:~/pitnc $ sudo ./pitnc_getparams /dev/serial0 0 Using Serial port /dev/serial0 retrying... TNC Software Version 8 01 TXDelay - Zero means use ADC 50 02 Persistance 255 03 Slottime (in 10 mS) 255 04 TXTail 255 05 Full Duplex - Not used 255 06 Our Channel (Hex) ff 07 I2C Address (0 = async) Hex ff 08 Mode Speed 25500 09 RX Level (Config) 255 10 TX Level 255 11 RX Level (Actual) 255 13 Centre Freq 2550 8 8 32 ff ff ff ff ff ff ff ff ff ff ff cd c0 sum 0 pi@raspberrypi:~/pitnc $ Not all I need is to get APRS and Figure out Pat Configure, 73 Don va7dgp/va7qu
On Wed, Jun 24, 2020 at 12:32 AM John Wiseman <john.wiseman@...> wrote:
|
|
Package Installation Scripts (Was: Re: [RaspberryPi-4-HamRadio] Brand New to Raspberry Pi)
On Mon, 22 Jun 2020 11:12:56 -0500, "John Nicholas"
<stnick@IWICHITA.COM> wrote: So when I decide to add an app to my collection. Do I add it via the etcher to the download, or onto the SD Card, or download after everything is up and runningHello John, Raspbian, a derivative of Debian, uses the 'apt' command, or the curses-based menu-driven 'aptitude' command-line package manager to add software packages to your system. You'll also find a GUI software manager in the applications menu-tree at the upper left corner of your desktop. You appear to be comfortable with the command-line interface, as am I, so below (and attached) are a few scripts I've written for my own use in adding packages. These are a bit crude, contain inconsistencies, and surely could be cleaned up and re-written in a more elegant manner, but I find them very useful none the less. The first is 'apt.sh' which I run to see if there are any updates available, before actually downloading a package: ----------------------------------------------------------------------- # apt.sh Initialize package handler # LGD: Mon Jun 5 11:58:39 PDT 2017 #set -xv # DEBUG LOGFIL="$HOME/logs/$0.log" [[ -d ${HOME}/logs ]] || echo -e "\n$0\: Log directory $LOGFIL does not exist$(exit 2)" >&2 # Check for internet connection STAT(){ ping -c1 -q 8.8.8.8 2>/dev/null 1>/dev/null ;STATUS=`echo $?` return $? } # Check for stale lock file LOCKED(){ LOCFIL=/var/lib/dpkg/lock if [[ -f $LOCFIL ]] ;then # Does stale lock file exist? ls -l $LOCFIL # Display lock file parameters read -n 1 CHOICE?"`echo -e \"\nRemove Lock File [Y/n/q]?\c\"`";echo # Prompt for user action case $CHOICE in q|Q*) exit ;; # Quit this script *) echo; rm $LOCFIL;return "$?" ;; # Remove lock file and return to caller with command status esac fi return 0 } LOCKED # Check for stale lock file until [[ $STATUS -eq 0 ]] ;do # Wait for network connection echo -e "Waiting for network connection." sleep 3 STAT done setterm -foreground green # Set text color to green echo -e "\n\tNetwork connection successful\n"; #setterm -foreground white # Set text color to white setterm --default # Set terminal to default values aplay -q /usr/lib/libreoffice/share/gallery/sounds/apert.wav # Announce successful network connection echo;date +%A", "%B" "%d", "%Y" "%R read -n 1 CHOICE?"`echo -e \"\nUpdate apt package system before continuing [Y/n]? \"`";echo case $CHOICE in [nN]) exit ;; # Don't update *) echo -e "\n##### `date` ####" >> ${LOGFIL};apt-get update 2>&1 | tee -a ${LOGFIL} && apt-get --show-progress upgrade 2>&1 | tee -a ${LOGFIL} ;; # Update esac read -n 1 CHOICE?"`echo -e \"\nUpgrade Debian system before continuing [Y/n]? \"`";echo case $CHOICE in [nN]) exit ;; # Don't upgrade *) date >> ${LOGFIL};apt-get --show-progress dist-upgrade 2>&1 | tee -a ${LOGFIL} ;; # Ugrade esac ----------------------------------------------------------------------- Between the effects of word-wrap and Windows Carriage-return, Line-feed convention to end lines, the above will require some editing to use. The attachments won't have those issues. The next script, 'show.sh' is used to query the package database to find if it contains a package supplied as an argument after the command itself. I often find it useful to append a '\*' after the package name to display package name variants. ----------------------------------------------------------------------- #! /bin/ksh # show.sh Display package information # # LGD: Sat 25 Jun 07:56:55 PDT 2016 # LGD: Mon 13 Feb 16:23:15 PST 2017 Added smart-pager support # if [[ $(tty |grep pts) ]] ;then export LESS="-P\ ?f%f .?n?m(file %i of %m) ..?ltlines %lt-%lb?L/%L. : byte %bB?s/%s. .?e(END) ?x- Next\: %x.:?pB%pB\%..%t (pts`tty|cut -d/ -f4`) " else export LESS="-P\ ?f%f .?n?m(file %i of %m) ..?ltlines %lt-%lb?L/%L. : byte %bB?s/%s. .?e(END) ?x- Next\: %x.:?pB%pB\%..%t (`tty|cut -d/ -f3`) " fi # USAGE: Multi-package search not yet implemented [[ $# -lt 1 ]] && echo -e "\n\tUsage: $0 [package name] \<package name\> \<...\>\n" >&2 && exit 1 LOGFIL="$HOME/logs/$0.log" [[ -d ${HOME}/logs ]] || echo -e "\n$0\: Log directory $LOGFIL does not exist$(exit 2)" >&2 #set -x SRCH=$(echo "$@"|sed 's/*/\\\\*/') # Escape * so shell doesn't show filenames FOUND=$(/usr/bin/apt-cache show $SRCH 2>&1) # BUG: Fails to assign value to $FOUND #FOUND=$(/usr/bin/apt-cache show "$SRCH") if [[ `echo "$FOUND"|grep "purely virtual"` ]] ;then # BUG: This fails to display output echo "$FOUND" >&2; exit 1 elif [[ `echo "$FOUND"|grep "No packages found"` ]] ;then echo "$FOUND" >&2; exit 1 else # Only pipe output through less when necessary [[ `echo "$FOUND"|wc -l` -gt 30 ]] && echo "$FOUND"| less -p 'Package:' [[ `echo "$FOUND"|wc -l` -le 30 ]] && echo "$FOUND"; exit fi ----------------------------------------------------------------------- You'll notice that I'm using the Korn Shell (ksh) command-line interpreter. If you want to use it, you'll have to install it with: 'apt-get install ksh' first. Otherwise, I'll leave the editing to support bash or sh as an exercise. :-) I like 'ksh' because, it supports 'vi' command-line editing and floating-point math, and it was what I learned back in the '80s. And finally, here is 'get.sh' to actually install the package: ----------------------------------------------------------------------- #! /usr/bin/ksh # # get.sh Install packages # # A front-end for 'apt-get' that provides package installation information before installing packages and logs actions # # LGD: Sat 25 Jun 07:56:55 PDT 2016 # LGD: Tue 05 May 2020 10:43:28 AM PDT: Bug fixes and enhancements # # Check for positional parameters [[ $# -lt 1 ]] && echo -e "\n\tUsage: $0 [package names]\n" && exit 1 # Set variable values and verify log file structure PROG=$(basename $0) ARGS="$@" LOGDIR="$HOME/logs/" LOGFIL="$HOME/logs/$(basename $0).log" # Check for existence of log directory and writable log file if [[ -d ${LOGDIR} ]] ;then : else echo -e "\n${0}: Log directory $LOGDIR does not exist." >&2 exit 2 fi if [[ -w ${LOGFIL} ]] ;then : else echo -e "\n${0}: Log file ${LOGFIL} does not exist or is not writeable." >&2 exit 3 fi echo -e "\n${PROG}: Working. Please standby ..." >&2 # Display assurance message # Enter date into logfile DATSTAMP() { echo -e "\nOOOO- $ARGS -OOOO \c" >>$LOGFIL # Blank line separator in log file $(/bin/date '+%_A, %B %-d, %Y %H%M %Z'\)>>$LOGFIL) return 0 } # Test package installation before continuing apt-get -s install $@ 2>&1 >/dev/null; EXSTAT=$? # Test for success: 100=Unable to locate package; 0=Already newest version # Get the package case $EXSTAT in # 1=fail; 100=Unable to locate package(S) 0) echo -e "\nInstall $@ [y/N]? \c" read REPLY [[ ${REPLY} == [yY] ]] && DATSTAMP # apt-get -s install $@ 2>&1 |tee -a $LOGFIL ;; # DEBUG Install package(s) apt-get install $@ 2>&1 |tee -a $LOGFIL ;; # DEBUG Install package(s) "100") DATSTAMP;echo -e "\nUnable to locate package(s) $@"|tee -a $LOGFIL ; exit 100 ;; # Log event *) echo "EXTSTAT = $EXTSTAT";echo -e "\n${0}: Package install failure (${?}).";exit 5 ;; # Report failure with exit code esac exit ----------------------------------------------------------------------- You'll notice that these scripts write log files of the output of their 'apt' commands in a 'logs' subdirectory under your $HOME directory, so you'll need to 'mkdir $HOME/logs' before using the scripts, if you want to keep logs. This can be useful when the output scrolls too fast to read, and as a record of what you've done. Finally, I put the name of this file '.fun' in my '$ENV' file so that it adds a few useful functions to my environment. The 'd' function can be useful for navigating convoluted directory structures. ----------------------------------------------------------------------- cls(){ tput clear cd tty } u(){ cd .. } d() { if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then echo "$FUNCNAME: ksh only";return 1 fi FIGNORE= # ksh93 equivalent to bash shopt -s dotglob if [ ${#} -gt 0 ] ;then # Only one command line argument accepted cd -- "$1" && return 0 fi if [ `ls -AF1|grep /|wc -l` -eq 1 ] ;then # cd if only one subdirectory cd -- `ls -AF1|grep /` && return 0 fi destdir=$( while :; do subdirs=( ~(N)*/ ) # ksh93 equivalent to subdirs=( */ ) with shopt -s nullglob (( ${#subdirs[@]} > 2 )) || break # . and .. are two entries echo -e "\n\t\tSubdirectories below ${PWD}: \n" >&2 for idx in "${!subdirs[@]}"; do printf '%d) %q\n' "$idx" "${subdirs[$idx]%/}" >&2 done printf '\nSelect a subdirectory: ' >&2 read -r if [[ $REPLY ]]; then cd -- "${subdirs[$REPLY]}" || break # Continue to loop through subdirectories after cding else break fi done printf '%s\n' "$PWD" ) [[ $destdir ]] && cd -- "$destdir" && return 0 } f(){ echo -e "You have these functions in your environment:\n" typeset +f echo } alias rm="rm -i" alias cp="cp -i" alias mv="mv -i" alias ls="ls --color" alias date="/bin/date '+%_A, %B %-d, %Y %H%M %Z'" ----------------------------------------------------------------------- Of course, you'll have to enable execute permissions on these script files before you will be able to run them: chmod 755 apt.sh show.sh get.sh Have fun, and if you improve my scripts, please e-mail a copy to me: LDighera@att.net Best regards, Larry WB6BBB PS: I was chatting with a fellow on 40-meters the other day, and happened to mention that this pandemic means "Bye Bye Boomer," and cleaver fellow, he said that made a good mnemonic for my call. :-)
|
|
Re: CAT Control Options
John, I realize I'm coming into this late, but absolutely have never had a problem with FTDI USB cables - Prolific was always hit or miss. For many years now have purchased FTDI cables from Mark KJ6ZWL (BlueMax49ers on eBay), have enjoyed excellent response time and not a single failure yet. https://www.ebay.com/usr/bluemax49ers?_trksid=p2047675.l2559
|
|
Re: Tnc-x PI
John G8BPQ
Unfortunately that instruction is also now out of date.
toggle quoted messageShow quoted text
The correct way is now to use raspi-config Interfacing Options/Serial to disable login on the serial port and enable the port. 73, John G8BBPQ
On 24/06/2020 05:55, Don Poaps wrote:
|
|
Re: Tnc-x PI
Tim I finally see what you meant by Note Note added 12/4/2018: Some individuals have reported that there is a problem
with the November, 2018 revision of Raspbian that results in the serial port not
being accessible. You would notice this, for example, if you run pitnc_getparams
and you keep getting “retrying…” instead of the menu. In this case you need to edit
the config.txt file in the /boot/ directory. You can do this by running the following
from the command line:
sudo leafpad /boot/config.txt
Add the following line at the bottom of this file:
dtoverlay=pi3-miniuart-bt
This problem seems to be fixed with more recent versions of the Stretch version of
Raspian. Thank You. I thought Buster would have fixed that issue. 73 Don va7dgp/va7qu
|
|
Re: HamPi 1.0 Released!
chuck gelm <rpi4ham@...>
On 6/20/20 12:23 PM, Dave Slotter, W3DJS wrote:
A couple of thoughts. First, what BitTorrent client are you running? Can you try using the main BitTorrent client?Hi, Dave: I am baffled. It worked. Just tried again and it worked. I did a 'diff' on your recent attachment and the original. They are identical. Thanks for this. FirstL I am using Linux, program is 'transmission-gtk 2.92'. I have no clue what a 'main BitTorrent client' is. 73, Chuck
|
|
Re: Tnc-x PI
The Red light is not steady. It's Off Thank You
On Tue, Jun 23, 2020 at 4:06 PM Mark Griffith via groups.io <mdgriffith2003=yahoo.com@groups.io> wrote:
|
|
Re: GPS install
jrreid_24@...
I'll add I didn't realize this issue was on HamPi. That makes remote digi extremely difficult if your GPS can't provide a clock. Very disappointing. Hope more users than Tim are trying to figure this out or have figured it out. It's a no go for me if I can't use the GPS dongle. Just gave to stick with the old 2.0 as I'm not savvy enough to figure it out.
Thanks for all your hard work Dave. I'm running your 2.0 so since it ain't broke I'll hang on to it for now.
|
|
2400 baud with Yeasu/Vertex FTL-1011
The Yeasu/Vertex FTL-1011 vhf-lo (6m) (and probably the 2011, 7011 radios for 2m, 70cm) seem to work with 2400 baud. They aren’t quite as noise immune on 2400 as on 1200 but the 6m version is really cheap! https://www.ebay.com/itm/Vertex-FTL-1011-VHF-FM-Transceiver-FREE-SHIPPING/282346444832. They do 35watts @51mhz and easily tune to the 1.5mhz of the 6m band. Some of them work higher in 6m band.
toggle quoted messageShow quoted text
Tadd — KA2DEW
|
|
Re: TV HDMI
#pi
Chuck M
If my senioritis isn't acting up, remember making the changes in the config file re HDMI setup. Will check again and also check the other item mentioned re TV setup. Tried several different cables, TVs, and monitors before buying the booster. having no problems with my Pi 4B or an older Pi 2 that controls my 3D printer. Just the Pi 3B. Chuck KD9DVB
On Tuesday, June 23, 2020, 6:33:24 PM EDT, N5XMT <dacooley@...> wrote:
Shouldn't need it. You can boost the HDMI signal out with a single command in the /boot/config.txt file
|
|