[chirp_devel] Patch for UV5R driver to fix communication on Ubuntu 16.04 with pl2303-based cables (fixes #4165)

Adam Novak
Wed Oct 26 21:53:34 PDT 2016


Baofeng shipped me an ostensibly pl2303-based programming cable with
my UV-82, which I successfully used to program my radio with CHIRP on
Ubuntu about two years ago.

Today, I am now on Ubuntu 16.04, and I couldn't get CHIRP to talk to
the same radio over the same cable. It turns out that newer Ubntu
versions ship a driver for the pl2303 that holds DTR low on the serial
side (at least until the port is opened), and this puts the radio into
transmit mode. The radio needs a little time to come out of it before
it can talk to CHIRP, but CHIRP forges ahead with its commands as soon
as it opens the port.

It's not crazy behavior on the part of the Ubuntu driver; DTR high
means the computer is ready to talk to the device, and if the port is
closed the computer is probably not ready to talk to the device. So I
think it's appropriate to patch CHIRP rather than try and change the
behavior on the LInux side.

This patch explicitly sets DTR high, and waits a bit, before trying to
talk to the radio. I'm patching the UV5R driver, which gets used for
the UV-82. This fixes issue #4165, which I reported so I could send in
this patch. I have successfully used this patch to program my radio
with CHIRP.

If there are any other radios that misbehave when DTR is low, and any
other cables in common use based on this chip, it may make sense to
patch those radio drivers as well.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setdtr.patch
Type: text/x-patch
Size: 1597 bytes
Desc: not available
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20161026/95d6b885/attachment-0001.bin 


More information about the chirp_devel mailing list