Page 1 of 1

Update Chirp

Posted: Fri Nov 18, 2022 4:24 pm
by TasogareNoOkami
Chirp is built on a regular basis (supposedly nightly) and often adds new radio models or better support for an existing model.

The version in the repos is two years old.

Chirp is the most common tool for programming radios via the audio cable (which some cheap or older models can only be programmed this way).
While primarily used for Amateur Radio the programming tool itself just manages configurations.

https://chirp.danplanet.com/projects/chirp/wiki/Home

Re: Update Chirp

Posted: Fri Nov 18, 2022 6:16 pm
by Stevo
I'll take a look at it.

20221106 is in upstream Debian.

Re: Update Chirp

Posted: Fri Nov 18, 2022 6:19 pm
by BV206
The best thing to do is download the flatpak file from their web site and manually install it.
https://trac.chirp.danplanet.com/chirp_daily/LATEST

The .deb/repo version requires some outdated non-supported libraries that require hoop jumping to get to work on Linux.

It might also be easier to use the Windows version via WINE but I don't know if that works on the current versions of MX/Debian.

Re: Update Chirp

Posted: Fri Nov 18, 2022 6:21 pm
by BV206
Stevo wrote: Fri Nov 18, 2022 6:16 pm 20221106 is in upstream Debian.
Wow. They must have fixed something then.

Re: Update Chirp

Posted: Fri Nov 18, 2022 6:38 pm
by Stevo
Yes, just recently:

(here's my backports hot off the computer: https://drive.google.com/file/d/1PgZGVL ... share_link)

Code: Select all

chirp (1:20221106+py3-1) unstable; urgency=medium

  [ Debian Janitor ]
  * Bump debhelper from old 12 to 13.
  * Set upstream metadata fields: Repository.
  * Update standards version to 4.6.0, no changes needed.

  [ Christoph Berg ]
  * New upstream version 20221106+py3.
  * Switch upstream to github. (Closes: #1012538)

 -- Christoph Berg <myon@debian.org>  Tue, 08 Nov 2022 12:03:58 +0100

chirp (1:20200227+py3+20200213-4) unstable; urgency=medium

  [ Paul Tagliamonte ]
  * Team Upload.
  * Pull in patch set from https://github.com/atpage/chirp - this fork fixes
    a significant amount of bugs from the py3 branch that we havn't got to yet.

 -- Dave Hibberd <d@vehibberd.com>  Sat, 20 Mar 2021 22:43:37 +0000

Re: Update Chirp

Posted: Fri Nov 25, 2022 4:57 pm
by TasogareNoOkami
BV206 wrote: Fri Nov 18, 2022 6:19 pm The best thing to do is download the flatpak file from their web site and manually install it.
https://trac.chirp.danplanet.com/chirp_daily/LATEST

The .deb/repo version requires some outdated non-supported libraries that require hoop jumping to get to work on Linux.

It might also be easier to use the Windows version via WINE but I don't know if that works on the current versions of MX/Debian.
I've never had a problem with the tar balls on the dan planet site.
But I installed the needed serial port and xml support packages some time ago so it never was an issue for me.

If some people need the flatpacks, whatever, the tar balls work fine (that is until I see that it is still a python2 script; python3 has a lot of complaints)

[Okay I see that python3 support is a bit of an issue; but I don't see where the chirp-py3 version is available]

Re: Update Chirp

Posted: Fri Nov 25, 2022 5:13 pm
by TasogareNoOkami
Stevo wrote: Fri Nov 18, 2022 6:38 pm

Code: Select all

chirp (1:20221106+py3-1) unstable; urgency=medium

  [ Debian Janitor ]
  * Bump debhelper from old 12 to 13.
  * Set upstream metadata fields: Repository.
  * Update standards version to 4.6.0, no changes needed.

  [ Christoph Berg ]
  * New upstream version 20221106+py3.
  * Switch upstream to github. (Closes: #1012538)

Wow they only just now switched to the github site that has been around since 2012 ?

I mean I have been following the dan planet site for daily builds and didn't know about the github site (it isn't listed on the dan planet site) but still ?

I'll have to check the python3 fork and see if that works better.

Re: Update Chirp

Posted: Fri Nov 25, 2022 5:21 pm
by Stevo
The python3 fork is what we had in the main MX 21 repo, and has now been updated.

Give it a try!

Re: Update Chirp

Posted: Fri Nov 25, 2022 5:27 pm
by TasogareNoOkami
Stevo wrote: Fri Nov 18, 2022 6:38 pm Yes, just recently:

(here's my backports hot off the computer: https://drive.google.com/file/d/1PgZGVL ... share_link)

Code: Select all

  [ Paul Tagliamonte ]
  * Team Upload.
  * Pull in patch set from https://github.com/atpage/chirp - this fork fixes
    a significant amount of bugs from the py3 branch that we havn't got to yet.
I don't know if I trust that fork.

A) it isn't forked from the official project
B) describes the program as a CLI for programming radios which it is not.
C) uses an old mercurial chirp project from another project (d-rats)

Not quite sure why debian pulled that one in ?

I am going to look at steve's archive later

Re: Update Chirp

Posted: Fri Nov 25, 2022 5:29 pm
by TasogareNoOkami
Stevo wrote: Fri Nov 25, 2022 5:21 pm The python3 fork is what we had in the main MX 21 repo, and has now been updated.

Give it a try!
I will later.

I like the chirp program and hope it is continued to be updated.

It is the number one program most hams are referred to whenever someone asks what to use to program their radios.

Re: Update Chirp

Posted: Sat Nov 26, 2022 7:58 pm
by Stevo
The python3 version is the only one that Debian is using. You could look at its bug reports there to see if there are any.

How do you know the version you have now isn't the python3 version? From what I can see on repology, most if not all distros are using that one.

Re: Update Chirp

Posted: Mon Dec 05, 2022 2:01 pm
by TasogareNoOkami
Stevo wrote: Sat Nov 26, 2022 7:58 pm The python3 version is the only one that Debian is using. You could look at its bug reports there to see if there are any.

How do you know the version you have now isn't the python3 version? From what I can see on repology, most if not all distros are using that one.
I assume you are addressing me ?
(I finally found my programming cable and got around to this.)
I also do not know what repology is ?
(I think I found it and I wouldn't use that as evidence of 'most if not all' uses python3.
Only nine distros on that list do and only in the most recent distro release alot of them being 2021.
https://repology.org/project/chirp/versions)

The original project site at danplanet (https://chirp.danplanet.com/projects/ch ... i/Download) still uses python2 in their scripts (the tarball package).

The python3 variant is found in various different distros that update the package to python3 syntax.

Now that modern distros have switched to python3 the original scripts from danplanet don't work.
Normally I use the repo packages but I download newer versions from danplanet.

Anyway I never came across the github site before and was not aware of it until you posted an excerpt from the changelog.

In MX19, I guess I had both python2 and python3 installed.
I guess the 'in situ' update to MX21 removed python2 and I didn't really pay much attention until I started playing with chirp again.

Note that I do not use python myself and chirp is the only python based program I have that I am aware of; so this never really has
been an issue for me since any other python program installed by synaptic because of dependencies just works because I am not
using them myself. Chirp is the only program I use manually cause repo versions are behind and I only need it to program the radio.
I haven't used in a while because I haven't needed to reprogram my radio.

I have tried using the chirp package you uploaded and have some issues.
(I am using the original repo package from your archive because I am not replacing the installed version just yet)

First, I can't run chirpw script; it has too many errors it can't recover from. (It still seems to be python2 based)
Second, I can run chirpwx.py instead. But it fails to communicate with the radio (Baofeng UV-5R).

When I run chirpw

Code: Select all

$> python3 ./chirpw
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ft1d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ap510: invalid syntax (ap510.py, line 383)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ftm3200d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/wouxun: invalid syntax (wouxun.py, line 277)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/bj9900: invalid syntax (bj9900.py, line 181)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/puxing_px888k: can only concatenate list (not "range") to list
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/lt725uv: invalid syntax (lt725uv.py, line 1550)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/th_uv3r: invalid syntax (wouxun.py, line 277)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ft450d: invalid syntax (ft450d.py, line 503)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ftm7250d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/rfinder: invalid syntax (rfinder.py, line 239)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ft2d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/puxing: invalid syntax (puxing.py, line 50)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/th_uv3r25: invalid syntax (wouxun.py, line 277)
Traceback (most recent call last):
  File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/./chirpw", line 142, in <module>
    from chirp.ui import mainapp
  File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/ui/mainapp.py", line 1437
    except errors.RadioError, e::
                            ^
SyntaxError: invalid syntax
This is when I run chirpwx.py
And I attempt to download from the Baofeng UV-5R via /dev/ttyUSB1

Code: Select all

python3 ./chirpwx.py
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ft1d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ap510: invalid syntax (ap510.py, line 383)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ftm3200d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/wouxun: invalid syntax (wouxun.py, line 277)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/bj9900: invalid syntax (bj9900.py, line 181)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/puxing_px888k: can only concatenate list (not "range") to list
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/lt725uv: invalid syntax (lt725uv.py, line 1550)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/th_uv3r: invalid syntax (wouxun.py, line 277)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ft450d: invalid syntax (ft450d.py, line 503)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ftm7250d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/rfinder: invalid syntax (rfinder.py, line 239)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/ft2d: invalid syntax (ft1d.py, line 1893)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/puxing: invalid syntax (puxing.py, line 50)
Failed to import /media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/th_uv3r25: invalid syntax (wouxun.py, line 277)
ERROR: uv5r._ident_radio: Radio did not respond
ERROR: uv5r._ident_radio: Radio did not respond
ERROR: Failed to clone: Radio did not respond
Traceback (most recent call last):
  File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/wxui/clone.py", line 33, in run
    self._fn()
  File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 855, in sync_in
    self._mmap = _do_download(self)
  File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 555, in _do_download
    data = _ident_radio(radio)
  File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 550, in _ident_radio
    raise error
  File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 527, in _ident_radio
    data = _do_ident(radio, magic)
  File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 422, in _do_ident
    raise errors.RadioError("Radio did not respond")
chirp.errors.RadioError: Radio did not respond
During a subsequent test (and all following tests) I got this error:

Code: Select all

ERROR: Failed to clone: Failed to communicate with radio: a bytes-like object is required, not 'str'
Traceback (most recent call last):
  File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 855, in sync_in
    self._mmap = _do_download(self)
  File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 575, in _do_download
    elif "\x20" * 14 in radio_version:
TypeError: a bytes-like object is required, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/wxui/clone.py", line 33, in run
    self._fn()
  File "/media/Data/05_Software/chirp-20221106/mx21/chirp_20221106+py3.orig/chirp/drivers/uv5r.py", line 859, in sync_in
    raise errors.RadioError("Failed to communicate with radio: %s" % e)
chirp.errors.RadioError: Failed to communicate with radio: a bytes-like object is required, not 'str'
After this error my radio has been left in a weird state.
The CTCSS is on and the radio is transmitting (mine is set for an amber display when transmitting, the screen
is orange after this error).

python three in use is:

Code: Select all

python3 -VV
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110]
Requirements according to requirements.txt are installed:
six (I have ... python3-six 1.16.0-2)
wxPython (python3-wxgtk4.0 4.0.7dfsg-10)
pyserial (python3-serial 3.5~b0-1)
future (python3-future 0.18.2-5)
requests (python3-requests 2.25.1)

Re: Update Chirp

Posted: Wed Jul 19, 2023 9:39 pm
by kd4e
Any updates re. the completely new version of CHIRP called chirp-next, please?

https://trac.chirp.danplanet.com/chirp_ ... -20230719/

https://chirp.danplanet.com/projects/ch ... irpOnLinux

Thanks!

Re: Update Chirp

Posted: Thu Jul 20, 2023 10:17 am
by BV206
The easy way to install the latest version of Chirp on MX or Debian now is to use pip or pipx to install the current chirp-next .whl (python wheel) file from their web site. As far as I can tell there is no longer any current .deb repo package.

Re: Update Chirp

Posted: Thu Jul 20, 2023 10:45 am
by kd4e
BV206 wrote: Thu Jul 20, 2023 10:17 am The easy way to install the latest version of Chirp on MX or Debian now is to use pip or pipx to install the current chirp-next .whl (python wheel) file from their web site. As far as I can tell there is no longer any current .deb repo package.
I'm unfamiliar with "pip" or "pipx". I take it that "pip" is command line and "pipx" includes a UI?

Will they handle all dependencies properly, for MX, and is there any systemd dependency (I have a non systemd install).

Thanks!

Re: Update Chirp

Posted: Thu Jul 20, 2023 12:02 pm
by BV206
kd4e wrote: Thu Jul 20, 2023 10:45 am I'm unfamiliar with "pip" or "pipx". I take it that "pip" is command line and "pipx" includes a UI?
No. They are utilities for python applications.

pip is the command for the python3-pip package:
Description: Python package installer
pip is the Python package installer. It integrates with virtualenv, doesn't
do partial installs, can save package state for replaying, can install from
non-egg sources, and can install from version control repositories.


pipx is another package:
Description: execute binaries from Python packages in isolated environments
pipx allows you to...
* Run the latest version of a CLI application from a package
in a temporary virtual environment,
leaving your system untouched after it finishes.
* Install packages to isolated virtual environments,
while globally exposing their CLI applications
so you can run them from anywhere.
* Easily list, upgrade, and uninstall packages
that were installed with pipx.


Both are in the standard Debian 12 (MX 23) repos.
On Debian 11 (MX 21) python3-pip is in the standard Debian 11 repo and pipx is in the Backports repo.

I know very little about about Python, pip and pipx. I just read and follwed the instructions on the Chirp web site.

Re: Update Chirp

Posted: Thu Jul 20, 2023 12:10 pm
by kd4e
BV206 wrote: Thu Jul 20, 2023 12:02 pm I know very little about about Python, pip and pipx. I just read and follwed the instructions on the Chirp web site.
OK, cool.

I've learned, the hard way, not to trust anything that doesn't originate in a MX Linux repository, or that's approved by a maintainer.

In the past I messed up my install by loading stuff without asking first.

Thanks.

Re: Update Chirp

Posted: Thu Jul 20, 2023 2:17 pm
by BV206
kd4e wrote: Thu Jul 20, 2023 10:45 am Will they handle all dependencies properly, for MX, and is there any systemd dependency (I have a non systemd install).
I missed this part. When you install python3-pip, and optionally pipx, they will install any required dependencies like any other package you install from a repo or from a .deb file.

The Chirp python package runs on MX 21 and 23 without systemd. In this case it doesn't appear that systemd is required. I don't know if that would be true for other python stuff.
kd4e wrote: Thu Jul 20, 2023 10:45 am I've learned, the hard way, not to trust anything that doesn't originate in a MX Linux repository, or that's approved by a maintainer.

In the past I messed up my install by loading stuff without asking first.
When you install Chirp with pip or pipx you don't use sudo. It creates some directories in your ~/.local directory and as far as I can tell it puts all the required files there and doesn't touch /usr or /opt or any other root level system directories. I'm not sure if it makes a .desktop menu file for Chirp because I already had a custom one. I don't think it can break your system and I don't know if that's true for other things installed by pip/pipx.

Re: Update Chirp

Posted: Thu Jul 20, 2023 2:27 pm
by CharlesV
It is a really good idea to at least create a timeshift snapshot before anything your unsure about. (and frankly, its just a good idea to have one scheduled.)

I have found a great thing is to have timeshift do a snapshot daily, late in the evening when I am off my machines... then I can safely do pretty much anything the next day knowing I have a fall back :-)

Re: Update Chirp

Posted: Thu Jul 20, 2023 4:46 pm
by kd4e
CharlesV wrote: Thu Jul 20, 2023 2:27 pm It is a really good idea to at least create a timeshift snapshot before anything your unsure about. (and frankly, its just a good idea to have one scheduled.)

I have found a great thing is to have timeshift do a snapshot daily, late in the evening when I am off my machines... then I can safely do pretty much anything the next day knowing I have a fall back :-)
Excellent point! As a former systems manager I should know better than to slack on backups ...

Re: Update Chirp

Posted: Thu Jul 20, 2023 4:47 pm
by kd4e
BV206 wrote: Thu Jul 20, 2023 2:17 pm When you install Chirp with pip or pipx you don't use sudo. It creates some directories in your ~/.local directory and as far as I can tell it puts all the required files there and doesn't touch /usr or /opt or any other root level system directories. I'm not sure if it makes a .desktop menu file for Chirp because I already had a custom one. I don't think it can break your system and I don't know if that's true for other things installed by pip/pipx.
Cool, thanks!

Re: Update Chirp

Posted: Fri Jul 21, 2023 1:05 pm
by kd4e
OK, snapshot done, python3-pip installed.

Note 1: It did not recognize python3-pipx, so I could not install that.

Note 2: The Chirp instructions appear to insist on pipx "You must use pipx to install chirp" rather than pip. Am I misunderstanding it?
2.2 For distros with the managed flag (Ubuntu 23.04, Debian 11 and later)

You must use pipx to install chirp separated from the system python environment. However, because some libraries from the system environment are required (packages from above) you must use the flag to enable their use. Use of the wheel download is recommended.

Code: Select all

sudo apt install -y pipx
pipx install --system-site-packages ./chirp-20230509-py3-none-any.whl

Re: Update Chirp

Posted: Fri Jul 21, 2023 2:27 pm
by BV206
If you are using MX 21 (Debian 11) You have to install pipx from the backports repository and the package name is just pipx.

You may want to get the latest Chirp version from https://trac.chirp.danplanet.com/chirp_next/ instead of using a file from May.

Re: Update Chirp

Posted: Fri Jul 21, 2023 4:18 pm
by kd4e
BV206 wrote: Fri Jul 21, 2023 2:27 pm If you are using MX 21 (Debian 11) You have to install pipx from the backports repository and the package name is just pipx.

You may want to get the latest Chirp version from https://trac.chirp.danplanet.com/chirp_next/ instead of using a file from May.
I'm on MX 21.3

OK re. pipx from Backports ... thanks!

I have this one downloaded and ready to load

Code: Select all

chirp-20230719-py3-none-any.whl

Re: Update Chirp

Posted: Fri Jul 21, 2023 5:04 pm
by kd4e
Everything is working!

Thanks for the assist!